/* Generated by Cython 3.2.1 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "define_macros": [
            [
                "NPY_NO_DEPRECATED_API",
                "NPY_1_7_API_VERSION"
            ]
        ],
        "depends": [],
        "extra_compile_args": [
            "-Wno-unreachable-code"
        ],
        "include_dirs": [
            "/tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/_core/include"
        ],
        "name": "cytimes.pddt",
        "sources": [
            "src/cytimes/pddt.py"
        ]
    },
    "module_name": "cytimes.pddt"
}
END: Cython Metadata */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
/* InitLimitedAPI */
#if defined(Py_LIMITED_API)
  #if !defined(CYTHON_LIMITED_API)
  #define CYTHON_LIMITED_API 1
  #endif
#elif defined(CYTHON_LIMITED_API)
  #ifdef _MSC_VER
  #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.")
  #else
  #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.
  #endif
#endif

#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x03080000
    #error Cython requires Python 3.8+.
#else
#define __PYX_ABI_VERSION "3_2_1"
#define CYTHON_HEX_VERSION 0x030201F0
#define CYTHON_FUTURE_DIVISION 1
/* CModulePreamble */
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(_WIN32) && !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
#define __PYX_COMMA ,
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
#if defined(GRAALVM_PYTHON)
  /* For very preliminary testing purposes. Most variables are set the same as PyPy.
     The existence of this section does not imply that anything works or is even tested */
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 1
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_ASSUME_SAFE_SIZE
  #define CYTHON_ASSUME_SAFE_SIZE 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_AM_SEND
  #define CYTHON_USE_AM_SEND 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 1
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#elif defined(PYPY_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 1
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #ifndef CYTHON_ASSUME_SAFE_SIZE
    #define CYTHON_ASSUME_SAFE_SIZE 1
  #endif
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #if PY_VERSION_HEX < 0x03090000
    #undef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00)
  #endif
  #undef CYTHON_USE_AM_SEND
  #define CYTHON_USE_AM_SEND 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100)
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#elif defined(CYTHON_LIMITED_API)
  #ifdef Py_LIMITED_API
    #undef __PYX_LIMITED_VERSION_HEX
    #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
  #endif
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 1
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 1
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #endif
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #endif
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_ASSUME_SAFE_SIZE
  #define CYTHON_ASSUME_SAFE_SIZE 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #endif
  #ifndef CYTHON_USE_AM_SEND
    #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000)
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #ifndef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 1
  #endif
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #ifdef Py_GIL_DISABLED
    #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1
  #else
    #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #endif
  #if PY_VERSION_HEX < 0x030A0000
    #undef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #elif !defined(CYTHON_USE_TYPE_SLOTS)
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #ifndef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLIST_INTERNALS)
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
  #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_ASSUME_SAFE_SIZE
    #define CYTHON_ASSUME_SAFE_SIZE 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_FAST_GIL
    #define CYTHON_FAST_GIL 0
  #elif !defined(CYTHON_FAST_GIL)
    #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6)
  #endif
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #ifndef CYTHON_USE_SYS_MONITORING
    #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #ifndef CYTHON_USE_AM_SEND
    #define CYTHON_USE_AM_SEND 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS 0
  #elif !defined(CYTHON_USE_DICT_VERSIONS)
    #define CYTHON_USE_DICT_VERSIONS  (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE)
  #endif
  #ifndef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 1
  #endif
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
  #ifndef CYTHON_USE_FREELISTS
    #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
  #endif
  #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000
    #undef CYTHON_IMMORTAL_CONSTANTS
    #define CYTHON_IMMORTAL_CONSTANTS 0  // definitely won't work
  #elif !defined(CYTHON_IMMORTAL_CONSTANTS)
    #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
  #endif
#endif
#ifndef CYTHON_COMPRESS_STRINGS
  #define CYTHON_COMPRESS_STRINGS 1
#endif
#ifndef CYTHON_FAST_PYCCALL
#define CYTHON_FAST_PYCCALL  CYTHON_FAST_PYCALL
#endif
#ifndef CYTHON_VECTORCALL
#if CYTHON_COMPILING_IN_LIMITED_API
#define CYTHON_VECTORCALL  (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
#else
#define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL)
#endif
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(maybe_unused)
        #define CYTHON_UNUSED [[maybe_unused]]
      #endif
    #endif
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
  #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_USE_CPP_STD_MOVE
  #if defined(__cplusplus) && (\
    __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
    #define CYTHON_USE_CPP_STD_MOVE 1
  #else
    #define CYTHON_USE_CPP_STD_MOVE 0
  #endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#include <stdint.h>
typedef uintptr_t  __pyx_uintptr_t;
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(fallthrough)
        #define CYTHON_FALLTHROUGH [[fallthrough]]
      #endif
    #endif
    #ifndef CYTHON_FALLTHROUGH
      #if __has_cpp_attribute(clang::fallthrough)
        #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
      #elif __has_cpp_attribute(gnu::fallthrough)
        #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
      #endif
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif
#ifndef Py_UNREACHABLE
  #define Py_UNREACHABLE()  assert(0); abort()
#endif
#ifdef __cplusplus
  template <typename T>
  struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
  #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
#else
  #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
#endif
#if CYTHON_COMPILING_IN_PYPY == 1
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX < 0x030A0000)
#else
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX < 0x03090000)
#endif
#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))

/* CInitCode */
#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #elif 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

/* PythonCompatibility */
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
#define __Pyx_DefaultClassType PyType_Type
#if CYTHON_COMPILING_IN_LIMITED_API
    #ifndef CO_OPTIMIZED
    static int CO_OPTIMIZED;
    #endif
    #ifndef CO_NEWLOCALS
    static int CO_NEWLOCALS;
    #endif
    #ifndef CO_VARARGS
    static int CO_VARARGS;
    #endif
    #ifndef CO_VARKEYWORDS
    static int CO_VARKEYWORDS;
    #endif
    #ifndef CO_ASYNC_GENERATOR
    static int CO_ASYNC_GENERATOR;
    #endif
    #ifndef CO_GENERATOR
    static int CO_GENERATOR;
    #endif
    #ifndef CO_COROUTINE
    static int CO_COROUTINE;
    #endif
#else
    #ifndef CO_COROUTINE
      #define CO_COROUTINE 0x80
    #endif
    #ifndef CO_ASYNC_GENERATOR
      #define CO_ASYNC_GENERATOR 0x200
    #endif
#endif
static int __Pyx_init_co_variables(void);
#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
  #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
#else
  #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
  #define __Pyx_Py_Is(x, y)  Py_Is(x, y)
#else
  #define __Pyx_Py_Is(x, y) ((x) == (y))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
  #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
#else
  #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
  #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
#else
  #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
  #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
#else
  #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
#endif
#define __Pyx_NoneAsNull(obj)  (__Pyx_Py_IsNone(obj) ? NULL : (obj))
#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
#else
  #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef Py_TPFLAGS_SEQUENCE
  #define Py_TPFLAGS_SEQUENCE 0
#endif
#ifndef Py_TPFLAGS_MAPPING
  #define Py_TPFLAGS_MAPPING 0
#endif
#ifndef Py_TPFLAGS_IMMUTABLETYPE
  #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8)
#endif
#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION
  #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7)
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#ifndef METH_FASTCALL
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #if PY_VERSION_HEX >= 0x030d00A4
  #  define __Pyx_PyCFunctionFast PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
  #else
  #  define __Pyx_PyCFunctionFast _PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
  #endif
#endif
#if CYTHON_METH_FASTCALL
  #define __Pyx_METH_FASTCALL METH_FASTCALL
  #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
  #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
#else
  #define __Pyx_METH_FASTCALL METH_VARARGS
  #define __Pyx_PyCFunction_FastCall PyCFunction
  #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
#endif
#if CYTHON_VECTORCALL
  #define __pyx_vectorcallfunc vectorcallfunc
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  PY_VECTORCALL_ARGUMENTS_OFFSET
  #define __Pyx_PyVectorcall_NARGS(n)  PyVectorcall_NARGS((size_t)(n))
#else
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  0
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(n))
#endif
#if PY_VERSION_HEX >= 0x030900B1
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_CheckExact(func)
#else
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_Check(func)
#endif
#define __Pyx_CyOrPyCFunction_Check(func)  PyCFunction_Check(func)
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  (((PyCFunctionObject*)(func))->m_ml->ml_meth)
#elif !CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  PyCFunction_GET_FUNCTION(func)
#endif
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FLAGS(func)  (((PyCFunctionObject*)(func))->m_ml->ml_flags)
static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
    return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
}
#endif
static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) {
#if CYTHON_COMPILING_IN_LIMITED_API
    return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
#else
    return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
#endif
}
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCFunction(func, cfunc)
#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  ((void)m, PyType_FromSpecWithBases(s, b))
  typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
#else
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  PyType_FromModuleAndSpec(m, s, b)
  #define __Pyx_PyCMethod  PyCMethod
#endif
#ifndef METH_METHOD
  #define METH_METHOD 0x200
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno))
#elif CYTHON_COMPILING_IN_GRAAL
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno))
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyThreadState_Current PyThreadState_Get()
#elif !CYTHON_FAST_THREAD_STATE
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x030d00A1
  #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#endif
#if CYTHON_USE_MODULE_STATE
static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op)
{
    void *result;
    result = PyModule_GetState(op);
    if (!result)
        Py_FatalError("Couldn't find the module state");
    return result;
}
#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o)
#else
#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global)
#endif
#define __Pyx_PyObject_GetSlot(obj, name, func_ctype)  __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype)
#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype)
#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((type)->name)
  #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype)
  #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL)
  #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype)
#else
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((func_ctype) PyType_GetSlot((type), Py_##name))
  #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\
    ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\
     (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\
     __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL)
  #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype)
  #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype)
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
#define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStrWithError(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
    PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
    if (res == NULL) PyErr_Clear();
    return res;
}
#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000
#define __Pyx_PyDict_GetItemStrWithError  PyDict_GetItemWithError
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#else
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
#if CYTHON_COMPILING_IN_PYPY
    return PyDict_GetItem(dict, name);
#else
    PyDictEntry *ep;
    PyDictObject *mp = (PyDictObject*) dict;
    long hash = ((PyStringObject *) name)->ob_shash;
    assert(hash != -1);
    ep = (mp->ma_lookup)(mp, name, hash);
    if (ep == NULL) {
        return NULL;
    }
    return ep->me_value;
#endif
}
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#endif
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetFlags(tp)   (((PyTypeObject *)tp)->tp_flags)
  #define __Pyx_PyType_HasFeature(type, feature)  ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
#else
  #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
  #define __Pyx_PyType_HasFeature(type, feature)  PyType_HasFeature(type, feature)
#endif
#define __Pyx_PyObject_GetIterNextFunc(iterator)  __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc)
#if CYTHON_USE_TYPE_SPECS
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  {\
    PyTypeObject *type = Py_TYPE((PyObject*)obj);\
    assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
    PyObject_GC_Del(obj);\
    Py_DECREF(type);\
}
#else
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  PyObject_GC_Del(obj)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((void)u, 1114111U)
  #define __Pyx_PyUnicode_KIND(u)         ((void)u, (0))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)u)
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GetLength(u))
#else
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_READY(op)       (0)
  #else
    #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                                0 : _PyUnicode_Ready((PyObject *)(op)))
  #endif
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         ((int)PyUnicode_KIND(u))
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #else
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
    #else
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
    #endif
  #endif
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #if !defined(PyUnicode_DecodeUnicodeEscape)
    #define PyUnicode_DecodeUnicodeEscape(s, size, errors)  PyUnicode_Decode(s, size, "unicode_escape", errors)
  #endif
  #if !defined(PyUnicode_Contains)
    #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
  #endif
  #if !defined(PyByteArray_Check)
    #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
  #endif
  #if !defined(PyObject_Format)
    #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
  #endif
#endif
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#elif CYTHON_COMPILING_IN_CPYTHON
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#else
  #define __Pyx_PySequence_ListKeepNew(obj)  PySequence_List(obj)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        __Pyx_IS_TYPE(obj, &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
enum __Pyx_ReferenceSharing {
  __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check
  __Pyx_ReferenceSharing_OwnStrongReference,
  __Pyx_ReferenceSharing_FunctionArgument,
  __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar
};
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\
    (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\
      (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\
      (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0)))
#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1)
#else
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0)
#endif
#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
  #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
  #else
    #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i)
  #endif
#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
  #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
  #else
    #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i))
  #endif
#else
  #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i))
#endif
#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\
    __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i))
#else
  #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i)
#endif
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result)
#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
  *result = PyObject_GetItem(dict, key);
  if (*result == NULL) {
    if (PyErr_ExceptionMatches(PyExc_KeyError)) {
      PyErr_Clear();
      return 0;
    }
    return -1;
  }
  return 1;
}
#else
static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
  *result = PyDict_GetItemWithError(dict, key);
  if (*result == NULL) {
    return PyErr_Occurred() ? -1 : 0;
  }
  Py_INCREF(*result);
  return 1;
}
#endif
#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST
  #define __Pyx_VISIT_CONST(obj)  Py_VISIT(obj)
#else
  #define __Pyx_VISIT_CONST(obj)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i)
  #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i)
#else
  #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
  #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i)
  #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
  #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i)
#endif
#if CYTHON_ASSUME_SAFE_SIZE
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
  #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o)
#else
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
  #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString)
  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
#endif
#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t
#define __Pyx_PyLong_AsHash_t   __Pyx_PyIndex_AsSsize_t
#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000
    #define __Pyx_PySendResult PySendResult
#else
    typedef enum {
        PYGEN_RETURN = 0,
        PYGEN_ERROR = -1,
        PYGEN_NEXT = 1,
    } __Pyx_PySendResult;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3
  typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result);
#else
  #define __Pyx_pyiter_sendfunc sendfunc
#endif
#if !CYTHON_USE_AM_SEND
#define __PYX_HAS_PY_AM_SEND 0
#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000
#define __PYX_HAS_PY_AM_SEND 1
#else
#define __PYX_HAS_PY_AM_SEND 2  // our own backported implementation
#endif
#if __PYX_HAS_PY_AM_SEND < 2
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
#else
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
        __Pyx_pyiter_sendfunc am_send;
    } __Pyx_PyAsyncMethodsStruct;
    #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s))
#endif
#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0
    #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21)
#else
    #define __Pyx_TPFLAGS_HAVE_AM_SEND (0)
#endif
#if PY_VERSION_HEX >= 0x03090000
#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get()
#else
#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp
#endif
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000
#ifdef __cplusplus
extern "C"
#endif
PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize);
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) {
    int value;
    PyObject *py_value = PyObject_GetAttrString(inspect, name);
    if (!py_value) return 0;
    value = (int) PyLong_AsLong(py_value);
    Py_DECREF(py_value);
    *write_to = value;
    return value != -1 || !PyErr_Occurred();
}
static int __Pyx_init_co_variables(void) {
    PyObject *inspect;
    int result;
    inspect = PyImport_ImportModule("inspect");
    result =
#if !defined(CO_OPTIMIZED)
        __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) &&
#endif
#if !defined(CO_NEWLOCALS)
        __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) &&
#endif
#if !defined(CO_VARARGS)
        __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) &&
#endif
#if !defined(CO_VARKEYWORDS)
        __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) &&
#endif
#if !defined(CO_ASYNC_GENERATOR)
        __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) &&
#endif
#if !defined(CO_GENERATOR)
        __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) &&
#endif
#if !defined(CO_COROUTINE)
        __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) &&
#endif
        1;
    Py_DECREF(inspect);
    return result ? 0 : -1;
}
#else
static int __Pyx_init_co_variables(void) {
    return 0;  // It's a limited API-only feature
}
#endif

/* MathInitCode */
#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
  #ifndef _USE_MATH_DEFINES
    #define _USE_MATH_DEFINES
  #endif
#endif
#include <math.h>
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0
#endif
#ifndef CYTHON_CLINE_IN_TRACEBACK
#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#endif
#if CYTHON_CLINE_IN_TRACEBACK
#define __PYX_MARK_ERR_POS(f_index, lineno)  { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; }
#else
#define __PYX_MARK_ERR_POS(f_index, lineno)  { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; }
#endif
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

#ifdef CYTHON_EXTERN_C
    #undef __PYX_EXTERN_C
    #define __PYX_EXTERN_C CYTHON_EXTERN_C
#elif defined(__PYX_EXTERN_C)
    #ifdef _MSC_VER
    #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
    #else
    #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
    #endif
#else
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__cytimes__pddt
#define __PYX_HAVE_API__cytimes__pddt
/* Early includes */
#include <string.h>
#include <stdio.h>

    /* Using NumPy API declarations from "numpy/__init__.cython-30.pxd" */
    
#include "numpy/arrayobject.h"
#include "numpy/ndarrayobject.h"
#include "numpy/ndarraytypes.h"
#include "numpy/arrayscalars.h"
#include "numpy/ufuncobject.h"

    #if PY_MAJOR_VERSION >= 3
      #define __Pyx_PyFloat_FromString(obj)  PyFloat_FromString(obj)
    #else
      #define __Pyx_PyFloat_FromString(obj)  PyFloat_FromString(obj, NULL)
    #endif
    
#include <stddef.h>

    #if PY_MAJOR_VERSION <= 2
    #define PyDict_GetItemWithError _PyDict_GetItemWithError
    #endif
    

    #if PY_VERSION_HEX < 0x030d0000
    static CYTHON_INLINE int __Pyx_PyWeakref_GetRef(PyObject *ref, PyObject **pobj)
    {
        PyObject *obj = PyWeakref_GetObject(ref);
        if (obj == NULL) {
            // SystemError if ref is NULL
            *pobj = NULL;
            return -1;
        }
        if (obj == Py_None) {
            *pobj = NULL;
            return 0;
        }
        Py_INCREF(obj);
        *pobj = obj;
        return 1;
    }
    #else
    #define __Pyx_PyWeakref_GetRef PyWeakref_GetRef
    #endif
    
#include "pythread.h"

    #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030600) && !defined(PyContextVar_Get)
    #define PyContextVar_Get(var, d, v)         ((d) ?             ((void)(var), Py_INCREF(d), (v)[0] = (d), 0) :             ((v)[0] = NULL, 0)         )
    #endif
    

    #if CYTHON_COMPILING_IN_LIMITED_API
    #ifdef _MSC_VER
    #pragma message ("This module uses CPython specific internals of 'datetime.datetime', which are not available in the limited API.")
    #else
    #warning This module uses CPython specific internals of 'datetime.datetime', which are not available in the limited API.
    #endif
    #endif
    
#include "datetime.h"

    #define __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold)         PyDateTimeAPI->DateTime_FromDateAndTimeAndFold(year, month, day, hour, minute, second,             microsecond, tz, fold, PyDateTimeAPI->DateTimeType)
    #define __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold)         PyDateTimeAPI->Time_FromTimeAndFold(hour, minute, second, microsecond, tz, fold, PyDateTimeAPI->TimeType)

    #define __Pyx_TimeZone_UTC PyDateTime_TimeZone_UTC
    #define __Pyx_TimeZone_FromOffsetAndName(offset, name) PyTimeZone_FromOffsetAndName(offset, name)

    /* Backport for Python < 3.10 */
    #if PY_VERSION_HEX < 0x030a00a1
        #ifndef PyDateTime_TIME_GET_TZINFO
            #define PyDateTime_TIME_GET_TZINFO(o)                 ((((PyDateTime_Time*)o)->hastzinfo) ? ((PyDateTime_Time*)o)->tzinfo : Py_None)
        #endif
        #ifndef PyDateTime_DATE_GET_TZINFO
            #define PyDateTime_DATE_GET_TZINFO(o)                 ((((PyDateTime_DateTime*)o)->hastzinfo) ? ((PyDateTime_DateTime*)o)->tzinfo : Py_None)
        #endif
    #endif
    
#include <limits.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>
#include <stdint.h>

    #if PY_VERSION_HEX >= 0x030d00b1 || defined(PyTime_t)
        #define __Pyx_PyTime_t PyTime_t
    #else
        #define __Pyx_PyTime_t _PyTime_t
    #endif

    #if PY_VERSION_HEX >= 0x030d00b1 || defined(PyTime_TimeRaw)
        static CYTHON_INLINE __Pyx_PyTime_t __Pyx_PyTime_TimeRaw(void) {
            __Pyx_PyTime_t tic;
            (void) PyTime_TimeRaw(&tic);
            return tic;
        }
    #else
        #define __Pyx_PyTime_TimeRaw()  _PyTime_GetSystemClock()
    #endif

    #if PY_VERSION_HEX >= 0x030d00b1 || defined(PyTime_MonotonicRaw)
        static CYTHON_INLINE __Pyx_PyTime_t __Pyx_PyTime_MonotonicRaw(void) {
            __Pyx_PyTime_t tic;
            (void) PyTime_MonotonicRaw(&tic);
            return tic;
        }
    #elif CYTHON_COMPILING_IN_PYPY && !defined(_PyTime_GetMonotonicClock)
        #define __Pyx_PyTime_MonotonicRaw()  _PyTime_GetSystemClock()
    #else
        #define __Pyx_PyTime_MonotonicRaw()  _PyTime_GetMonotonicClock()
    #endif

    #if PY_VERSION_HEX >= 0x030d00b1 || defined(PyTime_PerfCounterRaw)
        static CYTHON_INLINE __Pyx_PyTime_t __Pyx_PyTime_PerfCounterRaw(void) {
            __Pyx_PyTime_t tic;
            (void) PyTime_PerfCounterRaw(&tic);
            return tic;
        }
    #elif CYTHON_COMPILING_IN_PYPY && !defined(_PyTime_GetPerfCounter)
        #define __Pyx_PyTime_PerfCounterRaw()  __Pyx_PyTime_MonotonicRaw()
    #else
        #define __Pyx_PyTime_PerfCounterRaw()  _PyTime_GetPerfCounter()
    #endif

    #if PY_VERSION_HEX >= 0x030d00b1 || defined(PyTime_AsSecondsDouble)
        #define __Pyx_PyTime_AsSecondsDouble(t)  PyTime_AsSecondsDouble(t)
    #else
        #define __Pyx_PyTime_AsSecondsDouble(t)  _PyTime_AsSecondsDouble(t)
    #endif
    
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s)
#else
    #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AsString(s))
    #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s)
#endif
#define __Pyx_PyObject_AsWritableString(s)    ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#define __Pyx_PyUnicode_FromOrdinal(o)       PyUnicode_FromOrdinal((int)o)
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef)
    return Py_NewRef(obj);
#else
    Py_INCREF(obj);
    return obj;
#endif
}
static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef)
    return Py_XNewRef(obj);
#else
    Py_XINCREF(obj);
    return obj;
#endif
}
static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b);
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x)
#else
#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x)
#endif
#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x))
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_VERSION_HEX >= 0x030C00A7
  #ifndef _PyLong_SIGN_MASK
    #define _PyLong_SIGN_MASK 3
  #endif
  #ifndef _PyLong_NON_SIZE_BITS
    #define _PyLong_NON_SIZE_BITS 3
  #endif
  #define __Pyx_PyLong_Sign(x)  (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
  #define __Pyx_PyLong_IsNeg(x)  ((__Pyx_PyLong_Sign(x) & 2) != 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (!__Pyx_PyLong_IsNeg(x))
  #define __Pyx_PyLong_IsZero(x)  (__Pyx_PyLong_Sign(x) & 1)
  #define __Pyx_PyLong_IsPos(x)  (__Pyx_PyLong_Sign(x) == 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  (__Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
  #define __Pyx_PyLong_SignedDigitCount(x)\
        ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
  #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
    #define __Pyx_PyLong_IsCompact(x)     PyUnstable_Long_IsCompact((PyLongObject*) x)
    #define __Pyx_PyLong_CompactValue(x)  PyUnstable_Long_CompactValue((PyLongObject*) x)
  #else
    #define __Pyx_PyLong_IsCompact(x)     (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
    #define __Pyx_PyLong_CompactValue(x)  ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
  #endif
  typedef Py_ssize_t  __Pyx_compact_pylong;
  typedef size_t  __Pyx_compact_upylong;
  #else
  #define __Pyx_PyLong_IsNeg(x)  (Py_SIZE(x) < 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (Py_SIZE(x) >= 0)
  #define __Pyx_PyLong_IsZero(x)  (Py_SIZE(x) == 0)
  #define __Pyx_PyLong_IsPos(x)  (Py_SIZE(x) > 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  __Pyx_sst_abs(Py_SIZE(x))
  #define __Pyx_PyLong_SignedDigitCount(x)  Py_SIZE(x)
  #define __Pyx_PyLong_IsCompact(x)  (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
  #define __Pyx_PyLong_CompactValue(x)\
        ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
  typedef sdigit  __Pyx_compact_pylong;
  typedef digit  __Pyx_compact_upylong;
  #endif
  #if PY_VERSION_HEX >= 0x030C00A5
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->long_value.ob_digit)
  #else
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->ob_digit)
  #endif
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL)
#else
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
/* PretendToInitialize */
#ifdef __cplusplus
#if __cplusplus > 201103L
#include <type_traits>
#endif
template <typename T>
static void __Pyx_pretend_to_initialize(T* ptr) {
#if __cplusplus > 201103L
    if ((std::is_trivially_default_constructible<T>::value))
#endif
        *ptr = T();
    (void)ptr;
}
#else
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
#endif


#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_m = NULL;
#endif
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * const __pyx_cfilenm = __FILE__;
static const char *__pyx_filename;

/* Header.proto */
#if !defined(CYTHON_CCOMPLEX)
  #if defined(__cplusplus)
    #define CYTHON_CCOMPLEX 1
  #elif (defined(_Complex_I) && !defined(_MSC_VER)) || ((defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_COMPLEX__) && !defined(_MSC_VER))
    #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

/* #### Code section: filename_table ### */

static const char* const __pyx_f[] = {
  "src/cytimes/pddt.py",
  "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd",
  "cpython/contextvars.pxd",
  "datetime.pxd",
  "cpython/time.pxd",
  "src/cytimes/utils.pxd",
  "src/cytimes/parser.pxd",
  "cpython/type.pxd",
  "cpython/bool.pxd",
  "cpython/complex.pxd",
};
/* #### Code section: utility_code_proto_before_types ### */
/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

/* NoFastGil.proto */
#define __Pyx_PyGILState_Ensure PyGILState_Ensure
#define __Pyx_PyGILState_Release PyGILState_Release
#define __Pyx_FastGIL_Remember()
#define __Pyx_FastGIL_Forget()
#define __Pyx_FastGilFuncInit()

/* Atomics.proto (used by UnpackUnboundCMethod) */
#include <pythread.h>
#ifndef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 1
#endif
#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __pyx_atomic_int_type int
#define __pyx_nonatomic_int_type int
#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
                        (__STDC_VERSION__ >= 201112L) &&\
                        !defined(__STDC_NO_ATOMICS__))
    #include <stdatomic.h>
#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
                    (__cplusplus >= 201103L) ||\
                    (defined(_MSC_VER) && _MSC_VER >= 1700)))
    #include <atomic>
#endif
#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
                        (__STDC_VERSION__ >= 201112L) &&\
                        !defined(__STDC_NO_ATOMICS__) &&\
                       ATOMIC_INT_LOCK_FREE == 2)
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type atomic_int
    #define __pyx_atomic_ptr_type atomic_uintptr_t
    #define __pyx_nonatomic_ptr_type uintptr_t
    #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed)
    #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel)
    #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel)
    #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg)
    #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
    #define __pyx_atomic_load(value) atomic_load(value)
    #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed)
    #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire)
    #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
    #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
    #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
        #pragma message ("Using standard C atomics")
    #elif defined(__PYX_DEBUG_ATOMICS)
        #warning "Using standard C atomics"
    #endif
#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
                    (__cplusplus >= 201103L) ||\
\
                    (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\
                    ATOMIC_INT_LOCK_FREE == 2)
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type std::atomic_int
    #define __pyx_atomic_ptr_type std::atomic_uintptr_t
    #define __pyx_nonatomic_ptr_type uintptr_t
    #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed)
    #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel)
    #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel)
    #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg)
    #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
    #define __pyx_atomic_load(value) std::atomic_load(value)
    #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed)
    #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire)
    #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
    #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
    #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
        #pragma message ("Using standard C++ atomics")
    #elif defined(__PYX_DEBUG_ATOMICS)
        #warning "Using standard C++ atomics"
    #endif
#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
                    (__GNUC_MINOR__ > 1 ||\
                    (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
    #define __pyx_atomic_ptr_type void*
    #define __pyx_nonatomic_ptr_type void*
    #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1)
    #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1)
    #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1)
    #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg)
    static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
        __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value)
    static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
        __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Using GNU atomics"
    #endif
#elif CYTHON_ATOMICS && defined(_MSC_VER)
    #include <intrin.h>
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type long
    #define __pyx_atomic_ptr_type void*
    #undef __pyx_nonatomic_int_type
    #define __pyx_nonatomic_int_type long
    #define __pyx_nonatomic_ptr_type void*
    #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer)
    #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1)
    #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1)
    #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1)
    #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg)
    static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
        __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0)
    #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value
    #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0)
    #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value)
    static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
        __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #ifdef __PYX_DEBUG_ATOMICS
        #pragma message ("Using MSVC atomics")
    #endif
#else
    #undef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 0
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Not using atomics"
    #endif
#endif

/* CriticalSectionsDefinition.proto (used by CriticalSections) */
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyCriticalSection void*
#define __Pyx_PyCriticalSection2 void*
#define __Pyx_PyCriticalSection_End(cs)
#define __Pyx_PyCriticalSection2_End(cs)
#else
#define __Pyx_PyCriticalSection PyCriticalSection
#define __Pyx_PyCriticalSection2 PyCriticalSection2
#define __Pyx_PyCriticalSection_End PyCriticalSection_End
#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End
#endif

/* CriticalSections.proto (used by ParseKeywordsImpl) */
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs)
#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs)
#else
#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin
#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin
#endif
#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_BEGIN_CRITICAL_SECTION(o) {
#define __Pyx_END_CRITICAL_SECTION() }
#else
#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION
#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION
#endif

/* IncludeStructmemberH.proto (used by FixUpExtensionType) */
#include <structmember.h>

/* #### Code section: numeric_typedefs ### */

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":743
 * # 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;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":744
 * 
 * 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;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":745
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int64      int64_t
 * 
*/
typedef npy_int32 __pyx_t_5numpy_int32_t;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":746
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_uint8      uint8_t
*/
typedef npy_int64 __pyx_t_5numpy_int64_t;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":748
 * ctypedef npy_int64      int64_t
 * 
 * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
*/
typedef npy_uint8 __pyx_t_5numpy_uint8_t;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":749
 * 
 * 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;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":750
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint64     uint64_t
 * 
*/
typedef npy_uint32 __pyx_t_5numpy_uint32_t;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":751
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_float32    float32_t
*/
typedef npy_uint64 __pyx_t_5numpy_uint64_t;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":753
 * ctypedef npy_uint64     uint64_t
 * 
 * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_float64    float64_t
 * #ctypedef npy_float80    float80_t
*/
typedef npy_float32 __pyx_t_5numpy_float32_t;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":754
 * 
 * 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;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":761
 * ctypedef double complex complex128_t
 * 
 * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulonglong_t
 * 
*/
typedef npy_longlong __pyx_t_5numpy_longlong_t;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":762
 * 
 * ctypedef npy_longlong   longlong_t
 * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_intp       intp_t
*/
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":764
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uintp      uintp_t
 * 
*/
typedef npy_intp __pyx_t_5numpy_intp_t;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":765
 * 
 * ctypedef npy_intp       intp_t
 * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_double     float_t
*/
typedef npy_uintp __pyx_t_5numpy_uintp_t;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":767
 * 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;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":768
 * 
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longdouble longdouble_t
 * 
*/
typedef npy_double __pyx_t_5numpy_double_t;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":769
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef float complex       cfloat_t
*/
typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
/* #### Code section: complex_type_declarations ### */
/* Declarations.proto */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
  #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
static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);

/* Declarations.proto */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
  #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
static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);

/* Declarations.proto */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
  #ifdef __cplusplus
    typedef ::std::complex< long double > __pyx_t_long_double_complex;
  #else
    typedef long double _Complex __pyx_t_long_double_complex;
  #endif
#else
    typedef struct { long double real, imag; } __pyx_t_long_double_complex;
#endif
static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double, long double);

/* #### Code section: type_declarations ### */

/*--- Type declarations ---*/
struct __pyx_obj_7cytimes_6parser_Configs;
struct __pyx_obj_7cytimes_6parser_Result;
struct __pyx_obj_7cytimes_6parser_Parser;
struct __pyx_opt_args_7cpython_11contextvars_get_value;
struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default;

/* "cpython/contextvars.pxd":116
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 * cdef inline object get_value(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the default value of the context variable,
*/
struct __pyx_opt_args_7cpython_11contextvars_get_value {
  int __pyx_n;
  PyObject *default_value;
};

/* "cpython/contextvars.pxd":134
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 * cdef inline object get_value_no_default(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the provided default value if no such value was found.
*/
struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default {
  int __pyx_n;
  PyObject *default_value;
};
struct __pyx_opt_args_7cpython_8datetime_time_new;
struct __pyx_opt_args_7cpython_8datetime_datetime_new;
struct __pyx_opt_args_7cpython_8datetime_timezone_new;
struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp;

/* "datetime.pxd":265
 * # Create time object using DateTime CAPI factory function
 * # Note, there are no range checks for any of the arguments.
 * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold)
 * 
*/
struct __pyx_opt_args_7cpython_8datetime_time_new {
  int __pyx_n;
  int fold;
};

/* "datetime.pxd":270
 * # Create datetime object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold)
 * 
*/
struct __pyx_opt_args_7cpython_8datetime_datetime_new {
  int __pyx_n;
  int fold;
};

/* "datetime.pxd":279
 * 
 * # Create timedelta object using DateTime CAPI factory function.
 * cdef inline object timezone_new(object offset, object name=None):             # <<<<<<<<<<<<<<
 *     return __Pyx_TimeZone_FromOffsetAndName(offset, <PyObject*>name if name is not None else NULL)
 * 
*/
struct __pyx_opt_args_7cpython_8datetime_timezone_new {
  int __pyx_n;
  PyObject *name;
};

/* "datetime.pxd":283
 * 
 * # Create datetime object using DB API constructor.
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.DateTime_FromTimestamp(
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)
*/
struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp {
  int __pyx_n;
  PyObject *tz;
};
struct __pyx_t_7cytimes_5utils_ymd;
typedef struct __pyx_t_7cytimes_5utils_ymd __pyx_t_7cytimes_5utils_ymd;
struct __pyx_t_7cytimes_5utils_hmsf;
typedef struct __pyx_t_7cytimes_5utils_hmsf __pyx_t_7cytimes_5utils_hmsf;
struct __pyx_t_7cytimes_5utils_sf;
typedef struct __pyx_t_7cytimes_5utils_sf __pyx_t_7cytimes_5utils_sf;
struct __pyx_t_7cytimes_5utils_dtm;
typedef struct __pyx_t_7cytimes_5utils_dtm __pyx_t_7cytimes_5utils_dtm;
struct __pyx_t_7cytimes_5utils_iso;
typedef struct __pyx_t_7cytimes_5utils_iso __pyx_t_7cytimes_5utils_iso;
struct __pyx_opt_args_7cytimes_5utils_math_mod;
struct __pyx_opt_args_7cytimes_5utils_math_div_even;
struct __pyx_opt_args_7cytimes_5utils_math_div_up;
struct __pyx_opt_args_7cytimes_5utils_math_div_down;
struct __pyx_opt_args_7cytimes_5utils_math_div_ceil;
struct __pyx_opt_args_7cytimes_5utils_math_div_floor;
struct __pyx_opt_args_7cytimes_5utils_math_div_trunc;
struct __pyx_opt_args_7cytimes_5utils_is_str_dot;
struct __pyx_opt_args_7cytimes_5utils_is_str_comma;
struct __pyx_opt_args_7cytimes_5utils_is_str_iso_sep;
struct __pyx_opt_args_7cytimes_5utils_is_str_date_sep;
struct __pyx_opt_args_7cytimes_5utils_is_str_time_sep;
struct __pyx_opt_args_7cytimes_5utils_is_str_isoweek_sep;
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_ctl;
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_ctl_or_space;
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_digits;
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_letters_upper;
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_letters_lower;
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_letters;
struct __pyx_opt_args_7cytimes_5utils_is_str_alphas;
struct __pyx_opt_args_7cytimes_5utils_parse_numeric_kind;
struct __pyx_opt_args_7cytimes_5utils_parse_isoyear;
struct __pyx_opt_args_7cytimes_5utils_parse_isomonth;
struct __pyx_opt_args_7cytimes_5utils_parse_isoday;
struct __pyx_opt_args_7cytimes_5utils_parse_isoweek;
struct __pyx_opt_args_7cytimes_5utils_parse_isoweekday;
struct __pyx_opt_args_7cytimes_5utils_parse_isodoy;
struct __pyx_opt_args_7cytimes_5utils_parse_isohour;
struct __pyx_opt_args_7cytimes_5utils_parse_isominute;
struct __pyx_opt_args_7cytimes_5utils_parse_isosecond;
struct __pyx_opt_args_7cytimes_5utils_parse_isofraction;
struct __pyx_opt_args_7cytimes_5utils_parse_second_and_fraction;
struct __pyx_opt_args_7cytimes_5utils_slice_to_uint;
struct __pyx_opt_args_7cytimes_5utils_slice_to_ufloat;
struct __pyx_opt_args_7cytimes_5utils_date_new;
struct __pyx_opt_args_7cytimes_5utils_date_now;
struct __pyx_opt_args_7cytimes_5utils_date_fr_us;
struct __pyx_opt_args_7cytimes_5utils_date_fr_sec;
struct __pyx_opt_args_7cytimes_5utils_date_fr_ord;
struct __pyx_opt_args_7cytimes_5utils_date_fr_iso;
struct __pyx_opt_args_7cytimes_5utils_date_fr_doy;
struct __pyx_opt_args_7cytimes_5utils_date_fr_ts;
struct __pyx_opt_args_7cytimes_5utils_date_fr_date;
struct __pyx_opt_args_7cytimes_5utils_date_fr_dt;
struct __pyx_opt_args_7cytimes_5utils_date_replace;
struct __pyx_opt_args_7cytimes_5utils_date_add_delta;
struct __pyx_opt_args_7cytimes_5utils_dt_new;
struct __pyx_opt_args_7cytimes_5utils_dt_now;
struct __pyx_opt_args_7cytimes_5utils_dt_isoformat;
struct __pyx_opt_args_7cytimes_5utils_dt_to_tm;
struct __pyx_opt_args_7cytimes_5utils_dt_to_us;
struct __pyx_opt_args_7cytimes_5utils_dt_to_sec;
struct __pyx_opt_args_7cytimes_5utils_dt_to_ord;
struct __pyx_opt_args_7cytimes_5utils_dt_as_epoch;
struct __pyx_opt_args_7cytimes_5utils_dt_as_epoch_W_iso;
struct __pyx_opt_args_7cytimes_5utils_dt_fr_us;
struct __pyx_opt_args_7cytimes_5utils_dt_fr_sec;
struct __pyx_opt_args_7cytimes_5utils_dt_fr_ord;
struct __pyx_opt_args_7cytimes_5utils_dt_fr_iso;
struct __pyx_opt_args_7cytimes_5utils_dt_fr_doy;
struct __pyx_opt_args_7cytimes_5utils_dt_fr_ts;
struct __pyx_opt_args_7cytimes_5utils_dt_fr_date;
struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt;
struct __pyx_opt_args_7cytimes_5utils_dt_fr_time;
struct __pyx_opt_args_7cytimes_5utils_dt_combine;
struct __pyx_opt_args_7cytimes_5utils_dt_add;
struct __pyx_opt_args_7cytimes_5utils_dt_add_delta;
struct __pyx_opt_args_7cytimes_5utils_dt_replace;
struct __pyx_opt_args_7cytimes_5utils_dt_replace_tz_fold;
struct __pyx_opt_args_7cytimes_5utils_dt_replace_tz;
struct __pyx_opt_args_7cytimes_5utils_dt_replace_fold;
struct __pyx_opt_args_7cytimes_5utils_dt_compare;
struct __pyx_opt_args_7cytimes_5utils_dt_astimezone;
struct __pyx_opt_args_7cytimes_5utils_dt_normalize_tz;
struct __pyx_opt_args_7cytimes_5utils_time_new;
struct __pyx_opt_args_7cytimes_5utils_time_now;
struct __pyx_opt_args_7cytimes_5utils_time_isoformat;
struct __pyx_opt_args_7cytimes_5utils_time_fr_us;
struct __pyx_opt_args_7cytimes_5utils_time_fr_sec;
struct __pyx_opt_args_7cytimes_5utils_time_fr_time;
struct __pyx_opt_args_7cytimes_5utils_time_fr_dt;
struct __pyx_opt_args_7cytimes_5utils_td_new;
struct __pyx_opt_args_7cytimes_5utils_td_fr_us;
struct __pyx_opt_args_7cytimes_5utils_td_fr_sec;
struct __pyx_opt_args_7cytimes_5utils_td_fr_td;
struct __pyx_opt_args_7cytimes_5utils_tz_new;
struct __pyx_opt_args_7cytimes_5utils_tz_local;
struct __pyx_opt_args_7cytimes_5utils_tz_local_sec;
struct __pyx_opt_args_7cytimes_5utils_tz_name;
struct __pyx_opt_args_7cytimes_5utils_tz_dst;
struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset;
struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset_sec;
struct __pyx_opt_args_7cytimes_5utils_tz_utcformat;
struct __pyx_opt_args_7cytimes_5utils_dt64_as_int64_us;
struct __pyx_opt_args_7cytimes_5utils__dt64_Y_as_int64_D;
struct __pyx_opt_args_7cytimes_5utils__dt64_M_as_int64_D;
struct __pyx_opt_args_7cytimes_5utils_dt64_to_dt;
struct __pyx_opt_args_7cytimes_5utils_td64_as_int64_us;
struct __pyx_opt_args_7cytimes_5utils__td64_Y_as_int64_D;
struct __pyx_opt_args_7cytimes_5utils__td64_M_as_int64_D;
struct __pyx_opt_args_7cytimes_5utils_td64_to_td;
struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64;
struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like;
struct __pyx_opt_args_7cytimes_5utils_arr_assure_float64;
struct __pyx_opt_args_7cytimes_5utils_arr_clamp;
struct __pyx_opt_args_7cytimes_5utils_arr_min;
struct __pyx_opt_args_7cytimes_5utils_arr_max;
struct __pyx_opt_args_7cytimes_5utils_arr_min_arr;
struct __pyx_opt_args_7cytimes_5utils_arr_max_arr;
struct __pyx_opt_args_7cytimes_5utils_arr_abs;
struct __pyx_opt_args_7cytimes_5utils_arr_neg;
struct __pyx_opt_args_7cytimes_5utils_arr_add;
struct __pyx_opt_args_7cytimes_5utils_arr_mul;
struct __pyx_opt_args_7cytimes_5utils_arr_mod;
struct __pyx_opt_args_7cytimes_5utils_arr_div_even;
struct __pyx_opt_args_7cytimes_5utils_arr_div_even_mul;
struct __pyx_opt_args_7cytimes_5utils_arr_div_up;
struct __pyx_opt_args_7cytimes_5utils_arr_div_up_mul;
struct __pyx_opt_args_7cytimes_5utils_arr_div_down;
struct __pyx_opt_args_7cytimes_5utils_arr_div_down_mul;
struct __pyx_opt_args_7cytimes_5utils_arr_div_ceil;
struct __pyx_opt_args_7cytimes_5utils_arr_div_ceil_mul;
struct __pyx_opt_args_7cytimes_5utils_arr_div_floor;
struct __pyx_opt_args_7cytimes_5utils_arr_div_floor_mul;
struct __pyx_opt_args_7cytimes_5utils_arr_div_trunc;
struct __pyx_opt_args_7cytimes_5utils_arr_div_trunc_mul;
struct __pyx_opt_args_7cytimes_5utils_arr_add_arr;
struct __pyx_opt_args_7cytimes_5utils_arr_sub_arr;
struct __pyx_opt_args_7cytimes_5utils_arr_mul_arr;
struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_year;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_quarter;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_month;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_weekday;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_day;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_hour;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_minute;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_second;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_millisecond;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_microsecond;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_nanosecond;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_times;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_isocalendar;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_isoyear;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_isoweek;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_isoweekday;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_is_leap_year;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_is_long_year;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_leap_bt_years;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_year;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_bf_year;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_day_of_year;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_quarter;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_bf_quarter;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_day_of_quarter;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_month;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_bf_month;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Q;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_W;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_h;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_m;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_s;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ms;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_us;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ns;
struct __pyx_opt_args_7cytimes_5utils__dt64arr_Y_as_int64_D;
struct __pyx_opt_args_7cytimes_5utils__dt64arr_M_as_int64_D;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_W_iso;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_to_ord;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_to_ts;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_unit;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_add_delta;
struct __pyx_opt_args_7cytimes_5utils__dt64arr_add_delta_date;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_replace_dates;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_replace_times;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_round;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_ceil;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_floor;
struct __pyx_opt_args_7cytimes_5utils_td64arr_as_int64_us;
struct __pyx_opt_args_7cytimes_5utils__td64arr_Y_as_int64_D;
struct __pyx_opt_args_7cytimes_5utils__td64arr_M_as_int64_D;

/* "utils.pxd":151
 *         int  tm_isdst
 * 
 * ctypedef struct ymd:             # <<<<<<<<<<<<<<
 *     int year
 *     int month
*/
struct __pyx_t_7cytimes_5utils_ymd {
  int year;
  int month;
  int day;
};

/* "utils.pxd":156
 *     int day
 * 
 * ctypedef struct hmsf:             # <<<<<<<<<<<<<<
 *     int hour
 *     int minute
*/
struct __pyx_t_7cytimes_5utils_hmsf {
  int hour;
  int minute;
  int second;
  int microsecond;
};

/* "utils.pxd":162
 *     int microsecond
 * 
 * ctypedef struct sf:             # <<<<<<<<<<<<<<
 *     int second
 *     int microsecond
*/
struct __pyx_t_7cytimes_5utils_sf {
  int second;
  int microsecond;
};

/* "utils.pxd":166
 *     int microsecond
 * 
 * ctypedef struct dtm:             # <<<<<<<<<<<<<<
 *     int year
 *     int month
*/
struct __pyx_t_7cytimes_5utils_dtm {
  int year;
  int month;
  int day;
  int hour;
  int minute;
  int second;
  int microsecond;
};

/* "utils.pxd":175
 *     int microsecond
 * 
 * ctypedef struct iso:             # <<<<<<<<<<<<<<
 *     int year
 *     int week
*/
struct __pyx_t_7cytimes_5utils_iso {
  int year;
  int week;
  int weekday;
};

/* "utils.pxd":181
 * 
 * # Math -------------------------------------------------------------------------------------------------
 * cdef inline long long math_mod(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Compute module with Python semantics `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_math_mod {
  int __pyx_n;
  PY_LONG_LONG offset;
};

/* "utils.pxd":207
 *     return r + offset
 * 
 * cdef inline long long math_div_even(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then round to nearest, ties-to-even (bankers' rounding) `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_math_div_even {
  int __pyx_n;
  PY_LONG_LONG offset;
};

/* "utils.pxd":242
 *     return q + offset
 * 
 * cdef inline long long math_div_up(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then round half away from zero (round-half-up) `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_math_div_up {
  int __pyx_n;
  PY_LONG_LONG offset;
};

/* "utils.pxd":277
 *     return q + offset
 * 
 * cdef inline long long math_div_down(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then round half toward zero (round-half-down) `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_math_div_down {
  int __pyx_n;
  PY_LONG_LONG offset;
};

/* "utils.pxd":312
 *     return q + offset
 * 
 * cdef inline long long math_div_ceil(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then take the mathematical ceiling `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_math_div_ceil {
  int __pyx_n;
  PY_LONG_LONG offset;
};

/* "utils.pxd":340
 *     return q + offset
 * 
 * cdef inline long long math_div_floor(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then take the mathematical floor `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_math_div_floor {
  int __pyx_n;
  PY_LONG_LONG offset;
};

/* "utils.pxd":368
 *     return q + offset
 * 
 * cdef inline long long math_div_trunc(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide and truncate toward zero (C/CPython style) `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_math_div_trunc {
  int __pyx_n;
  PY_LONG_LONG offset;
};

/* "utils.pxd":515
 * 
 * # . check: string
 * cdef inline bint is_str_dot(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character dot `'.'` `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_dot {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":532
 *     return is_dot(str_read(token, 0))
 * 
 * cdef inline bint is_str_comma(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character comma `','` `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_comma {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":549
 *     return is_comma(str_read(token, 0))
 * 
 * cdef inline bint is_str_iso_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character ISO 8601 date-time separator `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_iso_sep {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":568
 *     return is_iso_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_date_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character date-field seperator `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_date_sep {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":587
 *     return is_date_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_time_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character time-field seperator `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_time_sep {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":606
 *     return is_time_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_isoweek_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character ISO week designator `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_isoweek_sep {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":625
 *     return is_isoweek_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_ascii_ctl(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single control charactor `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_ctl {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":644
 *     return is_ascii_ctl(str_read(token, 0))
 * 
 * cdef inline bint is_str_ascii_ctl_or_space(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single control or space charactor `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_ctl_or_space {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":664
 *     return is_ascii_ctl_or_space(str_read(token, 0))
 * 
 * cdef inline bint is_str_ascii_digits(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains ASCII digits `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_digits {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":687
 *     return True
 * 
 * cdef inline bint is_str_ascii_letters_upper(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains uppercase ASCII letters `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_letters_upper {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":710
 *     return True
 * 
 * cdef inline bint is_str_ascii_letters_lower(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains lowercase ASCII letters `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_letters_lower {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":733
 *     return True
 * 
 * cdef inline bint is_str_ascii_letters(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains letters (case-insensitive) `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_letters {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":756
 *     return True
 * 
 * cdef inline bint is_str_alphas(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains alphabetic characters `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_alphas {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":780
 * 
 * # . parse
 * cdef inline int parse_numeric_kind(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Classify `token` string as certain numeric kind `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_parse_numeric_kind {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":822
 *     return 2 if has_dot else 1
 * 
 * cdef inline int parse_isoyear(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse ISO format year component (YYYY) from a string,
 *     returns `-1` for invalid ISO years `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_parse_isoyear {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":869
 *     return out if out > 0 else -1
 * 
 * cdef inline int parse_isomonth(str token, Py_ssize_t pos, Py_ssize_t token_len=-1)  except -2:             # <<<<<<<<<<<<<<
 *     """Parse ISO format month component (MM) from a string,
 *     returns `-1` for invalid ISO months `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_parse_isomonth {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":908
 *     return out if 1 <= out <= 12 else -1
 * 
 * cdef inline int parse_isoday(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse ISO format day component (DD) from a string,
 *     returns `-1` for invalid ISO days `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_parse_isoday {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":947
 *     return out if 1 <= out <= 31 else -1
 * 
 * cdef inline int parse_isoweek(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format week number component (WW) from a string,
 *     returns `-1` for invalid ISO week number `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_parse_isoweek {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":986
 *     return out if 1 <= out <= 53 else -1
 * 
 * cdef inline int parse_isoweekday(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format weekday component (D) from a string,
 *     returns `-1` for invalid ISO weekdays `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_parse_isoweekday {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":1016
 *     return out if 1 <= out <= 7 else -1
 * 
 * cdef inline int parse_isodoy(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format day-of-year component (DDD) from a string,
 *     returns `-1` for invalid ISO day of the year `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_parse_isodoy {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":1059
 *     return out if 1 <= out <= 366 else -1
 * 
 * cdef inline int parse_isohour(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format hour (HH) component from a string,
 *     returns `-1` for invalid ISO hours `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_parse_isohour {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":1098
 *     return out if 0 <= out <= 23 else -1
 * 
 * cdef inline int parse_isominute(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format minute (MM) component from a string,
 *     returns `-1` for invalid ISO minutes `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_parse_isominute {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":1137
 *     return out if 0 <= out <= 59 else -1
 * 
 * cdef inline int parse_isosecond(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format second (SS) component from a string,
 *     returns `-1` for invalid ISO seconds `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_parse_isosecond {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":1155
 *     return parse_isominute(token, pos, token_len)
 * 
 * cdef inline int parse_isofraction(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO fractional time component (fractions of a second) from a string,
 *     returns `-1` for invalid ISO fraction `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_parse_isofraction {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":1194
 *     return scale_fraction_to_us(out, f_size)
 * 
 * cdef inline sf parse_second_and_fraction(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except *:             # <<<<<<<<<<<<<<
 *     """Parse a `seconds` token with an optional fractional part into (second, microsecond) `<'struct:sf'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_parse_second_and_fraction {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":1307
 * 
 * # . slice and convert
 * cdef inline unsigned long long slice_to_uint(str token, Py_ssize_t start, Py_ssize_t size, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Slice a substring from a string and convert to an unsigned integer `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_slice_to_uint {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":1359
 *     return out
 * 
 * cdef inline double slice_to_ufloat(str token, Py_ssize_t start, Py_ssize_t size, Py_ssize_t token_len=-1) except *:             # <<<<<<<<<<<<<<
 *     """Slice a substring from a string and convert to a non-negative double-precision float `<'float'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_slice_to_ufloat {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":2679
 * # datetime.date ----------------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.date date_new(int year=1, int month=1, int day=1, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create a new date `<'datetime.date'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_date_new {
  int __pyx_n;
  int year;
  int month;
  int day;
  PyObject *dclass;
};

/* "utils.pxd":2697
 *     return datetime.date_new(year, month, day)
 * 
 * cdef inline datetime.date date_now(object tzinfo=None, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Get today's date `<'datetime.date'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_date_now {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *dclass;
};

/* "utils.pxd":2821
 * 
 * # . conversion: from
 * cdef inline datetime.date date_fr_us(long long value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from microseconds since the Unix epoch `<'datetime.date'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_date_fr_us {
  int __pyx_n;
  PyObject *dclass;
};

/* "utils.pxd":2832
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_sec(double value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from seconds since the Unix epoch `<'datetime.date'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_date_fr_sec {
  int __pyx_n;
  PyObject *dclass;
};

/* "utils.pxd":2843
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_ord(int value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from a Gregorian ordinal (0001-01-01 = 1) `<'datetime.date'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_date_fr_ord {
  int __pyx_n;
  PyObject *dclass;
};

/* "utils.pxd":2854
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_iso(int year, int week, int weekday, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from ISO calendar values (year, week, weekday) `<'datetime.date'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_date_fr_iso {
  int __pyx_n;
  PyObject *dclass;
};

/* "utils.pxd":2869
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_doy(int year, int doy, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from Gregorian year and day-of-year `<'datetime.date'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_date_fr_doy {
  int __pyx_n;
  PyObject *dclass;
};

/* "utils.pxd":2882
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_ts(double value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from a POSIX timestamp in **local** time `<'datetime.date'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_date_fr_ts {
  int __pyx_n;
  PyObject *dclass;
};

/* "utils.pxd":2894
 *     return date if dclass is None else date_fr_date(date, dclass)
 * 
 * cdef inline datetime.date date_fr_date(datetime.date date, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from another date (or subclass) `<'datetime.date'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_date_fr_date {
  int __pyx_n;
  PyObject *dclass;
};

/* "utils.pxd":2910
 *     return date_new(date.year, date.month, date.day, dclass)
 * 
 * cdef inline datetime.date date_fr_dt(datetime.datetime dt, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from a datetime (include subclass) `<'datetime.date'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_date_fr_dt {
  int __pyx_n;
  PyObject *dclass;
};

/* "utils.pxd":2922
 * 
 * # . manipulation
 * cdef inline datetime.date date_replace(datetime.date date, int year=-1, int month=-1, int day=-1, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Replace specified fields in date `<'datetime.date'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_date_replace {
  int __pyx_n;
  int year;
  int month;
  int day;
  PyObject *dclass;
};

/* "utils.pxd":2956
 *     return date_new(year, month, day, dclass)
 * 
 * cdef inline datetime.date date_add_delta(datetime.date date,             # <<<<<<<<<<<<<<
 *     int years=0, int quarters=0, int months=0, int weeks=0, long long days=0, long long hours=0,
 *     long long minutes=0, long long seconds=0, long long milliseconds=0, long long microseconds=0,
*/
struct __pyx_opt_args_7cytimes_5utils_date_add_delta {
  int __pyx_n;
  int years;
  int quarters;
  int months;
  int weeks;
  PY_LONG_LONG days;
  PY_LONG_LONG hours;
  PY_LONG_LONG minutes;
  PY_LONG_LONG seconds;
  PY_LONG_LONG milliseconds;
  PY_LONG_LONG microseconds;
  int year;
  int month;
  int day;
  int weekday;
  int hour;
  int minute;
  int second;
  int millisecond;
  int microsecond;
  PyObject *dclass;
};

/* "utils.pxd":3067
 * # datetime.datetime ------------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.datetime dt_new(             # <<<<<<<<<<<<<<
 *     int year=1, int month=1, int day=1, int hour=0, int minute=0, int second=0,
 *     int microsecond=0, object tzinfo=None, int fold=0, object dtclass=None,
*/
struct __pyx_opt_args_7cytimes_5utils_dt_new {
  int __pyx_n;
  int year;
  int month;
  int day;
  int hour;
  int minute;
  int second;
  int microsecond;
  PyObject *tzinfo;
  int fold;
  PyObject *dtclass;
};

/* "utils.pxd":3106
 *     return datetime.datetime_new(year, month, day, hour, minute, second, microsecond, tzinfo, fold)
 * 
 * cdef inline datetime.datetime dt_now(object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Get the current datetime `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_now {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *dtclass;
};

/* "utils.pxd":3263
 *     return tm_strformat(dt_to_tm(dt, False), "".join(parts))
 * 
 * cdef inline str dt_isoformat(datetime.datetime dt, str sep="T", bint utc=False):             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to ISO string `<'str'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_isoformat {
  int __pyx_n;
  PyObject *sep;
  int utc;
};

/* "utils.pxd":3302
 *         )
 * 
 * cdef inline tm dt_to_tm(datetime.datetime dt, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to 'struct:tm' `<'struct:tm'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_to_tm {
  int __pyx_n;
  int utc;
};

/* "utils.pxd":3433
 *     return "%s %s %2d %02d:%02d:%02d %04d" % (s_wkd, s_mm, dd, hh, mi, ss, yy)
 * 
 * cdef inline long long dt_to_us(datetime.datetime dt, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to microseconds since the Unix epoch `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_to_us {
  int __pyx_n;
  int utc;
};

/* "utils.pxd":3463
 *     return us if off is None else us - td_to_us(off)
 * 
 * cdef inline double dt_to_sec(datetime.datetime dt, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to seconds since the Unix epoch `<'float'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_to_sec {
  int __pyx_n;
  int utc;
};

/* "utils.pxd":3479
 *     return <double> us * 1e-6
 * 
 * cdef inline long long dt_to_ord(datetime.datetime dt, bint utc=False) except -1:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to its Gregorian ordinal day `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_to_ord {
  int __pyx_n;
  int utc;
};

/* "utils.pxd":3548
 *     return t + (<double> dt.microsecond) * 1e-6
 * 
 * cdef inline long long dt_as_epoch(datetime.datetime dt, str as_unit, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to an integer count since the Unix epoch `<'int'>`,
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_as_epoch {
  int __pyx_n;
  int utc;
};

/* "utils.pxd":3656
 *     _raise_invalid_nptime_str_unit_error(as_unit)
 * 
 * cdef inline long long dt_as_epoch_W_iso(datetime.datetime dt, int weekday, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to an integer count of whole
 *     weeks since the Unix epoch, where weeks are aligned to a chosen
*/
struct __pyx_opt_args_7cytimes_5utils_dt_as_epoch_W_iso {
  int __pyx_n;
  int utc;
};

/* "utils.pxd":3688
 * 
 * # . conversion: from
 * cdef inline datetime.datetime dt_fr_us(long long value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from microseconds since the Unix epoch `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_fr_us {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *dtclass;
};

/* "utils.pxd":3703
 *     )
 * 
 * cdef inline datetime.datetime dt_fr_sec(double value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from seconds since the Unix epoch `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_fr_sec {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *dtclass;
};

/* "utils.pxd":3714
 *     return dt_fr_us(sec_to_us(value), tzinfo, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_ord(int value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from a Gregorian ordinal (0001-01-01 = 1) `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_fr_ord {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *dtclass;
};

/* "utils.pxd":3726
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_iso(int year, int week, int weekday, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from ISO calendar values (year, week, weekday) `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_fr_iso {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *dtclass;
};

/* "utils.pxd":3742
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_doy(int year, int doy, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from Gregorian year and day-of-year `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_fr_doy {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *dtclass;
};

/* "utils.pxd":3756
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_ts(double value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from a POSIX timestamp with optional timezone `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_fr_ts {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *dtclass;
};

/* "utils.pxd":3775
 *     return dt if dtclass is None else dt_fr_dt(dt, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_date(datetime.date date, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from date (include subclass) `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_fr_date {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *dtclass;
};

/* "utils.pxd":3787
 *     return dt_new(date.year, date.month, date.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_dt(datetime.datetime dt, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from another datetime (include subclass) `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt {
  int __pyx_n;
  PyObject *dtclass;
};

/* "utils.pxd":3806
 *     )
 * 
 * cdef inline datetime.datetime dt_fr_time(datetime.time time, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from time (include subclass) `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_fr_time {
  int __pyx_n;
  PyObject *dtclass;
};

/* "utils.pxd":3820
 *     )
 * 
 * cdef inline datetime.datetime dt_combine(datetime.date date=None, datetime.time time=None, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a `datetime.datetime` by combining a date and a time `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_combine {
  int __pyx_n;
  PyDateTime_Date *date;
  PyDateTime_Time *time;
  PyObject *tzinfo;
  PyObject *dtclass;
};

/* "utils.pxd":3852
 * 
 * # . manipulation
 * cdef inline datetime.datetime dt_add(datetime.datetime dt, int days=0, int seconds=0, int microseconds=0, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Add a day/second/microsecond delta to a `datetime.datetime` `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_add {
  int __pyx_n;
  int days;
  int seconds;
  int microseconds;
  PyObject *dtclass;
};

/* "utils.pxd":3904
 *     )
 * 
 * cdef inline datetime.datetime dt_add_delta(datetime.datetime dt,             # <<<<<<<<<<<<<<
 *     int years=0, int quarters=0, int months=0, int weeks=0, long long days=0, long long hours=0,
 *     long long minutes=0, long long seconds=0, long long milliseconds=0, long long microseconds=0,
*/
struct __pyx_opt_args_7cytimes_5utils_dt_add_delta {
  int __pyx_n;
  int years;
  int quarters;
  int months;
  int weeks;
  PY_LONG_LONG days;
  PY_LONG_LONG hours;
  PY_LONG_LONG minutes;
  PY_LONG_LONG seconds;
  PY_LONG_LONG milliseconds;
  PY_LONG_LONG microseconds;
  int year;
  int month;
  int day;
  int weekday;
  int hour;
  int minute;
  int second;
  int millisecond;
  int microsecond;
  PyObject *dtclass;
};

/* "utils.pxd":4038
 *     return dt_new(yy, mm, dd, hh, mi, ss, us, dt.tzinfo, dt.fold, dtclass)
 * 
 * cdef inline datetime.datetime dt_replace(datetime.datetime dt,             # <<<<<<<<<<<<<<
 *     int year=-1, int month=-1, int day=-1, int hour=-1, int minute=-1,
 *     int second=-1, int microsecond=-1, object tzinfo=-1, int fold=-1,
*/
struct __pyx_opt_args_7cytimes_5utils_dt_replace {
  int __pyx_n;
  int year;
  int month;
  int day;
  int hour;
  int minute;
  int second;
  int microsecond;
  PyObject *tzinfo;
  int fold;
  PyObject *dtclass;
};

/* "utils.pxd":4103
 *     )
 * 
 * cdef inline datetime.datetime dt_replace_tz_fold(datetime.datetime dt, object tzinfo, int fold, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a copy of `dt` with `tzinfo` and `fold` replaced `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_replace_tz_fold {
  int __pyx_n;
  PyObject *dtclass;
};

/* "utils.pxd":4131
 *     )
 * 
 * cdef inline datetime.datetime dt_replace_tz(datetime.datetime dt, object tzinfo, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a copy of `dt` with `tzinfo` replaced `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_replace_tz {
  int __pyx_n;
  PyObject *dtclass;
};

/* "utils.pxd":4154
 *     )
 * 
 * cdef inline datetime.datetime dt_replace_fold(datetime.datetime dt, int fold, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a copy of `dt` with `fold` set to 0 or 1 `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_replace_fold {
  int __pyx_n;
  PyObject *dtclass;
};

/* "utils.pxd":4182
 * 
 * # . check
 * cdef inline int dt_compare(datetime.datetime dt1, datetime.datetime dt2, bint allow_mixed = False) except -2:             # <<<<<<<<<<<<<<
 *     """Three-way comparison between two datetimes on a common microsecond timeline `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_compare {
  int __pyx_n;
  int allow_mixed;
};

/* "utils.pxd":4354
 *     return tz_utcoffset(dt.tzinfo, dt)
 * 
 * cdef inline datetime.datetime dt_astimezone(datetime.datetime dt, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to another timezone `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_astimezone {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *dtclass;
};

/* "utils.pxd":4431
 *     return to_tz.fromutc(dt_fr_us(us, to_tz, dtclass))
 * 
 * cdef inline datetime.datetime dt_normalize_tz(datetime.datetime dt, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Normalize an aware datetime against its own tzinfo `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_normalize_tz {
  int __pyx_n;
  PyObject *dtclass;
};

/* "utils.pxd":4484
 * # datetime.time ----------------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.time time_new(             # <<<<<<<<<<<<<<
 *     int hour=0, int minute=0, int second=0, int microsecond=0,
 *     object tzinfo=None, int fold=0, object tclass=None,
*/
struct __pyx_opt_args_7cytimes_5utils_time_new {
  int __pyx_n;
  int hour;
  int minute;
  int second;
  int microsecond;
  PyObject *tzinfo;
  int fold;
  PyObject *tclass;
};

/* "utils.pxd":4517
 *     return datetime.time_new(hour, minute, second, microsecond, tzinfo, fold)
 * 
 * cdef inline datetime.time time_now(object tzinfo=None, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Get the current time `<'datetime.time'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_time_now {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *tclass;
};

/* "utils.pxd":4559
 * 
 * # . conversion: to
 * cdef inline str time_isoformat(datetime.time time, bint utc=False):             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.time` to ISO string `<'str'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_time_isoformat {
  int __pyx_n;
  int utc;
};

/* "utils.pxd":4606
 * 
 * # . conversion: from
 * cdef inline datetime.time time_fr_us(long long value, object tzinfo=None, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from microseconds since the Unix epoch `<'datetime.time'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_time_fr_us {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *tclass;
};

/* "utils.pxd":4621
 *     )
 * 
 * cdef inline datetime.time time_fr_sec(double value, object tzinfo=None, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from seconds since the Unix epoch `<'datetime.time'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_time_fr_sec {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *tclass;
};

/* "utils.pxd":4632
 *     return time_fr_us(sec_to_us(value), tzinfo, tclass)
 * 
 * cdef inline datetime.time time_fr_time(datetime.time time, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from another time (include subclass) `<'datetime.time'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_time_fr_time {
  int __pyx_n;
  PyObject *tclass;
};

/* "utils.pxd":4651
 *     )
 * 
 * cdef inline datetime.time time_fr_dt(datetime.datetime dt, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from datetime (include subclass) `<'datetime.time'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_time_fr_dt {
  int __pyx_n;
  PyObject *tclass;
};

/* "utils.pxd":4667
 * # datetime.timedelta -----------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.timedelta td_new(int days=0, int seconds=0, int microseconds=0, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create a new timedelta `<'datetime.timedelta'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_td_new {
  int __pyx_n;
  int days;
  int seconds;
  int microseconds;
  PyObject *tdclass;
};

/* "utils.pxd":4803
 * 
 * # . conversion: from
 * cdef inline datetime.timedelta td_fr_us(long long value, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create timedelta from microseconds `<'datetime.timedelta'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_td_fr_us {
  int __pyx_n;
  PyObject *tdclass;
};

/* "utils.pxd":4822
 *     return td_new(dd, ss, us, tdclass)
 * 
 * cdef inline datetime.timedelta td_fr_sec(double value, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create timedelta from seconds `<'datetime.timedelta'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_td_fr_sec {
  int __pyx_n;
  PyObject *tdclass;
};

/* "utils.pxd":4832
 *     return td_fr_us(sec_to_us(value), tdclass)
 * 
 * cdef inline datetime.timedelta td_fr_td(datetime.timedelta td, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create timedelta from another timedelta (or subclass) `<'datetime.timedelta'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_td_fr_td {
  int __pyx_n;
  PyObject *tdclass;
};

/* "utils.pxd":4850
 * # datetime.tzinfo --------------------------------------------------------------------------------------
 * # . generate
 * cdef inline object tz_new(int hours=0, int minites=0, int seconds=0):             # <<<<<<<<<<<<<<
 *     """Create a new fixed-offset timezone `<'datetime.timezone'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_tz_new {
  int __pyx_n;
  int hours;
  int minites;
  int seconds;
};

/* "utils.pxd":4872
 *     return datetime.timezone_new(datetime.timedelta_new(0, sec, 0), None)
 * 
 * cdef inline object tz_local(datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Get the process-local timezone `<'zoneinfo.ZoneInfo/datetime.timezone'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_tz_local {
  int __pyx_n;
  PyDateTime_DateTime *dt;
};

/* "utils.pxd":4890
 *     return _LOCAL_TIMEZONE
 * 
 * cdef inline int tz_local_sec(datetime.datetime dt=None) except -200_000:             # <<<<<<<<<<<<<<
 *     """Return the local UTC offset (in whole seconds) at the given instant `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_tz_local_sec {
  int __pyx_n;
  PyDateTime_DateTime *dt;
};

/* "utils.pxd":4964
 * 
 * # . access
 * cdef inline str tz_name(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the display name from a tzinfo `<'str/None'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_tz_name {
  int __pyx_n;
  PyDateTime_DateTime *dt;
};

/* "utils.pxd":4987
 *         raise err
 * 
 * cdef inline datetime.timedelta tz_dst(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the DST offset of a tzinfo `<'timedelta/None'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_tz_dst {
  int __pyx_n;
  PyDateTime_DateTime *dt;
};

/* "utils.pxd":5010
 *         raise err
 * 
 * cdef inline datetime.timedelta tz_utcoffset(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the UTC offset from a tzinfo `<'timedelta/None'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset {
  int __pyx_n;
  PyDateTime_DateTime *dt;
};

/* "utils.pxd":5033
 *         raise err
 * 
 * cdef inline int tz_utcoffset_sec(object tz, datetime.datetime dt=None) except -200_000:             # <<<<<<<<<<<<<<
 *     """Return the UTC offset in total seconds from a tzinfo `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset_sec {
  int __pyx_n;
  PyDateTime_DateTime *dt;
};

/* "utils.pxd":5054
 *     return sec
 * 
 * cdef inline str tz_utcformat(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the UTC offset in ISO format string (HHMM) from a tzinfo `<'str/None'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_tz_utcformat {
  int __pyx_n;
  PyDateTime_DateTime *dt;
};

/* "utils.pxd":5351
 * 
 * # . conversion
 * cdef inline np.npy_int64 dt64_as_int64_us(object dt64, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """Convert a np.datetime64 to int64 microsecond ('us') ticks `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64_as_int64_us {
  int __pyx_n;
  npy_int64 offset;
};

/* "utils.pxd":5397
 *     _raise_dt64_to_reso_error(dt64, "us")
 * 
 * cdef inline np.npy_int64 _dt64_Y_as_int64_D(np.npy_int64 value, np.npy_int64 factor=1, np.npy_int64 offset=0) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.datetime64[Y] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils__dt64_Y_as_int64_D {
  int __pyx_n;
  npy_int64 factor;
  npy_int64 offset;
};

/* "utils.pxd":5413
 *     return (value * 365 + leaps) * factor + offset
 * 
 * cdef inline np.npy_int64 _dt64_M_as_int64_D(np.npy_int64 value, np.npy_int64 factor=1, np.npy_int64 offset=0) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.datetime64[M] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils__dt64_M_as_int64_D {
  int __pyx_n;
  npy_int64 factor;
  npy_int64 offset;
};

/* "utils.pxd":5435
 *     return (yy_ep * 365 + leaps + days_bf_month(yy, mm)) * factor + offset
 * 
 * cdef inline datetime.datetime dt64_to_dt(object dt64, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Convert np.datetime64 to datetime `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64_to_dt {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *dtclass;
};

/* "utils.pxd":5509
 * 
 * # . conversion
 * cdef inline np.npy_int64 td64_as_int64_us(object td64, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """Convert a np.timedelta64 to int64 microsecond ('us') ticks `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_td64_as_int64_us {
  int __pyx_n;
  npy_int64 offset;
};

/* "utils.pxd":5555
 *     _raise_dt64_to_reso_error(td64, "us")
 * 
 * cdef inline np.npy_int64 _td64_Y_as_int64_D(np.npy_int64 value, int to_reso, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.timedelta[Y] to int64 day ticks using an average
 *     year (365.2425 D), then further adjust the resolution by `to_reso` and
*/
struct __pyx_opt_args_7cytimes_5utils__td64_Y_as_int64_D {
  int __pyx_n;
  npy_int64 offset;
};

/* "utils.pxd":5604
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64." % to_reso)
 * 
 * cdef inline np.npy_int64 _td64_M_as_int64_D(np.npy_int64 value, int to_reso, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.timedelta[M] to int64 day ticks using an
 *     average month (365.2425 / 12 = 30.436875 D), then further adjust
*/
struct __pyx_opt_args_7cytimes_5utils__td64_M_as_int64_D {
  int __pyx_n;
  npy_int64 offset;
};

/* "utils.pxd":5653
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64." % to_reso)
 * 
 * cdef inline datetime.timedelta td64_to_td(object td64, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Convert np.timedelta64 to timedelta `<'datetime.timedelta'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_td64_to_td {
  int __pyx_n;
  PyObject *tdclass;
};

/* "utils.pxd":5731
 * 
 * # . dtype
 * cdef inline np.ndarray arr_assure_int64(np.ndarray arr, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ensure that a 1-D array is contiguous and dtype int64 `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 {
  int __pyx_n;
  int copy;
};

/* "utils.pxd":5756
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_INT64)
 * 
 * cdef inline np.ndarray arr_assure_int64_like(np.ndarray arr, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ensure that a 1-D array is contiguous and dtype
 *     int64 / datetime64[*] / timedelta64[*] `<'ndarray[int64*]'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like {
  int __pyx_n;
  int copy;
};

/* "utils.pxd":5786
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_INT64)
 * 
 * cdef inline np.ndarray arr_assure_float64(np.ndarray arr, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ensure that a 1-D array is contiguous and dtype float64 `<'ndarray[float64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_assure_float64 {
  int __pyx_n;
  int copy;
};

/* "utils.pxd":5852
 * 
 * # . range
 * cdef inline np.ndarray arr_clamp(np.ndarray arr, np.npy_int64 minimum, np.npy_int64 maximum, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Clamp the values of a 1-D ndarray between 'minimum' and 'maximum' value `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_clamp {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":5913
 *     return out
 * 
 * cdef inline np.ndarray arr_min(np.ndarray arr, np.npy_int64 value, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise minimum of a 1-D array with the scalar 'value' `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_min {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":5965
 *     return out
 * 
 * cdef inline np.ndarray arr_max(np.ndarray arr, np.npy_int64 value, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise maximum of a 1-D array with the scalar 'value' `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_max {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6017
 *     return out
 * 
 * cdef inline np.ndarray arr_min_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise minimum of two 1-D arrays <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_min_arr {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6089
 *     return out
 * 
 * cdef inline np.ndarray arr_max_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise maximum of two 1-D arrays <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_max_arr {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6161
 * 
 * # . arithmetic
 * cdef inline np.ndarray arr_abs(np.ndarray arr, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise absolute of a 1-D array `<'ndarray[int64]'`>
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_abs {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6212
 *     return out
 * 
 * cdef inline np.ndarray arr_neg(np.ndarray arr, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Negate the values of a 1-D array `<'ndarray[int64]'>`
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_neg {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6249
 *     return out
 * 
 * cdef inline np.ndarray arr_add(np.ndarray arr, np.npy_int64 value, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Add a 'value' to the 1-D array `<'np.ndarray'>`
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_add {
  int __pyx_n;
  int copy;
};

/* "utils.pxd":6290
 *     return out
 * 
 * cdef inline np.ndarray arr_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Multiply the values of a 1-D array by the 'factor' `<'np.ndarray'>`
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_mul {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6342
 *     return out
 * 
 * cdef inline np.ndarray arr_mod(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise modulo of a 1-D array by `factor` with Python semantics
 *     (remainder has the same sign as the divisor) `<'np.ndarray'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_arr_mod {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6401
 *     return out
 * 
 * cdef inline np.ndarray arr_div_even(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-to-even) <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_even {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6455
 *     return out
 * 
 * cdef inline np.ndarray arr_div_even_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-to-even),
 *     then scale by `multiple` <'ndarray[int64]'>.
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_even_mul {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6515
 *     return out
 * 
 * cdef inline np.ndarray arr_div_up(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-up / away-from-zero) <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_up {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6566
 *     return out
 * 
 * cdef inline np.ndarray arr_div_up_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to nearest away from
 *     zero (half-up), then scale by 'multiple' <'ndarray[int64]'>.
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_up_mul {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6623
 *     return out
 * 
 * cdef inline np.ndarray arr_div_down(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest
 *     integers (half-down / toward-zero) <'ndarray[int64]'>.
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_down {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6675
 *     return out
 * 
 * cdef inline np.ndarray arr_div_down_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-down),
 *     then scale by `multiple` <'ndarray[int64]'>.
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_down_mul {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6732
 *     return out
 * 
 * cdef inline np.ndarray arr_div_ceil(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and ceils up to the nearest integers `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_ceil {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6782
 *     return out
 * 
 * cdef inline np.ndarray arr_div_ceil_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and ceils up to the nearest integers,
 *     then scale by `multiple` <'ndarray[int64]'>.
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_ceil_mul {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6838
 *     return out
 * 
 * cdef inline np.ndarray arr_div_floor(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and floors down to the nearest integers `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_floor {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6888
 *     return out
 * 
 * cdef inline np.ndarray arr_div_floor_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and floors down to the nearest integers,
 *     then scale by `multiple` <'ndarray[int64]'>.
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_floor_mul {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6944
 *     return out
 * 
 * cdef inline np.ndarray arr_div_trunc(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and and truncate toward zero `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_trunc {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6989
 *     return out
 * 
 * cdef inline np.ndarray arr_div_trunc_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and truncate toward zero,
 *     then scale by `multiple` <'ndarray[int64]'>.
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_trunc_mul {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7040
 *     return out
 * 
 * cdef inline np.ndarray arr_add_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise addition of two 1-D arrays <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_add_arr {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7093
 *     return out
 * 
 * cdef inline np.ndarray arr_sub_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise subtraction of two 1-D arrays <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_sub_arr {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7146
 *     return out
 * 
 * cdef inline np.ndarray arr_mul_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise multiplication of two 1-D arrays <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_mul_arr {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7601
 * 
 * # . range check
 * cdef inline bint is_dt64arr_ns_safe(np.ndarray arr, int arr_reso=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check if a 1-D array can be safely represented as datetime64[ns] `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe {
  int __pyx_n;
  int arr_reso;
};

/* "utils.pxd":7670
 * 
 * # . access
 * cdef inline np.ndarray dt64arr_year(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract civil year numbers from a 1-D ndarray[datetime64[*]] `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_year {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7693
 *     return arr_add(out, EPOCH_YEAR + offset, False)
 * 
 * cdef inline np.ndarray dt64arr_quarter(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract quarter numbers (1..4) from a 1-D ndarray[datetime64[*]] `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_quarter {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7735
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_month(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract month numbers (1..12) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_month {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7758
 *     return arr_mod(out, 12, offset + 1, False)
 * 
 * cdef inline np.ndarray dt64arr_weekday(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract weekday numbers (0=Mon .. 6=Sun) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_weekday {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7804
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_day(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract day-of-month (1..31) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_day {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7865
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_hour(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract hour-of-day (0..23) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_hour {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7888
 *     return arr_mod(out, 24, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_minute(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract minute-of-hour (0..59) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_minute {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7911
 *     return arr_mod(out, 60, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_second(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract second-of-minute (0..59) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_second {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7934
 *     return arr_mod(out, 60, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_millisecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract millisecond-of-second (0..999) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_millisecond {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7957
 *     return arr_mod(out, 1_000, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_microsecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract microsecond-of-second (0..999,999) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_microsecond {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7980
 *     return arr_mod(out, 1_000_000, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_nanosecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract nanosecond-of-microsecond (0..999) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_nanosecond {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":8025
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_times(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract time-of-day (elapsed since midnight) in the same unit as `arr` <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_times {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":8074
 * 
 * # . calendar
 * cdef inline np.ndarray dt64arr_isocalendar(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Return ISO-8601 calendar components for each element of a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_isocalendar {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8136
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_isoyear(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract ISO-8601 year numbers from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_isoyear {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8173
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_isoweek(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract ISO-8601 week numbers from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_isoweek {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8210
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_isoweekday(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract ISO-8601 weekday numbers (1=Mon .. 7=Sun) from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_isoweekday {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8247
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_is_leap_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise check for leap years of a 1-D datetime64 array `<'ndarray[bool]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_is_leap_year {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8286
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_is_long_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise check for long years of a 1-D datetime64 array `<'ndarray[bool]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_is_long_year {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8325
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_leap_bt_years(np.ndarray arr, np.npy_int64 year, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Compute the number of leap years between the target `year` and elements
 *     of a 1-D datetime64 array `<'ndarray[int64]'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_leap_bt_years {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8363
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_in_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the number of days in the year (365/366) from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_year {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8398
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_bf_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the number of days strictly before January 1 of year under the
 *     proleptic Gregorian rules from a 1-D datetime64 array `<'ndarray[int64]'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_bf_year {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8434
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_day_of_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the 1-based ordinal day-of-year from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_day_of_year {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8471
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_in_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days in calendar quarter under the proleptic Gregorian rules
 *     from a 1-D datetime64 array `<'ndarray[int64]'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_quarter {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8509
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_bf_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days strictly before the first day of the
 *     calendar quarter under the proleptic Gregorian rules from a 1-D
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_bf_quarter {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8548
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_day_of_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the 1-based ordinal day-of-quarter from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_day_of_quarter {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8586
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_in_month(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days in calendar month under the proleptic Gregorian rules
 *     from a 1-D datetime64 array `<'ndarray[int64]'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_month {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8624
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_bf_month(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days strictly before the first day of the
 *     calendar month under the proleptic Gregorian rules from a 1-D
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_bf_month {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8677
 *     return arr_fill_int64(value, size).astype(nptime_unit_str2dt64(unit))
 * 
 * cdef inline np.ndarray dt64arr_as_int64(np.ndarray arr, str as_unit, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 ticks in the requested unit `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":8746
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, as_unit)
 * 
 * cdef inline np.ndarray dt64arr_as_int64_Y(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 year ticks (Y) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":8823
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_Q(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 quarter ticks (Q) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Q {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":8867
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_M(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 month ticks (M) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":8950
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_W(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 week ticks (W) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_W {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":8994
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_D(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 day ticks (D) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":9048
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "D")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_h(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 hour ticks (h) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_h {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":9102
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "h")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_m(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 minute ticks (m) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_m {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":9156
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "m")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_s(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 second ticks (s) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_s {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":9210
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "s")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_ms(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 millisecond ticks (ms) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ms {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":9264
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "ms")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_us(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 microsecond ticks (us) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_us {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":9318
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "us")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_ns(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 nanosecond ticks (ns) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ns {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":9372
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "ns")
 * 
 * cdef inline np.ndarray _dt64arr_Y_as_int64_D(np.ndarray arr, np.npy_int64 factor=1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert an ndarray[datetime64[Y]] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'ndarray[int64]'>`.
*/
struct __pyx_opt_args_7cytimes_5utils__dt64arr_Y_as_int64_D {
  int __pyx_n;
  npy_int64 factor;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":9405
 *     return out
 * 
 * cdef inline np.ndarray _dt64arr_M_as_int64_D(np.ndarray arr, np.npy_int64 factor=1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert an ndarray[datetime64[M]] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'ndarray[int64]'>`.
*/
struct __pyx_opt_args_7cytimes_5utils__dt64arr_M_as_int64_D {
  int __pyx_n;
  npy_int64 factor;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":9438
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_W_iso(np.ndarray arr, int weekday, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 week ticks (W) aligned to an ISO weekday `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_W_iso {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":9496
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_to_ord(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 proleptic
 *     Gregorian ordinals `<'ndarray[int64]'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_to_ord {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":9523
 * 
 * # . conversion: float64
 * cdef inline np.ndarray dt64arr_to_ts(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to float64 Unix timestamps `<'ndarray[float64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_to_ts {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":9579
 * 
 * # . conversion: unit
 * cdef inline np.ndarray dt64arr_as_unit(np.ndarray arr, str as_unit, int arr_reso=-1, bint limit=False, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D datetime64 array to a specifc NumPy datetime64 unit `<'ndarray[datetime64]'>`
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_unit {
  int __pyx_n;
  int arr_reso;
  int limit;
  int copy;
};

/* "utils.pxd":9798
 * 
 * # . manipulation
 * cdef inline np.ndarray dt64arr_add_delta(np.ndarray arr,             # <<<<<<<<<<<<<<
 *     np.npy_int64 years=0, np.npy_int64 quarters=0, np.npy_int64 months=0, np.npy_int64 weeks=0, np.npy_int64 days=0,
 *     np.npy_int64 hours=0, np.npy_int64 minutes=0, np.npy_int64 seconds=0, np.npy_int64 milliseconds=0,
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_add_delta {
  int __pyx_n;
  npy_int64 years;
  npy_int64 quarters;
  npy_int64 months;
  npy_int64 weeks;
  npy_int64 days;
  npy_int64 hours;
  npy_int64 minutes;
  npy_int64 seconds;
  npy_int64 milliseconds;
  npy_int64 microseconds;
  npy_int64 nanoseconds;
  int arr_reso;
};

/* "utils.pxd":9925
 *     )
 * 
 * cdef inline np.ndarray _dt64arr_add_delta_date(np.ndarray arr, np.npy_int64 years, np.npy_int64 quarters, np.npy_int64 months, np.npy_int64 weeks, np.npy_int64 days, int arr_reso=-1):             # <<<<<<<<<<<<<<
 *     """(internal) Apply only the calendar delta (Y/Q/M/W/D) to an ndarray[datetime64]
 *     and return `int64` day ticks `<'ndarray[int64]'>`.
*/
struct __pyx_opt_args_7cytimes_5utils__dt64arr_add_delta_date {
  int __pyx_n;
  int arr_reso;
};

/* "utils.pxd":10070
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_NS)
 * 
 * cdef inline np.ndarray dt64arr_replace_dates(np.ndarray arr, np.npy_int64 year, np.npy_int64 month, np.npy_int64 day, int arr_reso=-1):             # <<<<<<<<<<<<<<
 *     """Replace the Y/M/D components of an ndarray[datetime64] and return `int64` day ticks `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_replace_dates {
  int __pyx_n;
  int arr_reso;
};

/* "utils.pxd":10139
 *     return dateD
 * 
 * cdef inline np.ndarray dt64arr_replace_times(np.ndarray arr, np.npy_int64 hour, np.npy_int64 minute, np.npy_int64 second, np.npy_int64 microsecond, np.npy_int64 nanosecond, int arr_reso=-1):             # <<<<<<<<<<<<<<
 *     """Replace the h/m/s/us/ns components of an ndarray[datetime64] and return the
 *     time components `int64` ticks in the original resolution `<'ndarray[int64]'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_replace_times {
  int __pyx_n;
  int arr_reso;
};

/* "utils.pxd":10264
 * 
 * # . arithmetic
 * cdef inline np.ndarray dt64arr_round(np.ndarray arr, str to_unit, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Round a 1-D datetime64 array to the nearest multiple of `to_unit` (ties-to-even) `<'ndarray[datetime64]'>`
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_round {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":10448
 *     _raise_arr_dt64_rcl_error("round", arr_reso, to_unit)
 * 
 * cdef inline np.ndarray dt64arr_ceil(np.ndarray arr, str to_unit, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ceil a 1-D datetime64 array to the nearest multiple of `to_unit` `<'ndarray[datetime64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_ceil {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":10632
 *     _raise_arr_dt64_rcl_error("ceil", arr_reso, to_unit)
 * 
 * cdef inline np.ndarray dt64arr_floor(np.ndarray arr, str to_unit, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Floor a 1-D datetime64 array to the nearest multiple of `to_unit` `<'ndarray[datetime64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_floor {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":10897
 * 
 * # . conversion
 * cdef inline np.ndarray td64arr_as_int64_us(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[timedelta64[*]] to int64 microsecond ticks (us) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_td64arr_as_int64_us {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":10951
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "us")
 * 
 * cdef inline np.ndarray _td64arr_Y_as_int64_D(np.ndarray arr, int to_reso, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert a 1-D ndarray[timedelta64[Y]] to int64 day ticks using an
 *     average year (365.2425 D), then further adjust the resolution by `to_reso` and
*/
struct __pyx_opt_args_7cytimes_5utils__td64arr_Y_as_int64_D {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":10987
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64 array." % to_reso)
 * 
 * cdef inline np.ndarray _td64arr_M_as_int64_D(np.ndarray arr, int to_reso, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert a 1-D ndarray[timedelta64[M]] to int64 day ticks using an
 *     average month (365.2425 / 12 = 30.436875 D), then further adjust the resolution
*/
struct __pyx_opt_args_7cytimes_5utils__td64arr_M_as_int64_D {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};
struct __pyx_opt_args_7cytimes_6parser__timelex;
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_jump;
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_pertain;
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_utc;
struct __pyx_opt_args_7cytimes_6parser_7Configs_add_tz;
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_tz;
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_month;
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_weekday;
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_hms;
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_ampm;
struct __pyx_opt_args_7cytimes_6parser_6Result_set_ymd_str;
struct __pyx_opt_args_7cytimes_6parser_6Parser_parse;
struct __pyx_opt_args_7cytimes_6parser_6Parser__set_ymd_by_token;
struct __pyx_opt_args_7cytimes_6parser_6Parser__set_hms_by_token;
struct __pyx_opt_args_7cytimes_6parser_6Parser__set_hour_by_token;
struct __pyx_opt_args_7cytimes_6parser_6Parser__set_minute_by_token;
struct __pyx_opt_args_7cytimes_6parser_6Parser__set_second_by_token;
struct __pyx_opt_args_7cytimes_6parser_parse;
struct __pyx_opt_args_7cytimes_6parser_parse_obj;
struct __pyx_opt_args_7cytimes_6parser_parse_month;
struct __pyx_opt_args_7cytimes_6parser_parse_weekday;

/* "cytimes/parser.pxd":13
 * 
 * # Timelex
 * ctypedef enum State:             # <<<<<<<<<<<<<<
 *     START     = 0
 *     DIGIT     = 1
*/
enum __pyx_t_7cytimes_6parser_State {
  __pyx_e_7cytimes_6parser_START = 0,
  __pyx_e_7cytimes_6parser_DIGIT = 1,
  __pyx_e_7cytimes_6parser_DIGIT_DOT = 2,
  __pyx_e_7cytimes_6parser_ALPHA = 3,
  __pyx_e_7cytimes_6parser_ALPHA_DOT = 4
};
typedef enum __pyx_t_7cytimes_6parser_State __pyx_t_7cytimes_6parser_State;

/* "cytimes/parser.pxd":20
 *     ALPHA_DOT = 4
 * 
 * cdef inline list _timelex(str data, Py_ssize_t pos, Py_ssize_t length=0):             # <<<<<<<<<<<<<<
 *     """Tokenize a datetime-like string into lexical units (tokens).
 * 
*/
struct __pyx_opt_args_7cytimes_6parser__timelex {
  int __pyx_n;
  Py_ssize_t length;
};

/* "cytimes/parser.pxd":266
 *     cpdef bint add_jump(self, str token) except -1
 *     cpdef bint remove_jump(self, str token) except -1
 *     cpdef bint replace_jump(self, set tokens=?) except -1             # <<<<<<<<<<<<<<
 *     cpdef bint is_jump(self, str token) except -1
 *     # Pertain
*/
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_jump {
  int __pyx_n;
  PyObject *tokens;
};

/* "cytimes/parser.pxd":271
 *     cpdef bint add_pertain(self, str token) except -1
 *     cpdef bint remove_pertain(self, str token) except -1
 *     cpdef bint replace_pertain(self, set tokens=?) except -1             # <<<<<<<<<<<<<<
 *     cpdef bint is_pertain(self, str token) except -1
 *     # UTC
*/
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_pertain {
  int __pyx_n;
  PyObject *tokens;
};

/* "cytimes/parser.pxd":276
 *     cpdef bint add_utc(self, str token) except -1
 *     cpdef bint remove_utc(self, str token) except -1
 *     cpdef bint replace_utc(self, set tokens=?) except -1             # <<<<<<<<<<<<<<
 *     cpdef bint is_utc(self, str token) except -1
 *     # Timezone
*/
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_utc {
  int __pyx_n;
  PyObject *tokens;
};

/* "cytimes/parser.pxd":279
 *     cpdef bint is_utc(self, str token) except -1
 *     # Timezone
 *     cpdef bint add_tz(self, str token, int hours=?, int minutes=?, int seconds=?) except -1             # <<<<<<<<<<<<<<
 *     cpdef bint remove_tz(self, str token) except -1
 *     cpdef bint replace_tz(self, dict mapping=?) except -1
*/
struct __pyx_opt_args_7cytimes_6parser_7Configs_add_tz {
  int __pyx_n;
  int hours;
  int minutes;
  int seconds;
};

/* "cytimes/parser.pxd":281
 *     cpdef bint add_tz(self, str token, int hours=?, int minutes=?, int seconds=?) except -1
 *     cpdef bint remove_tz(self, str token) except -1
 *     cpdef bint replace_tz(self, dict mapping=?) except -1             # <<<<<<<<<<<<<<
 *     cpdef bint is_tz(self, str token) except -1
 *     cpdef int get_tz_offset(self, str token) except -200_000
*/
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_tz {
  int __pyx_n;
  PyObject *mapping;
};

/* "cytimes/parser.pxd":287
 *     cpdef bint add_month(self, str token, int month) except -1
 *     cpdef bint remove_month(self, str token) except -1
 *     cpdef bint replace_month(self, dict mapping=?) except -1             # <<<<<<<<<<<<<<
 *     cpdef bint is_month(self, str token) except -1
 *     cpdef int get_month(self, str token) except -2
*/
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_month {
  int __pyx_n;
  PyObject *mapping;
};

/* "cytimes/parser.pxd":293
 *     cpdef bint add_weekday(self, str token, int weekday) except -1
 *     cpdef bint remove_weekday(self, str token) except -1
 *     cpdef bint replace_weekday(self, dict mapping=?) except -1             # <<<<<<<<<<<<<<
 *     cpdef bint is_weekday(self, str token) except -1
 *     cpdef int get_weekday(self, str token) except -2
*/
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_weekday {
  int __pyx_n;
  PyObject *mapping;
};

/* "cytimes/parser.pxd":299
 *     cpdef bint add_hms(self, str token, int flag) except -1
 *     cpdef bint remove_hms(self, str token) except -1
 *     cpdef bint replace_hms(self, dict mapping=?) except -1             # <<<<<<<<<<<<<<
 *     cpdef bint is_hms(self, str token) except -1
 *     cpdef int get_hms(self, str token) except -2
*/
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_hms {
  int __pyx_n;
  PyObject *mapping;
};

/* "cytimes/parser.pxd":305
 *     cpdef bint add_ampm(self, str token, int flag) except -1
 *     cpdef bint remove_ampm(self, str token) except -1
 *     cpdef bint replace_ampm(self, dict mapping=?) except -1             # <<<<<<<<<<<<<<
 *     cpdef bint is_ampm(self, str token) except -1
 *     cpdef int get_ampm(self, str token) except -2
*/
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_ampm {
  int __pyx_n;
  PyObject *mapping;
};

/* "cytimes/parser.pxd":351
 *     # Y/M/D
 *     cdef inline bint set_ymd_int(self, int flag, long long value) except -1
 *     cdef inline bint set_ymd_str(self, int flag, str token, Py_ssize_t token_len=?) except -1             # <<<<<<<<<<<<<<
 *     cdef inline int ymd_slots_filled(self) noexcept
 *     cdef inline int ymd_roles_resolved(self) noexcept
*/
struct __pyx_opt_args_7cytimes_6parser_6Result_set_ymd_str {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "cytimes/parser.pxd":385
 *         object __cls
 *     # Parse
 *     cpdef datetime.datetime parse(self, str dtstr, object default=?, object yearfirst=?, object dayfirst=?, bint ignoretz=?, bint isoformat=?, object dtclass=?)             # <<<<<<<<<<<<<<
 *     cdef inline bint _process(self, str dtstr, bint isoformat) except -1
 *     # Build
*/
struct __pyx_opt_args_7cytimes_6parser_6Parser_parse {
  int __pyx_n;
  PyObject *__pyx_default;
  PyObject *yearfirst;
  PyObject *dayfirst;
  int ignoretz;
  int isoformat;
  PyObject *dtclass;
};

/* "cytimes/parser.pxd":413
 *     cdef inline bint _reset_token_peeks(self) noexcept
 *     # . setters
 *     cdef inline bint _set_ymd_by_token(self, int flag, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1             # <<<<<<<<<<<<<<
 *     cdef inline bint _set_hms_by_token(self, int flag, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
 *     cdef inline bint _set_hour_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
*/
struct __pyx_opt_args_7cytimes_6parser_6Parser__set_ymd_by_token {
  int __pyx_n;
  PyObject *token;
  Py_ssize_t token_len;
  int token_kind;
};

/* "cytimes/parser.pxd":414
 *     # . setters
 *     cdef inline bint _set_ymd_by_token(self, int flag, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
 *     cdef inline bint _set_hms_by_token(self, int flag, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1             # <<<<<<<<<<<<<<
 *     cdef inline bint _set_hour_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
 *     cdef inline bint _set_minute_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
*/
struct __pyx_opt_args_7cytimes_6parser_6Parser__set_hms_by_token {
  int __pyx_n;
  PyObject *token;
  Py_ssize_t token_len;
  int token_kind;
};

/* "cytimes/parser.pxd":415
 *     cdef inline bint _set_ymd_by_token(self, int flag, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
 *     cdef inline bint _set_hms_by_token(self, int flag, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
 *     cdef inline bint _set_hour_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1             # <<<<<<<<<<<<<<
 *     cdef inline bint _set_minute_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
 *     cdef inline bint _set_second_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
*/
struct __pyx_opt_args_7cytimes_6parser_6Parser__set_hour_by_token {
  int __pyx_n;
  PyObject *token;
  Py_ssize_t token_len;
  int token_kind;
};

/* "cytimes/parser.pxd":416
 *     cdef inline bint _set_hms_by_token(self, int flag, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
 *     cdef inline bint _set_hour_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
 *     cdef inline bint _set_minute_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1             # <<<<<<<<<<<<<<
 *     cdef inline bint _set_second_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
 *     cdef inline int _adjust_hour_by_ampm(self, int hour, int flag) except -1
*/
struct __pyx_opt_args_7cytimes_6parser_6Parser__set_minute_by_token {
  int __pyx_n;
  PyObject *token;
  Py_ssize_t token_len;
  int token_kind;
};

/* "cytimes/parser.pxd":417
 *     cdef inline bint _set_hour_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
 *     cdef inline bint _set_minute_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
 *     cdef inline bint _set_second_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1             # <<<<<<<<<<<<<<
 *     cdef inline int _adjust_hour_by_ampm(self, int hour, int flag) except -1
 *     # Internal
*/
struct __pyx_opt_args_7cytimes_6parser_6Parser__set_second_by_token {
  int __pyx_n;
  PyObject *token;
  Py_ssize_t token_len;
  int token_kind;
};

/* "cytimes/parser.pxd":425
 * 
 * # Parse
 * cpdef datetime.datetime parse(str dtstr, object default=?, object yearfirst=?, object dayfirst=?, bint ignoretz=?, bint isoformat=?, Configs cfg=?, object dtclass=?)             # <<<<<<<<<<<<<<
 * cpdef datetime.datetime parse_obj(object dtobj, object default=?, object yearfirst=?, object dayfirst=?, bint ignoretz=?, bint isoformat=?, Configs cfg=?, object dtclass=?)
 * cpdef int parse_month(object token, Configs cfg=?, bint raise_error=?) except -2
*/
struct __pyx_opt_args_7cytimes_6parser_parse {
  int __pyx_n;
  PyObject *__pyx_default;
  PyObject *yearfirst;
  PyObject *dayfirst;
  int ignoretz;
  int isoformat;
  struct __pyx_obj_7cytimes_6parser_Configs *cfg;
  PyObject *dtclass;
};

/* "cytimes/parser.pxd":426
 * # Parse
 * cpdef datetime.datetime parse(str dtstr, object default=?, object yearfirst=?, object dayfirst=?, bint ignoretz=?, bint isoformat=?, Configs cfg=?, object dtclass=?)
 * cpdef datetime.datetime parse_obj(object dtobj, object default=?, object yearfirst=?, object dayfirst=?, bint ignoretz=?, bint isoformat=?, Configs cfg=?, object dtclass=?)             # <<<<<<<<<<<<<<
 * cpdef int parse_month(object token, Configs cfg=?, bint raise_error=?) except -2
 * cpdef int parse_weekday(object token, Configs cfg=?, bint raise_error=?) except -2
*/
struct __pyx_opt_args_7cytimes_6parser_parse_obj {
  int __pyx_n;
  PyObject *__pyx_default;
  PyObject *yearfirst;
  PyObject *dayfirst;
  int ignoretz;
  int isoformat;
  struct __pyx_obj_7cytimes_6parser_Configs *cfg;
  PyObject *dtclass;
};

/* "cytimes/parser.pxd":427
 * cpdef datetime.datetime parse(str dtstr, object default=?, object yearfirst=?, object dayfirst=?, bint ignoretz=?, bint isoformat=?, Configs cfg=?, object dtclass=?)
 * cpdef datetime.datetime parse_obj(object dtobj, object default=?, object yearfirst=?, object dayfirst=?, bint ignoretz=?, bint isoformat=?, Configs cfg=?, object dtclass=?)
 * cpdef int parse_month(object token, Configs cfg=?, bint raise_error=?) except -2             # <<<<<<<<<<<<<<
 * cpdef int parse_weekday(object token, Configs cfg=?, bint raise_error=?) except -2
*/
struct __pyx_opt_args_7cytimes_6parser_parse_month {
  int __pyx_n;
  struct __pyx_obj_7cytimes_6parser_Configs *cfg;
  int raise_error;
};

/* "cytimes/parser.pxd":428
 * cpdef datetime.datetime parse_obj(object dtobj, object default=?, object yearfirst=?, object dayfirst=?, bint ignoretz=?, bint isoformat=?, Configs cfg=?, object dtclass=?)
 * cpdef int parse_month(object token, Configs cfg=?, bint raise_error=?) except -2
 * cpdef int parse_weekday(object token, Configs cfg=?, bint raise_error=?) except -2             # <<<<<<<<<<<<<<
*/
struct __pyx_opt_args_7cytimes_6parser_parse_weekday {
  int __pyx_n;
  struct __pyx_obj_7cytimes_6parser_Configs *cfg;
  int raise_error;
};
struct __pyx_opt_args_7cytimes_6errors_raise_error;
struct __pyx_opt_args_7cytimes_6errors_raise_configs_token_error;
struct __pyx_opt_args_7cytimes_6errors_raise_configs_value_error;
struct __pyx_opt_args_7cytimes_6errors_raise_parser_failed_error;
struct __pyx_opt_args_7cytimes_6errors_raise_argument_error;
struct __pyx_opt_args_7cytimes_6errors_raise_type_error;

/* "errors.pxd":4
 * 
 * # Raise error helpers
 * cpdef bint raise_error(object exc, object cls=?, str input_msg=?, str error_msg=?, Exception tb_exc=?)             # <<<<<<<<<<<<<<
 * cpdef bint raise_configs_token_error(object cls=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_configs_value_error(object cls=?, str error_msg=?, Exception tb_exc=?)
*/
struct __pyx_opt_args_7cytimes_6errors_raise_error {
  int __pyx_n;
  PyObject *cls;
  PyObject *input_msg;
  PyObject *error_msg;
  PyObject *tb_exc;
};

/* "errors.pxd":5
 * # Raise error helpers
 * cpdef bint raise_error(object exc, object cls=?, str input_msg=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_configs_token_error(object cls=?, str error_msg=?, Exception tb_exc=?)             # <<<<<<<<<<<<<<
 * cpdef bint raise_configs_value_error(object cls=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_parser_failed_error(object cls=?, str error_msg=?, Exception tb_exc=?)
*/
struct __pyx_opt_args_7cytimes_6errors_raise_configs_token_error {
  int __pyx_n;
  PyObject *cls;
  PyObject *error_msg;
  PyObject *tb_exc;
};

/* "errors.pxd":6
 * cpdef bint raise_error(object exc, object cls=?, str input_msg=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_configs_token_error(object cls=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_configs_value_error(object cls=?, str error_msg=?, Exception tb_exc=?)             # <<<<<<<<<<<<<<
 * cpdef bint raise_parser_failed_error(object cls=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_argument_error(object cls=?, str input_msg=?, str error_msg=?, Exception tb_exc=?)
*/
struct __pyx_opt_args_7cytimes_6errors_raise_configs_value_error {
  int __pyx_n;
  PyObject *cls;
  PyObject *error_msg;
  PyObject *tb_exc;
};

/* "errors.pxd":7
 * cpdef bint raise_configs_token_error(object cls=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_configs_value_error(object cls=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_parser_failed_error(object cls=?, str error_msg=?, Exception tb_exc=?)             # <<<<<<<<<<<<<<
 * cpdef bint raise_argument_error(object cls=?, str input_msg=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_type_error(object cls=?, str input_msg=?, str error_msg=?, Exception tb_exc=?)
*/
struct __pyx_opt_args_7cytimes_6errors_raise_parser_failed_error {
  int __pyx_n;
  PyObject *cls;
  PyObject *error_msg;
  PyObject *tb_exc;
};

/* "errors.pxd":8
 * cpdef bint raise_configs_value_error(object cls=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_parser_failed_error(object cls=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_argument_error(object cls=?, str input_msg=?, str error_msg=?, Exception tb_exc=?)             # <<<<<<<<<<<<<<
 * cpdef bint raise_type_error(object cls=?, str input_msg=?, str error_msg=?, Exception tb_exc=?)
*/
struct __pyx_opt_args_7cytimes_6errors_raise_argument_error {
  int __pyx_n;
  PyObject *cls;
  PyObject *input_msg;
  PyObject *error_msg;
  PyObject *tb_exc;
};

/* "errors.pxd":9
 * cpdef bint raise_parser_failed_error(object cls=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_argument_error(object cls=?, str input_msg=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_type_error(object cls=?, str input_msg=?, str error_msg=?, Exception tb_exc=?)             # <<<<<<<<<<<<<<
*/
struct __pyx_opt_args_7cytimes_6errors_raise_type_error {
  int __pyx_n;
  PyObject *cls;
  PyObject *input_msg;
  PyObject *error_msg;
  PyObject *tb_exc;
};

/* "cytimes/parser.pxd":246
 *     dict _DEFAULT_AMPM
 * 
 * cdef class Configs:             # <<<<<<<<<<<<<<
 *     cdef:
 *         # . settings
*/
struct __pyx_obj_7cytimes_6parser_Configs {
  PyObject_HEAD
  struct __pyx_vtabstruct_7cytimes_6parser_Configs *__pyx_vtab;
  int _yearfirst;
  int _dayfirst;
  PyObject *_jump;
  PyObject *_jump_ext;
  PyObject *_pertain;
  PyObject *_pertain_ext;
  PyObject *_utc;
  PyObject *_utc_ext;
  PyObject *_tz;
  PyObject *_tz_ext;
  PyObject *_month;
  PyObject *_month_ext;
  PyObject *_weekday;
  PyObject *_weekday_ext;
  PyObject *_hms;
  PyObject *_hms_ext;
  PyObject *_ampm;
  PyObject *_ampm_ext;
  PyObject *_Configs__cls;
};


/* "cytimes/parser.pxd":326
 * 
 * # Parser
 * cdef class Result:             # <<<<<<<<<<<<<<
 *     cdef:
 *         # . Y/M/D
*/
struct __pyx_obj_7cytimes_6parser_Result {
  PyObject_HEAD
  struct __pyx_vtabstruct_7cytimes_6parser_Result *__pyx_vtab;
  int _ymd[3];
  int _idx;
  int _yidx;
  int _midx;
  int _didx;
  int _resolved;
  int year;
  int month;
  int day;
  int hour;
  int minute;
  int second;
  int microsecond;
  int weekday;
  int doy;
  int ampm;
  int tzoffset;
  int tzoffset_finalized;
  int century_specified;
};


/* "cytimes/parser.pxd":374
 *     cdef inline bint _reset(self) noexcept
 * 
 * cdef class Parser:             # <<<<<<<<<<<<<<
 *     cdef:
 *         bint _ignoretz
*/
struct __pyx_obj_7cytimes_6parser_Parser {
  PyObject_HEAD
  struct __pyx_vtabstruct_7cytimes_6parser_Parser *__pyx_vtab;
  int _ignoretz;
  struct __pyx_obj_7cytimes_6parser_Configs *_cfg;
  struct __pyx_obj_7cytimes_6parser_Result *_res;
  Py_ssize_t _pos;
  Py_ssize_t _length;
  PyObject *_tokens;
  PyObject *_token1;
  PyObject *_Parser__cls;
};



/* "cytimes/parser.pxd":246
 *     dict _DEFAULT_AMPM
 * 
 * cdef class Configs:             # <<<<<<<<<<<<<<
 *     cdef:
 *         # . settings
*/

struct __pyx_vtabstruct_7cytimes_6parser_Configs {
  PyObject *(*order_hint)(struct __pyx_obj_7cytimes_6parser_Configs *, int __pyx_skip_dispatch);
  int (*add_jump)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*remove_jump)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*replace_jump)(struct __pyx_obj_7cytimes_6parser_Configs *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_jump *__pyx_optional_args);
  int (*is_jump)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*add_pertain)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*remove_pertain)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*replace_pertain)(struct __pyx_obj_7cytimes_6parser_Configs *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_pertain *__pyx_optional_args);
  int (*is_pertain)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*add_utc)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*remove_utc)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*replace_utc)(struct __pyx_obj_7cytimes_6parser_Configs *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_utc *__pyx_optional_args);
  int (*is_utc)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*add_tz)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_7Configs_add_tz *__pyx_optional_args);
  int (*remove_tz)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*replace_tz)(struct __pyx_obj_7cytimes_6parser_Configs *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_tz *__pyx_optional_args);
  int (*is_tz)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*get_tz_offset)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*add_month)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int, int __pyx_skip_dispatch);
  int (*remove_month)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*replace_month)(struct __pyx_obj_7cytimes_6parser_Configs *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_month *__pyx_optional_args);
  int (*is_month)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*get_month)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*add_weekday)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int, int __pyx_skip_dispatch);
  int (*remove_weekday)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*replace_weekday)(struct __pyx_obj_7cytimes_6parser_Configs *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_weekday *__pyx_optional_args);
  int (*is_weekday)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*get_weekday)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*add_hms)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int, int __pyx_skip_dispatch);
  int (*remove_hms)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*replace_hms)(struct __pyx_obj_7cytimes_6parser_Configs *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_hms *__pyx_optional_args);
  int (*is_hms)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*get_hms)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*add_ampm)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int, int __pyx_skip_dispatch);
  int (*remove_ampm)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*replace_ampm)(struct __pyx_obj_7cytimes_6parser_Configs *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_ampm *__pyx_optional_args);
  int (*is_ampm)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*get_ampm)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*clear_settings)(struct __pyx_obj_7cytimes_6parser_Configs *, int __pyx_skip_dispatch);
  int (*reset_settings)(struct __pyx_obj_7cytimes_6parser_Configs *, int __pyx_skip_dispatch);
  PyObject *(*_ensure_str_token)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, PyObject *);
  PyObject *(*_validate_token)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, PyObject *);
  PyObject *(*_lowercase_token)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, PyObject *);
  PyObject *(*_gen_token_case_variants)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *);
  int (*_ensure_int_value)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, PyObject *);
  int (*_validate_value)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int, int, int);
  PyObject *(*_cls)(struct __pyx_obj_7cytimes_6parser_Configs *);
};
static struct __pyx_vtabstruct_7cytimes_6parser_Configs *__pyx_vtabptr_7cytimes_6parser_Configs;


/* "cytimes/parser.pxd":326
 * 
 * # Parser
 * cdef class Result:             # <<<<<<<<<<<<<<
 *     cdef:
 *         # . Y/M/D
*/

struct __pyx_vtabstruct_7cytimes_6parser_Result {
  int (*set_ymd_int)(struct __pyx_obj_7cytimes_6parser_Result *, int, PY_LONG_LONG);
  int (*set_ymd_str)(struct __pyx_obj_7cytimes_6parser_Result *, int, PyObject *, struct __pyx_opt_args_7cytimes_6parser_6Result_set_ymd_str *__pyx_optional_args);
  int (*ymd_slots_filled)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*ymd_roles_resolved)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*could_be_day)(struct __pyx_obj_7cytimes_6parser_Result *, PY_LONG_LONG);
  int (*could_be_doy)(struct __pyx_obj_7cytimes_6parser_Result *, PY_LONG_LONG);
  int (*resolve)(struct __pyx_obj_7cytimes_6parser_Result *, int, int);
  int (*valid)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*is_year_set)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*is_month_set)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*is_day_set)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*is_hour_set)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*is_minute_set)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*is_second_set)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*is_microsecond_set)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*is_weekday_set)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*is_doy_set)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*is_ampm_set)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*is_tzoffset_set)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*_record_ymd)(struct __pyx_obj_7cytimes_6parser_Result *, int, int);
  int (*_reset)(struct __pyx_obj_7cytimes_6parser_Result *);
};
static struct __pyx_vtabstruct_7cytimes_6parser_Result *__pyx_vtabptr_7cytimes_6parser_Result;


/* "cytimes/parser.pxd":374
 *     cdef inline bint _reset(self) noexcept
 * 
 * cdef class Parser:             # <<<<<<<<<<<<<<
 *     cdef:
 *         bint _ignoretz
*/

struct __pyx_vtabstruct_7cytimes_6parser_Parser {
  PyDateTime_DateTime *(*parse)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_6Parser_parse *__pyx_optional_args);
  int (*_process)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *, int);
  PyDateTime_DateTime *(*_build)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *, PyObject *, PyObject *);
  PyDateTime_DateTime *(*_gen_dt)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *, PyObject *, PyObject *);
  int (*_process_iso_format)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_parse_iso_date)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_parse_iso_time)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_parse_iso_extra)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_process_timelex_tokens)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_parse_token_numeric)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_parse_token_month)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_parse_iso_week)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_parse_token_weekday)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_parse_token_ampm)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_parse_token_tzname)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_parse_token_tzoffset)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_has_token)(struct __pyx_obj_7cytimes_6parser_Parser *, Py_ssize_t);
  PyObject *(*_get_token)(struct __pyx_obj_7cytimes_6parser_Parser *, Py_ssize_t);
  PyObject *(*_get_token1)(struct __pyx_obj_7cytimes_6parser_Parser *);
  PyObject *(*_get_next_token)(struct __pyx_obj_7cytimes_6parser_Parser *);
  int (*_reset_token_peeks)(struct __pyx_obj_7cytimes_6parser_Parser *);
  int (*_set_ymd_by_token)(struct __pyx_obj_7cytimes_6parser_Parser *, int, struct __pyx_opt_args_7cytimes_6parser_6Parser__set_ymd_by_token *__pyx_optional_args);
  int (*_set_hms_by_token)(struct __pyx_obj_7cytimes_6parser_Parser *, int, struct __pyx_opt_args_7cytimes_6parser_6Parser__set_hms_by_token *__pyx_optional_args);
  int (*_set_hour_by_token)(struct __pyx_obj_7cytimes_6parser_Parser *, struct __pyx_opt_args_7cytimes_6parser_6Parser__set_hour_by_token *__pyx_optional_args);
  int (*_set_minute_by_token)(struct __pyx_obj_7cytimes_6parser_Parser *, struct __pyx_opt_args_7cytimes_6parser_6Parser__set_minute_by_token *__pyx_optional_args);
  int (*_set_second_by_token)(struct __pyx_obj_7cytimes_6parser_Parser *, struct __pyx_opt_args_7cytimes_6parser_6Parser__set_second_by_token *__pyx_optional_args);
  int (*_adjust_hour_by_ampm)(struct __pyx_obj_7cytimes_6parser_Parser *, int, int);
  PyObject *(*_cls)(struct __pyx_obj_7cytimes_6parser_Parser *);
};
static struct __pyx_vtabstruct_7cytimes_6parser_Parser *__pyx_vtabptr_7cytimes_6parser_Parser;
/* #### Code section: utility_code_proto ### */

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, Py_ssize_t);
    void (*DECREF)(void*, PyObject*, Py_ssize_t);
    void (*GOTREF)(void*, PyObject*, Py_ssize_t);
    void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
    void* (*SetupContext)(const char*, Py_ssize_t, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
  #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__));\
          }
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
  #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); else {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContextNogil()
  #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
#define __Pyx_Py_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; Py_XDECREF(tmp);\
    } while (0)
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#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)

/* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* PyThreadStateGet.proto (used by PyErrFetchRestore) */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#if PY_VERSION_HEX >= 0x030C00A6
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->current_exception != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
#else
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->curexc_type != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->curexc_type)
#endif
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  (PyErr_Occurred() != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

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

/* GetTopmostException.proto (used by SaveResetException) */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* PyImportError_Check.proto */
#define __Pyx_PyExc_ImportError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_ImportError)

/* PyObjectCall.proto (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* PyObjectCallMethO.proto (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectFastCall.proto */
#define __Pyx_PyObject_FastCall(func, args, nargs)  __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs);

/* RaiseException.export */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

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

/* PyRuntimeError_Check.proto */
#define __Pyx_PyExc_RuntimeError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_RuntimeError)

/* ModInt[long].proto */
static CYTHON_INLINE long __Pyx_mod_long(long, long, int b_is_constant);

/* PyZeroDivisionError_Check.proto */
#define __Pyx_PyExc_ZeroDivisionError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_ZeroDivisionError)

/* PyOverflowError_Check.proto */
#define __Pyx_PyExc_OverflowError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_OverflowError)

/* py_unicode_predicate.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_Py_UNICODE_ISALPHA(Py_UCS4 uchar);
#else
#define __Pyx_Py_UNICODE_ISALPHA(u)  Py_UNICODE_ISALPHA(u)
#endif

/* PyValueError_Check.proto */
#define __Pyx_PyExc_ValueError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_ValueError)

/* BuildPyUnicode.proto (used by COrdinalToPyUnicode) */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength,
                                                int prepend_sign, char padding_char);

/* COrdinalToPyUnicode.proto (used by CIntToPyUnicode) */
static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value);
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t width, char padding_char);

/* GCCDiagnostics.proto (used by CIntToPyUnicode) */
#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif

/* IncludeStdlibH.proto (used by CIntToPyUnicode) */
#include <stdlib.h>

/* IncludeStringH.proto (used by CIntToPyUnicode) */
#include <string.h>

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char);

/* JoinPyUnicode.export */
static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char);

/* PyUnicode_Substring.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Substring(
            PyObject* text, Py_ssize_t start, Py_ssize_t stop);

/* PyUnicode_Unicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj);

/* TupleAndListFromArray.proto (used by fastcall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
#endif
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
#endif

/* BytesEquals.proto (used by UnicodeEquals) */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

/* UnicodeEquals.proto (used by fastcall) */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

/* fastcall.proto */
#if CYTHON_AVOID_BORROWED_REFS
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i)
#elif CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i))
#else
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i))
#endif
#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
#define __Pyx_KwValues_VARARGS(args, nargs) NULL
#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
#if CYTHON_METH_FASTCALL
    #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i])
    #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds)
    #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
    static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
    CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
  #else
    #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
  #endif
#else
    #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS
    #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
    #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
    #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
    #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
#endif
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start)
#else
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
#endif

/* py_dict_items.proto (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);

/* CallCFunction.proto (used by CallUnboundCMethod0) */
#define __Pyx_CallCFunction(cfunc, self, args)\
    ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args)
#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\
    ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs)
#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\
    ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs)
#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\
    ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames)

/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */
typedef struct {
    PyObject *type;
    PyObject **method_name;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS
    __pyx_atomic_int_type initialized;
#endif
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) {
#if !CYTHON_ATOMICS
    return 1;
#else
    __pyx_nonatomic_int_type expected = 0;
    if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) {
        return 0;
    }
    return expected;
#endif
}
static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) {
#if CYTHON_ATOMICS
    __pyx_atomic_store(&cfunc->initialized, 2);
#endif
}
#else
#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2
#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc)
#endif

/* CallUnboundCMethod0.proto */
CYTHON_UNUSED
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#else
#define __Pyx_CallUnboundCMethod0(cfunc, self)  __Pyx__CallUnboundCMethod0(cfunc, self)
#endif

/* py_dict_values.proto (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);

/* OwnedDictNext.proto (used by ParseKeywordsImpl) */
#if CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue);
#else
CYTHON_INLINE
static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue);
#endif

/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

/* ParseKeywordsImpl.export */
static int __Pyx_ParseKeywordsTuple(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs
);
static int __Pyx_ParseKeywordDictToDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name
);
static int __Pyx_ParseKeywordDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs
);

/* CallUnboundCMethod2.proto */
CYTHON_UNUSED
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
#else
#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2)  __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
#endif

/* ParseKeywords.proto */
static CYTHON_INLINE int __Pyx_ParseKeywords(
    PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[],
    PyObject *kwds2, PyObject *values[],
    Py_ssize_t num_pos_args, Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs
);

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

/* ArgTypeTestFunc.export */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))

/* PyMemoryError_Check.proto */
#define __Pyx_PyExc_MemoryError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_MemoryError)

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* ModInt[PY_LONG_LONG].proto */
static CYTHON_INLINE PY_LONG_LONG __Pyx_mod_PY_LONG_LONG(PY_LONG_LONG, PY_LONG_LONG, int b_is_constant);

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

/* PyObjectVectorCallKwBuilder.proto */
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n);
#if CYTHON_VECTORCALL
#if PY_VERSION_HEX >= 0x03090000
#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall
#else
#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall
#endif
#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n)
static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n);
static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n);
#else
#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict
#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n)
#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value)
#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value)
#endif

/* PyObjectFormatAndDecref.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f);
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f);

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_int(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_int(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_int(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char);

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
        L->ob_item[len] = x;
        #else
        PyList_SET_ITEM(list, len, x);
        #endif
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* RaiseUnexpectedTypeError.proto */
static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);

/* PyTypeError_Check.proto */
#define __Pyx_PyExc_TypeError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_TypeError)

/* PyObjectFastCallMethod.proto */
#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000
#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL)
#else
static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf);
#endif

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_PY_LONG_LONG(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_PY_LONG_LONG(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_PY_LONG_LONG(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_PY_LONG_LONG(PY_LONG_LONG value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_PY_LONG_LONG(PY_LONG_LONG value, Py_ssize_t width, char padding_char, char format_char);

/* PyAssertionError_Check.proto */
#define __Pyx_PyExc_AssertionError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_AssertionError)

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_npy_intp(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_npy_intp(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_npy_intp(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_npy_intp(npy_intp value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_npy_intp(npy_intp value, Py_ssize_t width, char padding_char, char format_char);

/* ModInt[npy_int64].proto */
static CYTHON_INLINE npy_int64 __Pyx_mod_npy_int64(npy_int64, npy_int64, int b_is_constant);

/* DivInt[npy_int64].proto */
static CYTHON_INLINE npy_int64 __Pyx_div_npy_int64(npy_int64, npy_int64, int b_is_constant);

/* PyObject_Unicode.proto */
#define __Pyx_PyObject_Unicode(obj)\
    (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))

/* UnicodeConcatInPlace.proto */
# if CYTHON_COMPILING_IN_CPYTHON
    #if CYTHON_REFNANNY
        #define __Pyx_PyUnicode_ConcatInPlace(left, right, unsafe_shared) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, unsafe_shared, __pyx_refnanny)
    #else
        #define __Pyx_PyUnicode_ConcatInPlace(left, right, unsafe_shared) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, unsafe_shared)
    #endif
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_DefinitelyUnique)
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_OwnStrongReference)
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_DefinitelyUnique)
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_SharedReference)
    static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right, int unsafe_shared
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    );
#else
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace __Pyx_PyUnicode_Concat
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace __Pyx_PyUnicode_Concat
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace __Pyx_PyUnicode_Concat
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace __Pyx_PyUnicode_Concat
#endif
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace(left, right))
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(left, right))
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace(left, right))
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace(left, right))

/* dict_getitem_default.proto */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value);

/* PyObjectCall2Args.proto (used by CallUnboundCMethod1) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* CallUnboundCMethod1.proto */
CYTHON_UNUSED
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#else
#define __Pyx_CallUnboundCMethod1(cfunc, self, arg)  __Pyx__CallUnboundCMethod1(cfunc, self, arg)
#endif

/* PyObjectVectorCallMethodKwBuilder.proto */
#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000
#define __Pyx_Object_VectorcallMethod_CallFromBuilder PyObject_VectorcallMethod
#else
static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames);
#endif

/* PyDictVersioning.proto (used by GetModuleGlobalName) */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
        (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\
    } else {\
        (VAR) = __pyx_dict_cached_value = (LOOKUP);\
        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    }\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  do {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  do {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) {
    return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2);
}
#endif
#define __Pyx_PyErr_ExceptionMatches2(err1, err2)  __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
#ifdef PyExceptionInstance_Check
  #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj)
#else
  #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException)
#endif

/* PyUnicodeContains.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_ContainsTF(PyObject* substring, PyObject* text, int eq) {
    int result = PyUnicode_Contains(text, substring);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* pyint_simplify.proto */
static CYTHON_INLINE int __Pyx_PyInt_FromNumber(PyObject **number_var, const char *argname, int accept_none);

/* pybytes_as_double.proto (used by pyobject_as_double) */
static double __Pyx_SlowPyString_AsDouble(PyObject *obj);
static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length);
static CYTHON_INLINE double __Pyx_PyBytes_AsDouble(PyObject *obj) {
    char* as_c_string;
    Py_ssize_t size;
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
    as_c_string = PyBytes_AS_STRING(obj);
    size = PyBytes_GET_SIZE(obj);
#else
    if (PyBytes_AsStringAndSize(obj, &as_c_string, &size) < 0) {
        return (double)-1;
    }
#endif
    return __Pyx__PyBytes_AsDouble(obj, as_c_string, size);
}
static CYTHON_INLINE double __Pyx_PyByteArray_AsDouble(PyObject *obj) {
    char* as_c_string;
    Py_ssize_t size;
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
    as_c_string = PyByteArray_AS_STRING(obj);
    size = PyByteArray_GET_SIZE(obj);
#else
    as_c_string = PyByteArray_AsString(obj);
    if (as_c_string == NULL) {
        return (double)-1;
    }
    size = PyByteArray_Size(obj);
#endif
    return __Pyx__PyBytes_AsDouble(obj, as_c_string, size);
}

/* pyunicode_as_double.proto (used by pyobject_as_double) */
#if !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS
static const char* __Pyx__PyUnicode_AsDouble_Copy(const void* data, const int kind, char* buffer, Py_ssize_t start, Py_ssize_t end) {
    int last_was_punctuation;
    Py_ssize_t i;
    last_was_punctuation = 1;
    for (i=start; i <= end; i++) {
        Py_UCS4 chr = PyUnicode_READ(kind, data, i);
        int is_punctuation = (chr == '_') | (chr == '.');
        *buffer = (char)chr;
        buffer += (chr != '_');
        if (unlikely(chr > 127)) goto parse_failure;
        if (unlikely(last_was_punctuation & is_punctuation)) goto parse_failure;
        last_was_punctuation = is_punctuation;
    }
    if (unlikely(last_was_punctuation)) goto parse_failure;
    *buffer = '\0';
    return buffer;
parse_failure:
    return NULL;
}
static double __Pyx__PyUnicode_AsDouble_inf_nan(const void* data, int kind, Py_ssize_t start, Py_ssize_t length) {
    int matches = 1;
    Py_UCS4 chr;
    Py_UCS4 sign = PyUnicode_READ(kind, data, start);
    int is_signed = (sign == '-') | (sign == '+');
    start += is_signed;
    length -= is_signed;
    switch (PyUnicode_READ(kind, data, start)) {
        #ifdef Py_NAN
        case 'n':
        case 'N':
            if (unlikely(length != 3)) goto parse_failure;
            chr = PyUnicode_READ(kind, data, start+1);
            matches &= (chr == 'a') | (chr == 'A');
            chr = PyUnicode_READ(kind, data, start+2);
            matches &= (chr == 'n') | (chr == 'N');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_NAN : Py_NAN;
        #endif
        case 'i':
        case 'I':
            if (unlikely(length < 3)) goto parse_failure;
            chr = PyUnicode_READ(kind, data, start+1);
            matches &= (chr == 'n') | (chr == 'N');
            chr = PyUnicode_READ(kind, data, start+2);
            matches &= (chr == 'f') | (chr == 'F');
            if (likely(length == 3 && matches))
                return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
            if (unlikely(length != 8)) goto parse_failure;
            chr = PyUnicode_READ(kind, data, start+3);
            matches &= (chr == 'i') | (chr == 'I');
            chr = PyUnicode_READ(kind, data, start+4);
            matches &= (chr == 'n') | (chr == 'N');
            chr = PyUnicode_READ(kind, data, start+5);
            matches &= (chr == 'i') | (chr == 'I');
            chr = PyUnicode_READ(kind, data, start+6);
            matches &= (chr == 't') | (chr == 'T');
            chr = PyUnicode_READ(kind, data, start+7);
            matches &= (chr == 'y') | (chr == 'Y');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
        case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
            break;
        default:
            goto parse_failure;
    }
    return 0.0;
parse_failure:
    return -1.0;
}
static double __Pyx_PyUnicode_AsDouble_WithSpaces(PyObject *obj) {
    double value;
    const char *last;
    char *end;
    Py_ssize_t start, length = PyUnicode_GET_LENGTH(obj);
    const int kind = PyUnicode_KIND(obj);
    const void* data = PyUnicode_DATA(obj);
    start = 0;
    while (Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, start)))
        start++;
    while (start < length - 1 && Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, length - 1)))
        length--;
    length -= start;
    if (unlikely(length <= 0)) goto fallback;
    value = __Pyx__PyUnicode_AsDouble_inf_nan(data, kind, start, length);
    if (unlikely(value == -1.0)) goto fallback;
    if (value != 0.0) return value;
    if (length < 40) {
        char number[40];
        last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length);
        if (unlikely(!last)) goto fallback;
        value = PyOS_string_to_double(number, &end, NULL);
    } else {
        char *number = (char*) PyMem_Malloc((length + 1) * sizeof(char));
        if (unlikely(!number)) goto fallback;
        last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length);
        if (unlikely(!last)) {
            PyMem_Free(number);
            goto fallback;
        }
        value = PyOS_string_to_double(number, &end, NULL);
        PyMem_Free(number);
    }
    if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) {
        return value;
    }
fallback:
    return __Pyx_SlowPyString_AsDouble(obj);
}
#endif
static CYTHON_INLINE double __Pyx_PyUnicode_AsDouble(PyObject *obj) {
#if !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(__Pyx_PyUnicode_READY(obj) == -1))
        return (double)-1;
    if (likely(PyUnicode_IS_ASCII(obj))) {
        const char *s;
        Py_ssize_t length;
        s = PyUnicode_AsUTF8AndSize(obj, &length);
        return __Pyx__PyBytes_AsDouble(obj, s, length);
    }
    return __Pyx_PyUnicode_AsDouble_WithSpaces(obj);
#else
    return __Pyx_SlowPyString_AsDouble(obj);
#endif
}

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

/* FloatExceptionCheck.proto */
#define __PYX_CHECK_FLOAT_EXCEPTION(value, error_value)\
    ((error_value) == (error_value) ?\
     (value) == (error_value) :\
     (value) != (value))

/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
        L->ob_item[len] = x;
        #else
        PyList_SET_ITEM(list, len, x);
        #endif
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

/* SetItemInt.proto */
#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck, unsafe_shared) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
               __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
                                               int is_list, int wraparound, int boundscheck, int unsafe_shared);

/* DivInt[PY_LONG_LONG].proto */
static CYTHON_INLINE PY_LONG_LONG __Pyx_div_PY_LONG_LONG(PY_LONG_LONG, PY_LONG_LONG, int b_is_constant);

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto_3_2_1
#define __PYX_HAVE_RT_ImportType_proto_3_2_1
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
#include <stdalign.h>
#endif
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
#define __PYX_GET_STRUCT_ALIGNMENT_3_2_1(s) alignof(s)
#else
#define __PYX_GET_STRUCT_ALIGNMENT_3_2_1(s) sizeof(void*)
#endif
enum __Pyx_ImportType_CheckSize_3_2_1 {
   __Pyx_ImportType_CheckSize_Error_3_2_1 = 0,
   __Pyx_ImportType_CheckSize_Warn_3_2_1 = 1,
   __Pyx_ImportType_CheckSize_Ignore_3_2_1 = 2
};
static PyTypeObject *__Pyx_ImportType_3_2_1(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_1 check_size);
#endif

/* GetVTable.proto */
static void* __Pyx_GetVtable(PyTypeObject *type);

/* VoidPtrImport.proto */
static int __Pyx_ImportVoidPtr_3_2_1(PyObject *module, const char *name, void **p, const char *sig);

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

/* dict_setdefault.proto (used by FetchCommonType) */
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value);

/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp);
#endif

/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */
static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v);
#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v)

/* FixUpExtensionType.proto (used by FetchCommonType) */
static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);

/* AddModuleRef.proto (used by FetchSharedCythonModule) */
#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\
     __PYX_LIMITED_VERSION_HEX < 0x030d0000)
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name);
#else
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#endif

/* FetchSharedCythonModule.proto (used by FetchCommonType) */
static PyObject *__Pyx_FetchSharedCythonABIModule(void);

/* FetchCommonType.proto (used by CommonTypesMetaclass) */
static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases);

/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */
static int __pyx_CommonTypesMetaclass_init(PyObject *module);
#define __Pyx_CommonTypesMetaclass_USED

/* CallTypeTraverse.proto (used by CythonFunctionShared) */
#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0
#else
static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg);
#endif

/* PyMethodNew.proto (used by CythonFunctionShared) */
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ);

/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
#endif

/* CythonFunctionShared.proto (used by CythonFunction) */
#define __Pyx_CyFunction_USED
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CYFUNCTION_COROUTINE     0x08
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_CyFunction_GetClassObj(f)\
      (((__pyx_CyFunctionObject *) (f))->func_classobj)
#else
  #define __Pyx_CyFunction_GetClassObj(f)\
      ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
#endif
#define __Pyx_CyFunction_SetClassObj(f, classobj)\
    __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (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 {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject_HEAD
    PyObject *func;
#elif PY_VERSION_HEX < 0x030900B1
    PyCFunctionObject func;
#else
    PyCMethodObject func;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL
    __pyx_vectorcallfunc func_vectorcall;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_weakreflist;
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_dict;
#endif
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_classobj;
#endif
    PyObject *defaults;
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
    PyObject *func_is_coroutine;
} __pyx_CyFunctionObject;
#undef __Pyx_CyOrPyCFunction_Check
#define __Pyx_CyFunction_Check(obj)  __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType)
#define __Pyx_CyOrPyCFunction_Check(obj)  __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type)
#define __Pyx_CyFunction_CheckExact(obj)  __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType)
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void));
#undef __Pyx_IsSameCFunction
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCyOrCFunction(func, cfunc)
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func,
                                                         PyTypeObject *defaults_type);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(PyObject *module);
#if CYTHON_METH_FASTCALL
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
#if CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
#else
#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
#endif
#endif

/* CythonFunction.proto */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);

/* HasAttr.proto (used by ImportImpl) */
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_HasAttr(o, n)  PyObject_HasAttrWithError(o, n)
#else
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
#endif

/* ImportImpl.export */
static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level);

/* Import.proto */
static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* ListPack.proto */
static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...);

/* Py3UpdateBases.proto */
static PyObject* __Pyx_PEP560_update_bases(PyObject *bases);

/* CalculateMetaclass.proto */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);

/* SetNameInClass.proto (used by SetNewInClass) */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
#elif CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
#else
#define __Pyx_SetNameInClass(ns, name, value)  PyObject_SetItem(ns, name, value)
#endif

/* SetNewInClass.proto */
static int __Pyx_SetNewInClass(PyObject *ns, PyObject *name, PyObject *value);

/* ClassMethod.proto */
#if !CYTHON_COMPILING_IN_LIMITED_API
#include "descrobject.h"
#endif
CYTHON_UNUSED static PyObject* __Pyx_Method_ClassMethod(PyObject *method);

/* PyObjectLookupSpecial.proto (used by Py3ClassCreate) */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name)  __Pyx__PyObject_LookupSpecial(obj, attr_name, 0)
#define __Pyx_PyObject_LookupSpecial(obj, attr_name)  __Pyx__PyObject_LookupSpecial(obj, attr_name, 1)
static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error);
#else
#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n)
#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
#endif

/* Py3ClassCreate.proto */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
                                           PyObject *mkw, PyObject *modname, PyObject *doc);
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);

/* CLineInTraceback.proto (used by AddTraceback) */
#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#else
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#endif

/* CodeObjectCache.proto (used by AddTraceback) */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject __Pyx_CachedCodeObjectType;
#else
typedef PyCodeObject __Pyx_CachedCodeObjectType;
#endif
typedef struct {
    __Pyx_CachedCodeObjectType* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_int_type accessor_count;
  #endif
};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object);

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

/* RealImag.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(__cplusplus) && CYTHON_CCOMPLEX\
        && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
    #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

/* Arithmetic.proto */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    #define __Pyx_c_eq_float(a, b)   ((a)==(b))
    #define __Pyx_c_sum_float(a, b)  ((a)+(b))
    #define __Pyx_c_diff_float(a, b) ((a)-(b))
    #define __Pyx_c_prod_float(a, b) ((a)*(b))
    #define __Pyx_c_quot_float(a, b) ((a)/(b))
    #define __Pyx_c_neg_float(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
    #define __Pyx_c_conj_float(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs_float(z)     (::std::abs(z))
        #define __Pyx_c_pow_float(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero_float(z) ((z)==0)
    #define __Pyx_c_conj_float(z)    (conjf(z))
    #if 1
        #define __Pyx_c_abs_float(z)     (cabsf(z))
        #define __Pyx_c_pow_float(a, b)  (cpowf(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
    #if 1
        static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
    #endif
#endif

/* Arithmetic.proto */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    #define __Pyx_c_eq_double(a, b)   ((a)==(b))
    #define __Pyx_c_sum_double(a, b)  ((a)+(b))
    #define __Pyx_c_diff_double(a, b) ((a)-(b))
    #define __Pyx_c_prod_double(a, b) ((a)*(b))
    #define __Pyx_c_quot_double(a, b) ((a)/(b))
    #define __Pyx_c_neg_double(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
    #define __Pyx_c_conj_double(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs_double(z)     (::std::abs(z))
        #define __Pyx_c_pow_double(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero_double(z) ((z)==0)
    #define __Pyx_c_conj_double(z)    (conj(z))
    #if 1
        #define __Pyx_c_abs_double(z)     (cabs(z))
        #define __Pyx_c_pow_double(a, b)  (cpow(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
    #endif
#endif

/* Arithmetic.proto */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    #define __Pyx_c_eq_long__double(a, b)   ((a)==(b))
    #define __Pyx_c_sum_long__double(a, b)  ((a)+(b))
    #define __Pyx_c_diff_long__double(a, b) ((a)-(b))
    #define __Pyx_c_prod_long__double(a, b) ((a)*(b))
    #define __Pyx_c_quot_long__double(a, b) ((a)/(b))
    #define __Pyx_c_neg_long__double(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero_long__double(z) ((z)==(long double)0)
    #define __Pyx_c_conj_long__double(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs_long__double(z)     (::std::abs(z))
        #define __Pyx_c_pow_long__double(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero_long__double(z) ((z)==0)
    #define __Pyx_c_conj_long__double(z)    (conjl(z))
    #if 1
        #define __Pyx_c_abs_long__double(z)     (cabsl(z))
        #define __Pyx_c_pow_long__double(a, b)  (cpowl(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex);
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex);
    #if 1
        static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex);
        static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    #endif
#endif

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value);

/* CIntFromPy.proto */
static CYTHON_INLINE PY_LONG_LONG __Pyx_PyLong_As_PY_LONG_LONG(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_npy_int64(npy_int64 value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PY_LONG_LONG(PY_LONG_LONG value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_npy_intp(npy_intp value);

/* CIntFromPy.proto */
static CYTHON_INLINE npy_intp __Pyx_PyLong_As_npy_intp(PyObject *);

/* FormatTypeName.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%U"
#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName
#else
static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp);
#endif
#else  // !LIMITED_API
typedef const char *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%.200s"
#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name)
#define __Pyx_DECREF_TypeName(obj)
#endif

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *);

/* GetRuntimeVersion.proto */
#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
static unsigned long __Pyx_cached_runtime_version = 0;
static void __Pyx_init_runtime_version(void);
#else
#define __Pyx_init_runtime_version()
#endif
static unsigned long __Pyx_get_runtime_version(void);

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);

/* DecompressString.proto */
static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo);

/* MultiPhaseInitModuleState.proto */
#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
static PyObject *__Pyx_State_FindModule(void*);
static int __Pyx_State_AddModule(PyObject* module, void*);
static int __Pyx_State_RemoveModule(void*);
#elif CYTHON_USE_MODULE_STATE
#define __Pyx_State_FindModule PyState_FindModule
#define __Pyx_State_AddModule PyState_AddModule
#define __Pyx_State_RemoveModule PyState_RemoveModule
#endif

/* #### Code section: module_declarations ### */
/* CythonABIVersion.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
    #if CYTHON_METH_FASTCALL
        #define __PYX_FASTCALL_ABI_SUFFIX  "_fastcall"
    #else
        #define __PYX_FASTCALL_ABI_SUFFIX
    #endif
    #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
#else
    #define __PYX_LIMITED_ABI_SUFFIX
#endif
#if __PYX_HAS_PY_AM_SEND == 1
    #define __PYX_AM_SEND_ABI_SUFFIX
#elif __PYX_HAS_PY_AM_SEND == 2
    #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport"
#else
    #define __PYX_AM_SEND_ABI_SUFFIX "noamsend"
#endif
#ifndef __PYX_MONITORING_ABI_SUFFIX
    #define __PYX_MONITORING_ABI_SUFFIX
#endif
#if CYTHON_USE_TP_FINALIZE
    #define __PYX_TP_FINALIZE_ABI_SUFFIX
#else
    #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize"
#endif
#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED)
    #define __PYX_FREELISTS_ABI_SUFFIX
#else
    #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists"
#endif
#define CYTHON_ABI  __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."

static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr *__pyx_v_self); /* proto*/
static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr *__pyx_v_self); /* proto*/
static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Descr *__pyx_v_self); /* proto*/
static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr *__pyx_v_self); /* proto*/
static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr *__pyx_v_self); /* proto*/
static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArrayObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self); /* proto*/
#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self); /* proto*/
#endif
#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self); /* proto*/
#endif
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_4year_year(PyDateTime_Date *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_5month_month(PyDateTime_Date *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_3day_day(PyDateTime_Date *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4hour_hour(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6minute_minute(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6second_second(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4fold_fold(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4year_year(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_5month_month(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_3day_day(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4hour_hour(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6minute_minute(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6second_second(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4fold_fold(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_3day_day(PyDateTime_Delta *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_6second_second(PyDateTime_Delta *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(PyDateTime_Delta *__pyx_v_self); /* proto*/

/* Module declarations from "cython" */

/* Module declarations from "libc.string" */

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

/* Module declarations from "__builtin__" */

/* Module declarations from "cpython.type" */

/* 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 "cpython.number" */

/* Module declarations from "__builtin__" */

/* Module declarations from "cpython.bool" */

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

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

/* Module declarations from "__builtin__" */

/* Module declarations from "cpython.complex" */

/* Module declarations from "libc.stddef" */

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

/* Module declarations from "cpython.pyport" */

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

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

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

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

/* Module declarations from "cpython.contextvars" */

/* Module declarations from "cpython" */

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

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

/* Module declarations from "numpy" */

/* Module declarations from "numpy" */
static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/
static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void); /*proto*/
static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *); /*proto*/
static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *); /*proto*/
static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *); /*proto*/
static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *); /*proto*/

/* Module declarations from "datetime" */

/* Module declarations from "cpython.datetime" */
static CYTHON_INLINE void __pyx_f_7cpython_8datetime_import_datetime(void); /*proto*/
static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_new(int, int, int); /*proto*/
static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cpython_8datetime_time_new(int, int, int, int, PyObject *, struct __pyx_opt_args_7cpython_8datetime_time_new *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_new(int, int, int, int, int, int, int, PyObject *, struct __pyx_opt_args_7cpython_8datetime_datetime_new *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cpython_8datetime_timedelta_new(int, int, int); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_timezone_new(PyObject *, struct __pyx_opt_args_7cpython_8datetime_timezone_new *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_from_timestamp(PyObject *, struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_from_timestamp(PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_datetime_tzinfo(PyObject *); /*proto*/

/* Module declarations from "cytimes" */

/* Module declarations from "libc.limits" */

/* Module declarations from "libc" */

/* Module declarations from "libc.math" */

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

/* Module declarations from "libc.time" */

/* Module declarations from "libc.stdint" */

/* Module declarations from "cpython.time" */
static CYTHON_INLINE double __pyx_f_7cpython_4time_time(void); /*proto*/
static CYTHON_INLINE int __pyx_f_7cpython_4time__raise_from_errno(void); /*proto*/

/* Module declarations from "cytimes.utils" */
static int (*__pyx_vp_7cytimes_5utils_DAYS_BR_MONTH)[13] = 0;
#define __pyx_v_7cytimes_5utils_DAYS_BR_MONTH (*__pyx_vp_7cytimes_5utils_DAYS_BR_MONTH)
static int (*__pyx_vp_7cytimes_5utils_DAYS_IN_MONTH)[13] = 0;
#define __pyx_v_7cytimes_5utils_DAYS_IN_MONTH (*__pyx_vp_7cytimes_5utils_DAYS_IN_MONTH)
static int (*__pyx_vp_7cytimes_5utils_DAYS_BR_QUARTER)[5] = 0;
#define __pyx_v_7cytimes_5utils_DAYS_BR_QUARTER (*__pyx_vp_7cytimes_5utils_DAYS_BR_QUARTER)
static int (*__pyx_vp_7cytimes_5utils_DAYS_IN_QUARTER)[5] = 0;
#define __pyx_v_7cytimes_5utils_DAYS_IN_QUARTER (*__pyx_vp_7cytimes_5utils_DAYS_IN_QUARTER)
static PyObject **__pyx_vp_7cytimes_5utils_NAT = 0;
#define __pyx_v_7cytimes_5utils_NAT (*__pyx_vp_7cytimes_5utils_NAT)
static int *__pyx_vp_7cytimes_5utils_ORDINAL_MAX = 0;
#define __pyx_v_7cytimes_5utils_ORDINAL_MAX (*__pyx_vp_7cytimes_5utils_ORDINAL_MAX)
static PyDateTime_DateTime **__pyx_vp_7cytimes_5utils_EPOCH_DT = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_DT (*__pyx_vp_7cytimes_5utils_EPOCH_DT)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_YEAR = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_YEAR (*__pyx_vp_7cytimes_5utils_EPOCH_YEAR)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_MONTH = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_MONTH (*__pyx_vp_7cytimes_5utils_EPOCH_MONTH)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_DAY = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_DAY (*__pyx_vp_7cytimes_5utils_EPOCH_DAY)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_HOUR = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_HOUR (*__pyx_vp_7cytimes_5utils_EPOCH_HOUR)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_MINUTE = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_MINUTE (*__pyx_vp_7cytimes_5utils_EPOCH_MINUTE)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_SECOND = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_SECOND (*__pyx_vp_7cytimes_5utils_EPOCH_SECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_MILLISECOND = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_MILLISECOND (*__pyx_vp_7cytimes_5utils_EPOCH_MILLISECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_MICROSECOND = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_MICROSECOND (*__pyx_vp_7cytimes_5utils_EPOCH_MICROSECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_C4 = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_C4 (*__pyx_vp_7cytimes_5utils_EPOCH_C4)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_C100 = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_C100 (*__pyx_vp_7cytimes_5utils_EPOCH_C100)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_C400 = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_C400 (*__pyx_vp_7cytimes_5utils_EPOCH_C400)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_CBASE = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_CBASE (*__pyx_vp_7cytimes_5utils_EPOCH_CBASE)
static PyDateTime_TZInfo **__pyx_vp_7cytimes_5utils_UTC = 0;
#define __pyx_v_7cytimes_5utils_UTC (*__pyx_vp_7cytimes_5utils_UTC)
static PyObject **__pyx_vp_7cytimes_5utils_T_TIMEZONE = 0;
#define __pyx_v_7cytimes_5utils_T_TIMEZONE (*__pyx_vp_7cytimes_5utils_T_TIMEZONE)
static PyObject **__pyx_vp_7cytimes_5utils_T_ZONEINFO = 0;
#define __pyx_v_7cytimes_5utils_T_ZONEINFO (*__pyx_vp_7cytimes_5utils_T_ZONEINFO)
static int *__pyx_vp_7cytimes_5utils_NULL_TZOFFSET = 0;
#define __pyx_v_7cytimes_5utils_NULL_TZOFFSET (*__pyx_vp_7cytimes_5utils_NULL_TZOFFSET)
static PyObject **__pyx_vp_7cytimes_5utils__LOCAL_TIMEZONE = 0;
#define __pyx_v_7cytimes_5utils__LOCAL_TIMEZONE (*__pyx_vp_7cytimes_5utils__LOCAL_TIMEZONE)
static PyObject **__pyx_vp_7cytimes_5utils__UTC_ALIASES = 0;
#define __pyx_v_7cytimes_5utils__UTC_ALIASES (*__pyx_vp_7cytimes_5utils__UTC_ALIASES)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_SS_MINUTE = 0;
#define __pyx_v_7cytimes_5utils_SS_MINUTE (*__pyx_vp_7cytimes_5utils_SS_MINUTE)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_SS_HOUR = 0;
#define __pyx_v_7cytimes_5utils_SS_HOUR (*__pyx_vp_7cytimes_5utils_SS_HOUR)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_SS_DAY = 0;
#define __pyx_v_7cytimes_5utils_SS_DAY (*__pyx_vp_7cytimes_5utils_SS_DAY)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_MS_SECOND = 0;
#define __pyx_v_7cytimes_5utils_MS_SECOND (*__pyx_vp_7cytimes_5utils_MS_SECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_MS_MINUTE = 0;
#define __pyx_v_7cytimes_5utils_MS_MINUTE (*__pyx_vp_7cytimes_5utils_MS_MINUTE)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_MS_HOUR = 0;
#define __pyx_v_7cytimes_5utils_MS_HOUR (*__pyx_vp_7cytimes_5utils_MS_HOUR)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_MS_DAY = 0;
#define __pyx_v_7cytimes_5utils_MS_DAY (*__pyx_vp_7cytimes_5utils_MS_DAY)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_US_MILLISECOND = 0;
#define __pyx_v_7cytimes_5utils_US_MILLISECOND (*__pyx_vp_7cytimes_5utils_US_MILLISECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_US_SECOND = 0;
#define __pyx_v_7cytimes_5utils_US_SECOND (*__pyx_vp_7cytimes_5utils_US_SECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_US_MINUTE = 0;
#define __pyx_v_7cytimes_5utils_US_MINUTE (*__pyx_vp_7cytimes_5utils_US_MINUTE)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_US_HOUR = 0;
#define __pyx_v_7cytimes_5utils_US_HOUR (*__pyx_vp_7cytimes_5utils_US_HOUR)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_US_DAY = 0;
#define __pyx_v_7cytimes_5utils_US_DAY (*__pyx_vp_7cytimes_5utils_US_DAY)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_NS_MICROSECOND = 0;
#define __pyx_v_7cytimes_5utils_NS_MICROSECOND (*__pyx_vp_7cytimes_5utils_NS_MICROSECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_NS_MILLISECOND = 0;
#define __pyx_v_7cytimes_5utils_NS_MILLISECOND (*__pyx_vp_7cytimes_5utils_NS_MILLISECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_NS_SECOND = 0;
#define __pyx_v_7cytimes_5utils_NS_SECOND (*__pyx_vp_7cytimes_5utils_NS_SECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_NS_MINUTE = 0;
#define __pyx_v_7cytimes_5utils_NS_MINUTE (*__pyx_vp_7cytimes_5utils_NS_MINUTE)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_NS_HOUR = 0;
#define __pyx_v_7cytimes_5utils_NS_HOUR (*__pyx_vp_7cytimes_5utils_NS_HOUR)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_NS_DAY = 0;
#define __pyx_v_7cytimes_5utils_NS_DAY (*__pyx_vp_7cytimes_5utils_NS_DAY)
static double *__pyx_vp_7cytimes_5utils_TD64_YY_DAY = 0;
#define __pyx_v_7cytimes_5utils_TD64_YY_DAY (*__pyx_vp_7cytimes_5utils_TD64_YY_DAY)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_TD64_YY_SECOND = 0;
#define __pyx_v_7cytimes_5utils_TD64_YY_SECOND (*__pyx_vp_7cytimes_5utils_TD64_YY_SECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_TD64_YY_MILLISECOND = 0;
#define __pyx_v_7cytimes_5utils_TD64_YY_MILLISECOND (*__pyx_vp_7cytimes_5utils_TD64_YY_MILLISECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_TD64_YY_MICROSECOND = 0;
#define __pyx_v_7cytimes_5utils_TD64_YY_MICROSECOND (*__pyx_vp_7cytimes_5utils_TD64_YY_MICROSECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_TD64_YY_NANOSECOND = 0;
#define __pyx_v_7cytimes_5utils_TD64_YY_NANOSECOND (*__pyx_vp_7cytimes_5utils_TD64_YY_NANOSECOND)
static double *__pyx_vp_7cytimes_5utils_TD64_MM_DAY = 0;
#define __pyx_v_7cytimes_5utils_TD64_MM_DAY (*__pyx_vp_7cytimes_5utils_TD64_MM_DAY)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_TD64_MM_SECOND = 0;
#define __pyx_v_7cytimes_5utils_TD64_MM_SECOND (*__pyx_vp_7cytimes_5utils_TD64_MM_SECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_TD64_MM_MILLISECOND = 0;
#define __pyx_v_7cytimes_5utils_TD64_MM_MILLISECOND (*__pyx_vp_7cytimes_5utils_TD64_MM_MILLISECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_TD64_MM_MICROSECOND = 0;
#define __pyx_v_7cytimes_5utils_TD64_MM_MICROSECOND (*__pyx_vp_7cytimes_5utils_TD64_MM_MICROSECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_TD64_MM_NANOSECOND = 0;
#define __pyx_v_7cytimes_5utils_TD64_MM_NANOSECOND (*__pyx_vp_7cytimes_5utils_TD64_MM_NANOSECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_YY_MIN = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_YY_MIN (*__pyx_vp_7cytimes_5utils_DT64_NS_YY_MIN)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_MM_MIN = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_MM_MIN (*__pyx_vp_7cytimes_5utils_DT64_NS_MM_MIN)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_WW_MIN = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_WW_MIN (*__pyx_vp_7cytimes_5utils_DT64_NS_WW_MIN)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_DD_MIN = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_DD_MIN (*__pyx_vp_7cytimes_5utils_DT64_NS_DD_MIN)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_HH_MIN = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_HH_MIN (*__pyx_vp_7cytimes_5utils_DT64_NS_HH_MIN)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_MI_MIN = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_MI_MIN (*__pyx_vp_7cytimes_5utils_DT64_NS_MI_MIN)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_SS_MIN = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_SS_MIN (*__pyx_vp_7cytimes_5utils_DT64_NS_SS_MIN)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_MS_MIN = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_MS_MIN (*__pyx_vp_7cytimes_5utils_DT64_NS_MS_MIN)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_US_MIN = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_US_MIN (*__pyx_vp_7cytimes_5utils_DT64_NS_US_MIN)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_NS_MIN = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_NS_MIN (*__pyx_vp_7cytimes_5utils_DT64_NS_NS_MIN)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_YY_MAX = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_YY_MAX (*__pyx_vp_7cytimes_5utils_DT64_NS_YY_MAX)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_MM_MAX = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_MM_MAX (*__pyx_vp_7cytimes_5utils_DT64_NS_MM_MAX)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_WW_MAX = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_WW_MAX (*__pyx_vp_7cytimes_5utils_DT64_NS_WW_MAX)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_DD_MAX = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_DD_MAX (*__pyx_vp_7cytimes_5utils_DT64_NS_DD_MAX)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_HH_MAX = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_HH_MAX (*__pyx_vp_7cytimes_5utils_DT64_NS_HH_MAX)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_MI_MAX = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_MI_MAX (*__pyx_vp_7cytimes_5utils_DT64_NS_MI_MAX)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_SS_MAX = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_SS_MAX (*__pyx_vp_7cytimes_5utils_DT64_NS_SS_MAX)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_MS_MAX = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_MS_MAX (*__pyx_vp_7cytimes_5utils_DT64_NS_MS_MAX)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_US_MAX = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_US_MAX (*__pyx_vp_7cytimes_5utils_DT64_NS_US_MAX)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_NS_MAX = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_NS_MAX (*__pyx_vp_7cytimes_5utils_DT64_NS_NS_MAX)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_YY = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_YY (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_YY)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_MM = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_MM (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_MM)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_WW = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_WW (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_WW)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_DD = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_DD (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_DD)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_HH = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_HH (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_HH)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_MI = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_MI (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_MI)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_SS = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_SS (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_SS)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_MS = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_MS (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_MS)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_US = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_US (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_US)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_NS = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_NS (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_NS)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_PS = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_PS (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_PS)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_FS = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_FS (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_FS)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_AS = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_AS (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_AS)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_YY = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_YY (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_YY)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_MM = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_MM)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_WW = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_WW (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_WW)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_DD = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_DD)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_HH = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_HH (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_HH)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_MI = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MI (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_MI)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_SS = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_SS (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_SS)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_MS = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MS (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_MS)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_US = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_US (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_US)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_NS = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_NS)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_PS = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_PS (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_PS)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_FS = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_FS (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_FS)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_AS = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_AS (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_AS)
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_math_div_even(PY_LONG_LONG, PY_LONG_LONG, struct __pyx_opt_args_7cytimes_5utils_math_div_even *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_dot(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_comma(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_plus_sign(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_minus_sign(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_iso_sep(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_date_sep(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_time_sep(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_isoweek_sep(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_ctl(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_ctl_or_space(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_digit(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_letter_upper(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_letter_lower(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_letter(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_alpha(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isominute(PyObject *, Py_ssize_t, struct __pyx_opt_args_7cytimes_5utils_parse_isominute *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_scale_fraction_to_us(int, int); /*proto*/
static CYTHON_INLINE unsigned PY_LONG_LONG __pyx_f_7cytimes_5utils_slice_to_uint(PyObject *, Py_ssize_t, Py_ssize_t, struct __pyx_opt_args_7cytimes_5utils_slice_to_uint *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_parse_to_int(PyObject *, int __pyx_skip_dispatch); /*proto*/
static CYTHON_INLINE double __pyx_f_7cytimes_5utils_parse_to_float(PyObject *, int __pyx_skip_dispatch); /*proto*/
static CYTHON_INLINE struct tm __pyx_f_7cytimes_5utils_tm_gmtime(double); /*proto*/
static CYTHON_INLINE struct tm __pyx_f_7cytimes_5utils_tm_localtime(double); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_ts_localtime(double); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_sec_to_us(double); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_tm_strformat(struct tm, PyObject *); /*proto*/
static CYTHON_INLINE __pyx_t_7cytimes_5utils_hmsf __pyx_f_7cytimes_5utils_hmsf_fr_us(PY_LONG_LONG); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_leap_year(PY_LONG_LONG); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_long_year(PY_LONG_LONG); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_leap_years(PY_LONG_LONG, int); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_leaps_bt_years(PY_LONG_LONG, PY_LONG_LONG); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_days_in_year(PY_LONG_LONG); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_days_bf_year(PY_LONG_LONG); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_day_of_year(PY_LONG_LONG, int, int); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_quarter_of_month(int); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_days_in_quarter(PY_LONG_LONG, int); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_days_bf_quarter(PY_LONG_LONG, int); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_day_of_quarter(PY_LONG_LONG, int, int); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_days_in_month(PY_LONG_LONG, int); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_days_bf_month(PY_LONG_LONG, int); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_ymd_weekday(PY_LONG_LONG, int, int); /*proto*/
static CYTHON_INLINE __pyx_t_7cytimes_5utils_iso __pyx_f_7cytimes_5utils_ymd_isocalendar(PY_LONG_LONG, int, int); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_ymd_isoyear(PY_LONG_LONG, int, int); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_ymd_isoweek(PY_LONG_LONG, int, int); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_ymd_isoweekday(PY_LONG_LONG, int, int); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_ymd_to_ord(PY_LONG_LONG, int, int); /*proto*/
static CYTHON_INLINE __pyx_t_7cytimes_5utils_ymd __pyx_f_7cytimes_5utils_ymd_fr_ord(PY_LONG_LONG); /*proto*/
static CYTHON_INLINE __pyx_t_7cytimes_5utils_ymd __pyx_f_7cytimes_5utils_ymd_fr_us(PY_LONG_LONG); /*proto*/
static CYTHON_INLINE __pyx_t_7cytimes_5utils_ymd __pyx_f_7cytimes_5utils_ymd_fr_sec(double); /*proto*/
static CYTHON_INLINE __pyx_t_7cytimes_5utils_ymd __pyx_f_7cytimes_5utils_ymd_fr_iso(PY_LONG_LONG, int, int); /*proto*/
static CYTHON_INLINE __pyx_t_7cytimes_5utils_ymd __pyx_f_7cytimes_5utils_ymd_fr_doy(PY_LONG_LONG, int); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_iso_week1_mon_ord(PY_LONG_LONG); /*proto*/
static CYTHON_INLINE __pyx_t_7cytimes_5utils_dtm __pyx_f_7cytimes_5utils_dtm_fr_us(PY_LONG_LONG); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_combine_absolute_ms_us(int, int); /*proto*/
static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_new(struct __pyx_opt_args_7cytimes_5utils_date_new *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_now(struct __pyx_opt_args_7cytimes_5utils_date_now *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_date(PyObject *); /*proto*/
static CYTHON_INLINE struct tm __pyx_f_7cytimes_5utils_date_to_tm(PyDateTime_Date *); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_date_to_ord(PyDateTime_Date *); /*proto*/
static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_fr_date(PyDateTime_Date *, struct __pyx_opt_args_7cytimes_5utils_date_fr_date *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_fr_dt(PyDateTime_DateTime *, struct __pyx_opt_args_7cytimes_5utils_date_fr_dt *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_new(struct __pyx_opt_args_7cytimes_5utils_dt_new *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_now(struct __pyx_opt_args_7cytimes_5utils_dt_now *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_dt_local_mktime(PyDateTime_DateTime *); /*proto*/
static CYTHON_INLINE struct tm __pyx_f_7cytimes_5utils_dt_to_tm(PyDateTime_DateTime *, struct __pyx_opt_args_7cytimes_5utils_dt_to_tm *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_dt_to_us(PyDateTime_DateTime *, struct __pyx_opt_args_7cytimes_5utils_dt_to_us *__pyx_optional_args); /*proto*/
static CYTHON_INLINE double __pyx_f_7cytimes_5utils_dt_to_sec(PyDateTime_DateTime *, struct __pyx_opt_args_7cytimes_5utils_dt_to_sec *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_dt_to_ord(PyDateTime_DateTime *, struct __pyx_opt_args_7cytimes_5utils_dt_to_ord *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_us(PY_LONG_LONG, struct __pyx_opt_args_7cytimes_5utils_dt_fr_us *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_ts(double, struct __pyx_opt_args_7cytimes_5utils_dt_fr_ts *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_dt(PyDateTime_DateTime *, struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_combine(struct __pyx_opt_args_7cytimes_5utils_dt_combine *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_add(PyDateTime_DateTime *, struct __pyx_opt_args_7cytimes_5utils_dt_add *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_replace_tz_fold(PyDateTime_DateTime *, PyObject *, int, struct __pyx_opt_args_7cytimes_5utils_dt_replace_tz_fold *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_replace_tz(PyDateTime_DateTime *, PyObject *, struct __pyx_opt_args_7cytimes_5utils_dt_replace_tz *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_replace_fold(PyDateTime_DateTime *, int, struct __pyx_opt_args_7cytimes_5utils_dt_replace_fold *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_dt_tzname(PyDateTime_DateTime *); /*proto*/
static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_dt_utcoffset(PyDateTime_DateTime *); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_astimezone(PyDateTime_DateTime *, struct __pyx_opt_args_7cytimes_5utils_dt_astimezone *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_normalize_tz(PyDateTime_DateTime *, struct __pyx_opt_args_7cytimes_5utils_dt_normalize_tz *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cytimes_5utils_time_new(struct __pyx_opt_args_7cytimes_5utils_time_new *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_time(PyObject *); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_time_to_us(PyDateTime_Time *); /*proto*/
static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cytimes_5utils_time_fr_us(PY_LONG_LONG, struct __pyx_opt_args_7cytimes_5utils_time_fr_us *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cytimes_5utils_time_fr_dt(PyDateTime_DateTime *, struct __pyx_opt_args_7cytimes_5utils_time_fr_dt *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_td_new(struct __pyx_opt_args_7cytimes_5utils_td_new *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_td_utcformat(PyDateTime_Delta *); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_td_to_us(PyDateTime_Delta *); /*proto*/
static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_td_fr_us(PY_LONG_LONG, struct __pyx_opt_args_7cytimes_5utils_td_fr_us *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_tz_local(struct __pyx_opt_args_7cytimes_5utils_tz_local *__pyx_optional_args); /*proto*/
static PyObject *(*__pyx_f_7cytimes_5utils_tz_parse)(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_tz(PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_tz_name(PyObject *, struct __pyx_opt_args_7cytimes_5utils_tz_name *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_tz_dst(PyObject *, struct __pyx_opt_args_7cytimes_5utils_tz_dst *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_tz_utcoffset(PyObject *, struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_tz_utcoffset_sec(PyObject *, struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset_sec *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_tz_utcformat(PyObject *, struct __pyx_opt_args_7cytimes_5utils_tz_utcformat *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_nptime_unit_int2str(int); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_nptime_unit_int2dt64(int); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_nptime_unit_str2int(PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_nptime_unit_str2dt64(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_get_arr_nptime_unit(PyArrayObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_invalid_nptime_int_unit_error(int); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_invalid_nptime_dtype_error(PyArrayObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_assure_dt64(PyObject *); /*proto*/
static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils_dt64_as_int64_us(PyObject *, struct __pyx_opt_args_7cytimes_5utils_dt64_as_int64_us *__pyx_optional_args); /*proto*/
static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils__dt64_Y_as_int64_D(npy_int64, struct __pyx_opt_args_7cytimes_5utils__dt64_Y_as_int64_D *__pyx_optional_args); /*proto*/
static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils__dt64_M_as_int64_D(npy_int64, struct __pyx_opt_args_7cytimes_5utils__dt64_M_as_int64_D *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_dt64_to_reso_error(PyObject *, PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_assure_td64(PyObject *); /*proto*/
static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils_td64_as_int64_us(PyObject *, struct __pyx_opt_args_7cytimes_5utils_td64_as_int64_us *__pyx_optional_args); /*proto*/
static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils__td64_Y_as_int64_D(npy_int64, int, struct __pyx_opt_args_7cytimes_5utils__td64_Y_as_int64_D *__pyx_optional_args); /*proto*/
static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils__td64_M_as_int64_D(npy_int64, int, struct __pyx_opt_args_7cytimes_5utils__td64_M_as_int64_D *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_assure_1dim_arr(PyArrayObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_arr_int(PyArrayObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_arr_uint(PyArrayObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_arr_float(PyArrayObject *); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_assure_int64(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_assure_int64_like(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_assure_float64(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_arr_assure_float64 *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_zero_int64(npy_intp); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_fill_int64(npy_int64, npy_intp); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_min(PyArrayObject *, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_min *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_min_arr(PyArrayObject *, PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_arr_min_arr *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_abs(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_arr_abs *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_neg(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_arr_neg *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_add(PyArrayObject *, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_add *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_mul(PyArrayObject *, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_mul *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_mod(PyArrayObject *, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_mod *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_even(PyArrayObject *, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_div_even *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_even_mul(PyArrayObject *, npy_int64, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_div_even_mul *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_up(PyArrayObject *, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_div_up *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_down(PyArrayObject *, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_div_down *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_ceil(PyArrayObject *, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_div_ceil *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_ceil_mul(PyArrayObject *, npy_int64, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_div_ceil_mul *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_floor(PyArrayObject *, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_div_floor *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_floor_mul(PyArrayObject *, npy_int64, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_div_floor_mul *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_trunc(PyArrayObject *, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_div_trunc *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_add_arr(PyArrayObject *, PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_arr_add_arr *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_sub_arr(PyArrayObject *, PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_arr_sub_arr *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_eq(PyArrayObject *, npy_int64); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_gt(PyArrayObject *, npy_int64); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_lt(PyArrayObject *, npy_int64); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_eq_arr(PyArrayObject *, PyArrayObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_dt64arr(PyArrayObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_year(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_year *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_quarter(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_quarter *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_month(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_month *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_weekday(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_weekday *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_day(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_day *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_hour(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_hour *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_minute(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_minute *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_second(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_second *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_millisecond(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_millisecond *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_microsecond(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_microsecond *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_nanosecond(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_nanosecond *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_times(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_times *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_isocalendar(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_isocalendar *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_isoyear(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_isoyear *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_isoweek(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_isoweek *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_isoweekday(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_isoweekday *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_is_leap_year(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_is_leap_year *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_is_long_year(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_is_long_year *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_leap_bt_years(PyArrayObject *, npy_int64, struct __pyx_opt_args_7cytimes_5utils_dt64arr_leap_bt_years *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_days_in_year(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_year *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_days_bf_year(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_bf_year *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_day_of_year(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_day_of_year *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_days_in_quarter(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_quarter *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_days_bf_quarter(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_bf_quarter *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_day_of_quarter(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_day_of_quarter *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_days_in_month(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_month *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_days_bf_month(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_bf_month *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_fr_int64(npy_int64, npy_intp, PyObject *); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64(PyArrayObject *, PyObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_Q(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Q *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_W(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_W *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_h(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_h *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_m(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_m *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_s(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_s *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_ms(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ms *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_us(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_us *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_ns(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ns *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__dt64arr_Y_as_int64_D(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils__dt64arr_Y_as_int64_D *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__dt64arr_M_as_int64_D(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils__dt64arr_M_as_int64_D *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_W_iso(PyArrayObject *, int, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_W_iso *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_to_ord(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_to_ord *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_to_ts(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_to_ts *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_unit(PyArrayObject *, PyObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_unit *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_add_delta(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_add_delta *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__dt64arr_add_delta_date(PyArrayObject *, npy_int64, npy_int64, npy_int64, npy_int64, npy_int64, struct __pyx_opt_args_7cytimes_5utils__dt64arr_add_delta_date *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__dt64arr_ns_add_delta(PyArrayObject *, npy_int64, npy_int64, npy_int64, npy_int64, npy_int64, npy_int64, npy_int64, npy_int64, npy_int64, npy_int64, npy_int64); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_replace_dates(PyArrayObject *, npy_int64, npy_int64, npy_int64, struct __pyx_opt_args_7cytimes_5utils_dt64arr_replace_dates *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_replace_times(PyArrayObject *, npy_int64, npy_int64, npy_int64, npy_int64, npy_int64, struct __pyx_opt_args_7cytimes_5utils_dt64arr_replace_times *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_round(PyArrayObject *, PyObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_round *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_ceil(PyArrayObject *, PyObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_ceil *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_floor(PyArrayObject *, PyObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_floor *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(PyArrayObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_dt64arr_to_reso_error(PyArrayObject *, int, PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_arr_dt64_rcl_error(PyObject *, int, PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_td64arr(PyArrayObject *); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__td64arr_Y_as_int64_D(PyArrayObject *, int, struct __pyx_opt_args_7cytimes_5utils__td64arr_Y_as_int64_D *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__td64arr_M_as_int64_D(PyArrayObject *, int, struct __pyx_opt_args_7cytimes_5utils__td64arr_M_as_int64_D *__pyx_optional_args); /*proto*/

/* Module declarations from "cytimes.parser" */
static PyObject **__pyx_vp_7cytimes_6parser__DEFAULT_PERTAIN = 0;
#define __pyx_v_7cytimes_6parser__DEFAULT_PERTAIN (*__pyx_vp_7cytimes_6parser__DEFAULT_PERTAIN)
static PyObject **__pyx_vp_7cytimes_6parser__DEFAULT_JUMP = 0;
#define __pyx_v_7cytimes_6parser__DEFAULT_JUMP (*__pyx_vp_7cytimes_6parser__DEFAULT_JUMP)
static PyObject **__pyx_vp_7cytimes_6parser__DEFAULT_UTC = 0;
#define __pyx_v_7cytimes_6parser__DEFAULT_UTC (*__pyx_vp_7cytimes_6parser__DEFAULT_UTC)
static PyObject **__pyx_vp_7cytimes_6parser__DEFAULT_TZ = 0;
#define __pyx_v_7cytimes_6parser__DEFAULT_TZ (*__pyx_vp_7cytimes_6parser__DEFAULT_TZ)
static PyObject **__pyx_vp_7cytimes_6parser__DEFAULT_MONTH = 0;
#define __pyx_v_7cytimes_6parser__DEFAULT_MONTH (*__pyx_vp_7cytimes_6parser__DEFAULT_MONTH)
static PyObject **__pyx_vp_7cytimes_6parser__DEFAULT_WEEKDAY = 0;
#define __pyx_v_7cytimes_6parser__DEFAULT_WEEKDAY (*__pyx_vp_7cytimes_6parser__DEFAULT_WEEKDAY)
static PyObject **__pyx_vp_7cytimes_6parser__DEFAULT_HMS = 0;
#define __pyx_v_7cytimes_6parser__DEFAULT_HMS (*__pyx_vp_7cytimes_6parser__DEFAULT_HMS)
static PyObject **__pyx_vp_7cytimes_6parser__DEFAULT_AMPM = 0;
#define __pyx_v_7cytimes_6parser__DEFAULT_AMPM (*__pyx_vp_7cytimes_6parser__DEFAULT_AMPM)
static struct __pyx_obj_7cytimes_6parser_Configs **__pyx_vp_7cytimes_6parser__DEFAULT_CONFIGS = 0;
#define __pyx_v_7cytimes_6parser__DEFAULT_CONFIGS (*__pyx_vp_7cytimes_6parser__DEFAULT_CONFIGS)
static struct __pyx_obj_7cytimes_6parser_Parser **__pyx_vp_7cytimes_6parser__DEFAULT_PARSER = 0;
#define __pyx_v_7cytimes_6parser__DEFAULT_PARSER (*__pyx_vp_7cytimes_6parser__DEFAULT_PARSER)
static PyDateTime_DateTime *(*__pyx_f_7cytimes_6parser_parse_obj)(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_parse_obj *__pyx_optional_args); /*proto*/
static int (*__pyx_f_7cytimes_6parser_parse_month)(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_parse_month *__pyx_optional_args); /*proto*/
static int (*__pyx_f_7cytimes_6parser_parse_weekday)(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_parse_weekday *__pyx_optional_args); /*proto*/

/* Module declarations from "cytimes.errors" */
static int (*__pyx_f_7cytimes_6errors_raise_error)(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6errors_raise_error *__pyx_optional_args); /*proto*/
static int (*__pyx_f_7cytimes_6errors_raise_argument_error)(int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6errors_raise_argument_error *__pyx_optional_args); /*proto*/
static int (*__pyx_f_7cytimes_6errors_raise_type_error)(int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6errors_raise_type_error *__pyx_optional_args); /*proto*/

/* Module declarations from "cytimes.pddt" */
static Py_ssize_t __pyx_f_7cytimes_4pddt__parse_size(PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_f_7cytimes_4pddt__parse_freq(PyObject *); /*proto*/
static PY_LONG_LONG __pyx_f_7cytimes_4pddt__parse_us_from_iso_dict(PyObject *, PyObject *); /*proto*/
static PY_LONG_LONG __pyx_f_7cytimes_4pddt__parse_us_from_doy_dict(PyObject *, PyObject *); /*proto*/
/* #### Code section: typeinfo ### */
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "cytimes.pddt"
extern int __pyx_module_is_main_cytimes__pddt;
int __pyx_module_is_main_cytimes__pddt = 0;

/* Implementation of "cytimes.pddt" */
/* #### Code section: global_var ### */
static PyObject *__pyx_builtin_property;
static PyObject *__pyx_builtin_super;
/* #### Code section: string_decls ### */
/* #### Code section: decls ### */
static PyObject *__pyx_pf_7cytimes_5utils_parse_to_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_token); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_2parse_to_float(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_token); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_freq, PyObject *__pyx_v_tz, PyObject *__pyx_v_ambiguous, int __pyx_v_yearfirst, int __pyx_v_dayfirst, PyObject *__pyx_v_as_unit, int __pyx_v_copy, PyObject *__pyx_v_name, struct __pyx_obj_7cytimes_6parser_Configs *__pyx_v_cfg); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_2_new(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_freq, PyObject *__pyx_v_tz, PyObject *__pyx_v_ambiguous, int __pyx_v_yearfirst, int __pyx_v_dayfirst, PyObject *__pyx_v_as_unit, int __pyx_v_copy, PyObject *__pyx_v_name, struct __pyx_obj_7cytimes_6parser_Configs *__pyx_v_cfg); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_4_new_native(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_freq, PyDateTime_TZInfo *__pyx_v_tz, PyObject *__pyx_v_ambiguous, int __pyx_v_yearfirst, int __pyx_v_dayfirst, PyObject *__pyx_v_as_unit, int __pyx_v_copy, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_6_new_parser(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_freq, PyDateTime_TZInfo *__pyx_v_tz, PyObject *__pyx_v_ambiguous, PyObject *__pyx_v_yearfirst, PyObject *__pyx_v_dayfirst, PyObject *__pyx_v_as_unit, int __pyx_v_copy, PyObject *__pyx_v_name, struct __pyx_obj_7cytimes_6parser_Configs *__pyx_v_cfg); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_8date_range(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_periods, PyObject *__pyx_v_freq, PyObject *__pyx_v_tz, int __pyx_v_normalize, PyObject *__pyx_v_inclusive, PyObject *__pyx_v_unit, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_10parse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_freq, PyObject *__pyx_v_tz, PyObject *__pyx_v_ambiguous, int __pyx_v_yearfirst, int __pyx_v_dayfirst, PyObject *__pyx_v_as_unit, int __pyx_v_copy, PyObject *__pyx_v_name, struct __pyx_obj_7cytimes_6parser_Configs *__pyx_v_cfg); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_12now(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_size, PyObject *__pyx_v_tz, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_14utcnow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_size, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_16today(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_size, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_18combine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_size, PyObject *__pyx_v_date, PyObject *__pyx_v_time, PyObject *__pyx_v_tz, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_20fromordinal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_ordinal, PyObject *__pyx_v_size, PyObject *__pyx_v_tz, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_22fromseconds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_seconds, PyObject *__pyx_v_size, PyObject *__pyx_v_tz, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_24frommicroseconds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_us, PyObject *__pyx_v_size, PyObject *__pyx_v_tz, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_26fromtimestamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_ts, PyObject *__pyx_v_size, PyObject *__pyx_v_tz, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_28utcfromtimestamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_ts, PyObject *__pyx_v_size, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_30fromisoformat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_dtstr, PyObject *__pyx_v_size, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_32fromisocalendar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_iso, PyObject *__pyx_v_size, PyObject *__pyx_v_tz, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_34fromdayofyear(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_doy, PyObject *__pyx_v_size, PyObject *__pyx_v_tz, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_36fromdate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_date, PyObject *__pyx_v_size, PyObject *__pyx_v_tz, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_38fromdatetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_dt, PyObject *__pyx_v_size, PyObject *__pyx_v_tz, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_40fromdatetime64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_dt64, PyObject *__pyx_v_size, PyObject *__pyx_v_tz, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_42strptime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_dtstr, PyObject *__pyx_v_fmt, PyObject *__pyx_v_size, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_44ctime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_46strftime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fmt); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_48isoformat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_sep); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_50timedf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_52utctimedf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_54toordinal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_56toseconds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_utc); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_58tomicroseconds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_utc); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_60timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_62datetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_64date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_66time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_68timetz(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_70replace(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_year, int __pyx_v_month, int __pyx_v_day, int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, int __pyx_v_nanosecond, PyObject *__pyx_v_tzinfo); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_72to_curr_year(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_month, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_74to_prev_year(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_month, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_76to_next_year(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_month, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_78to_year(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_offset, PyObject *__pyx_v_month, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_80to_curr_quarter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_month, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_82to_prev_quarter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_month, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_84to_next_quarter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_month, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_86to_quarter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_offset, int __pyx_v_month, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_88to_curr_month(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_90to_prev_month(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_92to_next_month(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_94to_month(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_offset, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_96to_monday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_98to_tuesday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_100to_wednesday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_102to_thursday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_104to_friday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_106to_saturday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_108to_sunday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_110to_curr_weekday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weekday); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_112to_prev_weekday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weekday); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_114to_next_weekday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weekday); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_116to_weekday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_offset, PyObject *__pyx_v_weekday); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_118_to_curr_weekday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_weekday); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_120to_yesterday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_122to_tomorrow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_124to_day(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_offset); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_126normalize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_128snap(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_freq); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_130to_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_year, int __pyx_v_month, int __pyx_v_day, int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, int __pyx_v_nanosecond); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_132to_date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_year, int __pyx_v_month, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_134to_time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, int __pyx_v_nanosecond); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_136to_first_of(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_138to_last_of(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_140to_start_of(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_142to_end_of(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_144is_first_of(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_146is_last_of(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_148is_start_of(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_150is_end_of(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_152round(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_154ceil(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_156floor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_158fsp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_precision); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_160isocalendar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_162isoyear(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_164isoweek(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_166isoweekday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_168year(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_170is_year(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_year); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_172is_leap_year(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_174is_long_year(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_176leap_bt_year(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_year); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_178days_in_year(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_180days_bf_year(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_182day_of_year(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_184quarter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_186is_quarter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_quarter); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_188days_in_quarter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_190days_bf_quarter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_192day_of_quarter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_194month(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_196is_month(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_month); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_198days_in_month(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_200days_bf_month(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_202day_of_month(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_204month_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_locale); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_206weekday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_208is_weekday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weekday); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_210weekday_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_locale); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_212day(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_214is_day(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_216hour(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_218minute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_220second(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_222millisecond(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_224microsecond(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_226nanosecond(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_228tz_available(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_230is_local(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_232is_utc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_234tzname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_236astimezone(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tz, PyObject *__pyx_v_ambiguous, PyObject *__pyx_v_nonexistent); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_238tz_localize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tz, PyObject *__pyx_v_ambiguous, PyObject *__pyx_v_nonexistent); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_240tz_convert(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_242tz_switch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_targ_tz, PyObject *__pyx_v_base_tz, int __pyx_v_naive, PyObject *__pyx_v_ambiguous, PyObject *__pyx_v_nonexistent); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_244values_naive(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_246as_unit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_as_unit); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_248add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_years, int __pyx_v_quarters, int __pyx_v_months, int __pyx_v_weeks, int __pyx_v_days, int __pyx_v_hours, int __pyx_v_minutes, int __pyx_v_seconds, int __pyx_v_milliseconds, int __pyx_v_microseconds, int __pyx_v_nanoseconds); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_250sub(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_years, int __pyx_v_quarters, int __pyx_v_months, int __pyx_v_weeks, int __pyx_v_days, int __pyx_v_hours, int __pyx_v_minutes, int __pyx_v_seconds, int __pyx_v_milliseconds, int __pyx_v_microseconds, int __pyx_v_nanoseconds); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_252diff(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_unit, int __pyx_v_absolute, PyObject *__pyx_v_inclusive); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_254is_past(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_256is_future(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
/* #### Code section: late_includes ### */
/* #### Code section: module_state ### */
/* SmallCodeConfig */
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

typedef struct {
  PyObject *__pyx_d;
  PyObject *__pyx_b;
  PyObject *__pyx_cython_runtime;
  PyObject *__pyx_empty_tuple;
  PyObject *__pyx_empty_bytes;
  PyObject *__pyx_empty_unicode;
  PyTypeObject *__pyx_ptype_7cpython_4type_type;
  PyTypeObject *__pyx_ptype_7cpython_4bool_bool;
  PyTypeObject *__pyx_ptype_7cpython_7complex_complex;
  PyTypeObject *__pyx_ptype_5numpy_dtype;
  PyTypeObject *__pyx_ptype_5numpy_flatiter;
  PyTypeObject *__pyx_ptype_5numpy_broadcast;
  PyTypeObject *__pyx_ptype_5numpy_ndarray;
  PyTypeObject *__pyx_ptype_5numpy_generic;
  PyTypeObject *__pyx_ptype_5numpy_number;
  PyTypeObject *__pyx_ptype_5numpy_integer;
  PyTypeObject *__pyx_ptype_5numpy_signedinteger;
  PyTypeObject *__pyx_ptype_5numpy_unsignedinteger;
  PyTypeObject *__pyx_ptype_5numpy_inexact;
  PyTypeObject *__pyx_ptype_5numpy_floating;
  PyTypeObject *__pyx_ptype_5numpy_complexfloating;
  PyTypeObject *__pyx_ptype_5numpy_flexible;
  PyTypeObject *__pyx_ptype_5numpy_character;
  PyTypeObject *__pyx_ptype_5numpy_ufunc;
  PyTypeObject *__pyx_ptype_7cpython_8datetime_date;
  PyTypeObject *__pyx_ptype_7cpython_8datetime_time;
  PyTypeObject *__pyx_ptype_7cpython_8datetime_datetime;
  PyTypeObject *__pyx_ptype_7cpython_8datetime_timedelta;
  PyTypeObject *__pyx_ptype_7cpython_8datetime_tzinfo;
  PyTypeObject *__pyx_ptype_7cytimes_6parser_Configs;
  PyTypeObject *__pyx_ptype_7cytimes_6parser_Result;
  PyTypeObject *__pyx_ptype_7cytimes_6parser_Parser;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values;
  PyObject *__pyx_tuple[9];
  PyObject *__pyx_codeobj_tab[131];
  PyObject *__pyx_string_tab[1002];
  PyObject *__pyx_number_tab[8];
/* #### Code section: module_state_contents ### */
/* CommonTypesMetaclass.module_state_decls */
PyTypeObject *__pyx_CommonTypesMetaclassType;

/* CachedMethodType.module_state_decls */
#if CYTHON_COMPILING_IN_LIMITED_API
PyObject *__Pyx_CachedMethodType;
#endif

/* CythonFunctionShared.module_state_decls */
PyTypeObject *__pyx_CyFunctionType;

/* CodeObjectCache.module_state_decls */
struct __Pyx_CodeObjectCache __pyx_code_cache;

/* #### Code section: module_state_end ### */
} __pyx_mstatetype;

#if CYTHON_USE_MODULE_STATE
#ifdef __cplusplus
namespace {
extern struct PyModuleDef __pyx_moduledef;
} /* anonymous namespace */
#else
static struct PyModuleDef __pyx_moduledef;
#endif

#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef)))

#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef))
#else
static __pyx_mstatetype __pyx_mstate_global_static =
#ifdef __cplusplus
    {};
#else
    {0};
#endif
static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static;
#endif
/* #### Code section: constant_name_defines ### */
#define __pyx_kp_u_ __pyx_string_tab[0]
#define __pyx_kp_u_02d __pyx_string_tab[1]
#define __pyx_kp_u_02d_02d __pyx_string_tab[2]
#define __pyx_kp_u_02d_02d_02d __pyx_string_tab[3]
#define __pyx_kp_u_02d_02d_02d_06d __pyx_string_tab[4]
#define __pyx_kp_u_02d_02d_02d_06d_2 __pyx_string_tab[5]
#define __pyx_kp_u_02d_02d_02d_2 __pyx_string_tab[6]
#define __pyx_kp_u_02d_02d_2 __pyx_string_tab[7]
#define __pyx_kp_u_04d __pyx_string_tab[8]
#define __pyx_kp_u_06d __pyx_string_tab[9]
#define __pyx_kp_u_06d_2 __pyx_string_tab[10]
#define __pyx_kp_u_2d __pyx_string_tab[11]
#define __pyx_kp_u_7f __pyx_string_tab[12]
#define __pyx_kp_u_A_drop_in_replacement_for_Pandas __pyx_string_tab[13]
#define __pyx_kp_u_Accepts __pyx_string_tab[14]
#define __pyx_kp_u_Accepts_Y_M_W_D_h_m_s_ms_us_ns __pyx_string_tab[15]
#define __pyx_kp_u_Adjust_the_date_and_time_fields __pyx_string_tab[16]
#define __pyx_kp_u_Adjust_the_date_to_day_offset_Pd __pyx_string_tab[17]
#define __pyx_kp_u_Adjust_the_date_to_the_specific __pyx_string_tab[18]
#define __pyx_kp_u_Adjust_the_date_to_the_specific_2 __pyx_string_tab[19]
#define __pyx_kp_u_Adjust_the_date_to_the_specific_3 __pyx_string_tab[20]
#define __pyx_kp_u_Adjust_the_date_to_the_specific_4 __pyx_string_tab[21]
#define __pyx_kp_u_Adjust_the_date_to_the_specified __pyx_string_tab[22]
#define __pyx_kp_u_Adjust_the_date_to_the_specified_10 __pyx_string_tab[23]
#define __pyx_kp_u_Adjust_the_date_to_the_specified_11 __pyx_string_tab[24]
#define __pyx_kp_u_Adjust_the_date_to_the_specified_12 __pyx_string_tab[25]
#define __pyx_kp_u_Adjust_the_date_to_the_specified_2 __pyx_string_tab[26]
#define __pyx_kp_u_Adjust_the_date_to_the_specified_3 __pyx_string_tab[27]
#define __pyx_kp_u_Adjust_the_date_to_the_specified_4 __pyx_string_tab[28]
#define __pyx_kp_u_Adjust_the_date_to_the_specified_5 __pyx_string_tab[29]
#define __pyx_kp_u_Adjust_the_date_to_the_specified_6 __pyx_string_tab[30]
#define __pyx_kp_u_Adjust_the_date_to_the_specified_7 __pyx_string_tab[31]
#define __pyx_kp_u_Adjust_the_date_to_the_specified_8 __pyx_string_tab[32]
#define __pyx_kp_u_Adjust_the_date_to_the_specified_9 __pyx_string_tab[33]
#define __pyx_kp_u_Adjust_the_date_with_new_values __pyx_string_tab[34]
#define __pyx_kp_u_Adjust_the_time_fields_with_new __pyx_string_tab[35]
#define __pyx_kp_u_Array_size_must_be_greater_than __pyx_string_tab[36]
#define __pyx_kp_u_Cannot_add_delta_to_ndarray_s_Su __pyx_string_tab[37]
#define __pyx_kp_u_Cannot_compare_datetime_indexes __pyx_string_tab[38]
#define __pyx_kp_u_Cannot_compare_naive_and_aware_d __pyx_string_tab[39]
#define __pyx_kp_u_Cannot_compare_naive_and_aware_d_2 __pyx_string_tab[40]
#define __pyx_kp_u_Cannot_compare_ndarrays_with_dif __pyx_string_tab[41]
#define __pyx_kp_u_Cannot_convert __pyx_string_tab[42]
#define __pyx_kp_u_Cannot_convert_2 __pyx_string_tab[43]
#define __pyx_kp_u_Cannot_convert_array_element_s_t __pyx_string_tab[44]
#define __pyx_kp_u_Cannot_convert_array_from_dateti __pyx_string_tab[45]
#define __pyx_kp_u_Cannot_convert_ndarray __pyx_string_tab[46]
#define __pyx_kp_u_Cannot_convert_s_to_non_negative __pyx_string_tab[47]
#define __pyx_kp_u_Cannot_convert_s_to_non_negative_2 __pyx_string_tab[48]
#define __pyx_kp_u_Cannot_convert_timestamp_s_to_da __pyx_string_tab[49]
#define __pyx_kp_u_Cannot_create_date_using_custom __pyx_string_tab[50]
#define __pyx_kp_u_Cannot_create_datetime_using_cus __pyx_string_tab[51]
#define __pyx_kp_u_Cannot_create_time_using_custom __pyx_string_tab[52]
#define __pyx_kp_u_Cannot_create_timedelta_using_cu __pyx_string_tab[53]
#define __pyx_kp_u_Cannot_get_the_length_of __pyx_string_tab[54]
#define __pyx_kp_u_Cannot_parse __pyx_string_tab[55]
#define __pyx_kp_u_Cannot_parse_data_into_datetime __pyx_string_tab[56]
#define __pyx_kp_u_Cannot_parse_s_to_float_contains __pyx_string_tab[57]
#define __pyx_kp_u_Cannot_parse_s_to_float_contains_2 __pyx_string_tab[58]
#define __pyx_kp_u_Cannot_parse_s_to_float_contains_3 __pyx_string_tab[59]
#define __pyx_kp_u_Cannot_parse_s_to_float_contains_4 __pyx_string_tab[60]
#define __pyx_kp_u_Cannot_parse_s_to_float_negative __pyx_string_tab[61]
#define __pyx_kp_u_Cannot_parse_s_to_float_negative_2 __pyx_string_tab[62]
#define __pyx_kp_u_Cannot_parse_s_to_float_no_digit __pyx_string_tab[63]
#define __pyx_kp_u_Cannot_parse_s_to_float_positive __pyx_string_tab[64]
#define __pyx_kp_u_Cannot_parse_s_to_float_positive_2 __pyx_string_tab[65]
#define __pyx_kp_u_Cannot_parse_s_to_integer_contai __pyx_string_tab[66]
#define __pyx_kp_u_Cannot_parse_s_to_integer_contai_2 __pyx_string_tab[67]
#define __pyx_kp_u_Cannot_parse_s_to_integer_contai_3 __pyx_string_tab[68]
#define __pyx_kp_u_Cannot_parse_s_to_integer_negati __pyx_string_tab[69]
#define __pyx_kp_u_Cannot_parse_s_to_integer_no_dig __pyx_string_tab[70]
#define __pyx_kp_u_Cannot_parse_s_to_integer_positi __pyx_string_tab[71]
#define __pyx_kp_u_Cannot_perform_addition_on_ndarr __pyx_string_tab[72]
#define __pyx_kp_u_Cannot_perform_multiplication_on __pyx_string_tab[73]
#define __pyx_kp_u_Cannot_perform_subtraction_on_nd __pyx_string_tab[74]
#define __pyx_kp_u_Connot_parse_element __pyx_string_tab[75]
#define __pyx_kp_u_Construct_a_UTC_aware_index_from __pyx_string_tab[76]
#define __pyx_kp_u_Construct_a_fixed_frequency_inde __pyx_string_tab[77]
#define __pyx_kp_u_Construct_an_index_from_the_curr __pyx_string_tab[78]
#define __pyx_kp_u_Conversion_limits_to_units_betw __pyx_string_tab[79]
#define __pyx_kp_u_D_2 __pyx_string_tab[80]
#define __pyx_kp_u_Datetime_index_is_already_timezo __pyx_string_tab[81]
#define __pyx_kp_u_Datetime_index_is_timezone_naive __pyx_string_tab[82]
#define __pyx_kp_u_Datetime_index_is_timezone_naive_2 __pyx_string_tab[83]
#define __pyx_kp_u_Delta_unit_cannot_be_None __pyx_string_tab[84]
#define __pyx_kp_u_Delta_unit_cannot_be_an_empty_st __pyx_string_tab[85]
#define __pyx_kp_u_Dictionary_must_contain_doy_key __pyx_string_tab[86]
#define __pyx_kp_u_Dictionary_must_contain_week_key __pyx_string_tab[87]
#define __pyx_kp_u_Dictionary_must_contain_weekday __pyx_string_tab[88]
#define __pyx_kp_u_Dictionary_must_contain_year_key __pyx_string_tab[89]
#define __pyx_kp_u_Dictionary_must_contain_year_key_2 __pyx_string_tab[90]
#define __pyx_kp_u_Element_wise_check_whether_datet __pyx_string_tab[91]
#define __pyx_kp_u_Element_wise_check_whether_datet_2 __pyx_string_tab[92]
#define __pyx_kp_u_Expects_1_D_ndarray_instead_got __pyx_string_tab[93]
#define __pyx_kp_u_Expects_a_1_dimensional_array_go __pyx_string_tab[94]
#define __pyx_kp_u_Expects_a_1_dimensional_ndarray __pyx_string_tab[95]
#define __pyx_kp_u_Expects_an_instance_of_datetime __pyx_string_tab[96]
#define __pyx_kp_u_Expects_an_instance_of_np_dateti __pyx_string_tab[97]
#define __pyx_kp_u_Expects_an_instance_of_np_ndarra __pyx_string_tab[98]
#define __pyx_kp_u_Expects_an_instance_of_np_timede __pyx_string_tab[99]
#define __pyx_kp_u_Expects_dict_element_from __pyx_string_tab[100]
#define __pyx_kp_u_Expects_float_or_integer_element __pyx_string_tab[101]
#define __pyx_kp_u_Expects_instance_of_np_ndarray_t __pyx_string_tab[102]
#define __pyx_kp_u_Expects_integer_element_from __pyx_string_tab[103]
#define __pyx_kp_u_Expects_ndarray_datetime64_or_nd __pyx_string_tab[104]
#define __pyx_kp_u_Fail_to_convert_timestamp_s_to_U __pyx_string_tab[105]
#define __pyx_kp_u_Fail_to_convert_timestamp_s_to_l __pyx_string_tab[106]
#define __pyx_kp_u_Failed_ndarray_datetime64 __pyx_string_tab[107]
#define __pyx_kp_u_Fractional_seconds_precision_mus __pyx_string_tab[108]
#define __pyx_kp_u_H_M_S_f_z __pyx_string_tab[109]
#define __pyx_kp_u_Hashable_None __pyx_string_tab[110]
#define __pyx_kp_u_Invalid __pyx_string_tab[111]
#define __pyx_kp_u_Invalid_as_unit_input_Supports __pyx_string_tab[112]
#define __pyx_kp_u_Invalid_ceil_unit_input_Support __pyx_string_tab[113]
#define __pyx_kp_u_Invalid_floor_unit_input_Suppor __pyx_string_tab[114]
#define __pyx_kp_u_Invalid_round_unit_input_Suppor __pyx_string_tab[115]
#define __pyx_kp_u_M_2 __pyx_string_tab[116]
#define __pyx_kp_u_None __pyx_string_tab[117]
#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[118]
#define __pyx_kp_u_Only_supports_arrays_with_units __pyx_string_tab[119]
#define __pyx_kp_u_Pddt_date_range_line_541 __pyx_string_tab[120]
#define __pyx_kp_u_Pddt_day_of_month_line_4163 __pyx_string_tab[121]
#define __pyx_kp_u_Pddt_is_future_line_4925 __pyx_string_tab[122]
#define __pyx_kp_u_Pddt_is_past_line_4902 __pyx_string_tab[123]
#define __pyx_kp_u_Pddt_isocalendar_line_4013 __pyx_string_tab[124]
#define __pyx_kp_u_Pddt_replace_line_2071 __pyx_string_tab[125]
#define __pyx_kp_u_Pddt_snap_line_2988 __pyx_string_tab[126]
#define __pyx_kp_u_Pddt_timedf_line_1914 __pyx_string_tab[127]
#define __pyx_kp_u_Pddt_to_curr_month_line_2577 __pyx_string_tab[128]
#define __pyx_kp_u_Pddt_to_curr_quarter_line_2385 __pyx_string_tab[129]
#define __pyx_kp_u_Pddt_to_curr_weekday_line_2770 __pyx_string_tab[130]
#define __pyx_kp_u_Pddt_to_curr_year_line_2156 __pyx_string_tab[131]
#define __pyx_kp_u_Pddt_to_date_line_3120 __pyx_string_tab[132]
#define __pyx_kp_u_Pddt_to_datetime_line_3006 __pyx_string_tab[133]
#define __pyx_kp_u_Pddt_to_day_line_2935 __pyx_string_tab[134]
#define __pyx_kp_u_Pddt_to_month_line_2670 __pyx_string_tab[135]
#define __pyx_kp_u_Pddt_to_next_month_line_2656 __pyx_string_tab[136]
#define __pyx_kp_u_Pddt_to_next_quarter_line_2475 __pyx_string_tab[137]
#define __pyx_kp_u_Pddt_to_next_weekday_line_2804 __pyx_string_tab[138]
#define __pyx_kp_u_Pddt_to_next_year_line_2265 __pyx_string_tab[139]
#define __pyx_kp_u_Pddt_to_prev_month_line_2642 __pyx_string_tab[140]
#define __pyx_kp_u_Pddt_to_prev_quarter_line_2459 __pyx_string_tab[141]
#define __pyx_kp_u_Pddt_to_prev_weekday_line_2787 __pyx_string_tab[142]
#define __pyx_kp_u_Pddt_to_prev_year_line_2240 __pyx_string_tab[143]
#define __pyx_kp_u_Pddt_to_quarter_line_2491 __pyx_string_tab[144]
#define __pyx_kp_u_Pddt_to_time_line_3181 __pyx_string_tab[145]
#define __pyx_kp_u_Pddt_to_weekday_line_2821 __pyx_string_tab[146]
#define __pyx_kp_u_Pddt_to_year_line_2290 __pyx_string_tab[147]
#define __pyx_kp_u_Pddt_today_line_762 __pyx_string_tab[148]
#define __pyx_kp_u_Pddt_tz_available_line_4281 __pyx_string_tab[149]
#define __pyx_kp_u_Pddt_utcfromtimestamp_line_1406 __pyx_string_tab[150]
#define __pyx_kp_u_Pddt_utctimedf_line_1940 __pyx_string_tab[151]
#define __pyx_kp_u_Pddt_weekday_name_line_4211 __pyx_string_tab[152]
#define __pyx_kp_u_Replace_the_specified_datetime_f __pyx_string_tab[153]
#define __pyx_kp_u_Return_UTC_time_DataFrame_compat __pyx_string_tab[154]
#define __pyx_kp_u_Return_local_time_DataFrame_comp __pyx_string_tab[155]
#define __pyx_kp_u_Return_the_ISO_calendar_DateFram __pyx_string_tab[156]
#define __pyx_kp_u_Return_the_number_of_days_since __pyx_string_tab[157]
#define __pyx_kp_u_Return_the_weekday_names_with_sp __pyx_string_tab[158]
#define __pyx_kp_u_Seconds_value_must_be_finite_got __pyx_string_tab[159]
#define __pyx_kp_u_Snap_to_nearest_occurring_freque __pyx_string_tab[160]
#define __pyx_kp_u_Supports_Y_Q_M_W_D_h_m_s_ms_us_n __pyx_string_tab[161]
#define __pyx_kp_u_Supports_Y_Q_M_W_D_h_m_s_ms_us_n_2 __pyx_string_tab[162]
#define __pyx_kp_u_Supports_Y_Q_M_W_D_h_m_s_ms_us_n_3 __pyx_string_tab[163]
#define __pyx_kp_u_Supports_Y_Q_M_W_or_Month_name_g __pyx_string_tab[164]
#define __pyx_kp_u_Supports_Y_Q_M_W_or_Month_name_g_2 __pyx_string_tab[165]
#define __pyx_kp_u_Supports_Y_Q_M_W_or_Month_name_g_3 __pyx_string_tab[166]
#define __pyx_kp_u_Supports_one_both_or_neither_got __pyx_string_tab[167]
#define __pyx_kp_u_The_available_timezone_names_set __pyx_string_tab[168]
#define __pyx_kp_u_The_size_of_a_new_array_must_be __pyx_string_tab[169]
#define __pyx_kp_u_Timezone_offset __pyx_string_tab[170]
#define __pyx_kp_u_Try_to_set_unit_to_a_lower_resol __pyx_string_tab[171]
#define __pyx_kp_u_Unsupported_array_dtype_s __pyx_string_tab[172]
#define __pyx_kp_u_Unsupported_conversion_unit_d_fo __pyx_string_tab[173]
#define __pyx_kp_u_Unsupported_conversion_unit_d_fo_2 __pyx_string_tab[174]
#define __pyx_kp_u_Unsupported_datetime_resolution __pyx_string_tab[175]
#define __pyx_kp_u_Unsupported_doy_data_type_s __pyx_string_tab[176]
#define __pyx_kp_u_Unsupported_dtstr_data_type_s __pyx_string_tab[177]
#define __pyx_kp_u_Unsupported_iso_data_type_s __pyx_string_tab[178]
#define __pyx_kp_u_Unsupported_numpy_time_unit_NPY __pyx_string_tab[179]
#define __pyx_kp_u_Unsupported_ordinal_data_type_s __pyx_string_tab[180]
#define __pyx_kp_u_Unsupported_seconds_data_type_s __pyx_string_tab[181]
#define __pyx_kp_u_Unsupported_time_unit __pyx_string_tab[182]
#define __pyx_kp_u_Unsupported_ts_data_type_s __pyx_string_tab[183]
#define __pyx_kp_u_Unsupported_us_data_type_s __pyx_string_tab[184]
#define __pyx_kp_u_Value_for_doy_must_be_an_integer __pyx_string_tab[185]
#define __pyx_kp_u_Value_for_week_must_be_an_intege __pyx_string_tab[186]
#define __pyx_kp_u_Value_for_weekday_must_be_an_int __pyx_string_tab[187]
#define __pyx_kp_u_Value_for_year_must_be_an_intege __pyx_string_tab[188]
#define __pyx_kp_u_W_2 __pyx_string_tab[189]
#define __pyx_kp_u_When_date_is_a_date_instance_siz __pyx_string_tab[190]
#define __pyx_kp_u_When_doy_is_a_dictionary_size_mu __pyx_string_tab[191]
#define __pyx_kp_u_When_dt_is_a_datetime_like_insta __pyx_string_tab[192]
#define __pyx_kp_u_When_dtstr_is_a_literal_string_s __pyx_string_tab[193]
#define __pyx_kp_u_When_iso_is_a_dictionary_size_mu __pyx_string_tab[194]
#define __pyx_kp_u_When_ordinal_is_an_integer_size __pyx_string_tab[195]
#define __pyx_kp_u_When_seconds_is_a_float_or_integ __pyx_string_tab[196]
#define __pyx_kp_u_When_ts_is_a_float_or_integer_si __pyx_string_tab[197]
#define __pyx_kp_u_When_us_is_an_integer_size_must __pyx_string_tab[198]
#define __pyx_kp_u_Y_2 __pyx_string_tab[199]
#define __pyx_kp_u_Y_m_d __pyx_string_tab[200]
#define __pyx_kp_u__10 __pyx_string_tab[201]
#define __pyx_kp_u__11 __pyx_string_tab[202]
#define __pyx_kp_u__12 __pyx_string_tab[203]
#define __pyx_kp_u__13 __pyx_string_tab[204]
#define __pyx_kp_u__14 __pyx_string_tab[205]
#define __pyx_kp_u__15 __pyx_string_tab[206]
#define __pyx_kp_u__2 __pyx_string_tab[207]
#define __pyx_kp_u__3 __pyx_string_tab[208]
#define __pyx_kp_u__4 __pyx_string_tab[209]
#define __pyx_kp_u__5 __pyx_string_tab[210]
#define __pyx_kp_u__6 __pyx_string_tab[211]
#define __pyx_kp_u__7 __pyx_string_tab[212]
#define __pyx_kp_u__8 __pyx_string_tab[213]
#define __pyx_kp_u__9 __pyx_string_tab[214]
#define __pyx_kp_u_a_b_d_H_M_S_Y __pyx_string_tab[215]
#define __pyx_kp_u_add_note __pyx_string_tab[216]
#define __pyx_kp_u_arr2_length __pyx_string_tab[217]
#define __pyx_kp_u_arr_div_ceil_division_by_zero __pyx_string_tab[218]
#define __pyx_kp_u_arr_div_ceil_mul_division_by_zer __pyx_string_tab[219]
#define __pyx_kp_u_arr_div_down_division_by_zero __pyx_string_tab[220]
#define __pyx_kp_u_arr_div_down_mul_division_by_zer __pyx_string_tab[221]
#define __pyx_kp_u_arr_div_even_division_by_zero __pyx_string_tab[222]
#define __pyx_kp_u_arr_div_even_mul_division_by_zer __pyx_string_tab[223]
#define __pyx_kp_u_arr_div_floor_division_by_zero __pyx_string_tab[224]
#define __pyx_kp_u_arr_div_floor_mul_division_by_ze __pyx_string_tab[225]
#define __pyx_kp_u_arr_div_trunc_division_by_zero __pyx_string_tab[226]
#define __pyx_kp_u_arr_div_trunc_mul_division_by_ze __pyx_string_tab[227]
#define __pyx_kp_u_arr_div_up_division_by_zero __pyx_string_tab[228]
#define __pyx_kp_u_arr_div_up_mul_division_by_zero __pyx_string_tab[229]
#define __pyx_kp_u_arr_mod_division_by_zero __pyx_string_tab[230]
#define __pyx_kp_u_at_position __pyx_string_tab[231]
#define __pyx_kp_u_bool_None __pyx_string_tab[232]
#define __pyx_kp_u_ceil_unit __pyx_string_tab[233]
#define __pyx_kp_u_combine_date __pyx_string_tab[234]
#define __pyx_kp_u_combine_time __pyx_string_tab[235]
#define __pyx_kp_u_cython_bint __pyx_string_tab[236]
#define __pyx_kp_u_cython_int __pyx_string_tab[237]
#define __pyx_kp_u_date_range __pyx_string_tab[238]
#define __pyx_kp_u_datetime2 __pyx_string_tab[239]
#define __pyx_kp_u_datetime_date_object __pyx_string_tab[240]
#define __pyx_kp_u_datetime_date_str_None __pyx_string_tab[241]
#define __pyx_kp_u_datetime_datetime_np_datetime64 __pyx_string_tab[242]
#define __pyx_kp_u_datetime_time_str_None __pyx_string_tab[243]
#define __pyx_kp_u_datetime_tzinfo __pyx_string_tab[244]
#define __pyx_kp_u_datetime_tzinfo_str_None __pyx_string_tab[245]
#define __pyx_kp_u_dict_list_tuple_pd_DataFrame __pyx_string_tab[246]
#define __pyx_kp_u_diff_data __pyx_string_tab[247]
#define __pyx_kp_u_diff_inclusive __pyx_string_tab[248]
#define __pyx_kp_u_diff_unit __pyx_string_tab[249]
#define __pyx_kp_u_dt_isoformat_sep_cannot_be_None __pyx_string_tab[250]
#define __pyx_kp_u_dt_strformat_fmt_cannot_be_None __pyx_string_tab[251]
#define __pyx_kp_u_element __pyx_string_tab[252]
#define __pyx_kp_u_floor_unit __pyx_string_tab[253]
#define __pyx_kp_u_fold_must_be_either_0_or_1_got_d __pyx_string_tab[254]
#define __pyx_kp_u_from __pyx_string_tab[255]
#define __pyx_kp_u_from_2 __pyx_string_tab[256]
#define __pyx_kp_u_from_3 __pyx_string_tab[257]
#define __pyx_kp_u_fromdate __pyx_string_tab[258]
#define __pyx_kp_u_fromdate_size __pyx_string_tab[259]
#define __pyx_kp_u_fromdatetime __pyx_string_tab[260]
#define __pyx_kp_u_fromdatetime_size __pyx_string_tab[261]
#define __pyx_kp_u_fromdayofyear_doy __pyx_string_tab[262]
#define __pyx_kp_u_fromisocalendar_iso __pyx_string_tab[263]
#define __pyx_kp_u_fromisoformat __pyx_string_tab[264]
#define __pyx_kp_u_fromisoformat_size __pyx_string_tab[265]
#define __pyx_kp_u_frommicroseconds_size __pyx_string_tab[266]
#define __pyx_kp_u_frommicroseconds_us __pyx_string_tab[267]
#define __pyx_kp_u_fromordinal_ordinal __pyx_string_tab[268]
#define __pyx_kp_u_fromordinal_size __pyx_string_tab[269]
#define __pyx_kp_u_fromseconds_seconds __pyx_string_tab[270]
#define __pyx_kp_u_fromseconds_size __pyx_string_tab[271]
#define __pyx_kp_u_fromtimestamp_ts __pyx_string_tab[272]
#define __pyx_kp_u_fsp_precision __pyx_string_tab[273]
#define __pyx_kp_u_got __pyx_string_tab[274]
#define __pyx_kp_u_h_2 __pyx_string_tab[275]
#define __pyx_kp_u_int_Any __pyx_string_tab[276]
#define __pyx_kp_u_int_Any_None __pyx_string_tab[277]
#define __pyx_kp_u_int_None __pyx_string_tab[278]
#define __pyx_kp_u_int_float_object __pyx_string_tab[279]
#define __pyx_kp_u_int_object __pyx_string_tab[280]
#define __pyx_kp_u_int_str __pyx_string_tab[281]
#define __pyx_kp_u_int_str_None __pyx_string_tab[282]
#define __pyx_kp_u_m_2 __pyx_string_tab[283]
#define __pyx_kp_u_math_div_ceil_division_by_zero __pyx_string_tab[284]
#define __pyx_kp_u_math_div_ceil_result_does_not_fi __pyx_string_tab[285]
#define __pyx_kp_u_math_div_down_division_by_zero __pyx_string_tab[286]
#define __pyx_kp_u_math_div_down_result_does_not_fi __pyx_string_tab[287]
#define __pyx_kp_u_math_div_even_division_by_zero __pyx_string_tab[288]
#define __pyx_kp_u_math_div_even_result_does_not_fi __pyx_string_tab[289]
#define __pyx_kp_u_math_div_floor_division_by_zero __pyx_string_tab[290]
#define __pyx_kp_u_math_div_floor_result_does_not_f __pyx_string_tab[291]
#define __pyx_kp_u_math_div_trunc_division_by_zero __pyx_string_tab[292]
#define __pyx_kp_u_math_div_trunc_result_does_not_f __pyx_string_tab[293]
#define __pyx_kp_u_math_div_up_division_by_zero __pyx_string_tab[294]
#define __pyx_kp_u_math_div_up_result_does_not_fit __pyx_string_tab[295]
#define __pyx_kp_u_math_mod_division_by_zero __pyx_string_tab[296]
#define __pyx_kp_u_minimum_value_cannot_be_greater __pyx_string_tab[297]
#define __pyx_kp_u_minutes __pyx_string_tab[298]
#define __pyx_kp_u_missing_time_resolution_for_ndar __pyx_string_tab[299]
#define __pyx_kp_u_mix_tz_aware __pyx_string_tab[300]
#define __pyx_kp_u_mixed_timezones __pyx_string_tab[301]
#define __pyx_kp_u_month_name_locale __pyx_string_tab[302]
#define __pyx_kp_u_ms_2 __pyx_string_tab[303]
#define __pyx_kp_u_must_be_called_with_a_collectio __pyx_string_tab[304]
#define __pyx_kp_u_new___data_input __pyx_string_tab[305]
#define __pyx_kp_u_np_ndarray_Pydt __pyx_string_tab[306]
#define __pyx_kp_u_np_ndarray_datetime_date __pyx_string_tab[307]
#define __pyx_kp_u_np_ndarray_datetime_time __pyx_string_tab[308]
#define __pyx_kp_u_np_ndarray_np_datetime64 __pyx_string_tab[309]
#define __pyx_kp_u_np_ndarray_np_int64 __pyx_string_tab[310]
#define __pyx_kp_u_ns_2 __pyx_string_tab[311]
#define __pyx_kp_u_numpy__core_multiarray_failed_to __pyx_string_tab[312]
#define __pyx_kp_u_numpy__core_umath_failed_to_impo __pyx_string_tab[313]
#define __pyx_kp_u_object_None __pyx_string_tab[314]
#define __pyx_kp_u_out_of_range_Must_be_strictly_b __pyx_string_tab[315]
#define __pyx_kp_u_out_of_range_Must_be_strictly_b_2 __pyx_string_tab[316]
#define __pyx_kp_u_parse_to_float_token_cannot_be_N __pyx_string_tab[317]
#define __pyx_kp_u_parse_to_int_token_cannot_be_Non __pyx_string_tab[318]
#define __pyx_kp_u_pd_DataFrame __pyx_string_tab[319]
#define __pyx_kp_u_pd_Index_bool __pyx_string_tab[320]
#define __pyx_kp_u_pd_Index_np_float64 __pyx_string_tab[321]
#define __pyx_kp_u_pd_Index_np_int64 __pyx_string_tab[322]
#define __pyx_kp_u_pd_Index_str __pyx_string_tab[323]
#define __pyx_kp_u_resolution_is_not_supported __pyx_string_tab[324]
#define __pyx_kp_u_round_unit __pyx_string_tab[325]
#define __pyx_kp_u_s_2 __pyx_string_tab[326]
#define __pyx_kp_u_seconds_2 __pyx_string_tab[327]
#define __pyx_kp_u_seconds_from __pyx_string_tab[328]
#define __pyx_kp_u_seconds_from_hours __pyx_string_tab[329]
#define __pyx_kp_u_set_str __pyx_string_tab[330]
#define __pyx_kp_u_size __pyx_string_tab[331]
#define __pyx_kp_u_slice_to_ufloat_out_of_range_sta __pyx_string_tab[332]
#define __pyx_kp_u_slice_to_ufloat_size_must_be_0_i __pyx_string_tab[333]
#define __pyx_kp_u_slice_to_ufloat_start_must_be_0 __pyx_string_tab[334]
#define __pyx_kp_u_slice_to_ufloat_token_cannot_be __pyx_string_tab[335]
#define __pyx_kp_u_slice_to_uint_out_of_range_start __pyx_string_tab[336]
#define __pyx_kp_u_slice_to_uint_size_must_be_0_ins __pyx_string_tab[337]
#define __pyx_kp_u_slice_to_uint_start_must_be_0_in __pyx_string_tab[338]
#define __pyx_kp_u_slice_to_uint_token_cannot_be_No __pyx_string_tab[339]
#define __pyx_kp_u_snap_freq __pyx_string_tab[340]
#define __pyx_kp_u_src_cytimes_pddt_py __pyx_string_tab[341]
#define __pyx_kp_u_src_cytimes_utils_pxd __pyx_string_tab[342]
#define __pyx_kp_u_str_None __pyx_string_tab[343]
#define __pyx_kp_u_str_int __pyx_string_tab[344]
#define __pyx_kp_u_str_object __pyx_string_tab[345]
#define __pyx_kp_u_strftime_fmt __pyx_string_tab[346]
#define __pyx_kp_u_strptime_dtstr __pyx_string_tab[347]
#define __pyx_kp_u_strptime_dtstr_fmt __pyx_string_tab[348]
#define __pyx_kp_u_ticks_Supported_resolution_Y_M __pyx_string_tab[349]
#define __pyx_kp_u_ticks_Supported_units __pyx_string_tab[350]
#define __pyx_kp_u_ticks_Supported_units_Y_M_W_D_h __pyx_string_tab[351]
#define __pyx_kp_u_tm_strformat_expanded_output_exc __pyx_string_tab[352]
#define __pyx_kp_u_tm_strformat_failed_to_allocate __pyx_string_tab[353]
#define __pyx_kp_u_tm_strformat_fmt_cannot_be_None __pyx_string_tab[354]
#define __pyx_kp_u_to __pyx_string_tab[355]
#define __pyx_kp_u_to_datetime __pyx_string_tab[356]
#define __pyx_kp_u_to_datetime64 __pyx_string_tab[357]
#define __pyx_kp_u_to_end_of_unit __pyx_string_tab[358]
#define __pyx_kp_u_to_first_of_unit __pyx_string_tab[359]
#define __pyx_kp_u_to_float_contains_invalid_chara __pyx_string_tab[360]
#define __pyx_kp_u_to_int64 __pyx_string_tab[361]
#define __pyx_kp_u_to_int64_2 __pyx_string_tab[362]
#define __pyx_kp_u_to_integer __pyx_string_tab[363]
#define __pyx_kp_u_to_integer_Contains_invalid_cha __pyx_string_tab[364]
#define __pyx_kp_u_to_last_of_unit __pyx_string_tab[365]
#define __pyx_kp_u_to_non_negative_float_contains __pyx_string_tab[366]
#define __pyx_kp_u_to_start_of_unit __pyx_string_tab[367]
#define __pyx_kp_u_to_unsigned_integer_Contains_in __pyx_string_tab[368]
#define __pyx_kp_u_token_len __pyx_string_tab[369]
#define __pyx_kp_u_too_large_to_convert_to_C_long __pyx_string_tab[370]
#define __pyx_kp_u_tz_convert_2 __pyx_string_tab[371]
#define __pyx_kp_u_tz_convert_tz __pyx_string_tab[372]
#define __pyx_kp_u_tz_localize_2 __pyx_string_tab[373]
#define __pyx_kp_u_tz_localize_tz __pyx_string_tab[374]
#define __pyx_kp_u_tz_switch __pyx_string_tab[375]
#define __pyx_kp_u_unit_to_int64 __pyx_string_tab[376]
#define __pyx_kp_u_unless_utc_True __pyx_string_tab[377]
#define __pyx_kp_u_us_2 __pyx_string_tab[378]
#define __pyx_kp_u_vs __pyx_string_tab[379]
#define __pyx_kp_u_was_passed __pyx_string_tab[380]
#define __pyx_kp_u_weekday_name_locale __pyx_string_tab[381]
#define __pyx_n_u_AmbiguousTimeError __pyx_string_tab[382]
#define __pyx_n_u_Any __pyx_string_tab[383]
#define __pyx_n_u_Apr __pyx_string_tab[384]
#define __pyx_n_u_Aug __pyx_string_tab[385]
#define __pyx_n_u_Configs __pyx_string_tab[386]
#define __pyx_n_u_D __pyx_string_tab[387]
#define __pyx_n_u_DataFrame __pyx_string_tab[388]
#define __pyx_n_u_DatetimeArray __pyx_string_tab[389]
#define __pyx_n_u_DatetimeIndex __pyx_string_tab[390]
#define __pyx_n_u_Dec __pyx_string_tab[391]
#define __pyx_n_u_Feb __pyx_string_tab[392]
#define __pyx_n_u_Fri __pyx_string_tab[393]
#define __pyx_n_u_Hashable __pyx_string_tab[394]
#define __pyx_n_u_Index __pyx_string_tab[395]
#define __pyx_n_u_InvalidArgumentError __pyx_string_tab[396]
#define __pyx_n_u_Jan __pyx_string_tab[397]
#define __pyx_n_u_Jul __pyx_string_tab[398]
#define __pyx_n_u_Jun __pyx_string_tab[399]
#define __pyx_n_u_M __pyx_string_tab[400]
#define __pyx_n_u_Mar __pyx_string_tab[401]
#define __pyx_n_u_May __pyx_string_tab[402]
#define __pyx_n_u_MixedTimezoneError __pyx_string_tab[403]
#define __pyx_n_u_Mon __pyx_string_tab[404]
#define __pyx_n_u_Nov __pyx_string_tab[405]
#define __pyx_n_u_Oct __pyx_string_tab[406]
#define __pyx_n_u_OutOfBoundsError __pyx_string_tab[407]
#define __pyx_n_u_ParserFailedError __pyx_string_tab[408]
#define __pyx_n_u_PdDateParseError __pyx_string_tab[409]
#define __pyx_n_u_PdOutOfBoundsDatetime __pyx_string_tab[410]
#define __pyx_n_u_Pddt __pyx_string_tab[411]
#define __pyx_n_u_Pddt___new __pyx_string_tab[412]
#define __pyx_n_u_Pddt__new __pyx_string_tab[413]
#define __pyx_n_u_Pddt__new_native __pyx_string_tab[414]
#define __pyx_n_u_Pddt__new_parser __pyx_string_tab[415]
#define __pyx_n_u_Pddt__to_curr_weekday __pyx_string_tab[416]
#define __pyx_n_u_Pddt_add __pyx_string_tab[417]
#define __pyx_n_u_Pddt_as_unit __pyx_string_tab[418]
#define __pyx_n_u_Pddt_astimezone __pyx_string_tab[419]
#define __pyx_n_u_Pddt_ceil __pyx_string_tab[420]
#define __pyx_n_u_Pddt_combine __pyx_string_tab[421]
#define __pyx_n_u_Pddt_ctime __pyx_string_tab[422]
#define __pyx_n_u_Pddt_date __pyx_string_tab[423]
#define __pyx_n_u_Pddt_date_range __pyx_string_tab[424]
#define __pyx_n_u_Pddt_datetime __pyx_string_tab[425]
#define __pyx_n_u_Pddt_day __pyx_string_tab[426]
#define __pyx_n_u_Pddt_day_of_month __pyx_string_tab[427]
#define __pyx_n_u_Pddt_day_of_quarter __pyx_string_tab[428]
#define __pyx_n_u_Pddt_day_of_year __pyx_string_tab[429]
#define __pyx_n_u_Pddt_days_bf_month __pyx_string_tab[430]
#define __pyx_n_u_Pddt_days_bf_quarter __pyx_string_tab[431]
#define __pyx_n_u_Pddt_days_bf_year __pyx_string_tab[432]
#define __pyx_n_u_Pddt_days_in_month __pyx_string_tab[433]
#define __pyx_n_u_Pddt_days_in_quarter __pyx_string_tab[434]
#define __pyx_n_u_Pddt_days_in_year __pyx_string_tab[435]
#define __pyx_n_u_Pddt_diff __pyx_string_tab[436]
#define __pyx_n_u_Pddt_floor __pyx_string_tab[437]
#define __pyx_n_u_Pddt_fromdate __pyx_string_tab[438]
#define __pyx_n_u_Pddt_fromdatetime __pyx_string_tab[439]
#define __pyx_n_u_Pddt_fromdatetime64 __pyx_string_tab[440]
#define __pyx_n_u_Pddt_fromdayofyear __pyx_string_tab[441]
#define __pyx_n_u_Pddt_fromisocalendar __pyx_string_tab[442]
#define __pyx_n_u_Pddt_fromisoformat __pyx_string_tab[443]
#define __pyx_n_u_Pddt_frommicroseconds __pyx_string_tab[444]
#define __pyx_n_u_Pddt_fromordinal __pyx_string_tab[445]
#define __pyx_n_u_Pddt_fromseconds __pyx_string_tab[446]
#define __pyx_n_u_Pddt_fromtimestamp __pyx_string_tab[447]
#define __pyx_n_u_Pddt_fsp __pyx_string_tab[448]
#define __pyx_n_u_Pddt_hour __pyx_string_tab[449]
#define __pyx_n_u_Pddt_is_day __pyx_string_tab[450]
#define __pyx_n_u_Pddt_is_end_of __pyx_string_tab[451]
#define __pyx_n_u_Pddt_is_first_of __pyx_string_tab[452]
#define __pyx_n_u_Pddt_is_future __pyx_string_tab[453]
#define __pyx_n_u_Pddt_is_last_of __pyx_string_tab[454]
#define __pyx_n_u_Pddt_is_leap_year __pyx_string_tab[455]
#define __pyx_n_u_Pddt_is_local __pyx_string_tab[456]
#define __pyx_n_u_Pddt_is_long_year __pyx_string_tab[457]
#define __pyx_n_u_Pddt_is_month __pyx_string_tab[458]
#define __pyx_n_u_Pddt_is_past __pyx_string_tab[459]
#define __pyx_n_u_Pddt_is_quarter __pyx_string_tab[460]
#define __pyx_n_u_Pddt_is_start_of __pyx_string_tab[461]
#define __pyx_n_u_Pddt_is_utc __pyx_string_tab[462]
#define __pyx_n_u_Pddt_is_weekday __pyx_string_tab[463]
#define __pyx_n_u_Pddt_is_year __pyx_string_tab[464]
#define __pyx_n_u_Pddt_isocalendar __pyx_string_tab[465]
#define __pyx_n_u_Pddt_isoformat __pyx_string_tab[466]
#define __pyx_n_u_Pddt_isoweek __pyx_string_tab[467]
#define __pyx_n_u_Pddt_isoweekday __pyx_string_tab[468]
#define __pyx_n_u_Pddt_isoyear __pyx_string_tab[469]
#define __pyx_n_u_Pddt_leap_bt_year __pyx_string_tab[470]
#define __pyx_n_u_Pddt_microsecond __pyx_string_tab[471]
#define __pyx_n_u_Pddt_millisecond __pyx_string_tab[472]
#define __pyx_n_u_Pddt_minute __pyx_string_tab[473]
#define __pyx_n_u_Pddt_month __pyx_string_tab[474]
#define __pyx_n_u_Pddt_month_name __pyx_string_tab[475]
#define __pyx_n_u_Pddt_nanosecond __pyx_string_tab[476]
#define __pyx_n_u_Pddt_normalize __pyx_string_tab[477]
#define __pyx_n_u_Pddt_now __pyx_string_tab[478]
#define __pyx_n_u_Pddt_parse __pyx_string_tab[479]
#define __pyx_n_u_Pddt_quarter __pyx_string_tab[480]
#define __pyx_n_u_Pddt_replace __pyx_string_tab[481]
#define __pyx_n_u_Pddt_round __pyx_string_tab[482]
#define __pyx_n_u_Pddt_second __pyx_string_tab[483]
#define __pyx_n_u_Pddt_snap __pyx_string_tab[484]
#define __pyx_n_u_Pddt_strftime __pyx_string_tab[485]
#define __pyx_n_u_Pddt_strptime __pyx_string_tab[486]
#define __pyx_n_u_Pddt_sub __pyx_string_tab[487]
#define __pyx_n_u_Pddt_time __pyx_string_tab[488]
#define __pyx_n_u_Pddt_timedf __pyx_string_tab[489]
#define __pyx_n_u_Pddt_timestamp __pyx_string_tab[490]
#define __pyx_n_u_Pddt_timetz __pyx_string_tab[491]
#define __pyx_n_u_Pddt_to_curr_month __pyx_string_tab[492]
#define __pyx_n_u_Pddt_to_curr_quarter __pyx_string_tab[493]
#define __pyx_n_u_Pddt_to_curr_weekday __pyx_string_tab[494]
#define __pyx_n_u_Pddt_to_curr_year __pyx_string_tab[495]
#define __pyx_n_u_Pddt_to_date __pyx_string_tab[496]
#define __pyx_n_u_Pddt_to_datetime __pyx_string_tab[497]
#define __pyx_n_u_Pddt_to_day __pyx_string_tab[498]
#define __pyx_n_u_Pddt_to_end_of __pyx_string_tab[499]
#define __pyx_n_u_Pddt_to_first_of __pyx_string_tab[500]
#define __pyx_n_u_Pddt_to_friday __pyx_string_tab[501]
#define __pyx_n_u_Pddt_to_last_of __pyx_string_tab[502]
#define __pyx_n_u_Pddt_to_monday __pyx_string_tab[503]
#define __pyx_n_u_Pddt_to_month __pyx_string_tab[504]
#define __pyx_n_u_Pddt_to_next_month __pyx_string_tab[505]
#define __pyx_n_u_Pddt_to_next_quarter __pyx_string_tab[506]
#define __pyx_n_u_Pddt_to_next_weekday __pyx_string_tab[507]
#define __pyx_n_u_Pddt_to_next_year __pyx_string_tab[508]
#define __pyx_n_u_Pddt_to_prev_month __pyx_string_tab[509]
#define __pyx_n_u_Pddt_to_prev_quarter __pyx_string_tab[510]
#define __pyx_n_u_Pddt_to_prev_weekday __pyx_string_tab[511]
#define __pyx_n_u_Pddt_to_prev_year __pyx_string_tab[512]
#define __pyx_n_u_Pddt_to_quarter __pyx_string_tab[513]
#define __pyx_n_u_Pddt_to_saturday __pyx_string_tab[514]
#define __pyx_n_u_Pddt_to_start_of __pyx_string_tab[515]
#define __pyx_n_u_Pddt_to_sunday __pyx_string_tab[516]
#define __pyx_n_u_Pddt_to_thursday __pyx_string_tab[517]
#define __pyx_n_u_Pddt_to_time __pyx_string_tab[518]
#define __pyx_n_u_Pddt_to_tomorrow __pyx_string_tab[519]
#define __pyx_n_u_Pddt_to_tuesday __pyx_string_tab[520]
#define __pyx_n_u_Pddt_to_wednesday __pyx_string_tab[521]
#define __pyx_n_u_Pddt_to_weekday __pyx_string_tab[522]
#define __pyx_n_u_Pddt_to_year __pyx_string_tab[523]
#define __pyx_n_u_Pddt_to_yesterday __pyx_string_tab[524]
#define __pyx_n_u_Pddt_today __pyx_string_tab[525]
#define __pyx_n_u_Pddt_tomicroseconds __pyx_string_tab[526]
#define __pyx_n_u_Pddt_toordinal __pyx_string_tab[527]
#define __pyx_n_u_Pddt_toseconds __pyx_string_tab[528]
#define __pyx_n_u_Pddt_tz_available __pyx_string_tab[529]
#define __pyx_n_u_Pddt_tz_convert __pyx_string_tab[530]
#define __pyx_n_u_Pddt_tz_localize __pyx_string_tab[531]
#define __pyx_n_u_Pddt_tz_switch __pyx_string_tab[532]
#define __pyx_n_u_Pddt_tzname __pyx_string_tab[533]
#define __pyx_n_u_Pddt_utcfromtimestamp __pyx_string_tab[534]
#define __pyx_n_u_Pddt_utcnow __pyx_string_tab[535]
#define __pyx_n_u_Pddt_utctimedf __pyx_string_tab[536]
#define __pyx_n_u_Pddt_values_naive __pyx_string_tab[537]
#define __pyx_n_u_Pddt_weekday __pyx_string_tab[538]
#define __pyx_n_u_Pddt_weekday_name __pyx_string_tab[539]
#define __pyx_n_u_Pddt_year __pyx_string_tab[540]
#define __pyx_n_u_Pydt __pyx_string_tab[541]
#define __pyx_n_u_PytzAmbiguousTimeError __pyx_string_tab[542]
#define __pyx_n_u_PytzNonExistentTimeError __pyx_string_tab[543]
#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[544]
#define __pyx_n_u_Sat __pyx_string_tab[545]
#define __pyx_n_u_Self __pyx_string_tab[546]
#define __pyx_n_u_Sep __pyx_string_tab[547]
#define __pyx_n_u_Series __pyx_string_tab[548]
#define __pyx_n_u_Sun __pyx_string_tab[549]
#define __pyx_n_u_T __pyx_string_tab[550]
#define __pyx_n_u_Thu __pyx_string_tab[551]
#define __pyx_n_u_Tue __pyx_string_tab[552]
#define __pyx_n_u_W __pyx_string_tab[553]
#define __pyx_n_u_Wed __pyx_string_tab[554]
#define __pyx_n_u_Y __pyx_string_tab[555]
#define __pyx_n_u__16 __pyx_string_tab[556]
#define __pyx_n_u_absolute __pyx_string_tab[557]
#define __pyx_n_u_add __pyx_string_tab[558]
#define __pyx_n_u_all __pyx_string_tab[559]
#define __pyx_n_u_ambiguous __pyx_string_tab[560]
#define __pyx_n_u_arr __pyx_string_tab[561]
#define __pyx_n_u_arr_p __pyx_string_tab[562]
#define __pyx_n_u_arr_size __pyx_string_tab[563]
#define __pyx_n_u_arrf __pyx_string_tab[564]
#define __pyx_n_u_arrf_p __pyx_string_tab[565]
#define __pyx_n_u_as __pyx_string_tab[566]
#define __pyx_n_u_as_reso __pyx_string_tab[567]
#define __pyx_n_u_as_unit __pyx_string_tab[568]
#define __pyx_n_u_astimezone __pyx_string_tab[569]
#define __pyx_n_u_astype __pyx_string_tab[570]
#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[571]
#define __pyx_n_u_available_timezones __pyx_string_tab[572]
#define __pyx_n_u_available_timezones_2 __pyx_string_tab[573]
#define __pyx_n_u_base_tz __pyx_string_tab[574]
#define __pyx_n_u_bool __pyx_string_tab[575]
#define __pyx_n_u_both __pyx_string_tab[576]
#define __pyx_n_u_ceil __pyx_string_tab[577]
#define __pyx_n_u_cfg __pyx_string_tab[578]
#define __pyx_n_u_ch0 __pyx_string_tab[579]
#define __pyx_n_u_class __pyx_string_tab[580]
#define __pyx_n_u_cline_in_traceback __pyx_string_tab[581]
#define __pyx_n_u_cls __pyx_string_tab[582]
#define __pyx_n_u_cls_2 __pyx_string_tab[583]
#define __pyx_n_u_columns __pyx_string_tab[584]
#define __pyx_n_u_combine __pyx_string_tab[585]
#define __pyx_n_u_copy __pyx_string_tab[586]
#define __pyx_n_u_ctime __pyx_string_tab[587]
#define __pyx_n_u_cytimes __pyx_string_tab[588]
#define __pyx_n_u_cytimes_parser __pyx_string_tab[589]
#define __pyx_n_u_cytimes_pddt __pyx_string_tab[590]
#define __pyx_n_u_cytimes_pydt __pyx_string_tab[591]
#define __pyx_n_u_cytimes_utils __pyx_string_tab[592]
#define __pyx_n_u_d __pyx_string_tab[593]
#define __pyx_n_u_data __pyx_string_tab[594]
#define __pyx_n_u_date __pyx_string_tab[595]
#define __pyx_n_u_dateD __pyx_string_tab[596]
#define __pyx_n_u_dateM __pyx_string_tab[597]
#define __pyx_n_u_dateQ __pyx_string_tab[598]
#define __pyx_n_u_dateY __pyx_string_tab[599]
#define __pyx_n_u_date_range_2 __pyx_string_tab[600]
#define __pyx_n_u_dates __pyx_string_tab[601]
#define __pyx_n_u_datetime __pyx_string_tab[602]
#define __pyx_n_u_datetime64 __pyx_string_tab[603]
#define __pyx_n_u_day __pyx_string_tab[604]
#define __pyx_n_u_day_name __pyx_string_tab[605]
#define __pyx_n_u_day_of_month __pyx_string_tab[606]
#define __pyx_n_u_day_of_quarter __pyx_string_tab[607]
#define __pyx_n_u_day_of_year __pyx_string_tab[608]
#define __pyx_n_u_dayfirst __pyx_string_tab[609]
#define __pyx_n_u_days __pyx_string_tab[610]
#define __pyx_n_u_days_bf_month __pyx_string_tab[611]
#define __pyx_n_u_days_bf_quarter __pyx_string_tab[612]
#define __pyx_n_u_days_bf_year __pyx_string_tab[613]
#define __pyx_n_u_days_in_month __pyx_string_tab[614]
#define __pyx_n_u_days_in_quarter __pyx_string_tab[615]
#define __pyx_n_u_days_in_year __pyx_string_tab[616]
#define __pyx_n_u_delta __pyx_string_tab[617]
#define __pyx_n_u_delta_p __pyx_string_tab[618]
#define __pyx_n_u_diff __pyx_string_tab[619]
#define __pyx_n_u_doc __pyx_string_tab[620]
#define __pyx_n_u_doy __pyx_string_tab[621]
#define __pyx_n_u_dst __pyx_string_tab[622]
#define __pyx_n_u_dt __pyx_string_tab[623]
#define __pyx_n_u_dt64 __pyx_string_tab[624]
#define __pyx_n_u_dtarr __pyx_string_tab[625]
#define __pyx_n_u_dts __pyx_string_tab[626]
#define __pyx_n_u_dtstr __pyx_string_tab[627]
#define __pyx_n_u_dtype __pyx_string_tab[628]
#define __pyx_n_u_end __pyx_string_tab[629]
#define __pyx_n_u_err __pyx_string_tab[630]
#define __pyx_n_u_errors __pyx_string_tab[631]
#define __pyx_n_u_f __pyx_string_tab[632]
#define __pyx_n_u_floor __pyx_string_tab[633]
#define __pyx_n_u_fmt __pyx_string_tab[634]
#define __pyx_n_u_fold __pyx_string_tab[635]
#define __pyx_n_u_freq __pyx_string_tab[636]
#define __pyx_n_u_fromdate_2 __pyx_string_tab[637]
#define __pyx_n_u_fromdatetime64 __pyx_string_tab[638]
#define __pyx_n_u_fromdatetime_2 __pyx_string_tab[639]
#define __pyx_n_u_fromdayofyear __pyx_string_tab[640]
#define __pyx_n_u_fromisocalendar __pyx_string_tab[641]
#define __pyx_n_u_fromisoformat_2 __pyx_string_tab[642]
#define __pyx_n_u_frommicroseconds __pyx_string_tab[643]
#define __pyx_n_u_fromordinal __pyx_string_tab[644]
#define __pyx_n_u_fromseconds __pyx_string_tab[645]
#define __pyx_n_u_fromtimestamp __pyx_string_tab[646]
#define __pyx_n_u_fromutc __pyx_string_tab[647]
#define __pyx_n_u_fs __pyx_string_tab[648]
#define __pyx_n_u_fsp __pyx_string_tab[649]
#define __pyx_n_u_func __pyx_string_tab[650]
#define __pyx_n_u_generate_range __pyx_string_tab[651]
#define __pyx_n_u_get __pyx_string_tab[652]
#define __pyx_n_u_h __pyx_string_tab[653]
#define __pyx_n_u_has_tz __pyx_string_tab[654]
#define __pyx_n_u_hour __pyx_string_tab[655]
#define __pyx_n_u_hours __pyx_string_tab[656]
#define __pyx_n_u_i __pyx_string_tab[657]
#define __pyx_n_u_incl_off __pyx_string_tab[658]
#define __pyx_n_u_inclusive __pyx_string_tab[659]
#define __pyx_n_u_index __pyx_string_tab[660]
#define __pyx_n_u_infer __pyx_string_tab[661]
#define __pyx_n_u_is_coroutine __pyx_string_tab[662]
#define __pyx_n_u_is_day __pyx_string_tab[663]
#define __pyx_n_u_is_end_of __pyx_string_tab[664]
#define __pyx_n_u_is_first_of __pyx_string_tab[665]
#define __pyx_n_u_is_future __pyx_string_tab[666]
#define __pyx_n_u_is_last_of __pyx_string_tab[667]
#define __pyx_n_u_is_leap_year __pyx_string_tab[668]
#define __pyx_n_u_is_local __pyx_string_tab[669]
#define __pyx_n_u_is_long_year __pyx_string_tab[670]
#define __pyx_n_u_is_month __pyx_string_tab[671]
#define __pyx_n_u_is_past __pyx_string_tab[672]
#define __pyx_n_u_is_quarter __pyx_string_tab[673]
#define __pyx_n_u_is_start_of __pyx_string_tab[674]
#define __pyx_n_u_is_utc __pyx_string_tab[675]
#define __pyx_n_u_is_weekday __pyx_string_tab[676]
#define __pyx_n_u_is_year __pyx_string_tab[677]
#define __pyx_n_u_iso __pyx_string_tab[678]
#define __pyx_n_u_isocalendar __pyx_string_tab[679]
#define __pyx_n_u_isoformat __pyx_string_tab[680]
#define __pyx_n_u_isoweek __pyx_string_tab[681]
#define __pyx_n_u_isoweekday __pyx_string_tab[682]
#define __pyx_n_u_isoyear __pyx_string_tab[683]
#define __pyx_n_u_items __pyx_string_tab[684]
#define __pyx_n_u_leap_bt_year __pyx_string_tab[685]
#define __pyx_n_u_locale __pyx_string_tab[686]
#define __pyx_n_u_m __pyx_string_tab[687]
#define __pyx_n_u_main __pyx_string_tab[688]
#define __pyx_n_u_metaclass __pyx_string_tab[689]
#define __pyx_n_u_microsecond __pyx_string_tab[690]
#define __pyx_n_u_microseconds __pyx_string_tab[691]
#define __pyx_n_u_millisecond __pyx_string_tab[692]
#define __pyx_n_u_milliseconds __pyx_string_tab[693]
#define __pyx_n_u_min __pyx_string_tab[694]
#define __pyx_n_u_minute __pyx_string_tab[695]
#define __pyx_n_u_minutes_2 __pyx_string_tab[696]
#define __pyx_n_u_mm __pyx_string_tab[697]
#define __pyx_n_u_module __pyx_string_tab[698]
#define __pyx_n_u_month __pyx_string_tab[699]
#define __pyx_n_u_month_name __pyx_string_tab[700]
#define __pyx_n_u_months __pyx_string_tab[701]
#define __pyx_n_u_mro_entries __pyx_string_tab[702]
#define __pyx_n_u_ms __pyx_string_tab[703]
#define __pyx_n_u_msg __pyx_string_tab[704]
#define __pyx_n_u_my_arr __pyx_string_tab[705]
#define __pyx_n_u_my_dateD __pyx_string_tab[706]
#define __pyx_n_u_my_reso __pyx_string_tab[707]
#define __pyx_n_u_my_size __pyx_string_tab[708]
#define __pyx_n_u_my_tz __pyx_string_tab[709]
#define __pyx_n_u_my_unit __pyx_string_tab[710]
#define __pyx_n_u_naive __pyx_string_tab[711]
#define __pyx_n_u_name __pyx_string_tab[712]
#define __pyx_n_u_name_2 __pyx_string_tab[713]
#define __pyx_n_u_nanosecond __pyx_string_tab[714]
#define __pyx_n_u_nanoseconds __pyx_string_tab[715]
#define __pyx_n_u_neither __pyx_string_tab[716]
#define __pyx_n_u_new __pyx_string_tab[717]
#define __pyx_n_u_new_2 __pyx_string_tab[718]
#define __pyx_n_u_new_native __pyx_string_tab[719]
#define __pyx_n_u_new_parser __pyx_string_tab[720]
#define __pyx_n_u_no_default __pyx_string_tab[721]
#define __pyx_n_u_no_default_2 __pyx_string_tab[722]
#define __pyx_n_u_nonexistent __pyx_string_tab[723]
#define __pyx_n_u_normalize __pyx_string_tab[724]
#define __pyx_n_u_now __pyx_string_tab[725]
#define __pyx_n_u_np __pyx_string_tab[726]
#define __pyx_n_u_ns __pyx_string_tab[727]
#define __pyx_n_u_numpy __pyx_string_tab[728]
#define __pyx_n_u_o __pyx_string_tab[729]
#define __pyx_n_u_obj __pyx_string_tab[730]
#define __pyx_n_u_object __pyx_string_tab[731]
#define __pyx_n_u_offset __pyx_string_tab[732]
#define __pyx_n_u_one __pyx_string_tab[733]
#define __pyx_n_u_ordinal __pyx_string_tab[734]
#define __pyx_n_u_orient __pyx_string_tab[735]
#define __pyx_n_u_out __pyx_string_tab[736]
#define __pyx_n_u_pandas __pyx_string_tab[737]
#define __pyx_n_u_pandas__libs_lib __pyx_string_tab[738]
#define __pyx_n_u_pandas_core_arrays_datetimes __pyx_string_tab[739]
#define __pyx_n_u_parse __pyx_string_tab[740]
#define __pyx_n_u_parse_month __pyx_string_tab[741]
#define __pyx_n_u_parse_obj __pyx_string_tab[742]
#define __pyx_n_u_parse_to_float __pyx_string_tab[743]
#define __pyx_n_u_parse_to_int __pyx_string_tab[744]
#define __pyx_n_u_parse_weekday __pyx_string_tab[745]
#define __pyx_n_u_pd __pyx_string_tab[746]
#define __pyx_n_u_periods __pyx_string_tab[747]
#define __pyx_n_u_pop __pyx_string_tab[748]
#define __pyx_n_u_precision __pyx_string_tab[749]
#define __pyx_n_u_prepare __pyx_string_tab[750]
#define __pyx_n_u_property __pyx_string_tab[751]
#define __pyx_n_u_ps __pyx_string_tab[752]
#define __pyx_n_u_pt __pyx_string_tab[753]
#define __pyx_n_u_pt_arr __pyx_string_tab[754]
#define __pyx_n_u_pt_dateD __pyx_string_tab[755]
#define __pyx_n_u_pt_reso __pyx_string_tab[756]
#define __pyx_n_u_pt_tz __pyx_string_tab[757]
#define __pyx_n_u_pt_unit __pyx_string_tab[758]
#define __pyx_n_u_pyx_vtable __pyx_string_tab[759]
#define __pyx_n_u_qualname __pyx_string_tab[760]
#define __pyx_n_u_quarter __pyx_string_tab[761]
#define __pyx_n_u_quarters __pyx_string_tab[762]
#define __pyx_n_u_raise __pyx_string_tab[763]
#define __pyx_n_u_records __pyx_string_tab[764]
#define __pyx_n_u_replace __pyx_string_tab[765]
#define __pyx_n_u_return __pyx_string_tab[766]
#define __pyx_n_u_round __pyx_string_tab[767]
#define __pyx_n_u_row __pyx_string_tab[768]
#define __pyx_n_u_s __pyx_string_tab[769]
#define __pyx_n_u_second __pyx_string_tab[770]
#define __pyx_n_u_seconds __pyx_string_tab[771]
#define __pyx_n_u_self __pyx_string_tab[772]
#define __pyx_n_u_sep __pyx_string_tab[773]
#define __pyx_n_u_set_name __pyx_string_tab[774]
#define __pyx_n_u_setdefault __pyx_string_tab[775]
#define __pyx_n_u_shift_forward __pyx_string_tab[776]
#define __pyx_n_u_size_2 __pyx_string_tab[777]
#define __pyx_n_u_size_i __pyx_string_tab[778]
#define __pyx_n_u_snap __pyx_string_tab[779]
#define __pyx_n_u_start __pyx_string_tab[780]
#define __pyx_n_u_str __pyx_string_tab[781]
#define __pyx_n_u_strftime __pyx_string_tab[782]
#define __pyx_n_u_strptime __pyx_string_tab[783]
#define __pyx_n_u_sub __pyx_string_tab[784]
#define __pyx_n_u_super __pyx_string_tab[785]
#define __pyx_n_u_targ_tz __pyx_string_tab[786]
#define __pyx_n_u_test __pyx_string_tab[787]
#define __pyx_n_u_tic __pyx_string_tab[788]
#define __pyx_n_u_time __pyx_string_tab[789]
#define __pyx_n_u_timedf __pyx_string_tab[790]
#define __pyx_n_u_times __pyx_string_tab[791]
#define __pyx_n_u_timestamp __pyx_string_tab[792]
#define __pyx_n_u_timetz __pyx_string_tab[793]
#define __pyx_n_u_tm_hour __pyx_string_tab[794]
#define __pyx_n_u_tm_mday __pyx_string_tab[795]
#define __pyx_n_u_tm_min __pyx_string_tab[796]
#define __pyx_n_u_tm_mon __pyx_string_tab[797]
#define __pyx_n_u_tm_sec __pyx_string_tab[798]
#define __pyx_n_u_tm_wday __pyx_string_tab[799]
#define __pyx_n_u_tm_yday __pyx_string_tab[800]
#define __pyx_n_u_tm_year __pyx_string_tab[801]
#define __pyx_n_u_tmp_tz __pyx_string_tab[802]
#define __pyx_n_u_to_curr_month __pyx_string_tab[803]
#define __pyx_n_u_to_curr_quarter __pyx_string_tab[804]
#define __pyx_n_u_to_curr_weekday __pyx_string_tab[805]
#define __pyx_n_u_to_curr_weekday_2 __pyx_string_tab[806]
#define __pyx_n_u_to_curr_year __pyx_string_tab[807]
#define __pyx_n_u_to_date __pyx_string_tab[808]
#define __pyx_n_u_to_datetime_2 __pyx_string_tab[809]
#define __pyx_n_u_to_day __pyx_string_tab[810]
#define __pyx_n_u_to_dict __pyx_string_tab[811]
#define __pyx_n_u_to_end_of __pyx_string_tab[812]
#define __pyx_n_u_to_first_of __pyx_string_tab[813]
#define __pyx_n_u_to_friday __pyx_string_tab[814]
#define __pyx_n_u_to_last_of __pyx_string_tab[815]
#define __pyx_n_u_to_monday __pyx_string_tab[816]
#define __pyx_n_u_to_month __pyx_string_tab[817]
#define __pyx_n_u_to_next_month __pyx_string_tab[818]
#define __pyx_n_u_to_next_quarter __pyx_string_tab[819]
#define __pyx_n_u_to_next_weekday __pyx_string_tab[820]
#define __pyx_n_u_to_next_year __pyx_string_tab[821]
#define __pyx_n_u_to_prev_month __pyx_string_tab[822]
#define __pyx_n_u_to_prev_quarter __pyx_string_tab[823]
#define __pyx_n_u_to_prev_weekday __pyx_string_tab[824]
#define __pyx_n_u_to_prev_year __pyx_string_tab[825]
#define __pyx_n_u_to_quarter __pyx_string_tab[826]
#define __pyx_n_u_to_reso __pyx_string_tab[827]
#define __pyx_n_u_to_saturday __pyx_string_tab[828]
#define __pyx_n_u_to_start_of __pyx_string_tab[829]
#define __pyx_n_u_to_sunday __pyx_string_tab[830]
#define __pyx_n_u_to_thursday __pyx_string_tab[831]
#define __pyx_n_u_to_time __pyx_string_tab[832]
#define __pyx_n_u_to_tomorrow __pyx_string_tab[833]
#define __pyx_n_u_to_tuesday __pyx_string_tab[834]
#define __pyx_n_u_to_tz __pyx_string_tab[835]
#define __pyx_n_u_to_wednesday __pyx_string_tab[836]
#define __pyx_n_u_to_weekday __pyx_string_tab[837]
#define __pyx_n_u_to_year __pyx_string_tab[838]
#define __pyx_n_u_to_yesterday __pyx_string_tab[839]
#define __pyx_n_u_today __pyx_string_tab[840]
#define __pyx_n_u_token __pyx_string_tab[841]
#define __pyx_n_u_tomicroseconds __pyx_string_tab[842]
#define __pyx_n_u_toordinal __pyx_string_tab[843]
#define __pyx_n_u_toseconds __pyx_string_tab[844]
#define __pyx_n_u_ts __pyx_string_tab[845]
#define __pyx_n_u_typing __pyx_string_tab[846]
#define __pyx_n_u_typing_extensions __pyx_string_tab[847]
#define __pyx_n_u_tz __pyx_string_tab[848]
#define __pyx_n_u_tz_available __pyx_string_tab[849]
#define __pyx_n_u_tz_convert __pyx_string_tab[850]
#define __pyx_n_u_tz_localize __pyx_string_tab[851]
#define __pyx_n_u_tz_switch_2 __pyx_string_tab[852]
#define __pyx_n_u_tzinfo __pyx_string_tab[853]
#define __pyx_n_u_tzname __pyx_string_tab[854]
#define __pyx_n_u_unit __pyx_string_tab[855]
#define __pyx_n_u_unit_len __pyx_string_tab[856]
#define __pyx_n_u_us __pyx_string_tab[857]
#define __pyx_n_u_utc __pyx_string_tab[858]
#define __pyx_n_u_utcfromtimestamp __pyx_string_tab[859]
#define __pyx_n_u_utcnow __pyx_string_tab[860]
#define __pyx_n_u_utcoffset __pyx_string_tab[861]
#define __pyx_n_u_utctimedf __pyx_string_tab[862]
#define __pyx_n_u_utils __pyx_string_tab[863]
#define __pyx_n_u_v __pyx_string_tab[864]
#define __pyx_n_u_val __pyx_string_tab[865]
#define __pyx_n_u_value __pyx_string_tab[866]
#define __pyx_n_u_values __pyx_string_tab[867]
#define __pyx_n_u_values_naive __pyx_string_tab[868]
#define __pyx_n_u_wd __pyx_string_tab[869]
#define __pyx_n_u_week __pyx_string_tab[870]
#define __pyx_n_u_weekday __pyx_string_tab[871]
#define __pyx_n_u_weekday_name __pyx_string_tab[872]
#define __pyx_n_u_weeks __pyx_string_tab[873]
#define __pyx_n_u_wkd __pyx_string_tab[874]
#define __pyx_n_u_year __pyx_string_tab[875]
#define __pyx_n_u_yearfirst __pyx_string_tab[876]
#define __pyx_n_u_years __pyx_string_tab[877]
#define __pyx_n_u_zoneinfo __pyx_string_tab[878]
#define __pyx_kp_b_PY_LONG_LONG_PyDateTime_DateTime __pyx_string_tab[879]
#define __pyx_kp_b_PyDateTime_DateTime_PyObject_int __pyx_string_tab[880]
#define __pyx_kp_b_PyObject_PyObject_tz_parse __pyx_string_tab[881]
#define __pyx_kp_b_PyObject_struct___pyx_obj_7cytim __pyx_string_tab[882]
#define __pyx_kp_b_int_PyObject_int___pyx_skip_disp __pyx_string_tab[883]
#define __pyx_kp_b_iso88591_0_5_1_q_A_gQa_9Cq_q_A_havQ_4s_d __pyx_string_tab[884]
#define __pyx_kp_b_iso88591_1A_A_Q_z_A_7q_A_83a_1_a_fIQ_A_q __pyx_string_tab[885]
#define __pyx_kp_b_iso88591_1A_A_Q_z_A_7q_A_83a_1_a_vYa_A_q __pyx_string_tab[886]
#define __pyx_kp_b_iso88591_1D_r_q_U __pyx_string_tab[887]
#define __pyx_kp_b_iso88591_1_4_7s_Q_r_q_U __pyx_string_tab[888]
#define __pyx_kp_b_iso88591_1_4xs_l_Y_Na_a_r_v_1F_WE __pyx_string_tab[889]
#define __pyx_kp_b_iso88591_1_T_3c_c_HA_4wa_4_WA __pyx_string_tab[890]
#define __pyx_kp_b_iso88591_1_WAT_7q_A_IQd_881_XQ_Qj_XQ_Qj __pyx_string_tab[891]
#define __pyx_kp_b_iso88591_1_t9A __pyx_string_tab[892]
#define __pyx_kp_b_iso88591_1_t_AQ __pyx_string_tab[893]
#define __pyx_kp_b_iso88591_1_vS_j_q_z_A_q_q_1_U_1_XQgQ_b_3 __pyx_string_tab[894]
#define __pyx_kp_b_iso88591_2_T_Qa_r_7q_7q_A_83a_4y_Qd_9IV1 __pyx_string_tab[895]
#define __pyx_kp_b_iso88591_31D8H_3a_e_M_CvQa_T_N_3a_DMQR_E __pyx_string_tab[896]
#define __pyx_kp_b_iso88591_50DA_7_Q_4_Qa_a_t1_7q_1E_Q_ixq __pyx_string_tab[897]
#define __pyx_kp_b_iso88591_5Q_4xs_a_a_k_uA_r_v_1F_WE __pyx_string_tab[898]
#define __pyx_kp_b_iso88591_5_1_q_A_gQa_9Cq_q_A_a_t1_7q_1E __pyx_string_tab[899]
#define __pyx_kp_b_iso88591_7q_1F_A_q_L8NfTU __pyx_string_tab[900]
#define __pyx_kp_b_iso88591_8_9_q_A_q_L_8_a __pyx_string_tab[901]
#define __pyx_kp_b_iso88591_A_1 __pyx_string_tab[902]
#define __pyx_kp_b_iso88591_A_1_Q_2_1A_A_6_s_1_L_q_6_31_6_D __pyx_string_tab[903]
#define __pyx_kp_b_iso88591_A_1_T_V6_QfA_q_G2Q_6_a_q_uA_Q_T __pyx_string_tab[904]
#define __pyx_kp_b_iso88591_A_4uA_q_a_A_q_L_fA __pyx_string_tab[905]
#define __pyx_kp_b_iso88591_A_7_Q_1_a_t1_7q_1E_Q_ixq_88_4y __pyx_string_tab[906]
#define __pyx_kp_b_iso88591_A_A_1_Q_2_Yaq_A_6_A_vS_t_q_6_A_A __pyx_string_tab[907]
#define __pyx_kp_b_iso88591_A_A_a_2_1A_Kq_Q_WAT_9AT_0_XQ_s_q __pyx_string_tab[908]
#define __pyx_kp_b_iso88591_A_Rq_q_A_131_S_1_7q_A_881_1Ct2 __pyx_string_tab[909]
#define __pyx_kp_b_iso88591_A_T_3c_c_HA_4q_AV5 __pyx_string_tab[910]
#define __pyx_kp_b_iso88591_A_a_A_1_1_a_a_Q_1A_5_1_1_aq_3l_Q __pyx_string_tab[911]
#define __pyx_kp_b_iso88591_A_a_A_1_1_a_a_Q_Qa_A_1_k_Qa_N_3a __pyx_string_tab[912]
#define __pyx_kp_b_iso88591_A_a_A_1_1_a_a_Q_T_s_q_a_a_Q_A __pyx_string_tab[913]
#define __pyx_kp_b_iso88591_A_a_A_1_1_a_a_Q_l_s_q_q_a_a_Q_A __pyx_string_tab[914]
#define __pyx_kp_b_iso88591_A_a_A_1_1_a_a_ha_Q_Q_S_a_Q_Q_v_q __pyx_string_tab[915]
#define __pyx_kp_b_iso88591_A_a_A_a_B_1A_Qe5_uCq_1_1E_5_Yawd __pyx_string_tab[916]
#define __pyx_kp_b_iso88591_A_a_A_a_B_Qiq_uCq_1_1E_S_V7_gQ_4 __pyx_string_tab[917]
#define __pyx_kp_b_iso88591_A_a_A_a_F_Qe1_uCq_1_1E_9_q_4AT_3 __pyx_string_tab[918]
#define __pyx_kp_b_iso88591_A_a_A_a_H_Qd_uCq_1_1E_S_4AWHA_3e __pyx_string_tab[919]
#define __pyx_kp_b_iso88591_A_a_A_a_H_Qj_Q_uCq_1_1E_5_z_4AT __pyx_string_tab[920]
#define __pyx_kp_b_iso88591_A_a_A_a_Qe8_b_Q_uCq_1_a_T_e1A_3e __pyx_string_tab[921]
#define __pyx_kp_b_iso88591_A_a_A_a_s_q_e6_D_a __pyx_string_tab[922]
#define __pyx_kp_b_iso88591_A_a_A_a_uCq_1_a_1E_U_q_3e1F_T_q __pyx_string_tab[923]
#define __pyx_kp_b_iso88591_A_a_Q_A_1_r_r_Ba_2Q_1_a_t1_7q_is __pyx_string_tab[924]
#define __pyx_kp_b_iso88591_A_a_a_A_a_R_1A_Kq_Q_5_uD_z_fG6_v __pyx_string_tab[925]
#define __pyx_kp_b_iso88591_A_a_a_QgQ_uCq_1_1E_AV4uE_3e1G89E __pyx_string_tab[926]
#define __pyx_kp_b_iso88591_A_a_a_QgQ_uCq_1_1E_Yiq_q_1E1I_q __pyx_string_tab[927]
#define __pyx_kp_b_iso88591_A_a_a_s_V86_q __pyx_string_tab[928]
#define __pyx_kp_b_iso88591_A_a_q_Q_5_1_vS_t_4_AWA_a_t1_7q_1 __pyx_string_tab[929]
#define __pyx_kp_b_iso88591_A_a_q_Q_a_Q_A_Qha_4_1_gU_Q_iq_T __pyx_string_tab[930]
#define __pyx_kp_b_iso88591_A_a_q_Q_a_Q_A_V_5_2T_s_D_Cq_4xq __pyx_string_tab[931]
#define __pyx_kp_b_iso88591_A_a_s_avS_hiuA __pyx_string_tab[932]
#define __pyx_kp_b_iso88591_A_a_s_avXV89E __pyx_string_tab[933]
#define __pyx_kp_b_iso88591_A_at1_r_q_U __pyx_string_tab[934]
#define __pyx_kp_b_iso88591_A_q_1_Q_D_Yaq_A_6_vS_t_q_xy_t_q __pyx_string_tab[935]
#define __pyx_kp_b_iso88591_A_q_Q_7_Q_4_AWA_QgV1_a_t1_7q_1E __pyx_string_tab[936]
#define __pyx_kp_b_iso88591_A_q_Q_7_Q_4_q_q_a_t1_7q_1E_Q_6_1 __pyx_string_tab[937]
#define __pyx_kp_b_iso88591_A_q_Q_QgV1_3d_4_Qa_a_t1_7q_1E_Q __pyx_string_tab[938]
#define __pyx_kp_b_iso88591_A_q_Q_a_A_1_1_a_a_5_5_XS_S_c_c_S __pyx_string_tab[939]
#define __pyx_kp_b_iso88591_A_q_Q_t81Cwa __pyx_string_tab[940]
#define __pyx_kp_b_iso88591_A_q_Q_t82S_q __pyx_string_tab[941]
#define __pyx_kp_b_iso88591_A_q_q_a_q_a_a_Q_Q_A_s_c_S_c_1_1 __pyx_string_tab[942]
#define __pyx_kp_b_iso88591_A_q_q_a_q_a_a_Q_Q_A_s_c_S_c_1_1_2 __pyx_string_tab[943]
#define __pyx_kp_b_iso88591_A_r_q_Qd_q __pyx_string_tab[944]
#define __pyx_kp_b_iso88591_A_r_v_0_5EU __pyx_string_tab[945]
#define __pyx_kp_b_iso88591_A_r_v_1D0_Q __pyx_string_tab[946]
#define __pyx_kp_b_iso88591_A_r_v_4_uA __pyx_string_tab[947]
#define __pyx_kp_b_iso88591_A_r_v_AT1A_a __pyx_string_tab[948]
#define __pyx_kp_b_iso88591_A_r_v_Qd2B_q __pyx_string_tab[949]
#define __pyx_kp_b_iso88591_A_r_v_e1 __pyx_string_tab[950]
#define __pyx_kp_b_iso88591_A_t81Cs_S __pyx_string_tab[951]
#define __pyx_kp_b_iso88591_A_t_AQ __pyx_string_tab[952]
#define __pyx_kp_b_iso88591_A_xvS_wfG1 __pyx_string_tab[953]
#define __pyx_kp_b_iso88591_E_5Q_4r_1_a_t1_7q_1E_Q_is_4s_A __pyx_string_tab[954]
#define __pyx_kp_b_iso88591_E_5Q_t9AS __pyx_string_tab[955]
#define __pyx_kp_b_iso88591_E_5Q_t9Bc __pyx_string_tab[956]
#define __pyx_kp_b_iso88591_HA_A_q_L8I_q __pyx_string_tab[957]
#define __pyx_kp_b_iso88591_O1_r_q_m1D0_uA __pyx_string_tab[958]
#define __pyx_kp_b_iso88591_Q_q_A_r_1E_fA __pyx_string_tab[959]
#define __pyx_kp_b_iso88591_Q_r_q_Qd_q __pyx_string_tab[960]
#define __pyx_kp_b_iso88591_Q_t7_1 __pyx_string_tab[961]
#define __pyx_kp_b_iso88591_Q_t_AQ __pyx_string_tab[962]
#define __pyx_kp_b_iso88591_T_Qa_1Bj_1_1D_Q_r_v_e1 __pyx_string_tab[963]
#define __pyx_kp_b_iso88591_U_4xs_a_a_k_uA_r_q_QfCs_a __pyx_string_tab[964]
#define __pyx_kp_b_iso88591_WAT_7q_A_IQd_881_XQ_Qj_XQ_Qj_r __pyx_string_tab[965]
#define __pyx_kp_b_iso88591_Y6RRS_7_Q_4_a_t1_7q_1E_Q_is_4t1 __pyx_string_tab[966]
#define __pyx_kp_b_iso88591_a_4AQ_r_1_Qe6_A_Qe6_A_AU_1_Qe6 __pyx_string_tab[967]
#define __pyx_kp_b_iso88591_a_A_6_A_q_E_1A_6_A_1_7q_A_xx_t9 __pyx_string_tab[968]
#define __pyx_kp_b_iso88591_a_r_q_at_5 __pyx_string_tab[969]
#define __pyx_kp_b_iso88591_a_r_q_at_5_2 __pyx_string_tab[970]
#define __pyx_kp_b_iso88591_a_r_v_e1 __pyx_string_tab[971]
#define __pyx_kp_b_iso88591_a_t7_A __pyx_string_tab[972]
#define __pyx_kp_b_iso88591_a_t_AQ __pyx_string_tab[973]
#define __pyx_kp_b_iso88591_a_uAV5 __pyx_string_tab[974]
#define __pyx_kp_b_iso88591_g_6e_Oq_6_1_4_Qa_a_t1_7q_1E_Q_i __pyx_string_tab[975]
#define __pyx_kp_b_iso88591_g_6e_Oq_t_as __pyx_string_tab[976]
#define __pyx_kp_b_iso88591_g_6e_Oq_t_b_7 __pyx_string_tab[977]
#define __pyx_kp_b_iso88591_ha0_5_1_q_A_gQa_9Cq_q_A_havQ_4s __pyx_string_tab[978]
#define __pyx_kp_b_iso88591_ha2_T_1A_r_7q_7q_A_83a_4y_Qd_9I __pyx_string_tab[979]
#define __pyx_kp_b_iso88591_i_C1_t_A_1IV1 __pyx_string_tab[980]
#define __pyx_kp_b_iso88591_i_C1_t_as __pyx_string_tab[981]
#define __pyx_kp_b_iso88591_i_C1_t_b_1 __pyx_string_tab[982]
#define __pyx_kp_b_iso88591_nA_QgV1_r_q_nAT1A_e1 __pyx_string_tab[983]
#define __pyx_kp_b_iso88591_q_82Q_1_a_t1_7q_1E_Q_is_Ql2C3a __pyx_string_tab[984]
#define __pyx_kp_b_iso88591_q_q_r_q_at3C1 __pyx_string_tab[985]
#define __pyx_kp_b_iso88591_q_r_q_q_E __pyx_string_tab[986]
#define __pyx_kp_b_iso88591_q_r_q_q_E_2 __pyx_string_tab[987]
#define __pyx_kp_b_iso88591_q_t9AQ __pyx_string_tab[988]
#define __pyx_kp_b_iso88591_r_q_U __pyx_string_tab[989]
#define __pyx_kp_b_iso88591_r_q_at3C1 __pyx_string_tab[990]
#define __pyx_kp_b_iso88591_r_q_e1 __pyx_string_tab[991]
#define __pyx_kp_b_iso88591_r_q_e1_2 __pyx_string_tab[992]
#define __pyx_kp_b_iso88591_r_q_l_4_vU __pyx_string_tab[993]
#define __pyx_kp_b_iso88591_r_q_q_O1 __pyx_string_tab[994]
#define __pyx_kp_b_iso88591_t881 __pyx_string_tab[995]
#define __pyx_kp_b_iso88591_t889A __pyx_string_tab[996]
#define __pyx_kp_b_iso88591_uAV5 __pyx_string_tab[997]
#define __pyx_kp_b_iso88591_vS_j_q_z_A_q_A_A_q_q_1_U_1_XQgQ __pyx_string_tab[998]
#define __pyx_kp_b_iso88591_xq_1A_A_Q_z_A_7q_A_83a_1_a_31E __pyx_string_tab[999]
#define __pyx_kp_b_iso88591_xq_5_1_q_A_gQa_9Cq_q_A_a_t1_7q __pyx_string_tab[1000]
#define __pyx_kp_b_iso88591_xq_T_AQ_1Bj_1_1D_Q_r_v_e1 __pyx_string_tab[1001]
#define __pyx_int_0 __pyx_number_tab[0]
#define __pyx_int_neg_1 __pyx_number_tab[1]
#define __pyx_int_1 __pyx_number_tab[2]
#define __pyx_int_2 __pyx_number_tab[3]
#define __pyx_int_3 __pyx_number_tab[4]
#define __pyx_int_4 __pyx_number_tab[5]
#define __pyx_int_5 __pyx_number_tab[6]
#define __pyx_int_6 __pyx_number_tab[7]
/* #### Code section: module_state_clear ### */
#if CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) {
  __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m);
  if (!clear_module_state) return 0;
  Py_CLEAR(clear_module_state->__pyx_d);
  Py_CLEAR(clear_module_state->__pyx_b);
  Py_CLEAR(clear_module_state->__pyx_cython_runtime);
  Py_CLEAR(clear_module_state->__pyx_empty_tuple);
  Py_CLEAR(clear_module_state->__pyx_empty_bytes);
  Py_CLEAR(clear_module_state->__pyx_empty_unicode);
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __Pyx_State_RemoveModule(NULL);
  #endif
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4bool_bool);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_7complex_complex);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_dtype);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flatiter);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_broadcast);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ndarray);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_generic);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_number);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_integer);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_signedinteger);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_unsignedinteger);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_inexact);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_floating);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_complexfloating);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flexible);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_character);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ufunc);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_date);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_time);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_datetime);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_timedelta);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_tzinfo);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cytimes_6parser_Configs);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cytimes_6parser_Result);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cytimes_6parser_Parser);
  for (int i=0; i<9; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); }
  for (int i=0; i<131; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<1002; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<8; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); }
/* #### Code section: module_state_clear_contents ### */
/* CommonTypesMetaclass.module_state_clear */
Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType);

/* CythonFunctionShared.module_state_clear */
Py_CLEAR(clear_module_state->__pyx_CyFunctionType);

/* #### Code section: module_state_clear_end ### */
return 0;
}
#endif
/* #### Code section: module_state_traverse ### */
#if CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
  __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m);
  if (!traverse_module_state) return 0;
  Py_VISIT(traverse_module_state->__pyx_d);
  Py_VISIT(traverse_module_state->__pyx_b);
  Py_VISIT(traverse_module_state->__pyx_cython_runtime);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4bool_bool);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_7complex_complex);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_dtype);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flatiter);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_broadcast);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ndarray);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_generic);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_number);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_integer);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_signedinteger);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_unsignedinteger);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_inexact);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_floating);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_complexfloating);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flexible);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_character);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ufunc);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_date);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_time);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_datetime);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_timedelta);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_tzinfo);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cytimes_6parser_Configs);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cytimes_6parser_Result);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cytimes_6parser_Parser);
  for (int i=0; i<9; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); }
  for (int i=0; i<131; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<1002; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<8; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); }
/* #### Code section: module_state_traverse_contents ### */
/* CommonTypesMetaclass.module_state_traverse */
Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType);

/* CythonFunctionShared.module_state_traverse */
Py_VISIT(traverse_module_state->__pyx_CyFunctionType);

/* #### Code section: module_state_traverse_end ### */
return 0;
}
#endif
/* #### Code section: module_code ### */

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":242
 *         cdef int type_num
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp itemsize(self) noexcept nogil:
 *             return PyDataType_ELSIZE(self)
*/

static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr *__pyx_v_self) {
  npy_intp __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":244
 *         @property
 *         cdef inline npy_intp itemsize(self) noexcept nogil:
 *             return PyDataType_ELSIZE(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDataType_ELSIZE(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":242
 *         cdef int type_num
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp itemsize(self) noexcept nogil:
 *             return PyDataType_ELSIZE(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":246
 *             return PyDataType_ELSIZE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp alignment(self) noexcept nogil:
 *             return PyDataType_ALIGNMENT(self)
*/

static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr *__pyx_v_self) {
  npy_intp __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":248
 *         @property
 *         cdef inline npy_intp alignment(self) noexcept nogil:
 *             return PyDataType_ALIGNMENT(self)             # <<<<<<<<<<<<<<
 * 
 *         # Use fields/names with care as they may be NULL.  You must check
*/
  __pyx_r = PyDataType_ALIGNMENT(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":246
 *             return PyDataType_ELSIZE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp alignment(self) noexcept nogil:
 *             return PyDataType_ALIGNMENT(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":252
 *         # Use fields/names with care as they may be NULL.  You must check
 *         # for this using PyDataType_HASFIELDS.
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline object fields(self):
 *             return <object>PyDataType_FIELDS(self)
*/

static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Descr *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  __Pyx_RefNannySetupContext("fields", 0);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":254
 *         @property
 *         cdef inline object fields(self):
 *             return <object>PyDataType_FIELDS(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDataType_FIELDS(__pyx_v_self);
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":252
 *         # Use fields/names with care as they may be NULL.  You must check
 *         # for this using PyDataType_HASFIELDS.
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline object fields(self):
 *             return <object>PyDataType_FIELDS(self)
*/

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

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":256
 *             return <object>PyDataType_FIELDS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline tuple names(self):
 *             return <tuple>PyDataType_NAMES(self)
*/

static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  __Pyx_RefNannySetupContext("names", 0);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":258
 *         @property
 *         cdef inline tuple names(self):
 *             return <tuple>PyDataType_NAMES(self)             # <<<<<<<<<<<<<<
 * 
 *         # Use PyDataType_HASSUBARRAY to test whether this field is
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDataType_NAMES(__pyx_v_self);
  __Pyx_INCREF(((PyObject*)__pyx_t_1));
  __pyx_r = ((PyObject*)__pyx_t_1);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":256
 *             return <object>PyDataType_FIELDS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline tuple names(self):
 *             return <tuple>PyDataType_NAMES(self)
*/

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

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":263
 *         # valid (the pointer can be NULL). Most users should access
 *         # this field via the inline helper method PyDataType_SHAPE.
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
 *             return PyDataType_SUBARRAY(self)
*/

static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr *__pyx_v_self) {
  PyArray_ArrayDescr *__pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":265
 *         @property
 *         cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
 *             return PyDataType_SUBARRAY(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDataType_SUBARRAY(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":263
 *         # valid (the pointer can be NULL). Most users should access
 *         # this field via the inline helper method PyDataType_SHAPE.
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
 *             return PyDataType_SUBARRAY(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":267
 *             return PyDataType_SUBARRAY(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_uint64 flags(self) noexcept nogil:
 *             """The data types flags."""
*/

static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr *__pyx_v_self) {
  npy_uint64 __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":270
 *         cdef inline npy_uint64 flags(self) noexcept nogil:
 *             """The data types flags."""
 *             return PyDataType_FLAGS(self)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = PyDataType_FLAGS(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":267
 *             return PyDataType_SUBARRAY(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_uint64 flags(self) noexcept nogil:
 *             """The data types flags."""
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":279
 *     ctypedef class numpy.broadcast [object PyArrayMultiIterObject, check_size ignore]:
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int numiter(self) noexcept nogil:
 *             """The number of arrays that need to be broadcast to the same shape."""
*/

static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject *__pyx_v_self) {
  int __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":282
 *         cdef inline int numiter(self) noexcept nogil:
 *             """The number of arrays that need to be broadcast to the same shape."""
 *             return PyArray_MultiIter_NUMITER(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyArray_MultiIter_NUMITER(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":279
 *     ctypedef class numpy.broadcast [object PyArrayMultiIterObject, check_size ignore]:
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int numiter(self) noexcept nogil:
 *             """The number of arrays that need to be broadcast to the same shape."""
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":284
 *             return PyArray_MultiIter_NUMITER(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp size(self) noexcept nogil:
 *             """The total broadcasted size."""
*/

static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject *__pyx_v_self) {
  npy_intp __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":287
 *         cdef inline npy_intp size(self) noexcept nogil:
 *             """The total broadcasted size."""
 *             return PyArray_MultiIter_SIZE(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyArray_MultiIter_SIZE(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":284
 *             return PyArray_MultiIter_NUMITER(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp size(self) noexcept nogil:
 *             """The total broadcasted size."""
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":289
 *             return PyArray_MultiIter_SIZE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp index(self) noexcept nogil:
 *             """The current (1-d) index into the broadcasted result."""
*/

static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject *__pyx_v_self) {
  npy_intp __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":292
 *         cdef inline npy_intp index(self) noexcept nogil:
 *             """The current (1-d) index into the broadcasted result."""
 *             return PyArray_MultiIter_INDEX(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyArray_MultiIter_INDEX(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":289
 *             return PyArray_MultiIter_SIZE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp index(self) noexcept nogil:
 *             """The current (1-d) index into the broadcasted result."""
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":294
 *             return PyArray_MultiIter_INDEX(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int nd(self) noexcept nogil:
 *             """The number of dimensions in the broadcasted result."""
*/

static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject *__pyx_v_self) {
  int __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":297
 *         cdef inline int nd(self) noexcept nogil:
 *             """The number of dimensions in the broadcasted result."""
 *             return PyArray_MultiIter_NDIM(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyArray_MultiIter_NDIM(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":294
 *             return PyArray_MultiIter_INDEX(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int nd(self) noexcept nogil:
 *             """The number of dimensions in the broadcasted result."""
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":299
 *             return PyArray_MultiIter_NDIM(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp* dimensions(self) noexcept nogil:
 *             """The shape of the broadcasted result."""
*/

static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject *__pyx_v_self) {
  npy_intp *__pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":302
 *         cdef inline npy_intp* dimensions(self) noexcept nogil:
 *             """The shape of the broadcasted result."""
 *             return PyArray_MultiIter_DIMS(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":299
 *             return PyArray_MultiIter_NDIM(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp* dimensions(self) noexcept nogil:
 *             """The shape of the broadcasted result."""
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":304
 *             return PyArray_MultiIter_DIMS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline void** iters(self) noexcept nogil:
 *             """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
*/

static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject *__pyx_v_self) {
  void **__pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":308
 *             """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
 *             On return, the iterators are adjusted for broadcasting."""
 *             return PyArray_MultiIter_ITERS(self)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":304
 *             return PyArray_MultiIter_DIMS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline void** iters(self) noexcept nogil:
 *             """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":322
 *         # Instead, we use properties that map to the corresponding C-API functions.
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline PyObject* base(self) noexcept nogil:
 *             """Returns a borrowed reference to the object owning the data/memory.
*/

static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self) {
  PyObject *__pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":326
 *             """Returns a borrowed reference to the object owning the data/memory.
 *             """
 *             return PyArray_BASE(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyArray_BASE(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":322
 *         # Instead, we use properties that map to the corresponding C-API functions.
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline PyObject* base(self) noexcept nogil:
 *             """Returns a borrowed reference to the object owning the data/memory.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328
 *             return PyArray_BASE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline dtype descr(self):
 *             """Returns an owned reference to the dtype of the array.
*/

static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArrayObject *__pyx_v_self) {
  PyArray_Descr *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyArray_Descr *__pyx_t_1;
  __Pyx_RefNannySetupContext("descr", 0);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":332
 *             """Returns an owned reference to the dtype of the array.
 *             """
 *             return <dtype>PyArray_DESCR(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = PyArray_DESCR(__pyx_v_self);
  __Pyx_INCREF((PyObject *)((PyArray_Descr *)__pyx_t_1));
  __pyx_r = ((PyArray_Descr *)__pyx_t_1);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328
 *             return PyArray_BASE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline dtype descr(self):
 *             """Returns an owned reference to the dtype of the array.
*/

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":334
 *             return <dtype>PyArray_DESCR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int ndim(self) noexcept nogil:
 *             """Returns the number of dimensions in the array.
*/

static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self) {
  int __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338
 *             """Returns the number of dimensions in the array.
 *             """
 *             return PyArray_NDIM(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyArray_NDIM(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":334
 *             return <dtype>PyArray_DESCR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int ndim(self) noexcept nogil:
 *             """Returns the number of dimensions in the array.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":340
 *             return PyArray_NDIM(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp *shape(self) noexcept nogil:
 *             """Returns a pointer to the dimensions/shape of the array.
*/

static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self) {
  npy_intp *__pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":346
 *             Can return NULL for 0-dimensional arrays.
 *             """
 *             return PyArray_DIMS(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyArray_DIMS(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":340
 *             return PyArray_NDIM(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp *shape(self) noexcept nogil:
 *             """Returns a pointer to the dimensions/shape of the array.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348
 *             return PyArray_DIMS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp *strides(self) noexcept nogil:
 *             """Returns a pointer to the strides of the array.
*/

static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self) {
  npy_intp *__pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":353
 *             The number of elements matches the number of dimensions of the array (ndim).
 *             """
 *             return PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyArray_STRIDES(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348
 *             return PyArray_DIMS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp *strides(self) noexcept nogil:
 *             """Returns a pointer to the strides of the array.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":355
 *             return PyArray_STRIDES(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp size(self) noexcept nogil:
 *             """Returns the total size (in number of elements) of the array.
*/

static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self) {
  npy_intp __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":359
 *             """Returns the total size (in number of elements) of the array.
 *             """
 *             return PyArray_SIZE(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyArray_SIZE(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":355
 *             return PyArray_STRIDES(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp size(self) noexcept nogil:
 *             """Returns the total size (in number of elements) of the array.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":361
 *             return PyArray_SIZE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline char* data(self) noexcept nogil:
 *             """The pointer to the data buffer as a char*.
*/

static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self) {
  char *__pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":368
 *             of `PyArray_DATA()` instead, which returns a 'void*'.
 *             """
 *             return PyArray_BYTES(self)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = PyArray_BYTES(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":361
 *             return PyArray_SIZE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline char* data(self) noexcept nogil:
 *             """The pointer to the data buffer as a char*.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":776
 * ctypedef long double complex clongdouble_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);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":777
 * 
 * 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_ERR(1, 777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":776
 * ctypedef long double complex clongdouble_t
 * 
 * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
*/

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

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":779
 *     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);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":780
 * 
 * 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_ERR(1, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":779
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
*/

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

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":782
 *     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);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":783
 * 
 * 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_ERR(1, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":782
 *     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)
 * 
*/

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

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":785
 *     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);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":786
 * 
 * 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_ERR(1, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":785
 *     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)
 * 
*/

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

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":788
 *     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);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":789
 * 
 * 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 tuple PyDataType_SHAPE(dtype d):
*/
  __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_ERR(1, 789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":788
 *     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)
 * 
*/

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

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":791
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape
*/

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2;
  __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":792
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
 *         return <tuple>d.subarray.shape
 *     else:
*/
  __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d);
  if (__pyx_t_1) {

    /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":793
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape             # <<<<<<<<<<<<<<
 *     else:
 *         return ()
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_5numpy_5dtype_8subarray_subarray(__pyx_v_d)->shape;
    __Pyx_INCREF(((PyObject*)__pyx_t_2));
    __pyx_r = ((PyObject*)__pyx_t_2);
    goto __pyx_L0;

    /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":792
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
 *         return <tuple>d.subarray.shape
 *     else:
*/
  }

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":795
 *         return <tuple>d.subarray.shape
 *     else:
 *         return ()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple);
    __pyx_r = __pyx_mstate_global->__pyx_empty_tuple;
    goto __pyx_L0;
  }

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":791
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape
*/

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

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":994
 *     int _import_umath() except -1
 * 
 * cdef inline void set_array_base(ndarray arr, object base) except *:             # <<<<<<<<<<<<<<
 *     Py_INCREF(base) # important to do this before stealing the reference below!
 *     PyArray_SetBaseObject(arr, base)
*/

static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":995
 * 
 * cdef inline void set_array_base(ndarray arr, object base) except *:
 *     Py_INCREF(base) # important to do this before stealing the reference below!             # <<<<<<<<<<<<<<
 *     PyArray_SetBaseObject(arr, base)
 * 
*/
  Py_INCREF(__pyx_v_base);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":996
 * cdef inline void set_array_base(ndarray arr, object base) except *:
 *     Py_INCREF(base) # important to do this before stealing the reference below!
 *     PyArray_SetBaseObject(arr, base)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object get_array_base(ndarray arr):
*/
  __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 996, __pyx_L1_error)

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":994
 *     int _import_umath() except -1
 * 
 * cdef inline void set_array_base(ndarray arr, object base) except *:             # <<<<<<<<<<<<<<
 *     Py_INCREF(base) # important to do this before stealing the reference below!
 *     PyArray_SetBaseObject(arr, base)
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("numpy.set_array_base", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":998
 *     PyArray_SetBaseObject(arr, base)
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     base = PyArray_BASE(arr)
 *     if base is NULL:
*/

static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
  PyObject *__pyx_v_base;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("get_array_base", 0);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":999
 * 
 * cdef inline object get_array_base(ndarray arr):
 *     base = PyArray_BASE(arr)             # <<<<<<<<<<<<<<
 *     if base is NULL:
 *         return None
*/
  __pyx_v_base = PyArray_BASE(__pyx_v_arr);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1000
 * cdef inline object get_array_base(ndarray arr):
 *     base = PyArray_BASE(arr)
 *     if base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     return <object>base
*/
  __pyx_t_1 = (__pyx_v_base == NULL);
  if (__pyx_t_1) {

    /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1001
 *     base = PyArray_BASE(arr)
 *     if base is NULL:
 *         return None             # <<<<<<<<<<<<<<
 *     return <object>base
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1000
 * cdef inline object get_array_base(ndarray arr):
 *     base = PyArray_BASE(arr)
 *     if base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     return <object>base
*/
  }

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1002
 *     if base is NULL:
 *         return None
 *     return <object>base             # <<<<<<<<<<<<<<
 * 
 * # Versions of the import_* functions which are more suitable for
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_base));
  __pyx_r = ((PyObject *)__pyx_v_base);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":998
 *     PyArray_SetBaseObject(arr, base)
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     base = PyArray_BASE(arr)
 *     if base is NULL:
*/

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

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1006
 * # Versions of the import_* functions which are more suitable for
 * # Cython code.
 * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         __pyx_import_array()
*/

static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
  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;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("import_array", 0);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1007
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         __pyx_import_array()
 *     except Exception:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1008
 * cdef inline int import_array() except -1:
 *     try:
 *         __pyx_import_array()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy._core.multiarray failed to import")
*/
      __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1008, __pyx_L3_error)

      /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1007
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         __pyx_import_array()
 *     except Exception:
*/
    }
    __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_L8_try_end;
    __pyx_L3_error:;

    /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1009
 *     try:
 *         __pyx_import_array()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy._core.multiarray failed to import")
 * 
*/
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1009, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1010
 *         __pyx_import_array()
 *     except Exception:
 *         raise ImportError("numpy._core.multiarray failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_umath() except -1:
*/
      __pyx_t_9 = NULL;
      __pyx_t_10 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_multiarray_failed_to};
        __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1010, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_8);
      }
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(1, 1010, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;

    /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1007
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         __pyx_import_array()
 *     except Exception:
*/
    __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_L8_try_end:;
  }

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1006
 * # Versions of the import_* functions which are more suitable for
 * # Cython code.
 * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         __pyx_import_array()
*/

  /* function exit code */
  __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_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1012
 *         raise ImportError("numpy._core.multiarray failed to import")
 * 
 * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
*/

static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
  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;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("import_umath", 0);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1014
 * cdef inline int import_umath() except -1:
 *     try:
 *         _import_umath()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy._core.umath failed to import")
*/
      __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1014, __pyx_L3_error)

      /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
*/
    }
    __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_L8_try_end;
    __pyx_L3_error:;

    /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1015
 *     try:
 *         _import_umath()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy._core.umath failed to import")
 * 
*/
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1015, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1016
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy._core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_ufunc() except -1:
*/
      __pyx_t_9 = NULL;
      __pyx_t_10 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo};
        __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1016, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_8);
      }
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(1, 1016, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;

    /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
*/
    __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_L8_try_end:;
  }

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1012
 *         raise ImportError("numpy._core.multiarray failed to import")
 * 
 * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
*/

  /* function exit code */
  __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_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1018
 *         raise ImportError("numpy._core.umath failed to import")
 * 
 * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
*/

static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
  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;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("import_ufunc", 0);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1019
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1020
 * cdef inline int import_ufunc() except -1:
 *     try:
 *         _import_umath()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy._core.umath failed to import")
*/
      __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1020, __pyx_L3_error)

      /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1019
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
*/
    }
    __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_L8_try_end;
    __pyx_L3_error:;

    /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1021
 *     try:
 *         _import_umath()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy._core.umath failed to import")
 * 
*/
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1021, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy._core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __pyx_t_9 = NULL;
      __pyx_t_10 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo};
        __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1022, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_8);
      }
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(1, 1022, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;

    /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1019
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
*/
    __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_L8_try_end:;
  }

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1018
 *         raise ImportError("numpy._core.umath failed to import")
 * 
 * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
*/

  /* function exit code */
  __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_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025
 * 
 * 
 * cdef inline bint is_timedelta64_object(object obj) noexcept:             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.timedelta64)`
*/

static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1037
 *     bool
 *     """
 *     return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025
 * 
 * 
 * cdef inline bint is_timedelta64_object(object obj) noexcept:             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.timedelta64)`
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040
 * 
 * 
 * cdef inline bint is_datetime64_object(object obj) noexcept:             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.datetime64)`
*/

static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1052
 *     bool
 *     """
 *     return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040
 * 
 * 
 * cdef inline bint is_datetime64_object(object obj) noexcept:             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.datetime64)`
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055
 * 
 * 
 * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy datetime64 object
*/

static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
  npy_datetime __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1062
 *     also needed.  That can be found using `get_datetime64_unit`.
 *     """
 *     return (<PyDatetimeScalarObject*>obj).obval             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055
 * 
 * 
 * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy datetime64 object
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1065
 * 
 * 
 * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy timedelta64 object
*/

static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
  npy_timedelta __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1069
 *     returns the int64 value underlying scalar numpy timedelta64 object
 *     """
 *     return (<PyTimedeltaScalarObject*>obj).obval             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1065
 * 
 * 
 * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy timedelta64 object
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1072
 * 
 * 
 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the unit part of the dtype for a numpy datetime64 object.
*/

static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
  NPY_DATETIMEUNIT __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1076
 *     returns the unit part of the dtype for a numpy datetime64 object.
 *     """
 *     return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1072
 * 
 * 
 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the unit part of the dtype for a numpy datetime64 object.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/complex.pxd":20
 * 
 *         # unavailable in limited API
 *         @property             # <<<<<<<<<<<<<<
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double real(self) noexcept:
*/

#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self) {
  double __pyx_r;

  /* "cpython/complex.pxd":23
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double real(self) noexcept:
 *             return self.cval.real             # <<<<<<<<<<<<<<
 * 
 *         # unavailable in limited API
*/
  __pyx_r = __pyx_v_self->cval.real;
  goto __pyx_L0;

  /* "cpython/complex.pxd":20
 * 
 *         # unavailable in limited API
 *         @property             # <<<<<<<<<<<<<<
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double real(self) noexcept:
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}
#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/

/* "cpython/complex.pxd":26
 * 
 *         # unavailable in limited API
 *         @property             # <<<<<<<<<<<<<<
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double imag(self) noexcept:
*/

#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self) {
  double __pyx_r;

  /* "cpython/complex.pxd":29
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double imag(self) noexcept:
 *             return self.cval.imag             # <<<<<<<<<<<<<<
 * 
 *     # PyTypeObject PyComplex_Type
*/
  __pyx_r = __pyx_v_self->cval.imag;
  goto __pyx_L0;

  /* "cpython/complex.pxd":26
 * 
 *         # unavailable in limited API
 *         @property             # <<<<<<<<<<<<<<
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double imag(self) noexcept:
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}
#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/

/* "cpython/contextvars.pxd":115
 * 
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")             # <<<<<<<<<<<<<<
 * cdef inline object get_value(var, default_value=None):
 *     """Return a new reference to the value of the context variable,
*/

#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value *__pyx_optional_args) {

  /* "cpython/contextvars.pxd":116
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 * cdef inline object get_value(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the default value of the context variable,
*/
  PyObject *__pyx_v_default_value = ((PyObject *)Py_None);
  PyObject *__pyx_v_value;
  PyObject *__pyx_v_pyvalue = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_value", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_default_value = __pyx_optional_args->default_value;
    }
  }

  /* "cpython/contextvars.pxd":121
 *     or None if no such value or default was found.
 *     """
 *     cdef PyObject *value = NULL             # <<<<<<<<<<<<<<
 *     PyContextVar_Get(var, NULL, &value)
 *     if value is NULL:
*/
  __pyx_v_value = NULL;

  /* "cpython/contextvars.pxd":122
 *     """
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, NULL, &value)             # <<<<<<<<<<<<<<
 *     if value is NULL:
 *         # context variable does not have a default
*/
  __pyx_t_1 = PyContextVar_Get(__pyx_v_var, NULL, (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 122, __pyx_L1_error)

  /* "cpython/contextvars.pxd":123
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, NULL, &value)
 *     if value is NULL:             # <<<<<<<<<<<<<<
 *         # context variable does not have a default
 *         pyvalue = default_value
*/
  __pyx_t_2 = (__pyx_v_value == NULL);
  if (__pyx_t_2) {

    /* "cpython/contextvars.pxd":125
 *     if value is NULL:
 *         # context variable does not have a default
 *         pyvalue = default_value             # <<<<<<<<<<<<<<
 *     else:
 *         # value or default value of context variable
*/
    __Pyx_INCREF(__pyx_v_default_value);
    __pyx_v_pyvalue = __pyx_v_default_value;

    /* "cpython/contextvars.pxd":123
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, NULL, &value)
 *     if value is NULL:             # <<<<<<<<<<<<<<
 *         # context variable does not have a default
 *         pyvalue = default_value
*/
    goto __pyx_L3;
  }

  /* "cpython/contextvars.pxd":128
 *     else:
 *         # value or default value of context variable
 *         pyvalue = <object>value             # <<<<<<<<<<<<<<
 *         Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue
*/
  /*else*/ {
    __pyx_t_3 = ((PyObject *)__pyx_v_value);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_pyvalue = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cpython/contextvars.pxd":129
 *         # value or default value of context variable
 *         pyvalue = <object>value
 *         Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'             # <<<<<<<<<<<<<<
 *     return pyvalue
 * 
*/
    Py_XDECREF(__pyx_v_value);
  }
  __pyx_L3:;

  /* "cpython/contextvars.pxd":130
 *         pyvalue = <object>value
 *         Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_pyvalue);
  __pyx_r = __pyx_v_pyvalue;
  goto __pyx_L0;

  /* "cpython/contextvars.pxd":115
 * 
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")             # <<<<<<<<<<<<<<
 * cdef inline object get_value(var, default_value=None):
 *     """Return a new reference to the value of the context variable,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cpython.contextvars.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pyvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/

/* "cpython/contextvars.pxd":133
 * 
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")             # <<<<<<<<<<<<<<
 * cdef inline object get_value_no_default(var, default_value=None):
 *     """Return a new reference to the value of the context variable,
*/

#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value_no_default(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default *__pyx_optional_args) {

  /* "cpython/contextvars.pxd":134
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 * cdef inline object get_value_no_default(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the provided default value if no such value was found.
*/
  PyObject *__pyx_v_default_value = ((PyObject *)Py_None);
  PyObject *__pyx_v_value;
  PyObject *__pyx_v_pyvalue = NULL;
  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_value_no_default", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_default_value = __pyx_optional_args->default_value;
    }
  }

  /* "cpython/contextvars.pxd":140
 *     Ignores the default value of the context variable, if any.
 *     """
 *     cdef PyObject *value = NULL             # <<<<<<<<<<<<<<
 *     PyContextVar_Get(var, <PyObject*>default_value, &value)
 *     # value of context variable or 'default_value'
*/
  __pyx_v_value = NULL;

  /* "cpython/contextvars.pxd":141
 *     """
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, <PyObject*>default_value, &value)             # <<<<<<<<<<<<<<
 *     # value of context variable or 'default_value'
 *     pyvalue = <object>value
*/
  __pyx_t_1 = PyContextVar_Get(__pyx_v_var, ((PyObject *)__pyx_v_default_value), (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 141, __pyx_L1_error)

  /* "cpython/contextvars.pxd":143
 *     PyContextVar_Get(var, <PyObject*>default_value, &value)
 *     # value of context variable or 'default_value'
 *     pyvalue = <object>value             # <<<<<<<<<<<<<<
 *     Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_value);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_pyvalue = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cpython/contextvars.pxd":144
 *     # value of context variable or 'default_value'
 *     pyvalue = <object>value
 *     Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'             # <<<<<<<<<<<<<<
 *     return pyvalue
*/
  Py_XDECREF(__pyx_v_value);

  /* "cpython/contextvars.pxd":145
 *     pyvalue = <object>value
 *     Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue             # <<<<<<<<<<<<<<
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_pyvalue);
  __pyx_r = __pyx_v_pyvalue;
  goto __pyx_L0;

  /* "cpython/contextvars.pxd":133
 * 
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")             # <<<<<<<<<<<<<<
 * cdef inline object get_value_no_default(var, default_value=None):
 *     """Return a new reference to the value of the context variable,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cpython.contextvars.get_value_no_default", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pyvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/

/* "datetime.pxd":44
 * 
 *     ctypedef extern class datetime.date[object PyDateTime_Date]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int year(self) noexcept:
 *             return PyDateTime_GET_YEAR(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_4year_year(PyDateTime_Date *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":46
 *         @property
 *         cdef inline int year(self) noexcept:
 *             return PyDateTime_GET_YEAR(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_GET_YEAR(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":44
 * 
 *     ctypedef extern class datetime.date[object PyDateTime_Date]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int year(self) noexcept:
 *             return PyDateTime_GET_YEAR(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":48
 *             return PyDateTime_GET_YEAR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int month(self) noexcept:
 *             return PyDateTime_GET_MONTH(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_5month_month(PyDateTime_Date *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":50
 *         @property
 *         cdef inline int month(self) noexcept:
 *             return PyDateTime_GET_MONTH(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_GET_MONTH(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":48
 *             return PyDateTime_GET_YEAR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int month(self) noexcept:
 *             return PyDateTime_GET_MONTH(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":52
 *             return PyDateTime_GET_MONTH(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_GET_DAY(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_3day_day(PyDateTime_Date *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":54
 *         @property
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_GET_DAY(self)             # <<<<<<<<<<<<<<
 * 
 *     ctypedef extern class datetime.time[object PyDateTime_Time]:
*/
  __pyx_r = PyDateTime_GET_DAY(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":52
 *             return PyDateTime_GET_MONTH(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_GET_DAY(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":57
 * 
 *     ctypedef extern class datetime.time[object PyDateTime_Time]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int hour(self) noexcept:
 *             return PyDateTime_TIME_GET_HOUR(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4hour_hour(PyDateTime_Time *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":59
 *         @property
 *         cdef inline int hour(self) noexcept:
 *             return PyDateTime_TIME_GET_HOUR(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_TIME_GET_HOUR(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":57
 * 
 *     ctypedef extern class datetime.time[object PyDateTime_Time]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int hour(self) noexcept:
 *             return PyDateTime_TIME_GET_HOUR(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":61
 *             return PyDateTime_TIME_GET_HOUR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int minute(self) noexcept:
 *             return PyDateTime_TIME_GET_MINUTE(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6minute_minute(PyDateTime_Time *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":63
 *         @property
 *         cdef inline int minute(self) noexcept:
 *             return PyDateTime_TIME_GET_MINUTE(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_TIME_GET_MINUTE(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":61
 *             return PyDateTime_TIME_GET_HOUR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int minute(self) noexcept:
 *             return PyDateTime_TIME_GET_MINUTE(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":65
 *             return PyDateTime_TIME_GET_MINUTE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_TIME_GET_SECOND(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6second_second(PyDateTime_Time *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":67
 *         @property
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_TIME_GET_SECOND(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_TIME_GET_SECOND(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":65
 *             return PyDateTime_TIME_GET_MINUTE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_TIME_GET_SECOND(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":69
 *             return PyDateTime_TIME_GET_SECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_TIME_GET_MICROSECOND(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(PyDateTime_Time *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":71
 *         @property
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_TIME_GET_MICROSECOND(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_TIME_GET_MICROSECOND(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":69
 *             return PyDateTime_TIME_GET_SECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_TIME_GET_MICROSECOND(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":73
 *             return PyDateTime_TIME_GET_MICROSECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline object tzinfo(self):
 *             return <object>PyDateTime_TIME_GET_TZINFO(self)
*/

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(PyDateTime_Time *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  __Pyx_RefNannySetupContext("tzinfo", 0);

  /* "datetime.pxd":75
 *         @property
 *         cdef inline object tzinfo(self):
 *             return <object>PyDateTime_TIME_GET_TZINFO(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTime_TIME_GET_TZINFO(((PyObject *)__pyx_v_self));
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "datetime.pxd":73
 *             return PyDateTime_TIME_GET_MICROSECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline object tzinfo(self):
 *             return <object>PyDateTime_TIME_GET_TZINFO(self)
*/

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

/* "datetime.pxd":77
 *             return <object>PyDateTime_TIME_GET_TZINFO(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int fold(self) noexcept:
 *             # For Python < 3.6 this returns 0 no matter what
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4fold_fold(PyDateTime_Time *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":80
 *         cdef inline int fold(self) noexcept:
 *             # For Python < 3.6 this returns 0 no matter what
 *             return PyDateTime_TIME_GET_FOLD(self)             # <<<<<<<<<<<<<<
 * 
 *     ctypedef extern class datetime.datetime[object PyDateTime_DateTime]:
*/
  __pyx_r = PyDateTime_TIME_GET_FOLD(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":77
 *             return <object>PyDateTime_TIME_GET_TZINFO(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int fold(self) noexcept:
 *             # For Python < 3.6 this returns 0 no matter what
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":83
 * 
 *     ctypedef extern class datetime.datetime[object PyDateTime_DateTime]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int year(self) noexcept:
 *             return PyDateTime_GET_YEAR(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4year_year(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":85
 *         @property
 *         cdef inline int year(self) noexcept:
 *             return PyDateTime_GET_YEAR(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_GET_YEAR(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":83
 * 
 *     ctypedef extern class datetime.datetime[object PyDateTime_DateTime]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int year(self) noexcept:
 *             return PyDateTime_GET_YEAR(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":87
 *             return PyDateTime_GET_YEAR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int month(self) noexcept:
 *             return PyDateTime_GET_MONTH(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_5month_month(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":89
 *         @property
 *         cdef inline int month(self) noexcept:
 *             return PyDateTime_GET_MONTH(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_GET_MONTH(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":87
 *             return PyDateTime_GET_YEAR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int month(self) noexcept:
 *             return PyDateTime_GET_MONTH(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":91
 *             return PyDateTime_GET_MONTH(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_GET_DAY(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_3day_day(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":93
 *         @property
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_GET_DAY(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_GET_DAY(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":91
 *             return PyDateTime_GET_MONTH(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_GET_DAY(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":95
 *             return PyDateTime_GET_DAY(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int hour(self) noexcept:
 *             return PyDateTime_DATE_GET_HOUR(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4hour_hour(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":97
 *         @property
 *         cdef inline int hour(self) noexcept:
 *             return PyDateTime_DATE_GET_HOUR(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_DATE_GET_HOUR(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":95
 *             return PyDateTime_GET_DAY(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int hour(self) noexcept:
 *             return PyDateTime_DATE_GET_HOUR(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":99
 *             return PyDateTime_DATE_GET_HOUR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int minute(self) noexcept:
 *             return PyDateTime_DATE_GET_MINUTE(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6minute_minute(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":101
 *         @property
 *         cdef inline int minute(self) noexcept:
 *             return PyDateTime_DATE_GET_MINUTE(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_DATE_GET_MINUTE(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":99
 *             return PyDateTime_DATE_GET_HOUR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int minute(self) noexcept:
 *             return PyDateTime_DATE_GET_MINUTE(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":103
 *             return PyDateTime_DATE_GET_MINUTE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_DATE_GET_SECOND(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6second_second(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":105
 *         @property
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_DATE_GET_SECOND(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_DATE_GET_SECOND(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":103
 *             return PyDateTime_DATE_GET_MINUTE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_DATE_GET_SECOND(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":107
 *             return PyDateTime_DATE_GET_SECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_DATE_GET_MICROSECOND(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":109
 *         @property
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_DATE_GET_MICROSECOND(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_DATE_GET_MICROSECOND(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":107
 *             return PyDateTime_DATE_GET_SECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_DATE_GET_MICROSECOND(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":111
 *             return PyDateTime_DATE_GET_MICROSECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline object tzinfo(self):
 *             return <object>PyDateTime_DATE_GET_TZINFO(self)
*/

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(PyDateTime_DateTime *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  __Pyx_RefNannySetupContext("tzinfo", 0);

  /* "datetime.pxd":113
 *         @property
 *         cdef inline object tzinfo(self):
 *             return <object>PyDateTime_DATE_GET_TZINFO(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTime_DATE_GET_TZINFO(((PyObject *)__pyx_v_self));
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "datetime.pxd":111
 *             return PyDateTime_DATE_GET_MICROSECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline object tzinfo(self):
 *             return <object>PyDateTime_DATE_GET_TZINFO(self)
*/

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

/* "datetime.pxd":115
 *             return <object>PyDateTime_DATE_GET_TZINFO(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int fold(self) noexcept:
 *             # For Python < 3.6 this returns 0 no matter what
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4fold_fold(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":118
 *         cdef inline int fold(self) noexcept:
 *             # For Python < 3.6 this returns 0 no matter what
 *             return PyDateTime_DATE_GET_FOLD(self)             # <<<<<<<<<<<<<<
 * 
 *     ctypedef extern class datetime.timedelta[object PyDateTime_Delta]:
*/
  __pyx_r = PyDateTime_DATE_GET_FOLD(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":115
 *             return <object>PyDateTime_DATE_GET_TZINFO(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int fold(self) noexcept:
 *             # For Python < 3.6 this returns 0 no matter what
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":121
 * 
 *     ctypedef extern class datetime.timedelta[object PyDateTime_Delta]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_DELTA_GET_DAYS(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_3day_day(PyDateTime_Delta *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":123
 *         @property
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_DELTA_GET_DAYS(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_DELTA_GET_DAYS(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":121
 * 
 *     ctypedef extern class datetime.timedelta[object PyDateTime_Delta]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_DELTA_GET_DAYS(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":125
 *             return PyDateTime_DELTA_GET_DAYS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_DELTA_GET_SECONDS(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_6second_second(PyDateTime_Delta *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":127
 *         @property
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_DELTA_GET_SECONDS(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_DELTA_GET_SECONDS(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":125
 *             return PyDateTime_DELTA_GET_DAYS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_DELTA_GET_SECONDS(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":129
 *             return PyDateTime_DELTA_GET_SECONDS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_DELTA_GET_MICROSECONDS(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(PyDateTime_Delta *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":131
 *         @property
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_DELTA_GET_MICROSECONDS(self)             # <<<<<<<<<<<<<<
 * 
 *     ctypedef extern class datetime.tzinfo[object PyDateTime_TZInfo]:
*/
  __pyx_r = PyDateTime_DELTA_GET_MICROSECONDS(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":129
 *             return PyDateTime_DELTA_GET_SECONDS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_DELTA_GET_MICROSECONDS(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":255
 * # Datetime C API initialization function.
 * # You have to call it before any usage of DateTime CAPI functions.
 * cdef inline void import_datetime() noexcept:             # <<<<<<<<<<<<<<
 *     PyDateTime_IMPORT
 * 
*/

static CYTHON_INLINE void __pyx_f_7cpython_8datetime_import_datetime(void) {

  /* "datetime.pxd":256
 * # You have to call it before any usage of DateTime CAPI functions.
 * cdef inline void import_datetime() noexcept:
 *     PyDateTime_IMPORT             # <<<<<<<<<<<<<<
 * 
 * # Create date object using DateTime CAPI factory function.
*/
  (void)(PyDateTime_IMPORT);

  /* "datetime.pxd":255
 * # Datetime C API initialization function.
 * # You have to call it before any usage of DateTime CAPI functions.
 * cdef inline void import_datetime() noexcept:             # <<<<<<<<<<<<<<
 *     PyDateTime_IMPORT
 * 
*/

  /* function exit code */
}

/* "datetime.pxd":260
 * # Create date object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline date date_new(int year, int month, int day):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType)
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_new(int __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  PyDateTime_Date *__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("date_new", 0);

  /* "datetime.pxd":261
 * # Note, there are no range checks for any of the arguments.
 * cdef inline date date_new(int year, int month, int day):
 *     return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType)             # <<<<<<<<<<<<<<
 * 
 * # Create time object using DateTime CAPI factory function
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)PyDateTimeAPI->Date_FromDate(__pyx_v_year, __pyx_v_month, __pyx_v_day, PyDateTimeAPI->DateType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "datetime.pxd":260
 * # Create date object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline date date_new(int year, int month, int day):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.datetime.date_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":265
 * # Create time object using DateTime CAPI factory function
 * # Note, there are no range checks for any of the arguments.
 * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold)
 * 
*/

static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cpython_8datetime_time_new(int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, PyObject *__pyx_v_tz, struct __pyx_opt_args_7cpython_8datetime_time_new *__pyx_optional_args) {
  int __pyx_v_fold = ((int)0);
  PyDateTime_Time *__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("time_new", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fold = __pyx_optional_args->fold;
    }
  }

  /* "datetime.pxd":266
 * # Note, there are no range checks for any of the arguments.
 * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0):
 *     return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold)             # <<<<<<<<<<<<<<
 * 
 * # Create datetime object using DateTime CAPI factory function.
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)__Pyx_DateTime_TimeWithFold(__pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, __pyx_v_fold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(3, 266, __pyx_L1_error)
  __pyx_r = ((PyDateTime_Time *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "datetime.pxd":265
 * # Create time object using DateTime CAPI factory function
 * # Note, there are no range checks for any of the arguments.
 * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.datetime.time_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":270
 * # Create datetime object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold)
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_new(int __pyx_v_year, int __pyx_v_month, int __pyx_v_day, int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, PyObject *__pyx_v_tz, struct __pyx_opt_args_7cpython_8datetime_datetime_new *__pyx_optional_args) {
  int __pyx_v_fold = ((int)0);
  PyDateTime_DateTime *__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("datetime_new", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fold = __pyx_optional_args->fold;
    }
  }

  /* "datetime.pxd":271
 * # Note, there are no range checks for any of the arguments.
 * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0):
 *     return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold)             # <<<<<<<<<<<<<<
 * 
 * # Create timedelta object using DateTime CAPI factory function.
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)__Pyx_DateTime_DateTimeWithFold(__pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, __pyx_v_fold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "datetime.pxd":270
 * # Create datetime object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.datetime.datetime_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":275
 * # Create timedelta object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline timedelta timedelta_new(int days, int seconds, int useconds):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType)
 * 
*/

static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cpython_8datetime_timedelta_new(int __pyx_v_days, int __pyx_v_seconds, int __pyx_v_useconds) {
  PyDateTime_Delta *__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("timedelta_new", 0);

  /* "datetime.pxd":276
 * # Note, there are no range checks for any of the arguments.
 * cdef inline timedelta timedelta_new(int days, int seconds, int useconds):
 *     return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType)             # <<<<<<<<<<<<<<
 * 
 * # Create timedelta object using DateTime CAPI factory function.
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)PyDateTimeAPI->Delta_FromDelta(__pyx_v_days, __pyx_v_seconds, __pyx_v_useconds, 1, PyDateTimeAPI->DeltaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Delta *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "datetime.pxd":275
 * # Create timedelta object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline timedelta timedelta_new(int days, int seconds, int useconds):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.datetime.timedelta_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":279
 * 
 * # Create timedelta object using DateTime CAPI factory function.
 * cdef inline object timezone_new(object offset, object name=None):             # <<<<<<<<<<<<<<
 *     return __Pyx_TimeZone_FromOffsetAndName(offset, <PyObject*>name if name is not None else NULL)
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_timezone_new(PyObject *__pyx_v_offset, struct __pyx_opt_args_7cpython_8datetime_timezone_new *__pyx_optional_args) {
  PyObject *__pyx_v_name = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__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("timezone_new", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_name = __pyx_optional_args->name;
    }
  }

  /* "datetime.pxd":280
 * # Create timedelta object using DateTime CAPI factory function.
 * cdef inline object timezone_new(object offset, object name=None):
 *     return __Pyx_TimeZone_FromOffsetAndName(offset, <PyObject*>name if name is not None else NULL)             # <<<<<<<<<<<<<<
 * 
 * # Create datetime object using DB API constructor.
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = (__pyx_v_name != Py_None);
  if (__pyx_t_2) {
    __pyx_t_1 = ((PyObject *)__pyx_v_name);
  } else {
    __pyx_t_1 = NULL;
  }
  __pyx_t_3 = __Pyx_TimeZone_FromOffsetAndName(__pyx_v_offset, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "datetime.pxd":279
 * 
 * # Create timedelta object using DateTime CAPI factory function.
 * cdef inline object timezone_new(object offset, object name=None):             # <<<<<<<<<<<<<<
 *     return __Pyx_TimeZone_FromOffsetAndName(offset, <PyObject*>name if name is not None else NULL)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cpython.datetime.timezone_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":283
 * 
 * # Create datetime object using DB API constructor.
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.DateTime_FromTimestamp(
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_from_timestamp(PyObject *__pyx_v_timestamp, struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp *__pyx_optional_args) {
  PyObject *__pyx_v_tz = ((PyObject *)Py_None);
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("datetime_from_timestamp", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tz = __pyx_optional_args->tz;
    }
  }

  /* "datetime.pxd":284
 * # Create datetime object using DB API constructor.
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):
 *     return PyDateTimeAPI.DateTime_FromTimestamp(             # <<<<<<<<<<<<<<
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)
 * 
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "datetime.pxd":285
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):
 *     return PyDateTimeAPI.DateTime_FromTimestamp(
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)             # <<<<<<<<<<<<<<
 * 
 * # Create date object using DB API constructor.
*/
  __pyx_t_2 = (__pyx_v_tz != Py_None);
  if (__pyx_t_2) {
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_timestamp);
    __Pyx_GIVEREF(__pyx_v_timestamp);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(3, 285, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_tz);
    __Pyx_GIVEREF(__pyx_v_tz);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_tz) != (0)) __PYX_ERR(3, 285, __pyx_L1_error);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_timestamp);
    __Pyx_GIVEREF(__pyx_v_timestamp);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(3, 285, __pyx_L1_error);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }

  /* "datetime.pxd":284
 * # Create datetime object using DB API constructor.
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):
 *     return PyDateTimeAPI.DateTime_FromTimestamp(             # <<<<<<<<<<<<<<
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)
 * 
*/
  __pyx_t_3 = ((PyObject *)PyDateTimeAPI->DateTime_FromTimestamp(((PyObject *)PyDateTimeAPI->DateTimeType), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "datetime.pxd":283
 * 
 * # Create datetime object using DB API constructor.
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.DateTime_FromTimestamp(
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cpython.datetime.datetime_from_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":288
 * 
 * # Create date object using DB API constructor.
 * cdef inline date date_from_timestamp(timestamp):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Date_FromTimestamp(<PyObject*>PyDateTimeAPI.DateType, (timestamp,))
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_from_timestamp(PyObject *__pyx_v_timestamp) {
  PyDateTime_Date *__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("date_from_timestamp", 0);

  /* "datetime.pxd":289
 * # Create date object using DB API constructor.
 * cdef inline date date_from_timestamp(timestamp):
 *     return PyDateTimeAPI.Date_FromTimestamp(<PyObject*>PyDateTimeAPI.DateType, (timestamp,))             # <<<<<<<<<<<<<<
 * 
 * # More recognizable getters for date/time/datetime/timedelta.
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_timestamp);
  __Pyx_GIVEREF(__pyx_v_timestamp);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(3, 289, __pyx_L1_error);
  __pyx_t_2 = ((PyObject *)PyDateTimeAPI->Date_FromTimestamp(((PyObject *)PyDateTimeAPI->DateType), __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyDateTime_Date *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "datetime.pxd":288
 * 
 * # Create date object using DB API constructor.
 * cdef inline date date_from_timestamp(timestamp):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Date_FromTimestamp(<PyObject*>PyDateTimeAPI.DateType, (timestamp,))
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cpython.datetime.date_from_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":297
 * 
 * # Get UTC singleton
 * cdef inline object get_utc():             # <<<<<<<<<<<<<<
 *     return <object>__Pyx_TimeZone_UTC
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_get_utc(void) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_utc", 0);

  /* "datetime.pxd":298
 * # Get UTC singleton
 * cdef inline object get_utc():
 *     return <object>__Pyx_TimeZone_UTC             # <<<<<<<<<<<<<<
 * 
 * # Get tzinfo of time
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__Pyx_TimeZone_UTC));
  __pyx_r = ((PyObject *)__Pyx_TimeZone_UTC);
  goto __pyx_L0;

  /* "datetime.pxd":297
 * 
 * # Get UTC singleton
 * cdef inline object get_utc():             # <<<<<<<<<<<<<<
 *     return <object>__Pyx_TimeZone_UTC
 * 
*/

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

/* "datetime.pxd":301
 * 
 * # Get tzinfo of time
 * cdef inline object time_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     return <object>PyDateTime_TIME_GET_TZINFO(o)
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_time_tzinfo(PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  __Pyx_RefNannySetupContext("time_tzinfo", 0);

  /* "datetime.pxd":302
 * # Get tzinfo of time
 * cdef inline object time_tzinfo(object o):
 *     return <object>PyDateTime_TIME_GET_TZINFO(o)             # <<<<<<<<<<<<<<
 * 
 * # Get tzinfo of datetime
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTime_TIME_GET_TZINFO(__pyx_v_o);
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "datetime.pxd":301
 * 
 * # Get tzinfo of time
 * cdef inline object time_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     return <object>PyDateTime_TIME_GET_TZINFO(o)
 * 
*/

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

/* "datetime.pxd":305
 * 
 * # Get tzinfo of datetime
 * cdef inline object datetime_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     return <object>PyDateTime_DATE_GET_TZINFO(o)
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_datetime_tzinfo(PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  __Pyx_RefNannySetupContext("datetime_tzinfo", 0);

  /* "datetime.pxd":306
 * # Get tzinfo of datetime
 * cdef inline object datetime_tzinfo(object o):
 *     return <object>PyDateTime_DATE_GET_TZINFO(o)             # <<<<<<<<<<<<<<
 * 
 * # Get year of date
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTime_DATE_GET_TZINFO(__pyx_v_o);
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "datetime.pxd":305
 * 
 * # Get tzinfo of datetime
 * cdef inline object datetime_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     return <object>PyDateTime_DATE_GET_TZINFO(o)
 * 
*/

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

/* "datetime.pxd":309
 * 
 * # Get year of date
 * cdef inline int date_year(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_year(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":310
 * # Get year of date
 * cdef inline int date_year(object o) noexcept:
 *     return PyDateTime_GET_YEAR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get month of date
*/
  __pyx_r = PyDateTime_GET_YEAR(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":309
 * 
 * # Get year of date
 * cdef inline int date_year(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":313
 * 
 * # Get month of date
 * cdef inline int date_month(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_month(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":314
 * # Get month of date
 * cdef inline int date_month(object o) noexcept:
 *     return PyDateTime_GET_MONTH(o)             # <<<<<<<<<<<<<<
 * 
 * # Get day of date
*/
  __pyx_r = PyDateTime_GET_MONTH(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":313
 * 
 * # Get month of date
 * cdef inline int date_month(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":317
 * 
 * # Get day of date
 * cdef inline int date_day(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_day(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":318
 * # Get day of date
 * cdef inline int date_day(object o) noexcept:
 *     return PyDateTime_GET_DAY(o)             # <<<<<<<<<<<<<<
 * 
 * # Get year of datetime
*/
  __pyx_r = PyDateTime_GET_DAY(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":317
 * 
 * # Get day of date
 * cdef inline int date_day(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":321
 * 
 * # Get year of datetime
 * cdef inline int datetime_year(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_year(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":322
 * # Get year of datetime
 * cdef inline int datetime_year(object o) noexcept:
 *     return PyDateTime_GET_YEAR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get month of datetime
*/
  __pyx_r = PyDateTime_GET_YEAR(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":321
 * 
 * # Get year of datetime
 * cdef inline int datetime_year(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":325
 * 
 * # Get month of datetime
 * cdef inline int datetime_month(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_month(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":326
 * # Get month of datetime
 * cdef inline int datetime_month(object o) noexcept:
 *     return PyDateTime_GET_MONTH(o)             # <<<<<<<<<<<<<<
 * 
 * # Get day of datetime
*/
  __pyx_r = PyDateTime_GET_MONTH(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":325
 * 
 * # Get month of datetime
 * cdef inline int datetime_month(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":329
 * 
 * # Get day of datetime
 * cdef inline int datetime_day(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_day(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":330
 * # Get day of datetime
 * cdef inline int datetime_day(object o) noexcept:
 *     return PyDateTime_GET_DAY(o)             # <<<<<<<<<<<<<<
 * 
 * # Get hour of time
*/
  __pyx_r = PyDateTime_GET_DAY(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":329
 * 
 * # Get day of datetime
 * cdef inline int datetime_day(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":333
 * 
 * # Get hour of time
 * cdef inline int time_hour(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_HOUR(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_hour(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":334
 * # Get hour of time
 * cdef inline int time_hour(object o) noexcept:
 *     return PyDateTime_TIME_GET_HOUR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get minute of time
*/
  __pyx_r = PyDateTime_TIME_GET_HOUR(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":333
 * 
 * # Get hour of time
 * cdef inline int time_hour(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_HOUR(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":337
 * 
 * # Get minute of time
 * cdef inline int time_minute(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MINUTE(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_minute(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":338
 * # Get minute of time
 * cdef inline int time_minute(object o) noexcept:
 *     return PyDateTime_TIME_GET_MINUTE(o)             # <<<<<<<<<<<<<<
 * 
 * # Get second of time
*/
  __pyx_r = PyDateTime_TIME_GET_MINUTE(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":337
 * 
 * # Get minute of time
 * cdef inline int time_minute(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MINUTE(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":341
 * 
 * # Get second of time
 * cdef inline int time_second(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_SECOND(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_second(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":342
 * # Get second of time
 * cdef inline int time_second(object o) noexcept:
 *     return PyDateTime_TIME_GET_SECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get microsecond of time
*/
  __pyx_r = PyDateTime_TIME_GET_SECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":341
 * 
 * # Get second of time
 * cdef inline int time_second(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_SECOND(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":345
 * 
 * # Get microsecond of time
 * cdef inline int time_microsecond(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MICROSECOND(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_microsecond(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":346
 * # Get microsecond of time
 * cdef inline int time_microsecond(object o) noexcept:
 *     return PyDateTime_TIME_GET_MICROSECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get fold of time
*/
  __pyx_r = PyDateTime_TIME_GET_MICROSECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":345
 * 
 * # Get microsecond of time
 * cdef inline int time_microsecond(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MICROSECOND(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":349
 * 
 * # Get fold of time
 * cdef inline int time_fold(object o) noexcept:             # <<<<<<<<<<<<<<
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_TIME_GET_FOLD(o)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_fold(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":351
 * cdef inline int time_fold(object o) noexcept:
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_TIME_GET_FOLD(o)             # <<<<<<<<<<<<<<
 * 
 * # Get hour of datetime
*/
  __pyx_r = PyDateTime_TIME_GET_FOLD(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":349
 * 
 * # Get fold of time
 * cdef inline int time_fold(object o) noexcept:             # <<<<<<<<<<<<<<
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_TIME_GET_FOLD(o)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":354
 * 
 * # Get hour of datetime
 * cdef inline int datetime_hour(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_HOUR(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_hour(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":355
 * # Get hour of datetime
 * cdef inline int datetime_hour(object o) noexcept:
 *     return PyDateTime_DATE_GET_HOUR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get minute of datetime
*/
  __pyx_r = PyDateTime_DATE_GET_HOUR(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":354
 * 
 * # Get hour of datetime
 * cdef inline int datetime_hour(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_HOUR(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":358
 * 
 * # Get minute of datetime
 * cdef inline int datetime_minute(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MINUTE(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_minute(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":359
 * # Get minute of datetime
 * cdef inline int datetime_minute(object o) noexcept:
 *     return PyDateTime_DATE_GET_MINUTE(o)             # <<<<<<<<<<<<<<
 * 
 * # Get second of datetime
*/
  __pyx_r = PyDateTime_DATE_GET_MINUTE(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":358
 * 
 * # Get minute of datetime
 * cdef inline int datetime_minute(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MINUTE(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":362
 * 
 * # Get second of datetime
 * cdef inline int datetime_second(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_SECOND(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_second(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":363
 * # Get second of datetime
 * cdef inline int datetime_second(object o) noexcept:
 *     return PyDateTime_DATE_GET_SECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get microsecond of datetime
*/
  __pyx_r = PyDateTime_DATE_GET_SECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":362
 * 
 * # Get second of datetime
 * cdef inline int datetime_second(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_SECOND(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":366
 * 
 * # Get microsecond of datetime
 * cdef inline int datetime_microsecond(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MICROSECOND(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_microsecond(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":367
 * # Get microsecond of datetime
 * cdef inline int datetime_microsecond(object o) noexcept:
 *     return PyDateTime_DATE_GET_MICROSECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get fold of datetime
*/
  __pyx_r = PyDateTime_DATE_GET_MICROSECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":366
 * 
 * # Get microsecond of datetime
 * cdef inline int datetime_microsecond(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MICROSECOND(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":370
 * 
 * # Get fold of datetime
 * cdef inline int datetime_fold(object o) noexcept:             # <<<<<<<<<<<<<<
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_DATE_GET_FOLD(o)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_fold(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":372
 * cdef inline int datetime_fold(object o) noexcept:
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_DATE_GET_FOLD(o)             # <<<<<<<<<<<<<<
 * 
 * # Get days of timedelta
*/
  __pyx_r = PyDateTime_DATE_GET_FOLD(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":370
 * 
 * # Get fold of datetime
 * cdef inline int datetime_fold(object o) noexcept:             # <<<<<<<<<<<<<<
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_DATE_GET_FOLD(o)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":375
 * 
 * # Get days of timedelta
 * cdef inline int timedelta_days(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DELTA_GET_DAYS(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_days(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":376
 * # Get days of timedelta
 * cdef inline int timedelta_days(object o) noexcept:
 *     return PyDateTime_DELTA_GET_DAYS(o)             # <<<<<<<<<<<<<<
 * 
 * # Get seconds of timedelta
*/
  __pyx_r = PyDateTime_DELTA_GET_DAYS(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":375
 * 
 * # Get days of timedelta
 * cdef inline int timedelta_days(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DELTA_GET_DAYS(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":379
 * 
 * # Get seconds of timedelta
 * cdef inline int timedelta_seconds(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DELTA_GET_SECONDS(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_seconds(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":380
 * # Get seconds of timedelta
 * cdef inline int timedelta_seconds(object o) noexcept:
 *     return PyDateTime_DELTA_GET_SECONDS(o)             # <<<<<<<<<<<<<<
 * 
 * # Get microseconds of timedelta
*/
  __pyx_r = PyDateTime_DELTA_GET_SECONDS(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":379
 * 
 * # Get seconds of timedelta
 * cdef inline int timedelta_seconds(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DELTA_GET_SECONDS(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":383
 * 
 * # Get microseconds of timedelta
 * cdef inline int timedelta_microseconds(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DELTA_GET_MICROSECONDS(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_microseconds(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":384
 * # Get microseconds of timedelta
 * cdef inline int timedelta_microseconds(object o) noexcept:
 *     return PyDateTime_DELTA_GET_MICROSECONDS(o)             # <<<<<<<<<<<<<<
 * 
 * cdef inline double total_seconds(timedelta obj) noexcept:
*/
  __pyx_r = PyDateTime_DELTA_GET_MICROSECONDS(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":383
 * 
 * # Get microseconds of timedelta
 * cdef inline int timedelta_microseconds(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DELTA_GET_MICROSECONDS(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":386
 *     return PyDateTime_DELTA_GET_MICROSECONDS(o)
 * 
 * cdef inline double total_seconds(timedelta obj) noexcept:             # <<<<<<<<<<<<<<
 *     # Mirrors the "timedelta.total_seconds()" method.
 *     # Note that this implementation is not guaranteed to give *exactly* the same
*/

static CYTHON_INLINE double __pyx_f_7cpython_8datetime_total_seconds(PyDateTime_Delta *__pyx_v_obj) {
  double __pyx_v_days;
  double __pyx_v_seconds;
  double __pyx_v_micros;
  double __pyx_r;

  /* "datetime.pxd":392
 *     cdef:
 *         double days, seconds, micros
 *     days = <double>PyDateTime_DELTA_GET_DAYS(obj)             # <<<<<<<<<<<<<<
 *     seconds = <double>PyDateTime_DELTA_GET_SECONDS(obj)
 *     micros = <double>PyDateTime_DELTA_GET_MICROSECONDS(obj)
*/
  __pyx_v_days = ((double)PyDateTime_DELTA_GET_DAYS(((PyObject *)__pyx_v_obj)));

  /* "datetime.pxd":393
 *         double days, seconds, micros
 *     days = <double>PyDateTime_DELTA_GET_DAYS(obj)
 *     seconds = <double>PyDateTime_DELTA_GET_SECONDS(obj)             # <<<<<<<<<<<<<<
 *     micros = <double>PyDateTime_DELTA_GET_MICROSECONDS(obj)
 *     return days * 24 * 3600 + seconds + micros / 1_000_000
*/
  __pyx_v_seconds = ((double)PyDateTime_DELTA_GET_SECONDS(((PyObject *)__pyx_v_obj)));

  /* "datetime.pxd":394
 *     days = <double>PyDateTime_DELTA_GET_DAYS(obj)
 *     seconds = <double>PyDateTime_DELTA_GET_SECONDS(obj)
 *     micros = <double>PyDateTime_DELTA_GET_MICROSECONDS(obj)             # <<<<<<<<<<<<<<
 *     return days * 24 * 3600 + seconds + micros / 1_000_000
*/
  __pyx_v_micros = ((double)PyDateTime_DELTA_GET_MICROSECONDS(((PyObject *)__pyx_v_obj)));

  /* "datetime.pxd":395
 *     seconds = <double>PyDateTime_DELTA_GET_SECONDS(obj)
 *     micros = <double>PyDateTime_DELTA_GET_MICROSECONDS(obj)
 *     return days * 24 * 3600 + seconds + micros / 1_000_000             # <<<<<<<<<<<<<<
*/
  __pyx_r = ((((__pyx_v_days * 24.0) * 3600.0) + __pyx_v_seconds) + (__pyx_v_micros / 1000000.0));
  goto __pyx_L0;

  /* "datetime.pxd":386
 *     return PyDateTime_DELTA_GET_MICROSECONDS(o)
 * 
 * cdef inline double total_seconds(timedelta obj) noexcept:             # <<<<<<<<<<<<<<
 *     # Mirrors the "timedelta.total_seconds()" method.
 *     # Note that this implementation is not guaranteed to give *exactly* the same
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/time.pxd":79
 * 
 * 
 * cdef inline double time() noexcept nogil:             # <<<<<<<<<<<<<<
 *     cdef PyTime_t tic = PyTime_TimeRaw()
 *     return PyTime_AsSecondsDouble(tic)
*/

static CYTHON_INLINE double __pyx_f_7cpython_4time_time(void) {
  __Pyx_PyTime_t __pyx_v_tic;
  double __pyx_r;

  /* "cpython/time.pxd":80
 * 
 * cdef inline double time() noexcept nogil:
 *     cdef PyTime_t tic = PyTime_TimeRaw()             # <<<<<<<<<<<<<<
 *     return PyTime_AsSecondsDouble(tic)
 * 
*/
  __pyx_v_tic = __Pyx_PyTime_TimeRaw();

  /* "cpython/time.pxd":81
 * cdef inline double time() noexcept nogil:
 *     cdef PyTime_t tic = PyTime_TimeRaw()
 *     return PyTime_AsSecondsDouble(tic)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = __Pyx_PyTime_AsSecondsDouble(__pyx_v_tic);
  goto __pyx_L0;

  /* "cpython/time.pxd":79
 * 
 * 
 * cdef inline double time() noexcept nogil:             # <<<<<<<<<<<<<<
 *     cdef PyTime_t tic = PyTime_TimeRaw()
 *     return PyTime_AsSecondsDouble(tic)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/time.pxd":84
 * 
 * 
 * cdef inline int64_t time_ns() noexcept nogil:             # <<<<<<<<<<<<<<
 *     return <int64_t> PyTime_TimeRaw()
 * 
*/

static CYTHON_INLINE int64_t __pyx_f_7cpython_4time_time_ns(void) {
  int64_t __pyx_r;

  /* "cpython/time.pxd":85
 * 
 * cdef inline int64_t time_ns() noexcept nogil:
 *     return <int64_t> PyTime_TimeRaw()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = ((int64_t)__Pyx_PyTime_TimeRaw());
  goto __pyx_L0;

  /* "cpython/time.pxd":84
 * 
 * 
 * cdef inline int64_t time_ns() noexcept nogil:             # <<<<<<<<<<<<<<
 *     return <int64_t> PyTime_TimeRaw()
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/time.pxd":88
 * 
 * 
 * cdef inline double perf_counter() noexcept nogil:             # <<<<<<<<<<<<<<
 *     cdef PyTime_t tic = PyTime_PerfCounterRaw()
 *     return PyTime_AsSecondsDouble(tic)
*/

static CYTHON_INLINE double __pyx_f_7cpython_4time_perf_counter(void) {
  __Pyx_PyTime_t __pyx_v_tic;
  double __pyx_r;

  /* "cpython/time.pxd":89
 * 
 * cdef inline double perf_counter() noexcept nogil:
 *     cdef PyTime_t tic = PyTime_PerfCounterRaw()             # <<<<<<<<<<<<<<
 *     return PyTime_AsSecondsDouble(tic)
 * 
*/
  __pyx_v_tic = __Pyx_PyTime_PerfCounterRaw();

  /* "cpython/time.pxd":90
 * cdef inline double perf_counter() noexcept nogil:
 *     cdef PyTime_t tic = PyTime_PerfCounterRaw()
 *     return PyTime_AsSecondsDouble(tic)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = __Pyx_PyTime_AsSecondsDouble(__pyx_v_tic);
  goto __pyx_L0;

  /* "cpython/time.pxd":88
 * 
 * 
 * cdef inline double perf_counter() noexcept nogil:             # <<<<<<<<<<<<<<
 *     cdef PyTime_t tic = PyTime_PerfCounterRaw()
 *     return PyTime_AsSecondsDouble(tic)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/time.pxd":93
 * 
 * 
 * cdef inline int64_t perf_counter_ns() noexcept nogil:             # <<<<<<<<<<<<<<
 *     return <int64_t> PyTime_PerfCounterRaw()
 * 
*/

static CYTHON_INLINE int64_t __pyx_f_7cpython_4time_perf_counter_ns(void) {
  int64_t __pyx_r;

  /* "cpython/time.pxd":94
 * 
 * cdef inline int64_t perf_counter_ns() noexcept nogil:
 *     return <int64_t> PyTime_PerfCounterRaw()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = ((int64_t)__Pyx_PyTime_PerfCounterRaw());
  goto __pyx_L0;

  /* "cpython/time.pxd":93
 * 
 * 
 * cdef inline int64_t perf_counter_ns() noexcept nogil:             # <<<<<<<<<<<<<<
 *     return <int64_t> PyTime_PerfCounterRaw()
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/time.pxd":97
 * 
 * 
 * cdef inline double monotonic() noexcept nogil:             # <<<<<<<<<<<<<<
 *     cdef PyTime_t tic = PyTime_MonotonicRaw()
 *     return PyTime_AsSecondsDouble(tic)
*/

static CYTHON_INLINE double __pyx_f_7cpython_4time_monotonic(void) {
  __Pyx_PyTime_t __pyx_v_tic;
  double __pyx_r;

  /* "cpython/time.pxd":98
 * 
 * cdef inline double monotonic() noexcept nogil:
 *     cdef PyTime_t tic = PyTime_MonotonicRaw()             # <<<<<<<<<<<<<<
 *     return PyTime_AsSecondsDouble(tic)
 * 
*/
  __pyx_v_tic = __Pyx_PyTime_MonotonicRaw();

  /* "cpython/time.pxd":99
 * cdef inline double monotonic() noexcept nogil:
 *     cdef PyTime_t tic = PyTime_MonotonicRaw()
 *     return PyTime_AsSecondsDouble(tic)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = __Pyx_PyTime_AsSecondsDouble(__pyx_v_tic);
  goto __pyx_L0;

  /* "cpython/time.pxd":97
 * 
 * 
 * cdef inline double monotonic() noexcept nogil:             # <<<<<<<<<<<<<<
 *     cdef PyTime_t tic = PyTime_MonotonicRaw()
 *     return PyTime_AsSecondsDouble(tic)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/time.pxd":102
 * 
 * 
 * cdef inline int64_t monotonic_ns() noexcept nogil:             # <<<<<<<<<<<<<<
 *     return <int64_t> PyTime_MonotonicRaw()
 * 
*/

static CYTHON_INLINE int64_t __pyx_f_7cpython_4time_monotonic_ns(void) {
  int64_t __pyx_r;

  /* "cpython/time.pxd":103
 * 
 * cdef inline int64_t monotonic_ns() noexcept nogil:
 *     return <int64_t> PyTime_MonotonicRaw()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = ((int64_t)__Pyx_PyTime_MonotonicRaw());
  goto __pyx_L0;

  /* "cpython/time.pxd":102
 * 
 * 
 * cdef inline int64_t monotonic_ns() noexcept nogil:             # <<<<<<<<<<<<<<
 *     return <int64_t> PyTime_MonotonicRaw()
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/time.pxd":106
 * 
 * 
 * cdef inline int _raise_from_errno() except -1 with gil:             # <<<<<<<<<<<<<<
 *     PyErr_SetFromErrno(RuntimeError)
 *     return <int> -1  # Let the C compiler know that this function always raises.
*/

static CYTHON_INLINE int __pyx_f_7cpython_4time__raise_from_errno(void) {
  int __pyx_r;
  PyObject *__pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();

  /* "cpython/time.pxd":107
 * 
 * cdef inline int _raise_from_errno() except -1 with gil:
 *     PyErr_SetFromErrno(RuntimeError)             # <<<<<<<<<<<<<<
 *     return <int> -1  # Let the C compiler know that this function always raises.
 * 
*/
  __pyx_t_1 = PyErr_SetFromErrno(((PyObject *)(((PyTypeObject*)PyExc_RuntimeError)))); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(4, 107, __pyx_L1_error)

  /* "cpython/time.pxd":108
 * cdef inline int _raise_from_errno() except -1 with gil:
 *     PyErr_SetFromErrno(RuntimeError)
 *     return <int> -1  # Let the C compiler know that this function always raises.             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = ((int)-1L);
  goto __pyx_L0;

  /* "cpython/time.pxd":106
 * 
 * 
 * cdef inline int _raise_from_errno() except -1 with gil:             # <<<<<<<<<<<<<<
 *     PyErr_SetFromErrno(RuntimeError)
 *     return <int> -1  # Let the C compiler know that this function always raises.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cpython.time._raise_from_errno", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  return __pyx_r;
}

/* "cpython/time.pxd":111
 * 
 * 
 * cdef inline tm localtime() except * nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Analogue to the stdlib time.localtime.  The returned struct
*/

static CYTHON_INLINE struct tm __pyx_f_7cpython_4time_localtime(void) {
  time_t __pyx_v_tic;
  struct tm *__pyx_v_result;
  struct tm __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save;

  /* "cpython/time.pxd":117
 *     """
 *     cdef:
 *         time_t tic = <time_t>time()             # <<<<<<<<<<<<<<
 *         tm* result
 * 
*/
  __pyx_v_tic = ((time_t)__pyx_f_7cpython_4time_time());

  /* "cpython/time.pxd":120
 *         tm* result
 * 
 *     result = libc_localtime(&tic)             # <<<<<<<<<<<<<<
 *     if result is NULL:
 *         _raise_from_errno()
*/
  __pyx_v_result = localtime((&__pyx_v_tic));

  /* "cpython/time.pxd":121
 * 
 *     result = libc_localtime(&tic)
 *     if result is NULL:             # <<<<<<<<<<<<<<
 *         _raise_from_errno()
 *     # Fix 0-based date values (and the 1900-based year).
*/
  __pyx_t_1 = (__pyx_v_result == NULL);
  if (__pyx_t_1) {

    /* "cpython/time.pxd":122
 *     result = libc_localtime(&tic)
 *     if result is NULL:
 *         _raise_from_errno()             # <<<<<<<<<<<<<<
 *     # Fix 0-based date values (and the 1900-based year).
 *     # See tmtotuple() in https://github.com/python/cpython/blob/master/Modules/timemodule.c
*/
    __pyx_t_2 = __pyx_f_7cpython_4time__raise_from_errno(); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(4, 122, __pyx_L1_error)

    /* "cpython/time.pxd":121
 * 
 *     result = libc_localtime(&tic)
 *     if result is NULL:             # <<<<<<<<<<<<<<
 *         _raise_from_errno()
 *     # Fix 0-based date values (and the 1900-based year).
*/
  }

  /* "cpython/time.pxd":125
 *     # Fix 0-based date values (and the 1900-based year).
 *     # See tmtotuple() in https://github.com/python/cpython/blob/master/Modules/timemodule.c
 *     result.tm_year += 1900             # <<<<<<<<<<<<<<
 *     result.tm_mon += 1
 *     result.tm_wday = <int> ((result.tm_wday + 6) % 7)
*/
  __pyx_v_result->tm_year = (__pyx_v_result->tm_year + 0x76C);

  /* "cpython/time.pxd":126
 *     # See tmtotuple() in https://github.com/python/cpython/blob/master/Modules/timemodule.c
 *     result.tm_year += 1900
 *     result.tm_mon += 1             # <<<<<<<<<<<<<<
 *     result.tm_wday = <int> ((result.tm_wday + 6) % 7)
 *     result.tm_yday += 1
*/
  __pyx_v_result->tm_mon = (__pyx_v_result->tm_mon + 1);

  /* "cpython/time.pxd":127
 *     result.tm_year += 1900
 *     result.tm_mon += 1
 *     result.tm_wday = <int> ((result.tm_wday + 6) % 7)             # <<<<<<<<<<<<<<
 *     result.tm_yday += 1
 *     return result[0]
*/
  __pyx_v_result->tm_wday = ((int)__Pyx_mod_long((__pyx_v_result->tm_wday + 6), 7, 1));

  /* "cpython/time.pxd":128
 *     result.tm_mon += 1
 *     result.tm_wday = <int> ((result.tm_wday + 6) % 7)
 *     result.tm_yday += 1             # <<<<<<<<<<<<<<
 *     return result[0]
*/
  __pyx_v_result->tm_yday = (__pyx_v_result->tm_yday + 1);

  /* "cpython/time.pxd":129
 *     result.tm_wday = <int> ((result.tm_wday + 6) % 7)
 *     result.tm_yday += 1
 *     return result[0]             # <<<<<<<<<<<<<<
*/
  __pyx_r = (__pyx_v_result[0]);
  goto __pyx_L0;

  /* "cpython/time.pxd":111
 * 
 * 
 * cdef inline tm localtime() except * nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Analogue to the stdlib time.localtime.  The returned struct
*/

  /* function exit code */
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_AddTraceback("cpython.time.localtime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":181
 * 
 * # Math -------------------------------------------------------------------------------------------------
 * cdef inline long long math_mod(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Compute module with Python semantics `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_math_mod(PY_LONG_LONG __pyx_v_num, PY_LONG_LONG __pyx_v_div, struct __pyx_opt_args_7cytimes_5utils_math_mod *__pyx_optional_args) {
  PY_LONG_LONG __pyx_v_offset = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("math_mod", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
    }
  }

  /* "utils.pxd":193
 *     >>> (num % div) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_mod: division by zero.")
 *     if div == 1 or div == -1:
*/
  __pyx_t_1 = (__pyx_v_div == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":194
 *     """
 *     if div == 0:
 *         raise ZeroDivisionError("math_mod: division by zero.")             # <<<<<<<<<<<<<<
 *     if div == 1 or div == -1:
 *         return offset
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_mod_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 194, __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_ERR(5, 194, __pyx_L1_error)

    /* "utils.pxd":193
 *     >>> (num % div) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_mod: division by zero.")
 *     if div == 1 or div == -1:
*/
  }

  /* "utils.pxd":195
 *     if div == 0:
 *         raise ZeroDivisionError("math_mod: division by zero.")
 *     if div == 1 or div == -1:             # <<<<<<<<<<<<<<
 *         return offset
 * 
*/
  switch (__pyx_v_div) {
    case 1:
    case -1LL:

    /* "utils.pxd":196
 *         raise ZeroDivisionError("math_mod: division by zero.")
 *     if div == 1 or div == -1:
 *         return offset             # <<<<<<<<<<<<<<
 * 
 *     cdef long long r
*/
    __pyx_r = __pyx_v_offset;
    goto __pyx_L0;

    /* "utils.pxd":195
 *     if div == 0:
 *         raise ZeroDivisionError("math_mod: division by zero.")
 *     if div == 1 or div == -1:             # <<<<<<<<<<<<<<
 *         return offset
 * 
*/
    break;
    default: break;
  }

  /* "utils.pxd":200
 *     cdef long long r
 *     with cython.cdivision(True):
 *         r = num % div             # <<<<<<<<<<<<<<
 *     if r == 0:
 *         return offset
*/
  __pyx_v_r = (__pyx_v_num % __pyx_v_div);

  /* "utils.pxd":201
 *     with cython.cdivision(True):
 *         r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return offset
 *     if (r ^ div) < 0:  # different signs  adjust
*/
  __pyx_t_1 = (__pyx_v_r == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":202
 *         r = num % div
 *     if r == 0:
 *         return offset             # <<<<<<<<<<<<<<
 *     if (r ^ div) < 0:  # different signs  adjust
 *         r += div
*/
    __pyx_r = __pyx_v_offset;
    goto __pyx_L0;

    /* "utils.pxd":201
 *     with cython.cdivision(True):
 *         r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return offset
 *     if (r ^ div) < 0:  # different signs  adjust
*/
  }

  /* "utils.pxd":203
 *     if r == 0:
 *         return offset
 *     if (r ^ div) < 0:  # different signs  adjust             # <<<<<<<<<<<<<<
 *         r += div
 *     return r + offset
*/
  __pyx_t_1 = ((__pyx_v_r ^ __pyx_v_div) < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":204
 *         return offset
 *     if (r ^ div) < 0:  # different signs  adjust
 *         r += div             # <<<<<<<<<<<<<<
 *     return r + offset
 * 
*/
    __pyx_v_r = (__pyx_v_r + __pyx_v_div);

    /* "utils.pxd":203
 *     if r == 0:
 *         return offset
 *     if (r ^ div) < 0:  # different signs  adjust             # <<<<<<<<<<<<<<
 *         r += div
 *     return r + offset
*/
  }

  /* "utils.pxd":205
 *     if (r ^ div) < 0:  # different signs  adjust
 *         r += div
 *     return r + offset             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long math_div_even(long long num, long long div, long long offset=0) except *:
*/
  __pyx_r = (__pyx_v_r + __pyx_v_offset);
  goto __pyx_L0;

  /* "utils.pxd":181
 * 
 * # Math -------------------------------------------------------------------------------------------------
 * cdef inline long long math_mod(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Compute module with Python semantics `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.math_mod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":207
 *     return r + offset
 * 
 * cdef inline long long math_div_even(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then round to nearest, ties-to-even (bankers' rounding) `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_math_div_even(PY_LONG_LONG __pyx_v_num, PY_LONG_LONG __pyx_v_div, struct __pyx_opt_args_7cytimes_5utils_math_div_even *__pyx_optional_args) {
  PY_LONG_LONG __pyx_v_offset = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_v_abs_f;
  PY_LONG_LONG __pyx_v_abs_r;
  PY_LONG_LONG __pyx_v_half;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  PY_LONG_LONG __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("math_div_even", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
    }
  }

  /* "utils.pxd":220
 *     >>> round(num / div, 0) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_even: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  __pyx_t_1 = (__pyx_v_div == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":221
 *     """
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_even: division by zero.")             # <<<<<<<<<<<<<<
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_even: result does not fit in signed 64-bit")
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_even_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 221, __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_ERR(5, 221, __pyx_L1_error)

    /* "utils.pxd":220
 *     >>> round(num / div, 0) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_even: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  }

  /* "utils.pxd":222
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_even: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_even: result does not fit in signed 64-bit")
 * 
*/
  __pyx_t_5 = (__pyx_v_div == -1LL);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_num == LLONG_MIN);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L5_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":223
 *         raise ZeroDivisionError("math_div_even: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_even: result does not fit in signed 64-bit")             # <<<<<<<<<<<<<<
 * 
 *     cdef long long q, r
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_even_result_does_not_fi};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 223, __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_ERR(5, 223, __pyx_L1_error)

    /* "utils.pxd":222
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_even: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_even: result does not fit in signed 64-bit")
 * 
*/
  }

  /* "utils.pxd":227
 *     cdef long long q, r
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div             # <<<<<<<<<<<<<<
 *     if r == 0:
 *         return q + offset          # exact division
*/
  __pyx_v_q = (__pyx_v_num / __pyx_v_div);
  __pyx_v_r = (__pyx_v_num % __pyx_v_div);

  /* "utils.pxd":228
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset          # exact division
 * 
*/
  __pyx_t_1 = (__pyx_v_r == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":229
 *         q = num / div; r = num % div
 *     if r == 0:
 *         return q + offset          # exact division             # <<<<<<<<<<<<<<
 * 
 *     cdef:
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":228
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset          # exact division
 * 
*/
  }

  /* "utils.pxd":232
 * 
 *     cdef:
 *         long long abs_f = -div if div < 0 else div             # <<<<<<<<<<<<<<
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r
*/
  __pyx_t_1 = (__pyx_v_div < 0);
  if (__pyx_t_1) {
    __pyx_t_6 = (-__pyx_v_div);
  } else {
    __pyx_t_6 = __pyx_v_div;
  }
  __pyx_v_abs_f = __pyx_t_6;

  /* "utils.pxd":233
 *     cdef:
 *         long long abs_f = -div if div < 0 else div
 *         long long abs_r = -r if r < 0 else r             # <<<<<<<<<<<<<<
 *         long long half  = abs_f - abs_r
 *     if abs_r > half or (abs_r == half and (q & 1) != 0):
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {
    __pyx_t_6 = (-__pyx_v_r);
  } else {
    __pyx_t_6 = __pyx_v_r;
  }
  __pyx_v_abs_r = __pyx_t_6;

  /* "utils.pxd":234
 *         long long abs_f = -div if div < 0 else div
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r             # <<<<<<<<<<<<<<
 *     if abs_r > half or (abs_r == half and (q & 1) != 0):
 *         if (num ^ div) < 0:
*/
  __pyx_v_half = (__pyx_v_abs_f - __pyx_v_abs_r);

  /* "utils.pxd":235
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r
 *     if abs_r > half or (abs_r == half and (q & 1) != 0):             # <<<<<<<<<<<<<<
 *         if (num ^ div) < 0:
 *             q -= 1  # different signs  bump down
*/
  __pyx_t_5 = (__pyx_v_abs_r > __pyx_v_half);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_abs_r == __pyx_v_half);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_5 = ((__pyx_v_q & 1) != 0);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L9_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":236
 *         long long half  = abs_f - abs_r
 *     if abs_r > half or (abs_r == half and (q & 1) != 0):
 *         if (num ^ div) < 0:             # <<<<<<<<<<<<<<
 *             q -= 1  # different signs  bump down
 *         else:
*/
    __pyx_t_1 = ((__pyx_v_num ^ __pyx_v_div) < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":237
 *     if abs_r > half or (abs_r == half and (q & 1) != 0):
 *         if (num ^ div) < 0:
 *             q -= 1  # different signs  bump down             # <<<<<<<<<<<<<<
 *         else:
 *             q += 1  # same sign  bump up
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":236
 *         long long half  = abs_f - abs_r
 *     if abs_r > half or (abs_r == half and (q & 1) != 0):
 *         if (num ^ div) < 0:             # <<<<<<<<<<<<<<
 *             q -= 1  # different signs  bump down
 *         else:
*/
      goto __pyx_L12;
    }

    /* "utils.pxd":239
 *             q -= 1  # different signs  bump down
 *         else:
 *             q += 1  # same sign  bump up             # <<<<<<<<<<<<<<
 *     return q + offset
 * 
*/
    /*else*/ {
      __pyx_v_q = (__pyx_v_q + 1);
    }
    __pyx_L12:;

    /* "utils.pxd":235
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r
 *     if abs_r > half or (abs_r == half and (q & 1) != 0):             # <<<<<<<<<<<<<<
 *         if (num ^ div) < 0:
 *             q -= 1  # different signs  bump down
*/
  }

  /* "utils.pxd":240
 *         else:
 *             q += 1  # same sign  bump up
 *     return q + offset             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long math_div_up(long long num, long long div, long long offset=0) except *:
*/
  __pyx_r = (__pyx_v_q + __pyx_v_offset);
  goto __pyx_L0;

  /* "utils.pxd":207
 *     return r + offset
 * 
 * cdef inline long long math_div_even(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then round to nearest, ties-to-even (bankers' rounding) `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.math_div_even", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":242
 *     return q + offset
 * 
 * cdef inline long long math_div_up(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then round half away from zero (round-half-up) `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_math_div_up(PY_LONG_LONG __pyx_v_num, PY_LONG_LONG __pyx_v_div, struct __pyx_opt_args_7cytimes_5utils_math_div_up *__pyx_optional_args) {
  PY_LONG_LONG __pyx_v_offset = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_v_abs_f;
  PY_LONG_LONG __pyx_v_abs_r;
  PY_LONG_LONG __pyx_v_half;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  PY_LONG_LONG __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("math_div_up", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
    }
  }

  /* "utils.pxd":255
 *     >>> (Decimal(num) / Decimal(div)).to_integral_value(rounding=ROUND_HALF_UP) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_up: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  __pyx_t_1 = (__pyx_v_div == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":256
 *     """
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_up: division by zero.")             # <<<<<<<<<<<<<<
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_up: result does not fit in signed 64-bit")
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_up_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 256, __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_ERR(5, 256, __pyx_L1_error)

    /* "utils.pxd":255
 *     >>> (Decimal(num) / Decimal(div)).to_integral_value(rounding=ROUND_HALF_UP) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_up: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  }

  /* "utils.pxd":257
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_up: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_up: result does not fit in signed 64-bit")
 * 
*/
  __pyx_t_5 = (__pyx_v_div == -1LL);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_num == LLONG_MIN);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L5_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":258
 *         raise ZeroDivisionError("math_div_up: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_up: result does not fit in signed 64-bit")             # <<<<<<<<<<<<<<
 * 
 *     cdef long long q, r
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_up_result_does_not_fit};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 258, __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_ERR(5, 258, __pyx_L1_error)

    /* "utils.pxd":257
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_up: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_up: result does not fit in signed 64-bit")
 * 
*/
  }

  /* "utils.pxd":262
 *     cdef long long q, r
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div             # <<<<<<<<<<<<<<
 *     if r == 0:
 *         return q + offset        # exact division
*/
  __pyx_v_q = (__pyx_v_num / __pyx_v_div);
  __pyx_v_r = (__pyx_v_num % __pyx_v_div);

  /* "utils.pxd":263
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset        # exact division
 * 
*/
  __pyx_t_1 = (__pyx_v_r == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":264
 *         q = num / div; r = num % div
 *     if r == 0:
 *         return q + offset        # exact division             # <<<<<<<<<<<<<<
 * 
 *     cdef:
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":263
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset        # exact division
 * 
*/
  }

  /* "utils.pxd":267
 * 
 *     cdef:
 *         long long abs_f = -div if div < 0 else div             # <<<<<<<<<<<<<<
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r
*/
  __pyx_t_1 = (__pyx_v_div < 0);
  if (__pyx_t_1) {
    __pyx_t_6 = (-__pyx_v_div);
  } else {
    __pyx_t_6 = __pyx_v_div;
  }
  __pyx_v_abs_f = __pyx_t_6;

  /* "utils.pxd":268
 *     cdef:
 *         long long abs_f = -div if div < 0 else div
 *         long long abs_r = -r if r < 0 else r             # <<<<<<<<<<<<<<
 *         long long half  = abs_f - abs_r
 *     if abs_r >= half:
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {
    __pyx_t_6 = (-__pyx_v_r);
  } else {
    __pyx_t_6 = __pyx_v_r;
  }
  __pyx_v_abs_r = __pyx_t_6;

  /* "utils.pxd":269
 *         long long abs_f = -div if div < 0 else div
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r             # <<<<<<<<<<<<<<
 *     if abs_r >= half:
 *         if (num ^ div) < 0:
*/
  __pyx_v_half = (__pyx_v_abs_f - __pyx_v_abs_r);

  /* "utils.pxd":270
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r
 *     if abs_r >= half:             # <<<<<<<<<<<<<<
 *         if (num ^ div) < 0:
 *             q -= 1  # different signs  bump down
*/
  __pyx_t_1 = (__pyx_v_abs_r >= __pyx_v_half);
  if (__pyx_t_1) {

    /* "utils.pxd":271
 *         long long half  = abs_f - abs_r
 *     if abs_r >= half:
 *         if (num ^ div) < 0:             # <<<<<<<<<<<<<<
 *             q -= 1  # different signs  bump down
 *         else:
*/
    __pyx_t_1 = ((__pyx_v_num ^ __pyx_v_div) < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":272
 *     if abs_r >= half:
 *         if (num ^ div) < 0:
 *             q -= 1  # different signs  bump down             # <<<<<<<<<<<<<<
 *         else:
 *             q += 1  # same sign  bump up
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":271
 *         long long half  = abs_f - abs_r
 *     if abs_r >= half:
 *         if (num ^ div) < 0:             # <<<<<<<<<<<<<<
 *             q -= 1  # different signs  bump down
 *         else:
*/
      goto __pyx_L9;
    }

    /* "utils.pxd":274
 *             q -= 1  # different signs  bump down
 *         else:
 *             q += 1  # same sign  bump up             # <<<<<<<<<<<<<<
 *     return q + offset
 * 
*/
    /*else*/ {
      __pyx_v_q = (__pyx_v_q + 1);
    }
    __pyx_L9:;

    /* "utils.pxd":270
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r
 *     if abs_r >= half:             # <<<<<<<<<<<<<<
 *         if (num ^ div) < 0:
 *             q -= 1  # different signs  bump down
*/
  }

  /* "utils.pxd":275
 *         else:
 *             q += 1  # same sign  bump up
 *     return q + offset             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long math_div_down(long long num, long long div, long long offset=0) except *:
*/
  __pyx_r = (__pyx_v_q + __pyx_v_offset);
  goto __pyx_L0;

  /* "utils.pxd":242
 *     return q + offset
 * 
 * cdef inline long long math_div_up(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then round half away from zero (round-half-up) `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.math_div_up", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":277
 *     return q + offset
 * 
 * cdef inline long long math_div_down(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then round half toward zero (round-half-down) `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_math_div_down(PY_LONG_LONG __pyx_v_num, PY_LONG_LONG __pyx_v_div, struct __pyx_opt_args_7cytimes_5utils_math_div_down *__pyx_optional_args) {
  PY_LONG_LONG __pyx_v_offset = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_v_abs_f;
  PY_LONG_LONG __pyx_v_abs_r;
  PY_LONG_LONG __pyx_v_half;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  PY_LONG_LONG __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("math_div_down", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
    }
  }

  /* "utils.pxd":290
 *     >>> (Decimal(num) / Decimal(div)).to_integral_value(rounding=ROUND_HALF_DOWN) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_down: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  __pyx_t_1 = (__pyx_v_div == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":291
 *     """
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_down: division by zero.")             # <<<<<<<<<<<<<<
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_down: result does not fit in signed 64-bit")
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_down_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 291, __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_ERR(5, 291, __pyx_L1_error)

    /* "utils.pxd":290
 *     >>> (Decimal(num) / Decimal(div)).to_integral_value(rounding=ROUND_HALF_DOWN) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_down: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  }

  /* "utils.pxd":292
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_down: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_down: result does not fit in signed 64-bit")
 * 
*/
  __pyx_t_5 = (__pyx_v_div == -1LL);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_num == LLONG_MIN);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L5_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":293
 *         raise ZeroDivisionError("math_div_down: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_down: result does not fit in signed 64-bit")             # <<<<<<<<<<<<<<
 * 
 *     cdef long long q, r
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_down_result_does_not_fi};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 293, __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_ERR(5, 293, __pyx_L1_error)

    /* "utils.pxd":292
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_down: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_down: result does not fit in signed 64-bit")
 * 
*/
  }

  /* "utils.pxd":297
 *     cdef long long q, r
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div             # <<<<<<<<<<<<<<
 *     if r == 0:
 *         return q + offset        # exact division
*/
  __pyx_v_q = (__pyx_v_num / __pyx_v_div);
  __pyx_v_r = (__pyx_v_num % __pyx_v_div);

  /* "utils.pxd":298
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset        # exact division
 * 
*/
  __pyx_t_1 = (__pyx_v_r == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":299
 *         q = num / div; r = num % div
 *     if r == 0:
 *         return q + offset        # exact division             # <<<<<<<<<<<<<<
 * 
 *     cdef:
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":298
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset        # exact division
 * 
*/
  }

  /* "utils.pxd":302
 * 
 *     cdef:
 *         long long abs_f = -div if div < 0 else div             # <<<<<<<<<<<<<<
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r
*/
  __pyx_t_1 = (__pyx_v_div < 0);
  if (__pyx_t_1) {
    __pyx_t_6 = (-__pyx_v_div);
  } else {
    __pyx_t_6 = __pyx_v_div;
  }
  __pyx_v_abs_f = __pyx_t_6;

  /* "utils.pxd":303
 *     cdef:
 *         long long abs_f = -div if div < 0 else div
 *         long long abs_r = -r if r < 0 else r             # <<<<<<<<<<<<<<
 *         long long half  = abs_f - abs_r
 *     if abs_r > half:
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {
    __pyx_t_6 = (-__pyx_v_r);
  } else {
    __pyx_t_6 = __pyx_v_r;
  }
  __pyx_v_abs_r = __pyx_t_6;

  /* "utils.pxd":304
 *         long long abs_f = -div if div < 0 else div
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r             # <<<<<<<<<<<<<<
 *     if abs_r > half:
 *         if (num ^ div) < 0:
*/
  __pyx_v_half = (__pyx_v_abs_f - __pyx_v_abs_r);

  /* "utils.pxd":305
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r
 *     if abs_r > half:             # <<<<<<<<<<<<<<
 *         if (num ^ div) < 0:
 *             q -= 1  # different signs  bump down
*/
  __pyx_t_1 = (__pyx_v_abs_r > __pyx_v_half);
  if (__pyx_t_1) {

    /* "utils.pxd":306
 *         long long half  = abs_f - abs_r
 *     if abs_r > half:
 *         if (num ^ div) < 0:             # <<<<<<<<<<<<<<
 *             q -= 1  # different signs  bump down
 *         else:
*/
    __pyx_t_1 = ((__pyx_v_num ^ __pyx_v_div) < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":307
 *     if abs_r > half:
 *         if (num ^ div) < 0:
 *             q -= 1  # different signs  bump down             # <<<<<<<<<<<<<<
 *         else:
 *             q += 1  # same sign  bump up
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":306
 *         long long half  = abs_f - abs_r
 *     if abs_r > half:
 *         if (num ^ div) < 0:             # <<<<<<<<<<<<<<
 *             q -= 1  # different signs  bump down
 *         else:
*/
      goto __pyx_L9;
    }

    /* "utils.pxd":309
 *             q -= 1  # different signs  bump down
 *         else:
 *             q += 1  # same sign  bump up             # <<<<<<<<<<<<<<
 *     return q + offset
 * 
*/
    /*else*/ {
      __pyx_v_q = (__pyx_v_q + 1);
    }
    __pyx_L9:;

    /* "utils.pxd":305
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r
 *     if abs_r > half:             # <<<<<<<<<<<<<<
 *         if (num ^ div) < 0:
 *             q -= 1  # different signs  bump down
*/
  }

  /* "utils.pxd":310
 *         else:
 *             q += 1  # same sign  bump up
 *     return q + offset             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long math_div_ceil(long long num, long long div, long long offset=0) except *:
*/
  __pyx_r = (__pyx_v_q + __pyx_v_offset);
  goto __pyx_L0;

  /* "utils.pxd":277
 *     return q + offset
 * 
 * cdef inline long long math_div_down(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then round half toward zero (round-half-down) `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.math_div_down", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":312
 *     return q + offset
 * 
 * cdef inline long long math_div_ceil(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then take the mathematical ceiling `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_math_div_ceil(PY_LONG_LONG __pyx_v_num, PY_LONG_LONG __pyx_v_div, struct __pyx_opt_args_7cytimes_5utils_math_div_ceil *__pyx_optional_args) {
  PY_LONG_LONG __pyx_v_offset = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("math_div_ceil", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
    }
  }

  /* "utils.pxd":325
 *     >>> math.ceil(num / div) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_ceil: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  __pyx_t_1 = (__pyx_v_div == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":326
 *     """
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_ceil: division by zero.")             # <<<<<<<<<<<<<<
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_ceil: result does not fit in signed 64-bit")
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_ceil_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 326, __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_ERR(5, 326, __pyx_L1_error)

    /* "utils.pxd":325
 *     >>> math.ceil(num / div) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_ceil: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  }

  /* "utils.pxd":327
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_ceil: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_ceil: result does not fit in signed 64-bit")
 * 
*/
  __pyx_t_5 = (__pyx_v_div == -1LL);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_num == LLONG_MIN);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L5_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":328
 *         raise ZeroDivisionError("math_div_ceil: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_ceil: result does not fit in signed 64-bit")             # <<<<<<<<<<<<<<
 * 
 *     cdef long long q, r
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_ceil_result_does_not_fi};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 328, __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_ERR(5, 328, __pyx_L1_error)

    /* "utils.pxd":327
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_ceil: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_ceil: result does not fit in signed 64-bit")
 * 
*/
  }

  /* "utils.pxd":332
 *     cdef long long q, r
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div             # <<<<<<<<<<<<<<
 *     if r == 0:
 *         return q + offset         # exact division
*/
  __pyx_v_q = (__pyx_v_num / __pyx_v_div);
  __pyx_v_r = (__pyx_v_num % __pyx_v_div);

  /* "utils.pxd":333
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset         # exact division
 * 
*/
  __pyx_t_1 = (__pyx_v_r == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":334
 *         q = num / div; r = num % div
 *     if r == 0:
 *         return q + offset         # exact division             # <<<<<<<<<<<<<<
 * 
 *     if (num ^ div) >= 0:  # same sign  bump up
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":333
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset         # exact division
 * 
*/
  }

  /* "utils.pxd":336
 *         return q + offset         # exact division
 * 
 *     if (num ^ div) >= 0:  # same sign  bump up             # <<<<<<<<<<<<<<
 *         q += 1
 *     return q + offset
*/
  __pyx_t_1 = ((__pyx_v_num ^ __pyx_v_div) >= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":337
 * 
 *     if (num ^ div) >= 0:  # same sign  bump up
 *         q += 1             # <<<<<<<<<<<<<<
 *     return q + offset
 * 
*/
    __pyx_v_q = (__pyx_v_q + 1);

    /* "utils.pxd":336
 *         return q + offset         # exact division
 * 
 *     if (num ^ div) >= 0:  # same sign  bump up             # <<<<<<<<<<<<<<
 *         q += 1
 *     return q + offset
*/
  }

  /* "utils.pxd":338
 *     if (num ^ div) >= 0:  # same sign  bump up
 *         q += 1
 *     return q + offset             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long math_div_floor(long long num, long long div, long long offset=0) except *:
*/
  __pyx_r = (__pyx_v_q + __pyx_v_offset);
  goto __pyx_L0;

  /* "utils.pxd":312
 *     return q + offset
 * 
 * cdef inline long long math_div_ceil(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then take the mathematical ceiling `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.math_div_ceil", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":340
 *     return q + offset
 * 
 * cdef inline long long math_div_floor(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then take the mathematical floor `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_math_div_floor(PY_LONG_LONG __pyx_v_num, PY_LONG_LONG __pyx_v_div, struct __pyx_opt_args_7cytimes_5utils_math_div_floor *__pyx_optional_args) {
  PY_LONG_LONG __pyx_v_offset = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("math_div_floor", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
    }
  }

  /* "utils.pxd":353
 *     >>> math.floor(num / div) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_floor: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  __pyx_t_1 = (__pyx_v_div == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":354
 *     """
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_floor: division by zero.")             # <<<<<<<<<<<<<<
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_floor: result does not fit in signed 64-bit")
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_floor_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 354, __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_ERR(5, 354, __pyx_L1_error)

    /* "utils.pxd":353
 *     >>> math.floor(num / div) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_floor: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  }

  /* "utils.pxd":355
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_floor: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_floor: result does not fit in signed 64-bit")
 * 
*/
  __pyx_t_5 = (__pyx_v_div == -1LL);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_num == LLONG_MIN);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L5_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":356
 *         raise ZeroDivisionError("math_div_floor: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_floor: result does not fit in signed 64-bit")             # <<<<<<<<<<<<<<
 * 
 *     cdef long long q, r
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_floor_result_does_not_f};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 356, __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_ERR(5, 356, __pyx_L1_error)

    /* "utils.pxd":355
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_floor: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_floor: result does not fit in signed 64-bit")
 * 
*/
  }

  /* "utils.pxd":360
 *     cdef long long q, r
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div             # <<<<<<<<<<<<<<
 *     if r == 0:
 *         return q + offset         # exact division
*/
  __pyx_v_q = (__pyx_v_num / __pyx_v_div);
  __pyx_v_r = (__pyx_v_num % __pyx_v_div);

  /* "utils.pxd":361
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset         # exact division
 * 
*/
  __pyx_t_1 = (__pyx_v_r == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":362
 *         q = num / div; r = num % div
 *     if r == 0:
 *         return q + offset         # exact division             # <<<<<<<<<<<<<<
 * 
 *     if (num ^ div) < 0:        # different sign  bump down
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":361
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset         # exact division
 * 
*/
  }

  /* "utils.pxd":364
 *         return q + offset         # exact division
 * 
 *     if (num ^ div) < 0:        # different sign  bump down             # <<<<<<<<<<<<<<
 *         q -= 1
 *     return q + offset
*/
  __pyx_t_1 = ((__pyx_v_num ^ __pyx_v_div) < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":365
 * 
 *     if (num ^ div) < 0:        # different sign  bump down
 *         q -= 1             # <<<<<<<<<<<<<<
 *     return q + offset
 * 
*/
    __pyx_v_q = (__pyx_v_q - 1);

    /* "utils.pxd":364
 *         return q + offset         # exact division
 * 
 *     if (num ^ div) < 0:        # different sign  bump down             # <<<<<<<<<<<<<<
 *         q -= 1
 *     return q + offset
*/
  }

  /* "utils.pxd":366
 *     if (num ^ div) < 0:        # different sign  bump down
 *         q -= 1
 *     return q + offset             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long math_div_trunc(long long num, long long div, long long offset=0) except *:
*/
  __pyx_r = (__pyx_v_q + __pyx_v_offset);
  goto __pyx_L0;

  /* "utils.pxd":340
 *     return q + offset
 * 
 * cdef inline long long math_div_floor(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then take the mathematical floor `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.math_div_floor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":368
 *     return q + offset
 * 
 * cdef inline long long math_div_trunc(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide and truncate toward zero (C/CPython style) `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_math_div_trunc(PY_LONG_LONG __pyx_v_num, PY_LONG_LONG __pyx_v_div, struct __pyx_opt_args_7cytimes_5utils_math_div_trunc *__pyx_optional_args) {
  PY_LONG_LONG __pyx_v_offset = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("math_div_trunc", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
    }
  }

  /* "utils.pxd":378
 *     :raises `<'OverflowError'>`: When the result does not fit in signed 64-bit.
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_trunc: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  __pyx_t_1 = (__pyx_v_div == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":379
 *     """
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_trunc: division by zero.")             # <<<<<<<<<<<<<<
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_trunc: result does not fit in signed 64-bit")
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_trunc_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 379, __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_ERR(5, 379, __pyx_L1_error)

    /* "utils.pxd":378
 *     :raises `<'OverflowError'>`: When the result does not fit in signed 64-bit.
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_trunc: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  }

  /* "utils.pxd":380
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_trunc: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_trunc: result does not fit in signed 64-bit")
 * 
*/
  __pyx_t_5 = (__pyx_v_div == -1LL);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_num == LLONG_MIN);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L5_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":381
 *         raise ZeroDivisionError("math_div_trunc: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_trunc: result does not fit in signed 64-bit")             # <<<<<<<<<<<<<<
 * 
 *     cdef long long q
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_trunc_result_does_not_f};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 381, __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_ERR(5, 381, __pyx_L1_error)

    /* "utils.pxd":380
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_trunc: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_trunc: result does not fit in signed 64-bit")
 * 
*/
  }

  /* "utils.pxd":385
 *     cdef long long q
 *     with cython.cdivision(True):
 *         q = num / div          # truncates toward zero             # <<<<<<<<<<<<<<
 *     return q + offset
 * 
*/
  __pyx_v_q = (__pyx_v_num / __pyx_v_div);

  /* "utils.pxd":386
 *     with cython.cdivision(True):
 *         q = num / div          # truncates toward zero
 *     return q + offset             # <<<<<<<<<<<<<<
 * 
 * cdef inline unsigned long long abs_diff_ull(long long a, long long b) noexcept nogil:
*/
  __pyx_r = (__pyx_v_q + __pyx_v_offset);
  goto __pyx_L0;

  /* "utils.pxd":368
 *     return q + offset
 * 
 * cdef inline long long math_div_trunc(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide and truncate toward zero (C/CPython style) `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.math_div_trunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":388
 *     return q + offset
 * 
 * cdef inline unsigned long long abs_diff_ull(long long a, long long b) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return |a - b| as uint64 using unsigned arithmetic `<'int'>`.
 * 
*/

static CYTHON_INLINE unsigned PY_LONG_LONG __pyx_f_7cytimes_5utils_abs_diff_ull(PY_LONG_LONG __pyx_v_a, PY_LONG_LONG __pyx_v_b) {
  unsigned PY_LONG_LONG __pyx_v_ua;
  unsigned PY_LONG_LONG __pyx_v_ub;
  unsigned PY_LONG_LONG __pyx_r;
  unsigned PY_LONG_LONG __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":393
 *     Safe for all long long pairs (avoids signed overflow/UB near LLONG_MIN/LLONG_MAX).
 *     """
 *     cdef unsigned long long ua = <unsigned long long> a             # <<<<<<<<<<<<<<
 *     cdef unsigned long long ub = <unsigned long long> b
 *     return ua - ub if a >= b else ub - ua
*/
  __pyx_v_ua = ((unsigned PY_LONG_LONG)__pyx_v_a);

  /* "utils.pxd":394
 *     """
 *     cdef unsigned long long ua = <unsigned long long> a
 *     cdef unsigned long long ub = <unsigned long long> b             # <<<<<<<<<<<<<<
 *     return ua - ub if a >= b else ub - ua
 * 
*/
  __pyx_v_ub = ((unsigned PY_LONG_LONG)__pyx_v_b);

  /* "utils.pxd":395
 *     cdef unsigned long long ua = <unsigned long long> a
 *     cdef unsigned long long ub = <unsigned long long> b
 *     return ua - ub if a >= b else ub - ua             # <<<<<<<<<<<<<<
 * 
 * # Parser -----------------------------------------------------------------------------------------------
*/
  __pyx_t_2 = (__pyx_v_a >= __pyx_v_b);
  if (__pyx_t_2) {
    __pyx_t_1 = (__pyx_v_ua - __pyx_v_ub);
  } else {
    __pyx_t_1 = (__pyx_v_ub - __pyx_v_ua);
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":388
 *     return q + offset
 * 
 * cdef inline unsigned long long abs_diff_ull(long long a, long long b) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return |a - b| as uint64 using unsigned arithmetic `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":399
 * # Parser -----------------------------------------------------------------------------------------------
 * # . check: character
 * cdef inline bint is_dot(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a dot `'.'` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_dot(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;

  /* "utils.pxd":404
 *     - Dot: `'.'` (46)
 *     """
 *     return ch == 46             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_comma(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_r = (__pyx_v_ch == 46);
  goto __pyx_L0;

  /* "utils.pxd":399
 * # Parser -----------------------------------------------------------------------------------------------
 * # . check: character
 * cdef inline bint is_dot(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a dot `'.'` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":406
 *     return ch == 46
 * 
 * cdef inline bint is_comma(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a comma `','` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_comma(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;

  /* "utils.pxd":411
 *     - Comma: `','` (44)
 *     """
 *     return ch == 44             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_plus_sign(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_r = (__pyx_v_ch == 44);
  goto __pyx_L0;

  /* "utils.pxd":406
 *     return ch == 46
 * 
 * cdef inline bint is_comma(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a comma `','` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":413
 *     return ch == 44
 * 
 * cdef inline bint is_plus_sign(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a plus sign `'+'` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_plus_sign(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;

  /* "utils.pxd":418
 *     - Plus sign: `'+'` (43)
 *     """
 *     return ch == 43             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_minus_sign(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_r = (__pyx_v_ch == 43);
  goto __pyx_L0;

  /* "utils.pxd":413
 *     return ch == 44
 * 
 * cdef inline bint is_plus_sign(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a plus sign `'+'` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":420
 *     return ch == 43
 * 
 * cdef inline bint is_minus_sign(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a minus sign `'-'` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_minus_sign(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;

  /* "utils.pxd":425
 *     - Minus sign: `'-'` (45)
 *     """
 *     return ch == 45             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_plus_or_minus_sign(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_r = (__pyx_v_ch == 45);
  goto __pyx_L0;

  /* "utils.pxd":420
 *     return ch == 43
 * 
 * cdef inline bint is_minus_sign(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a minus sign `'-'` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":427
 *     return ch == 45
 * 
 * cdef inline bint is_plus_or_minus_sign(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a plus or minus sign `'-'` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_plus_or_minus_sign(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":433
 *     - Minus sign: `'-'` (45)
 *     """
 *     return is_plus_sign(ch) or is_minus_sign(ch)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_iso_sep(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_t_2 = __pyx_f_7cytimes_5utils_is_plus_sign(__pyx_v_ch);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = __pyx_f_7cytimes_5utils_is_minus_sign(__pyx_v_ch);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":427
 *     return ch == 45
 * 
 * cdef inline bint is_plus_or_minus_sign(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a plus or minus sign `'-'` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":435
 *     return is_plus_sign(ch) or is_minus_sign(ch)
 * 
 * cdef inline bint is_iso_sep(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is an ISO 8601 date-time separator `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_iso_sep(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":440
 *     - Date / Time separators: `' '` (32) or `'T'` (case-insensitive: 84 & 116).
 *     """
 *     return ch == 32 or ch == 84 or ch == 116             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_date_sep(Py_UCS4 ch) noexcept nogil:
*/
  switch (__pyx_v_ch) {
    case 32:
    case 84:
    case 0x74:
    __pyx_t_1 = 1;
    break;
    default:
    __pyx_t_1 = 0;
    break;
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":435
 *     return is_plus_sign(ch) or is_minus_sign(ch)
 * 
 * cdef inline bint is_iso_sep(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is an ISO 8601 date-time separator `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":442
 *     return ch == 32 or ch == 84 or ch == 116
 * 
 * cdef inline bint is_date_sep(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a date-field seperator `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_date_sep(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":447
 *     - Date-field separators: `'-'` (45), `'.'` (46) or `'/'` (47)
 *     """
 *     return 45 <= ch <= 47             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_time_sep(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_t_1 = (45 <= __pyx_v_ch);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_ch <= 47);
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":442
 *     return ch == 32 or ch == 84 or ch == 116
 * 
 * cdef inline bint is_date_sep(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a date-field seperator `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":449
 *     return 45 <= ch <= 47
 * 
 * cdef inline bint is_time_sep(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is the time-field separator `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_time_sep(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;

  /* "utils.pxd":454
 *     - Time-field seperator: `':'` (58)
 *     """
 *     return ch == 58             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_isoweek_sep(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_r = (__pyx_v_ch == 58);
  goto __pyx_L0;

  /* "utils.pxd":449
 *     return 45 <= ch <= 47
 * 
 * cdef inline bint is_time_sep(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is the time-field separator `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":456
 *     return ch == 58
 * 
 * cdef inline bint is_isoweek_sep(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is the ISO week designator `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_isoweek_sep(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":461
 *     - ISO week designator: `'W'` (case-insensitive: 87 & 119).
 *     """
 *     return ch == 87 or ch == 119             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_ascii_ctl(Py_UCS4 ch) noexcept nogil:
*/
  switch (__pyx_v_ch) {
    case 87:
    case 0x77:
    __pyx_t_1 = 1;
    break;
    default:
    __pyx_t_1 = 0;
    break;
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":456
 *     return ch == 58
 * 
 * cdef inline bint is_isoweek_sep(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is the ISO week designator `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":463
 *     return ch == 87 or ch == 119
 * 
 * cdef inline bint is_ascii_ctl(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a control charactor `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_ctl(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":468
 *     - ASCII control characters (0-31) and (127)
 *     """
 *     return ch <= 31 or ch == 127             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_ascii_ctl_or_space(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_t_2 = (__pyx_v_ch <= 31);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_ch == 0x7F);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":463
 *     return ch == 87 or ch == 119
 * 
 * cdef inline bint is_ascii_ctl(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a control charactor `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":470
 *     return ch <= 31 or ch == 127
 * 
 * cdef inline bint is_ascii_ctl_or_space(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a control or space charactor `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_ctl_or_space(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":476
 *     - ASCII space character: (32)
 *     """
 *     return ch <= 32 or ch == 127             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_ascii_digit(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_t_2 = (__pyx_v_ch <= 32);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_ch == 0x7F);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":470
 *     return ch <= 31 or ch == 127
 * 
 * cdef inline bint is_ascii_ctl_or_space(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a control or space charactor `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":478
 *     return ch <= 32 or ch == 127
 * 
 * cdef inline bint is_ascii_digit(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is an ASCII digit `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_digit(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":483
 *     - ASSCI digits: `'0'` (48) ... `'9'` (57)
 *     """
 *     return 48 <= ch <= 57             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_ascii_letter_upper(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_t_1 = (48 <= __pyx_v_ch);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_ch <= 57);
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":478
 *     return ch <= 32 or ch == 127
 * 
 * cdef inline bint is_ascii_digit(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is an ASCII digit `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":485
 *     return 48 <= ch <= 57
 * 
 * cdef inline bint is_ascii_letter_upper(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is an uppercase ASCII letter `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_letter_upper(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":490
 *     - Uppercase ASCII letters: `'A'` (65) ... `'Z'` (90)
 *     """
 *     return 65 <= ch <= 90             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_ascii_letter_lower(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_t_1 = (65 <= __pyx_v_ch);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_ch <= 90);
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":485
 *     return 48 <= ch <= 57
 * 
 * cdef inline bint is_ascii_letter_upper(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is an uppercase ASCII letter `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":492
 *     return 65 <= ch <= 90
 * 
 * cdef inline bint is_ascii_letter_lower(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a lowercase ASCII letter `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_letter_lower(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":497
 *     - Lowercase ASCII letters: `'a'` (97) ... `'z'` (122)
 *     """
 *     return 97 <= ch <= 122             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_ascii_letter(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_t_1 = (97 <= __pyx_v_ch);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_ch <= 0x7A);
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":492
 *     return 65 <= ch <= 90
 * 
 * cdef inline bint is_ascii_letter_lower(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a lowercase ASCII letter `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":499
 *     return 97 <= ch <= 122
 * 
 * cdef inline bint is_ascii_letter(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is an ASCII letter (case-insensitive) `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_letter(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":505
 *     - Lowercase ASCII letters: `'a'` (97) ... `'z'` (122)
 *     """
 *     return is_ascii_letter_lower(ch) or is_ascii_letter_upper(ch)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_alpha(Py_UCS4 ch) noexcept:
*/
  __pyx_t_2 = __pyx_f_7cytimes_5utils_is_ascii_letter_lower(__pyx_v_ch);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = __pyx_f_7cytimes_5utils_is_ascii_letter_upper(__pyx_v_ch);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":499
 *     return 97 <= ch <= 122
 * 
 * cdef inline bint is_ascii_letter(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is an ASCII letter (case-insensitive) `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":507
 *     return is_ascii_letter_lower(ch) or is_ascii_letter_upper(ch)
 * 
 * cdef inline bint is_alpha(Py_UCS4 ch) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is an alphabetic character `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_alpha(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "utils.pxd":512
 *     - Uses Unicode definition of alphabetic characters.
 *     """
 *     return True if is_ascii_letter(ch) else ch.isalpha()             # <<<<<<<<<<<<<<
 * 
 * # . check: string
*/
  __pyx_t_2 = __pyx_f_7cytimes_5utils_is_ascii_letter(__pyx_v_ch);
  if (__pyx_t_2) {
    __pyx_t_1 = 1;
  } else {
    __pyx_t_3 = __Pyx_Py_UNICODE_ISALPHA(__pyx_v_ch); 
    __pyx_t_1 = __pyx_t_3;
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":507
 *     return is_ascii_letter_lower(ch) or is_ascii_letter_upper(ch)
 * 
 * cdef inline bint is_alpha(Py_UCS4 ch) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is an alphabetic character `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":515
 * 
 * # . check: string
 * cdef inline bint is_str_dot(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character dot `'.'` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_dot(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_dot *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  int __pyx_r;
  int __pyx_t_1;
  Py_UCS4 __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":524
 *     :returns `<'bool'>`: True if `token` is a single-character dot `'.'`; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":525
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":524
 *     :returns `<'bool'>`: True if `token` is a single-character dot `'.'`; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":526
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":527
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len != 1:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":526
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "utils.pxd":528
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_dot(str_read(token, 0))
*/
  __pyx_t_1 = (__pyx_v_token_len != 1);
  if (__pyx_t_1) {

    /* "utils.pxd":529
 *         token_len = str_len(token)
 *     if token_len != 1:
 *         return False             # <<<<<<<<<<<<<<
 *     return is_dot(str_read(token, 0))
 * 
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":528
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_dot(str_read(token, 0))
*/
  }

  /* "utils.pxd":530
 *     if token_len != 1:
 *         return False
 *     return is_dot(str_read(token, 0))             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_comma(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_token, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 530, __pyx_L1_error)
  __pyx_r = __pyx_f_7cytimes_5utils_is_dot(__pyx_t_2);
  goto __pyx_L0;

  /* "utils.pxd":515
 * 
 * # . check: string
 * cdef inline bint is_str_dot(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character dot `'.'` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_dot", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":532
 *     return is_dot(str_read(token, 0))
 * 
 * cdef inline bint is_str_comma(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character comma `','` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_comma(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_comma *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  int __pyx_r;
  int __pyx_t_1;
  Py_UCS4 __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":541
 *     :returns `<'bool'>`: True if `token` is a single-character comma `'.,`; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":542
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":541
 *     :returns `<'bool'>`: True if `token` is a single-character comma `'.,`; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":543
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":544
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len != 1:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":543
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "utils.pxd":545
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_comma(str_read(token, 0))
*/
  __pyx_t_1 = (__pyx_v_token_len != 1);
  if (__pyx_t_1) {

    /* "utils.pxd":546
 *         token_len = str_len(token)
 *     if token_len != 1:
 *         return False             # <<<<<<<<<<<<<<
 *     return is_comma(str_read(token, 0))
 * 
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":545
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_comma(str_read(token, 0))
*/
  }

  /* "utils.pxd":547
 *     if token_len != 1:
 *         return False
 *     return is_comma(str_read(token, 0))             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_iso_sep(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_token, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 547, __pyx_L1_error)
  __pyx_r = __pyx_f_7cytimes_5utils_is_comma(__pyx_t_2);
  goto __pyx_L0;

  /* "utils.pxd":532
 *     return is_dot(str_read(token, 0))
 * 
 * cdef inline bint is_str_comma(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character comma `','` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_comma", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":549
 *     return is_comma(str_read(token, 0))
 * 
 * cdef inline bint is_str_iso_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character ISO 8601 date-time separator `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_iso_sep(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_iso_sep *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  int __pyx_r;
  int __pyx_t_1;
  Py_UCS4 __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":560
 *     :returns `<'bool'>`: True if `token` is a single-character ISO date-time separator; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":561
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":560
 *     :returns `<'bool'>`: True if `token` is a single-character ISO date-time separator; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":562
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":563
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len != 1:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":562
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "utils.pxd":564
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_iso_sep(str_read(token, 0))
*/
  __pyx_t_1 = (__pyx_v_token_len != 1);
  if (__pyx_t_1) {

    /* "utils.pxd":565
 *         token_len = str_len(token)
 *     if token_len != 1:
 *         return False             # <<<<<<<<<<<<<<
 *     return is_iso_sep(str_read(token, 0))
 * 
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":564
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_iso_sep(str_read(token, 0))
*/
  }

  /* "utils.pxd":566
 *     if token_len != 1:
 *         return False
 *     return is_iso_sep(str_read(token, 0))             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_date_sep(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_token, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 566, __pyx_L1_error)
  __pyx_r = __pyx_f_7cytimes_5utils_is_iso_sep(__pyx_t_2);
  goto __pyx_L0;

  /* "utils.pxd":549
 *     return is_comma(str_read(token, 0))
 * 
 * cdef inline bint is_str_iso_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character ISO 8601 date-time separator `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_iso_sep", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":568
 *     return is_iso_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_date_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character date-field seperator `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_date_sep(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_date_sep *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  int __pyx_r;
  int __pyx_t_1;
  Py_UCS4 __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":579
 *     :returns `<'bool'>`: True if `token` is a single-character date-field separator; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":580
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":579
 *     :returns `<'bool'>`: True if `token` is a single-character date-field separator; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":581
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":582
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len != 1:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":581
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "utils.pxd":583
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_date_sep(str_read(token, 0))
*/
  __pyx_t_1 = (__pyx_v_token_len != 1);
  if (__pyx_t_1) {

    /* "utils.pxd":584
 *         token_len = str_len(token)
 *     if token_len != 1:
 *         return False             # <<<<<<<<<<<<<<
 *     return is_date_sep(str_read(token, 0))
 * 
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":583
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_date_sep(str_read(token, 0))
*/
  }

  /* "utils.pxd":585
 *     if token_len != 1:
 *         return False
 *     return is_date_sep(str_read(token, 0))             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_time_sep(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_token, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 585, __pyx_L1_error)
  __pyx_r = __pyx_f_7cytimes_5utils_is_date_sep(__pyx_t_2);
  goto __pyx_L0;

  /* "utils.pxd":568
 *     return is_iso_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_date_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character date-field seperator `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_date_sep", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":587
 *     return is_date_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_time_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character time-field seperator `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_time_sep(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_time_sep *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  int __pyx_r;
  int __pyx_t_1;
  Py_UCS4 __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":598
 *     :returns `<'bool'>`: True if `token` is a single-character time-field separator; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":599
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":598
 *     :returns `<'bool'>`: True if `token` is a single-character time-field separator; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":600
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":601
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len != 1:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":600
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "utils.pxd":602
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_time_sep(str_read(token, 0))
*/
  __pyx_t_1 = (__pyx_v_token_len != 1);
  if (__pyx_t_1) {

    /* "utils.pxd":603
 *         token_len = str_len(token)
 *     if token_len != 1:
 *         return False             # <<<<<<<<<<<<<<
 *     return is_time_sep(str_read(token, 0))
 * 
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":602
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_time_sep(str_read(token, 0))
*/
  }

  /* "utils.pxd":604
 *     if token_len != 1:
 *         return False
 *     return is_time_sep(str_read(token, 0))             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_isoweek_sep(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_token, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 604, __pyx_L1_error)
  __pyx_r = __pyx_f_7cytimes_5utils_is_time_sep(__pyx_t_2);
  goto __pyx_L0;

  /* "utils.pxd":587
 *     return is_date_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_time_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character time-field seperator `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_time_sep", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":606
 *     return is_time_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_isoweek_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character ISO week designator `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_isoweek_sep(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_isoweek_sep *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  int __pyx_r;
  int __pyx_t_1;
  Py_UCS4 __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":617
 *     :returns `<'bool'>`: True if `token` is a single-character ISO week designator; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":618
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":617
 *     :returns `<'bool'>`: True if `token` is a single-character ISO week designator; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":619
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":620
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len != 1:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":619
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "utils.pxd":621
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_isoweek_sep(str_read(token, 0))
*/
  __pyx_t_1 = (__pyx_v_token_len != 1);
  if (__pyx_t_1) {

    /* "utils.pxd":622
 *         token_len = str_len(token)
 *     if token_len != 1:
 *         return False             # <<<<<<<<<<<<<<
 *     return is_isoweek_sep(str_read(token, 0))
 * 
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":621
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_isoweek_sep(str_read(token, 0))
*/
  }

  /* "utils.pxd":623
 *     if token_len != 1:
 *         return False
 *     return is_isoweek_sep(str_read(token, 0))             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_ascii_ctl(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_token, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 623, __pyx_L1_error)
  __pyx_r = __pyx_f_7cytimes_5utils_is_isoweek_sep(__pyx_t_2);
  goto __pyx_L0;

  /* "utils.pxd":606
 *     return is_time_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_isoweek_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character ISO week designator `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_isoweek_sep", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":625
 *     return is_isoweek_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_ascii_ctl(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single control charactor `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_ascii_ctl(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_ctl *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  int __pyx_r;
  int __pyx_t_1;
  Py_UCS4 __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":636
 *     :returns `<'bool'>`: True if `token` is a single control character; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":637
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":636
 *     :returns `<'bool'>`: True if `token` is a single control character; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":638
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":639
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len != 1:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":638
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "utils.pxd":640
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_ascii_ctl(str_read(token, 0))
*/
  __pyx_t_1 = (__pyx_v_token_len != 1);
  if (__pyx_t_1) {

    /* "utils.pxd":641
 *         token_len = str_len(token)
 *     if token_len != 1:
 *         return False             # <<<<<<<<<<<<<<
 *     return is_ascii_ctl(str_read(token, 0))
 * 
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":640
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_ascii_ctl(str_read(token, 0))
*/
  }

  /* "utils.pxd":642
 *     if token_len != 1:
 *         return False
 *     return is_ascii_ctl(str_read(token, 0))             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_ascii_ctl_or_space(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_token, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 642, __pyx_L1_error)
  __pyx_r = __pyx_f_7cytimes_5utils_is_ascii_ctl(__pyx_t_2);
  goto __pyx_L0;

  /* "utils.pxd":625
 *     return is_isoweek_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_ascii_ctl(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single control charactor `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_ascii_ctl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":644
 *     return is_ascii_ctl(str_read(token, 0))
 * 
 * cdef inline bint is_str_ascii_ctl_or_space(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single control or space charactor `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_ascii_ctl_or_space(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_ctl_or_space *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  int __pyx_r;
  int __pyx_t_1;
  Py_UCS4 __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":656
 *     :returns `<'bool'>`: True if `token` is a single control or space character; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":657
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":656
 *     :returns `<'bool'>`: True if `token` is a single control or space character; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":658
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":659
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len != 1:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":658
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "utils.pxd":660
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_ascii_ctl_or_space(str_read(token, 0))
*/
  __pyx_t_1 = (__pyx_v_token_len != 1);
  if (__pyx_t_1) {

    /* "utils.pxd":661
 *         token_len = str_len(token)
 *     if token_len != 1:
 *         return False             # <<<<<<<<<<<<<<
 *     return is_ascii_ctl_or_space(str_read(token, 0))
 * 
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":660
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_ascii_ctl_or_space(str_read(token, 0))
*/
  }

  /* "utils.pxd":662
 *     if token_len != 1:
 *         return False
 *     return is_ascii_ctl_or_space(str_read(token, 0))             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_ascii_digits(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_token, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 662, __pyx_L1_error)
  __pyx_r = __pyx_f_7cytimes_5utils_is_ascii_ctl_or_space(__pyx_t_2);
  goto __pyx_L0;

  /* "utils.pxd":644
 *     return is_ascii_ctl(str_read(token, 0))
 * 
 * cdef inline bint is_str_ascii_ctl_or_space(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single control or space charactor `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_ascii_ctl_or_space", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":664
 *     return is_ascii_ctl_or_space(str_read(token, 0))
 * 
 * cdef inline bint is_str_ascii_digits(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains ASCII digits `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_ascii_digits(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_digits *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_ssize_t __pyx_v_i;
  int __pyx_r;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":675
 *     :returns `<'bool'>`: True if `token` only contains ASCII digits; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":676
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":675
 *     :returns `<'bool'>`: True if `token` only contains ASCII digits; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":677
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":678
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len == 0:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":677
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  }

  /* "utils.pxd":679
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  __pyx_t_1 = (__pyx_v_token_len == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":680
 *         token_len = str_len(token)
 *     if token_len == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":679
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  }

  /* "utils.pxd":682
 *         return False
 *     cdef Py_ssize_t i
 *     for i in range(token_len):             # <<<<<<<<<<<<<<
 *         if not is_ascii_digit(str_read(token, i)):
 *             return False
*/
  __pyx_t_2 = __pyx_v_token_len;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "utils.pxd":683
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
 *         if not is_ascii_digit(str_read(token, i)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    __pyx_t_5 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_i); if (unlikely(__pyx_t_5 == ((Py_UCS4)-1))) __PYX_ERR(5, 683, __pyx_L1_error)
    __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_t_5));
    if (__pyx_t_1) {

      /* "utils.pxd":684
 *     for i in range(token_len):
 *         if not is_ascii_digit(str_read(token, i)):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
*/
      __pyx_r = 0;
      goto __pyx_L0;

      /* "utils.pxd":683
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
 *         if not is_ascii_digit(str_read(token, i)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    }
  }

  /* "utils.pxd":685
 *         if not is_ascii_digit(str_read(token, i)):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_ascii_letters_upper(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "utils.pxd":664
 *     return is_ascii_ctl_or_space(str_read(token, 0))
 * 
 * cdef inline bint is_str_ascii_digits(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains ASCII digits `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_ascii_digits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":687
 *     return True
 * 
 * cdef inline bint is_str_ascii_letters_upper(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains uppercase ASCII letters `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_ascii_letters_upper(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_letters_upper *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_ssize_t __pyx_v_i;
  int __pyx_r;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":698
 *     :returns `<'bool'>`: True if `token` only contains uppercase ASCII letters; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":699
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":698
 *     :returns `<'bool'>`: True if `token` only contains uppercase ASCII letters; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":700
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":701
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len == 0:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":700
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  }

  /* "utils.pxd":702
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  __pyx_t_1 = (__pyx_v_token_len == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":703
 *         token_len = str_len(token)
 *     if token_len == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":702
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  }

  /* "utils.pxd":705
 *         return False
 *     cdef Py_ssize_t i
 *     for i in range(token_len):             # <<<<<<<<<<<<<<
 *         if not is_ascii_letter_upper(str_read(token, i)):
 *             return False
*/
  __pyx_t_2 = __pyx_v_token_len;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "utils.pxd":706
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
 *         if not is_ascii_letter_upper(str_read(token, i)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    __pyx_t_5 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_i); if (unlikely(__pyx_t_5 == ((Py_UCS4)-1))) __PYX_ERR(5, 706, __pyx_L1_error)
    __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_letter_upper(__pyx_t_5));
    if (__pyx_t_1) {

      /* "utils.pxd":707
 *     for i in range(token_len):
 *         if not is_ascii_letter_upper(str_read(token, i)):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
*/
      __pyx_r = 0;
      goto __pyx_L0;

      /* "utils.pxd":706
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
 *         if not is_ascii_letter_upper(str_read(token, i)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    }
  }

  /* "utils.pxd":708
 *         if not is_ascii_letter_upper(str_read(token, i)):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_ascii_letters_lower(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "utils.pxd":687
 *     return True
 * 
 * cdef inline bint is_str_ascii_letters_upper(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains uppercase ASCII letters `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_ascii_letters_upper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":710
 *     return True
 * 
 * cdef inline bint is_str_ascii_letters_lower(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains lowercase ASCII letters `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_ascii_letters_lower(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_letters_lower *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_ssize_t __pyx_v_i;
  int __pyx_r;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":721
 *     :returns `<'bool'>`: True if `token` only contains lowercase ASCII letters; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":722
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":721
 *     :returns `<'bool'>`: True if `token` only contains lowercase ASCII letters; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":723
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":724
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len == 0:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":723
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  }

  /* "utils.pxd":725
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  __pyx_t_1 = (__pyx_v_token_len == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":726
 *         token_len = str_len(token)
 *     if token_len == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":725
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  }

  /* "utils.pxd":728
 *         return False
 *     cdef Py_ssize_t i
 *     for i in range(token_len):             # <<<<<<<<<<<<<<
 *         if not is_ascii_letter_lower(str_read(token, i)):
 *             return False
*/
  __pyx_t_2 = __pyx_v_token_len;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "utils.pxd":729
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
 *         if not is_ascii_letter_lower(str_read(token, i)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    __pyx_t_5 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_i); if (unlikely(__pyx_t_5 == ((Py_UCS4)-1))) __PYX_ERR(5, 729, __pyx_L1_error)
    __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_letter_lower(__pyx_t_5));
    if (__pyx_t_1) {

      /* "utils.pxd":730
 *     for i in range(token_len):
 *         if not is_ascii_letter_lower(str_read(token, i)):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
*/
      __pyx_r = 0;
      goto __pyx_L0;

      /* "utils.pxd":729
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
 *         if not is_ascii_letter_lower(str_read(token, i)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    }
  }

  /* "utils.pxd":731
 *         if not is_ascii_letter_lower(str_read(token, i)):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_ascii_letters(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "utils.pxd":710
 *     return True
 * 
 * cdef inline bint is_str_ascii_letters_lower(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains lowercase ASCII letters `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_ascii_letters_lower", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":733
 *     return True
 * 
 * cdef inline bint is_str_ascii_letters(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains letters (case-insensitive) `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_ascii_letters(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_letters *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_ssize_t __pyx_v_i;
  int __pyx_r;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":744
 *     :returns `<'bool'>`: True if `token` only contains letters (case-insensitive); False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":745
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":744
 *     :returns `<'bool'>`: True if `token` only contains letters (case-insensitive); False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":746
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":747
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len == 0:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":746
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  }

  /* "utils.pxd":748
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  __pyx_t_1 = (__pyx_v_token_len == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":749
 *         token_len = str_len(token)
 *     if token_len == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":748
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  }

  /* "utils.pxd":751
 *         return False
 *     cdef Py_ssize_t i
 *     for i in range(token_len):             # <<<<<<<<<<<<<<
 *         if not is_ascii_letter(str_read(token, i)):
 *             return False
*/
  __pyx_t_2 = __pyx_v_token_len;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "utils.pxd":752
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
 *         if not is_ascii_letter(str_read(token, i)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    __pyx_t_5 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_i); if (unlikely(__pyx_t_5 == ((Py_UCS4)-1))) __PYX_ERR(5, 752, __pyx_L1_error)
    __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_letter(__pyx_t_5));
    if (__pyx_t_1) {

      /* "utils.pxd":753
 *     for i in range(token_len):
 *         if not is_ascii_letter(str_read(token, i)):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
*/
      __pyx_r = 0;
      goto __pyx_L0;

      /* "utils.pxd":752
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
 *         if not is_ascii_letter(str_read(token, i)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    }
  }

  /* "utils.pxd":754
 *         if not is_ascii_letter(str_read(token, i)):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_alphas(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "utils.pxd":733
 *     return True
 * 
 * cdef inline bint is_str_ascii_letters(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains letters (case-insensitive) `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_ascii_letters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":756
 *     return True
 * 
 * cdef inline bint is_str_alphas(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains alphabetic characters `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_alphas(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_alphas *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_ssize_t __pyx_v_i;
  int __pyx_r;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":767
 *     :returns `<'bool'>`: True if `token` only contains alphabetic characters; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":768
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":767
 *     :returns `<'bool'>`: True if `token` only contains alphabetic characters; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":769
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":770
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len == 0:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":769
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  }

  /* "utils.pxd":771
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  __pyx_t_1 = (__pyx_v_token_len == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":772
 *         token_len = str_len(token)
 *     if token_len == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":771
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  }

  /* "utils.pxd":774
 *         return False
 *     cdef Py_ssize_t i
 *     for i in range(token_len):             # <<<<<<<<<<<<<<
 *         if not is_alpha(str_read(token, i)):
 *             return False
*/
  __pyx_t_2 = __pyx_v_token_len;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "utils.pxd":775
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
 *         if not is_alpha(str_read(token, i)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    __pyx_t_5 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_i); if (unlikely(__pyx_t_5 == ((Py_UCS4)-1))) __PYX_ERR(5, 775, __pyx_L1_error)
    __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_alpha(__pyx_t_5));
    if (__pyx_t_1) {

      /* "utils.pxd":776
 *     for i in range(token_len):
 *         if not is_alpha(str_read(token, i)):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
*/
      __pyx_r = 0;
      goto __pyx_L0;

      /* "utils.pxd":775
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
 *         if not is_alpha(str_read(token, i)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    }
  }

  /* "utils.pxd":777
 *         if not is_alpha(str_read(token, i)):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * # . parse
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "utils.pxd":756
 *     return True
 * 
 * cdef inline bint is_str_alphas(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains alphabetic characters `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_alphas", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":780
 * 
 * # . parse
 * cdef inline int parse_numeric_kind(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Classify `token` string as certain numeric kind `<'int'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_numeric_kind(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_parse_numeric_kind *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  int __pyx_v_has_num;
  int __pyx_v_has_dot;
  Py_ssize_t __pyx_v_i;
  Py_UCS4 __pyx_v_ch;
  int __pyx_r;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":794
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return 0
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":795
 *     # Validate
 *     if token is None:
 *         return 0             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":794
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return 0
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":796
 *     if token is None:
 *         return 0
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":797
 *         return 0
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len == 0:
 *         return 0
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":796
 *     if token is None:
 *         return 0
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  }

  /* "utils.pxd":798
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return 0
 * 
*/
  __pyx_t_1 = (__pyx_v_token_len == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":799
 *         token_len = str_len(token)
 *     if token_len == 0:
 *         return 0             # <<<<<<<<<<<<<<
 * 
 *     cdef:
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":798
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return 0
 * 
*/
  }

  /* "utils.pxd":802
 * 
 *     cdef:
 *         bint has_num = False             # <<<<<<<<<<<<<<
 *         bint has_dot = False
 *         Py_ssize_t i
*/
  __pyx_v_has_num = 0;

  /* "utils.pxd":803
 *     cdef:
 *         bint has_num = False
 *         bint has_dot = False             # <<<<<<<<<<<<<<
 *         Py_ssize_t i
 *         Py_UCS4 ch
*/
  __pyx_v_has_dot = 0;

  /* "utils.pxd":807
 *         Py_UCS4 ch
 * 
 *     for i in range(token_len):             # <<<<<<<<<<<<<<
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):
*/
  __pyx_t_2 = __pyx_v_token_len;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "utils.pxd":808
 * 
 *     for i in range(token_len):
 *         ch = str_read(token, i)             # <<<<<<<<<<<<<<
 *         if is_ascii_digit(ch):
 *             has_num = True
*/
    __pyx_t_5 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_i); if (unlikely(__pyx_t_5 == ((Py_UCS4)-1))) __PYX_ERR(5, 808, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_5;

    /* "utils.pxd":809
 *     for i in range(token_len):
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             has_num = True
 *         elif ch == 46:  # '.'
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_ch);
    if (__pyx_t_1) {

      /* "utils.pxd":810
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):
 *             has_num = True             # <<<<<<<<<<<<<<
 *         elif ch == 46:  # '.'
 *             if has_dot:
*/
      __pyx_v_has_num = 1;

      /* "utils.pxd":809
 *     for i in range(token_len):
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             has_num = True
 *         elif ch == 46:  # '.'
*/
      goto __pyx_L8;
    }

    /* "utils.pxd":811
 *         if is_ascii_digit(ch):
 *             has_num = True
 *         elif ch == 46:  # '.'             # <<<<<<<<<<<<<<
 *             if has_dot:
 *                 return 0
*/
    __pyx_t_1 = (__pyx_v_ch == 46);
    if (__pyx_t_1) {

      /* "utils.pxd":812
 *             has_num = True
 *         elif ch == 46:  # '.'
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 return 0
 *             has_dot = True
*/
      if (__pyx_v_has_dot) {

        /* "utils.pxd":813
 *         elif ch == 46:  # '.'
 *             if has_dot:
 *                 return 0             # <<<<<<<<<<<<<<
 *             has_dot = True
 *         else:
*/
        __pyx_r = 0;
        goto __pyx_L0;

        /* "utils.pxd":812
 *             has_num = True
 *         elif ch == 46:  # '.'
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 return 0
 *             has_dot = True
*/
      }

      /* "utils.pxd":814
 *             if has_dot:
 *                 return 0
 *             has_dot = True             # <<<<<<<<<<<<<<
 *         else:
 *             return 0
*/
      __pyx_v_has_dot = 1;

      /* "utils.pxd":811
 *         if is_ascii_digit(ch):
 *             has_num = True
 *         elif ch == 46:  # '.'             # <<<<<<<<<<<<<<
 *             if has_dot:
 *                 return 0
*/
      goto __pyx_L8;
    }

    /* "utils.pxd":816
 *             has_dot = True
 *         else:
 *             return 0             # <<<<<<<<<<<<<<
 * 
 *     if not has_num:
*/
    /*else*/ {
      __pyx_r = 0;
      goto __pyx_L0;
    }
    __pyx_L8:;
  }

  /* "utils.pxd":818
 *             return 0
 * 
 *     if not has_num:             # <<<<<<<<<<<<<<
 *         return 0
 *     return 2 if has_dot else 1
*/
  __pyx_t_1 = (!__pyx_v_has_num);
  if (__pyx_t_1) {

    /* "utils.pxd":819
 * 
 *     if not has_num:
 *         return 0             # <<<<<<<<<<<<<<
 *     return 2 if has_dot else 1
 * 
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":818
 *             return 0
 * 
 *     if not has_num:             # <<<<<<<<<<<<<<
 *         return 0
 *     return 2 if has_dot else 1
*/
  }

  /* "utils.pxd":820
 *     if not has_num:
 *         return 0
 *     return 2 if has_dot else 1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int parse_isoyear(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:
*/
  if (__pyx_v_has_dot) {
    __pyx_t_6 = 2;
  } else {
    __pyx_t_6 = 1;
  }
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "utils.pxd":780
 * 
 * # . parse
 * cdef inline int parse_numeric_kind(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Classify `token` string as certain numeric kind `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_numeric_kind", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":822
 *     return 2 if has_dot else 1
 * 
 * cdef inline int parse_isoyear(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse ISO format year component (YYYY) from a string,
 *     returns `-1` for invalid ISO years `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isoyear(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_5utils_parse_isoyear *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_UCS4 __pyx_v_c0;
  Py_UCS4 __pyx_v_c1;
  Py_UCS4 __pyx_v_c2;
  Py_UCS4 __pyx_v_c3;
  int __pyx_v_out;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":839
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":840
 *     # Validate
 *     if token is None:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":839
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":841
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 4:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":842
 *         return -1  # exit: invalid
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if pos < 0 or token_len - pos < 4:
 *         return -1  # exit: invalid
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":841
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 4:
*/
  }

  /* "utils.pxd":843
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 4:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_2 = (__pyx_v_pos < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_token_len - __pyx_v_pos) < 4);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":844
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 4:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Parse value
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":843
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 4:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":847
 * 
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_pos); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 847, __pyx_L1_error)
  __pyx_v_c0 = __pyx_t_3;

  /* "utils.pxd":848
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c0));
  if (__pyx_t_1) {

    /* "utils.pxd":849
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":848
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  }

  /* "utils.pxd":850
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, (__pyx_v_pos + 1)); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 850, __pyx_L1_error)
  __pyx_v_c1 = __pyx_t_3;

  /* "utils.pxd":851
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c1));
  if (__pyx_t_1) {

    /* "utils.pxd":852
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
 *     if not is_ascii_digit(c2):
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":851
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
*/
  }

  /* "utils.pxd":853
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c2):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, (__pyx_v_pos + 2)); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 853, __pyx_L1_error)
  __pyx_v_c2 = __pyx_t_3;

  /* "utils.pxd":854
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
 *     if not is_ascii_digit(c2):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c3 = str_read(token, pos + 3)
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c2));
  if (__pyx_t_1) {

    /* "utils.pxd":855
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
 *     if not is_ascii_digit(c2):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     cdef Py_UCS4 c3 = str_read(token, pos + 3)
 *     if not is_ascii_digit(c3):
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":854
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
 *     if not is_ascii_digit(c2):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c3 = str_read(token, pos + 3)
*/
  }

  /* "utils.pxd":856
 *     if not is_ascii_digit(c2):
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c3 = str_read(token, pos + 3)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c3):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, (__pyx_v_pos + 3)); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 856, __pyx_L1_error)
  __pyx_v_c3 = __pyx_t_3;

  /* "utils.pxd":857
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c3 = str_read(token, pos + 3)
 *     if not is_ascii_digit(c3):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c3));
  if (__pyx_t_1) {

    /* "utils.pxd":858
 *     cdef Py_UCS4 c3 = str_read(token, pos + 3)
 *     if not is_ascii_digit(c3):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Convert to integer
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":857
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c3 = str_read(token, pos + 3)
 *     if not is_ascii_digit(c3):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":864
 *         (ord(c0) - 48) * 1000 +
 *         (ord(c1) - 48) *  100 +
 *         (ord(c2) - 48) *   10 +             # <<<<<<<<<<<<<<
 *         (ord(c3) - 48)
 *     )
*/
  __pyx_v_out = (((((__Pyx_long_cast(__pyx_v_c0) - 48) * 0x3E8) + ((__Pyx_long_cast(__pyx_v_c1) - 48) * 0x64)) + ((__Pyx_long_cast(__pyx_v_c2) - 48) * 10)) + (__Pyx_long_cast(__pyx_v_c3) - 48));

  /* "utils.pxd":867
 *         (ord(c3) - 48)
 *     )
 *     return out if out > 0 else -1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int parse_isomonth(str token, Py_ssize_t pos, Py_ssize_t token_len=-1)  except -2:
*/
  __pyx_t_1 = (__pyx_v_out > 0);
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_v_out;
  } else {
    __pyx_t_4 = -1;
  }
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "utils.pxd":822
 *     return 2 if has_dot else 1
 * 
 * cdef inline int parse_isoyear(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse ISO format year component (YYYY) from a string,
 *     returns `-1` for invalid ISO years `<'int'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_isoyear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -2;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":869
 *     return out if out > 0 else -1
 * 
 * cdef inline int parse_isomonth(str token, Py_ssize_t pos, Py_ssize_t token_len=-1)  except -2:             # <<<<<<<<<<<<<<
 *     """Parse ISO format month component (MM) from a string,
 *     returns `-1` for invalid ISO months `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isomonth(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_5utils_parse_isomonth *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_UCS4 __pyx_v_c0;
  Py_UCS4 __pyx_v_c1;
  int __pyx_v_out;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":886
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":887
 *     # Validate
 *     if token is None:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":886
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":888
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":889
 *         return -1  # exit: invalid
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if pos < 0 or token_len - pos < 2:
 *         return -1  # exit: invalid
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":888
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
*/
  }

  /* "utils.pxd":890
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_2 = (__pyx_v_pos < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_token_len - __pyx_v_pos) < 2);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":891
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Parse value
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":890
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":894
 * 
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_pos); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 894, __pyx_L1_error)
  __pyx_v_c0 = __pyx_t_3;

  /* "utils.pxd":895
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c0));
  if (__pyx_t_1) {

    /* "utils.pxd":896
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":895
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  }

  /* "utils.pxd":897
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, (__pyx_v_pos + 1)); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 897, __pyx_L1_error)
  __pyx_v_c1 = __pyx_t_3;

  /* "utils.pxd":898
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c1));
  if (__pyx_t_1) {

    /* "utils.pxd":899
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Convert to integer
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":898
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":903
 *     # Convert to integer
 *     cdef int out = (
 *         (ord(c0) - 48) * 10 +             # <<<<<<<<<<<<<<
 *         (ord(c1) - 48)
 *     )
*/
  __pyx_v_out = (((__Pyx_long_cast(__pyx_v_c0) - 48) * 10) + (__Pyx_long_cast(__pyx_v_c1) - 48));

  /* "utils.pxd":906
 *         (ord(c1) - 48)
 *     )
 *     return out if 1 <= out <= 12 else -1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int parse_isoday(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:
*/
  __pyx_t_1 = (1 <= __pyx_v_out);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_out <= 12);
  }
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_v_out;
  } else {
    __pyx_t_4 = -1;
  }
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "utils.pxd":869
 *     return out if out > 0 else -1
 * 
 * cdef inline int parse_isomonth(str token, Py_ssize_t pos, Py_ssize_t token_len=-1)  except -2:             # <<<<<<<<<<<<<<
 *     """Parse ISO format month component (MM) from a string,
 *     returns `-1` for invalid ISO months `<'int'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_isomonth", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -2;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":908
 *     return out if 1 <= out <= 12 else -1
 * 
 * cdef inline int parse_isoday(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse ISO format day component (DD) from a string,
 *     returns `-1` for invalid ISO days `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isoday(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_5utils_parse_isoday *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_UCS4 __pyx_v_c0;
  Py_UCS4 __pyx_v_c1;
  int __pyx_v_out;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":925
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":926
 *     # Validate
 *     if token is None:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":925
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":927
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":928
 *         return -1  # exit: invalid
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if pos < 0 or token_len - pos < 2:
 *         return -1  # exit: invalid
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":927
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
*/
  }

  /* "utils.pxd":929
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_2 = (__pyx_v_pos < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_token_len - __pyx_v_pos) < 2);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":930
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Parse value
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":929
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":933
 * 
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_pos); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 933, __pyx_L1_error)
  __pyx_v_c0 = __pyx_t_3;

  /* "utils.pxd":934
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c0));
  if (__pyx_t_1) {

    /* "utils.pxd":935
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":934
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  }

  /* "utils.pxd":936
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, (__pyx_v_pos + 1)); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 936, __pyx_L1_error)
  __pyx_v_c1 = __pyx_t_3;

  /* "utils.pxd":937
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c1));
  if (__pyx_t_1) {

    /* "utils.pxd":938
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Convert to integer
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":937
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":942
 *     # Convert to integer
 *     cdef int out = (
 *         (ord(c0) - 48) * 10 +             # <<<<<<<<<<<<<<
 *         (ord(c1) - 48)
 *     )
*/
  __pyx_v_out = (((__Pyx_long_cast(__pyx_v_c0) - 48) * 10) + (__Pyx_long_cast(__pyx_v_c1) - 48));

  /* "utils.pxd":945
 *         (ord(c1) - 48)
 *     )
 *     return out if 1 <= out <= 31 else -1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int parse_isoweek(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:
*/
  __pyx_t_1 = (1 <= __pyx_v_out);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_out <= 31);
  }
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_v_out;
  } else {
    __pyx_t_4 = -1;
  }
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "utils.pxd":908
 *     return out if 1 <= out <= 12 else -1
 * 
 * cdef inline int parse_isoday(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse ISO format day component (DD) from a string,
 *     returns `-1` for invalid ISO days `<'int'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_isoday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -2;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":947
 *     return out if 1 <= out <= 31 else -1
 * 
 * cdef inline int parse_isoweek(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format week number component (WW) from a string,
 *     returns `-1` for invalid ISO week number `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isoweek(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_5utils_parse_isoweek *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_UCS4 __pyx_v_c0;
  Py_UCS4 __pyx_v_c1;
  int __pyx_v_out;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":964
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":965
 *     # Validate
 *     if token is None:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":964
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":966
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":967
 *         return -1  # exit: invalid
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if pos < 0 or token_len - pos < 2:
 *         return -1  # exit: invalid
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":966
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
*/
  }

  /* "utils.pxd":968
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_2 = (__pyx_v_pos < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_token_len - __pyx_v_pos) < 2);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":969
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Parse value
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":968
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":972
 * 
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_pos); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 972, __pyx_L1_error)
  __pyx_v_c0 = __pyx_t_3;

  /* "utils.pxd":973
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c0));
  if (__pyx_t_1) {

    /* "utils.pxd":974
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":973
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  }

  /* "utils.pxd":975
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, (__pyx_v_pos + 1)); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 975, __pyx_L1_error)
  __pyx_v_c1 = __pyx_t_3;

  /* "utils.pxd":976
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c1));
  if (__pyx_t_1) {

    /* "utils.pxd":977
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Convert to integer
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":976
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":981
 *     # Convert to integer
 *     cdef int out = (
 *         (ord(c0) - 48) * 10 +             # <<<<<<<<<<<<<<
 *         (ord(c1) - 48)
 *     )
*/
  __pyx_v_out = (((__Pyx_long_cast(__pyx_v_c0) - 48) * 10) + (__Pyx_long_cast(__pyx_v_c1) - 48));

  /* "utils.pxd":984
 *         (ord(c1) - 48)
 *     )
 *     return out if 1 <= out <= 53 else -1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int parse_isoweekday(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:
*/
  __pyx_t_1 = (1 <= __pyx_v_out);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_out <= 53);
  }
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_v_out;
  } else {
    __pyx_t_4 = -1;
  }
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "utils.pxd":947
 *     return out if 1 <= out <= 31 else -1
 * 
 * cdef inline int parse_isoweek(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format week number component (WW) from a string,
 *     returns `-1` for invalid ISO week number `<'int'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_isoweek", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -2;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":986
 *     return out if 1 <= out <= 53 else -1
 * 
 * cdef inline int parse_isoweekday(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format weekday component (D) from a string,
 *     returns `-1` for invalid ISO weekdays `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isoweekday(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_5utils_parse_isoweekday *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_UCS4 __pyx_v_ch;
  int __pyx_v_out;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":1002
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":1003
 *     # Validate
 *     if token is None:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1002
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":1004
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1005
 *         return -1  # exit: invalid
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if pos < 0 or token_len - pos < 1:
 *         return -1  # exit: invalid
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":1004
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:
*/
  }

  /* "utils.pxd":1006
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_2 = (__pyx_v_pos < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_token_len - __pyx_v_pos) < 1);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":1007
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Parse value
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1006
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":1010
 * 
 *     # Parse value
 *     cdef Py_UCS4 ch = str_read(token, pos)             # <<<<<<<<<<<<<<
 * 
 *     # Convert to integer
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_pos); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 1010, __pyx_L1_error)
  __pyx_v_ch = __pyx_t_3;

  /* "utils.pxd":1013
 * 
 *     # Convert to integer
 *     cdef int out = ord(ch) - 48             # <<<<<<<<<<<<<<
 *     return out if 1 <= out <= 7 else -1
 * 
*/
  __pyx_v_out = (__Pyx_long_cast(__pyx_v_ch) - 48);

  /* "utils.pxd":1014
 *     # Convert to integer
 *     cdef int out = ord(ch) - 48
 *     return out if 1 <= out <= 7 else -1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int parse_isodoy(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:
*/
  __pyx_t_1 = (1 <= __pyx_v_out);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_out <= 7);
  }
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_v_out;
  } else {
    __pyx_t_4 = -1;
  }
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "utils.pxd":986
 *     return out if 1 <= out <= 53 else -1
 * 
 * cdef inline int parse_isoweekday(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format weekday component (D) from a string,
 *     returns `-1` for invalid ISO weekdays `<'int'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_isoweekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -2;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1016
 *     return out if 1 <= out <= 7 else -1
 * 
 * cdef inline int parse_isodoy(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format day-of-year component (DDD) from a string,
 *     returns `-1` for invalid ISO day of the year `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isodoy(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_5utils_parse_isodoy *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_UCS4 __pyx_v_c0;
  Py_UCS4 __pyx_v_c1;
  Py_UCS4 __pyx_v_c2;
  int __pyx_v_out;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":1033
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":1034
 *     # Validate
 *     if token is None:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1033
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":1035
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 3:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1036
 *         return -1  # exit: invalid
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if pos < 0 or token_len - pos < 3:
 *         return -1  # exit: invalid
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":1035
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 3:
*/
  }

  /* "utils.pxd":1037
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 3:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_2 = (__pyx_v_pos < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_token_len - __pyx_v_pos) < 3);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":1038
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 3:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Parse value
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1037
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 3:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":1041
 * 
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_pos); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 1041, __pyx_L1_error)
  __pyx_v_c0 = __pyx_t_3;

  /* "utils.pxd":1042
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c0));
  if (__pyx_t_1) {

    /* "utils.pxd":1043
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1042
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  }

  /* "utils.pxd":1044
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, (__pyx_v_pos + 1)); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 1044, __pyx_L1_error)
  __pyx_v_c1 = __pyx_t_3;

  /* "utils.pxd":1045
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c1));
  if (__pyx_t_1) {

    /* "utils.pxd":1046
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
 *     if not is_ascii_digit(c2):
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1045
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
*/
  }

  /* "utils.pxd":1047
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c2):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, (__pyx_v_pos + 2)); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 1047, __pyx_L1_error)
  __pyx_v_c2 = __pyx_t_3;

  /* "utils.pxd":1048
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
 *     if not is_ascii_digit(c2):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c2));
  if (__pyx_t_1) {

    /* "utils.pxd":1049
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
 *     if not is_ascii_digit(c2):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Convert to integer
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1048
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
 *     if not is_ascii_digit(c2):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":1054
 *     cdef int out = (
 *         (ord(c0) - 48) * 100 +
 *         (ord(c1) - 48) * 10  +             # <<<<<<<<<<<<<<
 *         (ord(c2) - 48)
 *     )
*/
  __pyx_v_out = ((((__Pyx_long_cast(__pyx_v_c0) - 48) * 0x64) + ((__Pyx_long_cast(__pyx_v_c1) - 48) * 10)) + (__Pyx_long_cast(__pyx_v_c2) - 48));

  /* "utils.pxd":1057
 *         (ord(c2) - 48)
 *     )
 *     return out if 1 <= out <= 366 else -1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int parse_isohour(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:
*/
  __pyx_t_1 = (1 <= __pyx_v_out);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_out <= 0x16E);
  }
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_v_out;
  } else {
    __pyx_t_4 = -1;
  }
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "utils.pxd":1016
 *     return out if 1 <= out <= 7 else -1
 * 
 * cdef inline int parse_isodoy(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format day-of-year component (DDD) from a string,
 *     returns `-1` for invalid ISO day of the year `<'int'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_isodoy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -2;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1059
 *     return out if 1 <= out <= 366 else -1
 * 
 * cdef inline int parse_isohour(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format hour (HH) component from a string,
 *     returns `-1` for invalid ISO hours `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isohour(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_5utils_parse_isohour *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_UCS4 __pyx_v_c0;
  Py_UCS4 __pyx_v_c1;
  int __pyx_v_out;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":1076
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":1077
 *     # Validate
 *     if token is None:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1076
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":1078
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1079
 *         return -1  # exit: invalid
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if pos < 0 or token_len - pos < 2:
 *         return -1  # exit: invalid
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":1078
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
*/
  }

  /* "utils.pxd":1080
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_2 = (__pyx_v_pos < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_token_len - __pyx_v_pos) < 2);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":1081
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Parse value
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1080
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":1084
 * 
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_pos); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 1084, __pyx_L1_error)
  __pyx_v_c0 = __pyx_t_3;

  /* "utils.pxd":1085
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c0));
  if (__pyx_t_1) {

    /* "utils.pxd":1086
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1085
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  }

  /* "utils.pxd":1087
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, (__pyx_v_pos + 1)); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 1087, __pyx_L1_error)
  __pyx_v_c1 = __pyx_t_3;

  /* "utils.pxd":1088
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c1));
  if (__pyx_t_1) {

    /* "utils.pxd":1089
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Convert to integer
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1088
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":1093
 *     # Convert to integer
 *     cdef int out = (
 *         (ord(c0) - 48) * 10 +             # <<<<<<<<<<<<<<
 *         (ord(c1) - 48)
 *     )
*/
  __pyx_v_out = (((__Pyx_long_cast(__pyx_v_c0) - 48) * 10) + (__Pyx_long_cast(__pyx_v_c1) - 48));

  /* "utils.pxd":1096
 *         (ord(c1) - 48)
 *     )
 *     return out if 0 <= out <= 23 else -1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int parse_isominute(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:
*/
  __pyx_t_1 = (0 <= __pyx_v_out);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_out <= 23);
  }
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_v_out;
  } else {
    __pyx_t_4 = -1;
  }
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "utils.pxd":1059
 *     return out if 1 <= out <= 366 else -1
 * 
 * cdef inline int parse_isohour(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format hour (HH) component from a string,
 *     returns `-1` for invalid ISO hours `<'int'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_isohour", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -2;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1098
 *     return out if 0 <= out <= 23 else -1
 * 
 * cdef inline int parse_isominute(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format minute (MM) component from a string,
 *     returns `-1` for invalid ISO minutes `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isominute(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_5utils_parse_isominute *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_UCS4 __pyx_v_c0;
  Py_UCS4 __pyx_v_c1;
  int __pyx_v_out;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":1115
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":1116
 *     # Validate
 *     if token is None:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1115
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":1117
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1118
 *         return -1  # exit: invalid
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if pos < 0 or token_len - pos < 2:
 *         return -1  # exit: invalid
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":1117
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
*/
  }

  /* "utils.pxd":1119
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_2 = (__pyx_v_pos < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_token_len - __pyx_v_pos) < 2);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":1120
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Parse value
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1119
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":1123
 * 
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_pos); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 1123, __pyx_L1_error)
  __pyx_v_c0 = __pyx_t_3;

  /* "utils.pxd":1124
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c0));
  if (__pyx_t_1) {

    /* "utils.pxd":1125
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1124
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  }

  /* "utils.pxd":1126
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, (__pyx_v_pos + 1)); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 1126, __pyx_L1_error)
  __pyx_v_c1 = __pyx_t_3;

  /* "utils.pxd":1127
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c1));
  if (__pyx_t_1) {

    /* "utils.pxd":1128
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Convert to integer
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1127
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":1132
 *     # Convert to integer
 *     cdef int out = (
 *         (ord(c0) - 48) * 10 +             # <<<<<<<<<<<<<<
 *         (ord(c1) - 48)
 *     )
*/
  __pyx_v_out = (((__Pyx_long_cast(__pyx_v_c0) - 48) * 10) + (__Pyx_long_cast(__pyx_v_c1) - 48));

  /* "utils.pxd":1135
 *         (ord(c1) - 48)
 *     )
 *     return out if 0 <= out <= 59 else -1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int parse_isosecond(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:
*/
  __pyx_t_1 = (0 <= __pyx_v_out);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_out <= 59);
  }
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_v_out;
  } else {
    __pyx_t_4 = -1;
  }
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "utils.pxd":1098
 *     return out if 0 <= out <= 23 else -1
 * 
 * cdef inline int parse_isominute(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format minute (MM) component from a string,
 *     returns `-1` for invalid ISO minutes `<'int'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_isominute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -2;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1137
 *     return out if 0 <= out <= 59 else -1
 * 
 * cdef inline int parse_isosecond(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format second (SS) component from a string,
 *     returns `-1` for invalid ISO seconds `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isosecond(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_5utils_parse_isosecond *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  int __pyx_r;
  int __pyx_t_1;
  struct __pyx_opt_args_7cytimes_5utils_parse_isominute __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":1153
 *     :returns `<'int'>`: The parsed ISO second `[0..59]`, or `-1` if invalid.
 *     """
 *     return parse_isominute(token, pos, token_len)             # <<<<<<<<<<<<<<
 * 
 * cdef inline int parse_isofraction(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.token_len = __pyx_v_token_len;
  __pyx_t_1 = __pyx_f_7cytimes_5utils_parse_isominute(__pyx_v_token, __pyx_v_pos, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-2))) __PYX_ERR(5, 1153, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":1137
 *     return out if 0 <= out <= 59 else -1
 * 
 * cdef inline int parse_isosecond(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format second (SS) component from a string,
 *     returns `-1` for invalid ISO seconds `<'int'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_isosecond", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -2;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1155
 *     return parse_isominute(token, pos, token_len)
 * 
 * cdef inline int parse_isofraction(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO fractional time component (fractions of a second) from a string,
 *     returns `-1` for invalid ISO fraction `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isofraction(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_5utils_parse_isofraction *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  int __pyx_v_f_size;
  int __pyx_v_out;
  Py_UCS4 __pyx_v_ch;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":1172
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":1173
 *     # Validate
 *     if token is None:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1172
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":1174
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1175
 *         return -1  # exit: invalid
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if pos < 0 or token_len - pos < 1:
 *         return -1  # exit: invalid
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":1174
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:
*/
  }

  /* "utils.pxd":1176
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_2 = (__pyx_v_pos < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_token_len - __pyx_v_pos) < 1);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":1177
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Parse value
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1176
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":1181
 *     # Parse value
 *     cdef:
 *         int f_size = 0             # <<<<<<<<<<<<<<
 *         int out = 0
 *         Py_UCS4 ch
*/
  __pyx_v_f_size = 0;

  /* "utils.pxd":1182
 *     cdef:
 *         int f_size = 0
 *         int out = 0             # <<<<<<<<<<<<<<
 *         Py_UCS4 ch
 *     while pos < token_len and f_size < 6:
*/
  __pyx_v_out = 0;

  /* "utils.pxd":1184
 *         int out = 0
 *         Py_UCS4 ch
 *     while pos < token_len and f_size < 6:             # <<<<<<<<<<<<<<
 *         ch = str_read(token, pos)
 *         if not is_ascii_digit(ch):
*/
  while (1) {
    __pyx_t_2 = (__pyx_v_pos < __pyx_v_token_len);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_f_size < 6);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L10_bool_binop_done:;
    if (!__pyx_t_1) break;

    /* "utils.pxd":1185
 *         Py_UCS4 ch
 *     while pos < token_len and f_size < 6:
 *         ch = str_read(token, pos)             # <<<<<<<<<<<<<<
 *         if not is_ascii_digit(ch):
 *             break
*/
    __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_pos); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 1185, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_3;

    /* "utils.pxd":1186
 *     while pos < token_len and f_size < 6:
 *         ch = str_read(token, pos)
 *         if not is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             break
 *         out = out * 10 + (ord(ch) - 48)
*/
    __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_ch));
    if (__pyx_t_1) {

      /* "utils.pxd":1187
 *         ch = str_read(token, pos)
 *         if not is_ascii_digit(ch):
 *             break             # <<<<<<<<<<<<<<
 *         out = out * 10 + (ord(ch) - 48)
 *         pos += 1; f_size += 1
*/
      goto __pyx_L9_break;

      /* "utils.pxd":1186
 *     while pos < token_len and f_size < 6:
 *         ch = str_read(token, pos)
 *         if not is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             break
 *         out = out * 10 + (ord(ch) - 48)
*/
    }

    /* "utils.pxd":1188
 *         if not is_ascii_digit(ch):
 *             break
 *         out = out * 10 + (ord(ch) - 48)             # <<<<<<<<<<<<<<
 *         pos += 1; f_size += 1
 * 
*/
    __pyx_v_out = ((__pyx_v_out * 10) + (__Pyx_long_cast(__pyx_v_ch) - 48));

    /* "utils.pxd":1189
 *             break
 *         out = out * 10 + (ord(ch) - 48)
 *         pos += 1; f_size += 1             # <<<<<<<<<<<<<<
 * 
 *     # Compensate missing digits (pad with zeros)
*/
    __pyx_v_pos = (__pyx_v_pos + 1);
    __pyx_v_f_size = (__pyx_v_f_size + 1);
  }
  __pyx_L9_break:;

  /* "utils.pxd":1192
 * 
 *     # Compensate missing digits (pad with zeros)
 *     return scale_fraction_to_us(out, f_size)             # <<<<<<<<<<<<<<
 * 
 * cdef inline sf parse_second_and_fraction(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except *:
*/
  __pyx_r = __pyx_f_7cytimes_5utils_scale_fraction_to_us(__pyx_v_out, __pyx_v_f_size);
  goto __pyx_L0;

  /* "utils.pxd":1155
 *     return parse_isominute(token, pos, token_len)
 * 
 * cdef inline int parse_isofraction(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO fractional time component (fractions of a second) from a string,
 *     returns `-1` for invalid ISO fraction `<'int'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_isofraction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -2;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1194
 *     return scale_fraction_to_us(out, f_size)
 * 
 * cdef inline sf parse_second_and_fraction(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except *:             # <<<<<<<<<<<<<<
 *     """Parse a `seconds` token with an optional fractional part into (second, microsecond) `<'struct:sf'>`.
 * 
*/

static CYTHON_INLINE __pyx_t_7cytimes_5utils_sf __pyx_f_7cytimes_5utils_parse_second_and_fraction(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_5utils_parse_second_and_fraction *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  __pyx_t_7cytimes_5utils_sf __pyx_v_out;
  unsigned PY_LONG_LONG __pyx_v_i_part;
  unsigned PY_LONG_LONG __pyx_v_f_part;
  int __pyx_v_f_size;
  int __pyx_v_has_dot;
  int __pyx_v_has_digit;
  Py_UCS4 __pyx_v_ch;
  __pyx_t_7cytimes_5utils_sf __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":1225
 *     # Validate
 *     cdef sf out
 *     if token is None:             # <<<<<<<<<<<<<<
 *         out.second = out.microsecond = -1
 *         return out  # exit: invalid
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":1226
 *     cdef sf out
 *     if token is None:
 *         out.second = out.microsecond = -1             # <<<<<<<<<<<<<<
 *         return out  # exit: invalid
 *     if token_len <= 0:
*/
    __pyx_v_out.second = -1;
    __pyx_v_out.microsecond = -1;

    /* "utils.pxd":1227
 *     if token is None:
 *         out.second = out.microsecond = -1
 *         return out  # exit: invalid             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "utils.pxd":1225
 *     # Validate
 *     cdef sf out
 *     if token is None:             # <<<<<<<<<<<<<<
 *         out.second = out.microsecond = -1
 *         return out  # exit: invalid
*/
  }

  /* "utils.pxd":1228
 *         out.second = out.microsecond = -1
 *         return out  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1229
 *         return out  # exit: invalid
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if pos < 0 or token_len - pos < 1:
 *         out.second = out.microsecond = -1
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":1228
 *         out.second = out.microsecond = -1
 *         return out  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:
*/
  }

  /* "utils.pxd":1230
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:             # <<<<<<<<<<<<<<
 *         out.second = out.microsecond = -1
 *         return out  # exit: invalid
*/
  __pyx_t_2 = (__pyx_v_pos < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_token_len - __pyx_v_pos) < 1);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":1231
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:
 *         out.second = out.microsecond = -1             # <<<<<<<<<<<<<<
 *         return out  # exit: invalid
 * 
*/
    __pyx_v_out.second = -1;
    __pyx_v_out.microsecond = -1;

    /* "utils.pxd":1232
 *     if pos < 0 or token_len - pos < 1:
 *         out.second = out.microsecond = -1
 *         return out  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Parse value
*/
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "utils.pxd":1230
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:             # <<<<<<<<<<<<<<
 *         out.second = out.microsecond = -1
 *         return out  # exit: invalid
*/
  }

  /* "utils.pxd":1236
 *     # Parse value
 *     cdef:
 *         unsigned long long i_part = 0             # <<<<<<<<<<<<<<
 *         unsigned long long f_part = 0
 *         int f_size = 0
*/
  __pyx_v_i_part = 0;

  /* "utils.pxd":1237
 *     cdef:
 *         unsigned long long i_part = 0
 *         unsigned long long f_part = 0             # <<<<<<<<<<<<<<
 *         int f_size = 0
 *         bint has_dot = False
*/
  __pyx_v_f_part = 0;

  /* "utils.pxd":1238
 *         unsigned long long i_part = 0
 *         unsigned long long f_part = 0
 *         int f_size = 0             # <<<<<<<<<<<<<<
 *         bint has_dot = False
 *         bint has_digit = False
*/
  __pyx_v_f_size = 0;

  /* "utils.pxd":1239
 *         unsigned long long f_part = 0
 *         int f_size = 0
 *         bint has_dot = False             # <<<<<<<<<<<<<<
 *         bint has_digit = False
 *         Py_UCS4 ch
*/
  __pyx_v_has_dot = 0;

  /* "utils.pxd":1240
 *         int f_size = 0
 *         bint has_dot = False
 *         bint has_digit = False             # <<<<<<<<<<<<<<
 *         Py_UCS4 ch
 * 
*/
  __pyx_v_has_digit = 0;

  /* "utils.pxd":1243
 *         Py_UCS4 ch
 * 
 *     while pos < token_len and f_size < 6:             # <<<<<<<<<<<<<<
 *         ch = str_read(token, pos)
 *         if is_ascii_digit(ch):
*/
  while (1) {
    __pyx_t_2 = (__pyx_v_pos < __pyx_v_token_len);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_f_size < 6);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L10_bool_binop_done:;
    if (!__pyx_t_1) break;

    /* "utils.pxd":1244
 * 
 *     while pos < token_len and f_size < 6:
 *         ch = str_read(token, pos)             # <<<<<<<<<<<<<<
 *         if is_ascii_digit(ch):
 *             if not has_dot:
*/
    __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_pos); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 1244, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_3;

    /* "utils.pxd":1245
 *     while pos < token_len and f_size < 6:
 *         ch = str_read(token, pos)
 *         if is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             if not has_dot:
 *                 i_part = i_part * 10 + (ord(ch) - 48)
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_ch);
    if (__pyx_t_1) {

      /* "utils.pxd":1246
 *         ch = str_read(token, pos)
 *         if is_ascii_digit(ch):
 *             if not has_dot:             # <<<<<<<<<<<<<<
 *                 i_part = i_part * 10 + (ord(ch) - 48)
 *             else:
*/
      __pyx_t_1 = (!__pyx_v_has_dot);
      if (__pyx_t_1) {

        /* "utils.pxd":1247
 *         if is_ascii_digit(ch):
 *             if not has_dot:
 *                 i_part = i_part * 10 + (ord(ch) - 48)             # <<<<<<<<<<<<<<
 *             else:
 *                 f_part = f_part * 10 + (ord(ch) - 48)
*/
        __pyx_v_i_part = ((__pyx_v_i_part * 10) + (__Pyx_long_cast(__pyx_v_ch) - 48));

        /* "utils.pxd":1246
 *         ch = str_read(token, pos)
 *         if is_ascii_digit(ch):
 *             if not has_dot:             # <<<<<<<<<<<<<<
 *                 i_part = i_part * 10 + (ord(ch) - 48)
 *             else:
*/
        goto __pyx_L13;
      }

      /* "utils.pxd":1249
 *                 i_part = i_part * 10 + (ord(ch) - 48)
 *             else:
 *                 f_part = f_part * 10 + (ord(ch) - 48)             # <<<<<<<<<<<<<<
 *                 f_size += 1
 *             has_digit = True
*/
      /*else*/ {
        __pyx_v_f_part = ((__pyx_v_f_part * 10) + (__Pyx_long_cast(__pyx_v_ch) - 48));

        /* "utils.pxd":1250
 *             else:
 *                 f_part = f_part * 10 + (ord(ch) - 48)
 *                 f_size += 1             # <<<<<<<<<<<<<<
 *             has_digit = True
 *             pos += 1
*/
        __pyx_v_f_size = (__pyx_v_f_size + 1);
      }
      __pyx_L13:;

      /* "utils.pxd":1251
 *                 f_part = f_part * 10 + (ord(ch) - 48)
 *                 f_size += 1
 *             has_digit = True             # <<<<<<<<<<<<<<
 *             pos += 1
 *         elif ch == 46:  # '.'
*/
      __pyx_v_has_digit = 1;

      /* "utils.pxd":1252
 *                 f_size += 1
 *             has_digit = True
 *             pos += 1             # <<<<<<<<<<<<<<
 *         elif ch == 46:  # '.'
 *             if has_dot:
*/
      __pyx_v_pos = (__pyx_v_pos + 1);

      /* "utils.pxd":1245
 *     while pos < token_len and f_size < 6:
 *         ch = str_read(token, pos)
 *         if is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             if not has_dot:
 *                 i_part = i_part * 10 + (ord(ch) - 48)
*/
      goto __pyx_L12;
    }

    /* "utils.pxd":1253
 *             has_digit = True
 *             pos += 1
 *         elif ch == 46:  # '.'             # <<<<<<<<<<<<<<
 *             if has_dot:
 *                 break
*/
    __pyx_t_1 = (__pyx_v_ch == 46);
    if (__pyx_t_1) {

      /* "utils.pxd":1254
 *             pos += 1
 *         elif ch == 46:  # '.'
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 break
 *             has_dot = True
*/
      if (__pyx_v_has_dot) {

        /* "utils.pxd":1255
 *         elif ch == 46:  # '.'
 *             if has_dot:
 *                 break             # <<<<<<<<<<<<<<
 *             has_dot = True
 *             pos += 1
*/
        goto __pyx_L9_break;

        /* "utils.pxd":1254
 *             pos += 1
 *         elif ch == 46:  # '.'
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 break
 *             has_dot = True
*/
      }

      /* "utils.pxd":1256
 *             if has_dot:
 *                 break
 *             has_dot = True             # <<<<<<<<<<<<<<
 *             pos += 1
 *         else:
*/
      __pyx_v_has_dot = 1;

      /* "utils.pxd":1257
 *                 break
 *             has_dot = True
 *             pos += 1             # <<<<<<<<<<<<<<
 *         else:
 *             break
*/
      __pyx_v_pos = (__pyx_v_pos + 1);

      /* "utils.pxd":1253
 *             has_digit = True
 *             pos += 1
 *         elif ch == 46:  # '.'             # <<<<<<<<<<<<<<
 *             if has_dot:
 *                 break
*/
      goto __pyx_L12;
    }

    /* "utils.pxd":1259
 *             pos += 1
 *         else:
 *             break             # <<<<<<<<<<<<<<
 * 
 *     # No digits / second out of range: invalid
*/
    /*else*/ {
      goto __pyx_L9_break;
    }
    __pyx_L12:;
  }
  __pyx_L9_break:;

  /* "utils.pxd":1262
 * 
 *     # No digits / second out of range: invalid
 *     if not has_digit or i_part > 59:             # <<<<<<<<<<<<<<
 *         out.second = out.microsecond = -1
 *     # Pure integer: second only
*/
  __pyx_t_2 = (!__pyx_v_has_digit);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L16_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_i_part > 59);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L16_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":1263
 *     # No digits / second out of range: invalid
 *     if not has_digit or i_part > 59:
 *         out.second = out.microsecond = -1             # <<<<<<<<<<<<<<
 *     # Pure integer: second only
 *     elif not has_dot:
*/
    __pyx_v_out.second = -1;
    __pyx_v_out.microsecond = -1;

    /* "utils.pxd":1262
 * 
 *     # No digits / second out of range: invalid
 *     if not has_digit or i_part > 59:             # <<<<<<<<<<<<<<
 *         out.second = out.microsecond = -1
 *     # Pure integer: second only
*/
    goto __pyx_L15;
  }

  /* "utils.pxd":1265
 *         out.second = out.microsecond = -1
 *     # Pure integer: second only
 *     elif not has_dot:             # <<<<<<<<<<<<<<
 *         out.second = i_part
 *         out.microsecond = -1
*/
  __pyx_t_1 = (!__pyx_v_has_dot);
  if (__pyx_t_1) {

    /* "utils.pxd":1266
 *     # Pure integer: second only
 *     elif not has_dot:
 *         out.second = i_part             # <<<<<<<<<<<<<<
 *         out.microsecond = -1
 *     # Float: second & microsecond
*/
    __pyx_v_out.second = __pyx_v_i_part;

    /* "utils.pxd":1267
 *     elif not has_dot:
 *         out.second = i_part
 *         out.microsecond = -1             # <<<<<<<<<<<<<<
 *     # Float: second & microsecond
 *     else:
*/
    __pyx_v_out.microsecond = -1;

    /* "utils.pxd":1265
 *         out.second = out.microsecond = -1
 *     # Pure integer: second only
 *     elif not has_dot:             # <<<<<<<<<<<<<<
 *         out.second = i_part
 *         out.microsecond = -1
*/
    goto __pyx_L15;
  }

  /* "utils.pxd":1270
 *     # Float: second & microsecond
 *     else:
 *         out.second = i_part             # <<<<<<<<<<<<<<
 *         out.microsecond = scale_fraction_to_us(f_part, f_size)
 *     return out
*/
  /*else*/ {
    __pyx_v_out.second = __pyx_v_i_part;

    /* "utils.pxd":1271
 *     else:
 *         out.second = i_part
 *         out.microsecond = scale_fraction_to_us(f_part, f_size)             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
    __pyx_v_out.microsecond = __pyx_f_7cytimes_5utils_scale_fraction_to_us(__pyx_v_f_part, __pyx_v_f_size);
  }
  __pyx_L15:;

  /* "utils.pxd":1272
 *         out.second = i_part
 *         out.microsecond = scale_fraction_to_us(f_part, f_size)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline int scale_fraction_to_us(int fraction, int fraction_size) noexcept:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":1194
 *     return scale_fraction_to_us(out, f_size)
 * 
 * cdef inline sf parse_second_and_fraction(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except *:             # <<<<<<<<<<<<<<
 *     """Parse a `seconds` token with an optional fractional part into (second, microsecond) `<'struct:sf'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_second_and_fraction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1274
 *     return out
 * 
 * cdef inline int scale_fraction_to_us(int fraction, int fraction_size) noexcept:             # <<<<<<<<<<<<<<
 *     """Scale a fractional time component to microseconds based on its size `<'int'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_scale_fraction_to_us(int __pyx_v_fraction, int __pyx_v_fraction_size) {
  int __pyx_r;

  /* "utils.pxd":1291
 *         # 123 milliseconds  123000 microseconds
 *     """
 *     if fraction_size == 6:             # <<<<<<<<<<<<<<
 *         return fraction
 *     elif fraction_size == 5:
*/
  switch (__pyx_v_fraction_size) {
    case 6:

    /* "utils.pxd":1292
 *     """
 *     if fraction_size == 6:
 *         return fraction             # <<<<<<<<<<<<<<
 *     elif fraction_size == 5:
 *         return fraction * 10
*/
    __pyx_r = __pyx_v_fraction;
    goto __pyx_L0;

    /* "utils.pxd":1291
 *         # 123 milliseconds  123000 microseconds
 *     """
 *     if fraction_size == 6:             # <<<<<<<<<<<<<<
 *         return fraction
 *     elif fraction_size == 5:
*/
    break;
    case 5:

    /* "utils.pxd":1294
 *         return fraction
 *     elif fraction_size == 5:
 *         return fraction * 10             # <<<<<<<<<<<<<<
 *     elif fraction_size == 4:
 *         return fraction * 100
*/
    __pyx_r = (__pyx_v_fraction * 10);
    goto __pyx_L0;

    /* "utils.pxd":1293
 *     if fraction_size == 6:
 *         return fraction
 *     elif fraction_size == 5:             # <<<<<<<<<<<<<<
 *         return fraction * 10
 *     elif fraction_size == 4:
*/
    break;
    case 4:

    /* "utils.pxd":1296
 *         return fraction * 10
 *     elif fraction_size == 4:
 *         return fraction * 100             # <<<<<<<<<<<<<<
 *     elif fraction_size == 3:
 *         return fraction * 1_000
*/
    __pyx_r = (__pyx_v_fraction * 0x64);
    goto __pyx_L0;

    /* "utils.pxd":1295
 *     elif fraction_size == 5:
 *         return fraction * 10
 *     elif fraction_size == 4:             # <<<<<<<<<<<<<<
 *         return fraction * 100
 *     elif fraction_size == 3:
*/
    break;
    case 3:

    /* "utils.pxd":1298
 *         return fraction * 100
 *     elif fraction_size == 3:
 *         return fraction * 1_000             # <<<<<<<<<<<<<<
 *     elif fraction_size == 2:
 *         return fraction * 10_000
*/
    __pyx_r = (__pyx_v_fraction * 0x3E8);
    goto __pyx_L0;

    /* "utils.pxd":1297
 *     elif fraction_size == 4:
 *         return fraction * 100
 *     elif fraction_size == 3:             # <<<<<<<<<<<<<<
 *         return fraction * 1_000
 *     elif fraction_size == 2:
*/
    break;
    case 2:

    /* "utils.pxd":1300
 *         return fraction * 1_000
 *     elif fraction_size == 2:
 *         return fraction * 10_000             # <<<<<<<<<<<<<<
 *     elif fraction_size == 1:
 *         return fraction * 100_000
*/
    __pyx_r = (__pyx_v_fraction * 0x2710);
    goto __pyx_L0;

    /* "utils.pxd":1299
 *     elif fraction_size == 3:
 *         return fraction * 1_000
 *     elif fraction_size == 2:             # <<<<<<<<<<<<<<
 *         return fraction * 10_000
 *     elif fraction_size == 1:
*/
    break;
    case 1:

    /* "utils.pxd":1302
 *         return fraction * 10_000
 *     elif fraction_size == 1:
 *         return fraction * 100_000             # <<<<<<<<<<<<<<
 *     else:
 *         return -1
*/
    __pyx_r = (__pyx_v_fraction * 0x186A0);
    goto __pyx_L0;

    /* "utils.pxd":1301
 *     elif fraction_size == 2:
 *         return fraction * 10_000
 *     elif fraction_size == 1:             # <<<<<<<<<<<<<<
 *         return fraction * 100_000
 *     else:
*/
    break;
    default:

    /* "utils.pxd":1304
 *         return fraction * 100_000
 *     else:
 *         return -1             # <<<<<<<<<<<<<<
 * 
 * # . slice and convert
*/
    __pyx_r = -1;
    goto __pyx_L0;
    break;
  }

  /* "utils.pxd":1274
 *     return out
 * 
 * cdef inline int scale_fraction_to_us(int fraction, int fraction_size) noexcept:             # <<<<<<<<<<<<<<
 *     """Scale a fractional time component to microseconds based on its size `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1307
 * 
 * # . slice and convert
 * cdef inline unsigned long long slice_to_uint(str token, Py_ssize_t start, Py_ssize_t size, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Slice a substring from a string and convert to an unsigned integer `<'int'>`.
 * 
*/

static CYTHON_INLINE unsigned PY_LONG_LONG __pyx_f_7cytimes_5utils_slice_to_uint(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_size, struct __pyx_opt_args_7cytimes_5utils_slice_to_uint *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_ssize_t __pyx_v_end;
  unsigned PY_LONG_LONG __pyx_v_out;
  Py_ssize_t __pyx_v_i;
  Py_UCS4 __pyx_v_ch;
  unsigned PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8[7];
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_UCS4 __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("slice_to_uint", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":1331
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_uint: 'token' cannot be None")
 *     if start < 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1332
 *     # Validate
 *     if token is None:
 *         raise ValueError("slice_to_uint: 'token' cannot be None")             # <<<<<<<<<<<<<<
 *     if start < 0:
 *         raise ValueError("slice_to_uint: 'start' must be >= 0, instead got %d" % start)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_slice_to_uint_token_cannot_be_No};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1332, __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_ERR(5, 1332, __pyx_L1_error)

    /* "utils.pxd":1331
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_uint: 'token' cannot be None")
 *     if start < 0:
*/
  }

  /* "utils.pxd":1333
 *     if token is None:
 *         raise ValueError("slice_to_uint: 'token' cannot be None")
 *     if start < 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_uint: 'start' must be >= 0, instead got %d" % start)
 *     if size <= 0:
*/
  __pyx_t_1 = (__pyx_v_start < 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1334
 *         raise ValueError("slice_to_uint: 'token' cannot be None")
 *     if start < 0:
 *         raise ValueError("slice_to_uint: 'start' must be >= 0, instead got %d" % start)             # <<<<<<<<<<<<<<
 *     if size <= 0:
 *         raise ValueError("slice_to_uint: 'size' must be > 0, instead got %d" % size)
*/
    __pyx_t_3 = NULL;
    __pyx_t_5 = PyLong_FromSsize_t(__pyx_v_start); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_slice_to_uint_start_must_be_0_in, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 1334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1334, __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_ERR(5, 1334, __pyx_L1_error)

    /* "utils.pxd":1333
 *     if token is None:
 *         raise ValueError("slice_to_uint: 'token' cannot be None")
 *     if start < 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_uint: 'start' must be >= 0, instead got %d" % start)
 *     if size <= 0:
*/
  }

  /* "utils.pxd":1335
 *     if start < 0:
 *         raise ValueError("slice_to_uint: 'start' must be >= 0, instead got %d" % start)
 *     if size <= 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_uint: 'size' must be > 0, instead got %d" % size)
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_size <= 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1336
 *         raise ValueError("slice_to_uint: 'start' must be >= 0, instead got %d" % start)
 *     if size <= 0:
 *         raise ValueError("slice_to_uint: 'size' must be > 0, instead got %d" % size)             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_t_6 = NULL;
    __pyx_t_3 = PyLong_FromSsize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1336, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_slice_to_uint_size_must_be_0_ins, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1336, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1336, __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_ERR(5, 1336, __pyx_L1_error)

    /* "utils.pxd":1335
 *     if start < 0:
 *         raise ValueError("slice_to_uint: 'start' must be >= 0, instead got %d" % start)
 *     if size <= 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_uint: 'size' must be > 0, instead got %d" % size)
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":1337
 *     if size <= 0:
 *         raise ValueError("slice_to_uint: 'size' must be > 0, instead got %d" % size)
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     cdef Py_ssize_t end = start + size
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1338
 *         raise ValueError("slice_to_uint: 'size' must be > 0, instead got %d" % size)
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t end = start + size
 *     if end > token_len:
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":1337
 *     if size <= 0:
 *         raise ValueError("slice_to_uint: 'size' must be > 0, instead got %d" % size)
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     cdef Py_ssize_t end = start + size
*/
  }

  /* "utils.pxd":1339
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     cdef Py_ssize_t end = start + size             # <<<<<<<<<<<<<<
 *     if end > token_len:
 *         raise ValueError("slice_to_uint: out of range (start=%d size=%d token_len=%d)" % (start, size, token_len))
*/
  __pyx_v_end = (__pyx_v_start + __pyx_v_size);

  /* "utils.pxd":1340
 *         token_len = str_len(token)
 *     cdef Py_ssize_t end = start + size
 *     if end > token_len:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_uint: out of range (start=%d size=%d token_len=%d)" % (start, size, token_len))
 * 
*/
  __pyx_t_1 = (__pyx_v_end > __pyx_v_token_len);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1341
 *     cdef Py_ssize_t end = start + size
 *     if end > token_len:
 *         raise ValueError("slice_to_uint: out of range (start=%d size=%d token_len=%d)" % (start, size, token_len))             # <<<<<<<<<<<<<<
 * 
 *     # Slice and convert
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_start, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 1341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_token_len, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_slice_to_uint_out_of_range_start;
    __pyx_t_8[1] = __pyx_t_6;
    __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_size;
    __pyx_t_8[3] = __pyx_t_3;
    __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u_token_len;
    __pyx_t_8[5] = __pyx_t_7;
    __pyx_t_8[6] = __pyx_mstate_global->__pyx_kp_u_;
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 7, 35 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127);
    if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1341, __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_ERR(5, 1341, __pyx_L1_error)

    /* "utils.pxd":1340
 *         token_len = str_len(token)
 *     cdef Py_ssize_t end = start + size
 *     if end > token_len:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_uint: out of range (start=%d size=%d token_len=%d)" % (start, size, token_len))
 * 
*/
  }

  /* "utils.pxd":1345
 *     # Slice and convert
 *     cdef:
 *         unsigned long long out = 0             # <<<<<<<<<<<<<<
 *         Py_ssize_t i
 *         Py_UCS4 ch
*/
  __pyx_v_out = 0;

  /* "utils.pxd":1349
 *         Py_UCS4 ch
 * 
 *     for i in range(start, end):             # <<<<<<<<<<<<<<
 *         ch = str_read(token, i)
 *         if not is_ascii_digit(ch):
*/
  __pyx_t_10 = __pyx_v_end;
  __pyx_t_11 = __pyx_t_10;
  for (__pyx_t_12 = __pyx_v_start; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "utils.pxd":1350
 * 
 *     for i in range(start, end):
 *         ch = str_read(token, i)             # <<<<<<<<<<<<<<
 *         if not is_ascii_digit(ch):
 *             raise ValueError(
*/
    __pyx_t_13 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_i); if (unlikely(__pyx_t_13 == ((Py_UCS4)-1))) __PYX_ERR(5, 1350, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_13;

    /* "utils.pxd":1351
 *     for i in range(start, end):
 *         ch = str_read(token, i)
 *         if not is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Cannot convert '%s' to unsigned integer. Contains invalid character '%s' "
*/
    __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_ch));
    if (unlikely(__pyx_t_1)) {

      /* "utils.pxd":1352
 *         ch = str_read(token, i)
 *         if not is_ascii_digit(ch):
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Cannot convert '%s' to unsigned integer. Contains invalid character '%s' "
 *                 "at position %d." % (token[start: end], str_chr(ch), i)
*/
      __pyx_t_9 = NULL;

      /* "utils.pxd":1354
 *             raise ValueError(
 *                 "Cannot convert '%s' to unsigned integer. Contains invalid character '%s' "
 *                 "at position %d." % (token[start: end], str_chr(ch), i)             # <<<<<<<<<<<<<<
 *             )
 *         out = out * 10 + (ord(ch) - 48)
*/
      if (unlikely(__pyx_v_token == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(5, 1354, __pyx_L1_error)
      }
      __pyx_t_5 = __Pyx_PyUnicode_Substring(__pyx_v_token, __pyx_v_start, __pyx_v_end); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1354, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1354, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = __Pyx_PyUnicode_Unicode(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1354, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1354, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_convert;
      __pyx_t_8[1] = __pyx_t_5;
      __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_to_unsigned_integer_Contains_in;
      __pyx_t_8[3] = __pyx_t_3;
      __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u_at_position;
      __pyx_t_8[5] = __pyx_t_7;
      __pyx_t_8[6] = __pyx_mstate_global->__pyx_kp_u__2;

      /* "utils.pxd":1353
 *         if not is_ascii_digit(ch):
 *             raise ValueError(
 *                 "Cannot convert '%s' to unsigned integer. Contains invalid character '%s' "             # <<<<<<<<<<<<<<
 *                 "at position %d." % (token[start: end], str_chr(ch), i)
 *             )
*/
      __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_8, 7, 16 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 51 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 14 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
      if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 1353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_4 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1352, __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_ERR(5, 1352, __pyx_L1_error)

      /* "utils.pxd":1351
 *     for i in range(start, end):
 *         ch = str_read(token, i)
 *         if not is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Cannot convert '%s' to unsigned integer. Contains invalid character '%s' "
*/
    }

    /* "utils.pxd":1356
 *                 "at position %d." % (token[start: end], str_chr(ch), i)
 *             )
 *         out = out * 10 + (ord(ch) - 48)             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
    __pyx_v_out = ((__pyx_v_out * 10) + (__Pyx_long_cast(__pyx_v_ch) - 48));
  }

  /* "utils.pxd":1357
 *             )
 *         out = out * 10 + (ord(ch) - 48)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline double slice_to_ufloat(str token, Py_ssize_t start, Py_ssize_t size, Py_ssize_t token_len=-1) except *:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":1307
 * 
 * # . slice and convert
 * cdef inline unsigned long long slice_to_uint(str token, Py_ssize_t start, Py_ssize_t size, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Slice a substring from a string and convert to an unsigned integer `<'int'>`.
 * 
*/

  /* function exit code */
  __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);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytimes.utils.slice_to_uint", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":1359
 *     return out
 * 
 * cdef inline double slice_to_ufloat(str token, Py_ssize_t start, Py_ssize_t size, Py_ssize_t token_len=-1) except *:             # <<<<<<<<<<<<<<
 *     """Slice a substring from a string and convert to a non-negative double-precision float `<'float'>`.
 * 
*/

static CYTHON_INLINE double __pyx_f_7cytimes_5utils_slice_to_ufloat(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_size, struct __pyx_opt_args_7cytimes_5utils_slice_to_ufloat *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_ssize_t __pyx_v_end;
  unsigned PY_LONG_LONG __pyx_v_i_part;
  unsigned PY_LONG_LONG __pyx_v_f_part;
  double __pyx_v_f_scale;
  int __pyx_v_has_dot;
  int __pyx_v_has_digit;
  Py_ssize_t __pyx_v_i;
  Py_UCS4 __pyx_v_ch;
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8[7];
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_UCS4 __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("slice_to_ufloat", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":1383
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_ufloat: 'token' cannot be None")
 *     if start < 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1384
 *     # Validate
 *     if token is None:
 *         raise ValueError("slice_to_ufloat: 'token' cannot be None")             # <<<<<<<<<<<<<<
 *     if start < 0:
 *         raise ValueError("slice_to_ufloat: 'start' must be >= 0, instead got %d" % start)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_slice_to_ufloat_token_cannot_be};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1384, __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_ERR(5, 1384, __pyx_L1_error)

    /* "utils.pxd":1383
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_ufloat: 'token' cannot be None")
 *     if start < 0:
*/
  }

  /* "utils.pxd":1385
 *     if token is None:
 *         raise ValueError("slice_to_ufloat: 'token' cannot be None")
 *     if start < 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_ufloat: 'start' must be >= 0, instead got %d" % start)
 *     if size <= 0:
*/
  __pyx_t_1 = (__pyx_v_start < 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1386
 *         raise ValueError("slice_to_ufloat: 'token' cannot be None")
 *     if start < 0:
 *         raise ValueError("slice_to_ufloat: 'start' must be >= 0, instead got %d" % start)             # <<<<<<<<<<<<<<
 *     if size <= 0:
 *         raise ValueError("slice_to_ufloat: 'size' must be > 0, instead got %d" % size)
*/
    __pyx_t_3 = NULL;
    __pyx_t_5 = PyLong_FromSsize_t(__pyx_v_start); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_slice_to_ufloat_start_must_be_0, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 1386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1386, __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_ERR(5, 1386, __pyx_L1_error)

    /* "utils.pxd":1385
 *     if token is None:
 *         raise ValueError("slice_to_ufloat: 'token' cannot be None")
 *     if start < 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_ufloat: 'start' must be >= 0, instead got %d" % start)
 *     if size <= 0:
*/
  }

  /* "utils.pxd":1387
 *     if start < 0:
 *         raise ValueError("slice_to_ufloat: 'start' must be >= 0, instead got %d" % start)
 *     if size <= 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_ufloat: 'size' must be > 0, instead got %d" % size)
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_size <= 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1388
 *         raise ValueError("slice_to_ufloat: 'start' must be >= 0, instead got %d" % start)
 *     if size <= 0:
 *         raise ValueError("slice_to_ufloat: 'size' must be > 0, instead got %d" % size)             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_t_6 = NULL;
    __pyx_t_3 = PyLong_FromSsize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_slice_to_ufloat_size_must_be_0_i, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1388, __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_ERR(5, 1388, __pyx_L1_error)

    /* "utils.pxd":1387
 *     if start < 0:
 *         raise ValueError("slice_to_ufloat: 'start' must be >= 0, instead got %d" % start)
 *     if size <= 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_ufloat: 'size' must be > 0, instead got %d" % size)
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":1389
 *     if size <= 0:
 *         raise ValueError("slice_to_ufloat: 'size' must be > 0, instead got %d" % size)
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     cdef Py_ssize_t end = start + size
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1390
 *         raise ValueError("slice_to_ufloat: 'size' must be > 0, instead got %d" % size)
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t end = start + size
 *     if end > token_len:
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":1389
 *     if size <= 0:
 *         raise ValueError("slice_to_ufloat: 'size' must be > 0, instead got %d" % size)
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     cdef Py_ssize_t end = start + size
*/
  }

  /* "utils.pxd":1391
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     cdef Py_ssize_t end = start + size             # <<<<<<<<<<<<<<
 *     if end > token_len:
 *         raise ValueError("slice_to_ufloat: out of range (start=%d size=%d token_len=%d)" % (start, size, token_len))
*/
  __pyx_v_end = (__pyx_v_start + __pyx_v_size);

  /* "utils.pxd":1392
 *         token_len = str_len(token)
 *     cdef Py_ssize_t end = start + size
 *     if end > token_len:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_ufloat: out of range (start=%d size=%d token_len=%d)" % (start, size, token_len))
 * 
*/
  __pyx_t_1 = (__pyx_v_end > __pyx_v_token_len);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1393
 *     cdef Py_ssize_t end = start + size
 *     if end > token_len:
 *         raise ValueError("slice_to_ufloat: out of range (start=%d size=%d token_len=%d)" % (start, size, token_len))             # <<<<<<<<<<<<<<
 * 
 *     # Slice and convert
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_start, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 1393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_token_len, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_slice_to_ufloat_out_of_range_sta;
    __pyx_t_8[1] = __pyx_t_6;
    __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_size;
    __pyx_t_8[3] = __pyx_t_3;
    __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u_token_len;
    __pyx_t_8[5] = __pyx_t_7;
    __pyx_t_8[6] = __pyx_mstate_global->__pyx_kp_u_;
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 7, 37 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127);
    if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1393, __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_ERR(5, 1393, __pyx_L1_error)

    /* "utils.pxd":1392
 *         token_len = str_len(token)
 *     cdef Py_ssize_t end = start + size
 *     if end > token_len:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_ufloat: out of range (start=%d size=%d token_len=%d)" % (start, size, token_len))
 * 
*/
  }

  /* "utils.pxd":1397
 *     # Slice and convert
 *     cdef:
 *         unsigned long long i_part = 0             # <<<<<<<<<<<<<<
 *         unsigned long long f_part = 0
 *         double f_scale = 1.0
*/
  __pyx_v_i_part = 0;

  /* "utils.pxd":1398
 *     cdef:
 *         unsigned long long i_part = 0
 *         unsigned long long f_part = 0             # <<<<<<<<<<<<<<
 *         double f_scale = 1.0
 *         bint has_dot = False
*/
  __pyx_v_f_part = 0;

  /* "utils.pxd":1399
 *         unsigned long long i_part = 0
 *         unsigned long long f_part = 0
 *         double f_scale = 1.0             # <<<<<<<<<<<<<<
 *         bint has_dot = False
 *         bint has_digit = False
*/
  __pyx_v_f_scale = 1.0;

  /* "utils.pxd":1400
 *         unsigned long long f_part = 0
 *         double f_scale = 1.0
 *         bint has_dot = False             # <<<<<<<<<<<<<<
 *         bint has_digit = False
 *         Py_ssize_t i
*/
  __pyx_v_has_dot = 0;

  /* "utils.pxd":1401
 *         double f_scale = 1.0
 *         bint has_dot = False
 *         bint has_digit = False             # <<<<<<<<<<<<<<
 *         Py_ssize_t i
 *         Py_UCS4 ch
*/
  __pyx_v_has_digit = 0;

  /* "utils.pxd":1405
 *         Py_UCS4 ch
 * 
 *     for i in range(start, end):             # <<<<<<<<<<<<<<
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):
*/
  __pyx_t_10 = __pyx_v_end;
  __pyx_t_11 = __pyx_t_10;
  for (__pyx_t_12 = __pyx_v_start; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "utils.pxd":1406
 * 
 *     for i in range(start, end):
 *         ch = str_read(token, i)             # <<<<<<<<<<<<<<
 *         if is_ascii_digit(ch):
 *             if not has_dot:
*/
    __pyx_t_13 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_i); if (unlikely(__pyx_t_13 == ((Py_UCS4)-1))) __PYX_ERR(5, 1406, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_13;

    /* "utils.pxd":1407
 *     for i in range(start, end):
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             if not has_dot:
 *                 i_part = i_part * 10 + (ord(ch) - 48)
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_ch);
    if (__pyx_t_1) {

      /* "utils.pxd":1408
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):
 *             if not has_dot:             # <<<<<<<<<<<<<<
 *                 i_part = i_part * 10 + (ord(ch) - 48)
 *             else:
*/
      __pyx_t_1 = (!__pyx_v_has_dot);
      if (__pyx_t_1) {

        /* "utils.pxd":1409
 *         if is_ascii_digit(ch):
 *             if not has_dot:
 *                 i_part = i_part * 10 + (ord(ch) - 48)             # <<<<<<<<<<<<<<
 *             else:
 *                 f_part = f_part * 10 + (ord(ch) - 48)
*/
        __pyx_v_i_part = ((__pyx_v_i_part * 10) + (__Pyx_long_cast(__pyx_v_ch) - 48));

        /* "utils.pxd":1408
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):
 *             if not has_dot:             # <<<<<<<<<<<<<<
 *                 i_part = i_part * 10 + (ord(ch) - 48)
 *             else:
*/
        goto __pyx_L11;
      }

      /* "utils.pxd":1411
 *                 i_part = i_part * 10 + (ord(ch) - 48)
 *             else:
 *                 f_part = f_part * 10 + (ord(ch) - 48)             # <<<<<<<<<<<<<<
 *                 f_scale *= 0.1
 *             has_digit = True
*/
      /*else*/ {
        __pyx_v_f_part = ((__pyx_v_f_part * 10) + (__Pyx_long_cast(__pyx_v_ch) - 48));

        /* "utils.pxd":1412
 *             else:
 *                 f_part = f_part * 10 + (ord(ch) - 48)
 *                 f_scale *= 0.1             # <<<<<<<<<<<<<<
 *             has_digit = True
 *         elif ch == 46:  # '.'
*/
        __pyx_v_f_scale = (__pyx_v_f_scale * 0.1);
      }
      __pyx_L11:;

      /* "utils.pxd":1413
 *                 f_part = f_part * 10 + (ord(ch) - 48)
 *                 f_scale *= 0.1
 *             has_digit = True             # <<<<<<<<<<<<<<
 *         elif ch == 46:  # '.'
 *             if has_dot:
*/
      __pyx_v_has_digit = 1;

      /* "utils.pxd":1407
 *     for i in range(start, end):
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             if not has_dot:
 *                 i_part = i_part * 10 + (ord(ch) - 48)
*/
      goto __pyx_L10;
    }

    /* "utils.pxd":1414
 *                 f_scale *= 0.1
 *             has_digit = True
 *         elif ch == 46:  # '.'             # <<<<<<<<<<<<<<
 *             if has_dot:
 *                 raise ValueError(
*/
    __pyx_t_1 = (__pyx_v_ch == 46);
    if (likely(__pyx_t_1)) {

      /* "utils.pxd":1415
 *             has_digit = True
 *         elif ch == 46:  # '.'
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot convert '%s' to non-negative float: "
*/
      if (unlikely(__pyx_v_has_dot)) {

        /* "utils.pxd":1416
 *         elif ch == 46:  # '.'
 *             if has_dot:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot convert '%s' to non-negative float: "
 *                     "contains more than one decimal point." % (token[start: end])
*/
        __pyx_t_9 = NULL;

        /* "utils.pxd":1418
 *                 raise ValueError(
 *                     "Cannot convert '%s' to non-negative float: "
 *                     "contains more than one decimal point." % (token[start: end])             # <<<<<<<<<<<<<<
 *                 )
 *             has_dot = True
*/
        if (unlikely(__pyx_v_token == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(5, 1418, __pyx_L1_error)
        }
        __pyx_t_5 = __Pyx_PyUnicode_Substring(__pyx_v_token, __pyx_v_start, __pyx_v_end); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1418, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_convert_s_to_non_negative, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1418, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1416, __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_ERR(5, 1416, __pyx_L1_error)

        /* "utils.pxd":1415
 *             has_digit = True
 *         elif ch == 46:  # '.'
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot convert '%s' to non-negative float: "
*/
      }

      /* "utils.pxd":1420
 *                     "contains more than one decimal point." % (token[start: end])
 *                 )
 *             has_dot = True             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError(
*/
      __pyx_v_has_dot = 1;

      /* "utils.pxd":1414
 *                 f_scale *= 0.1
 *             has_digit = True
 *         elif ch == 46:  # '.'             # <<<<<<<<<<<<<<
 *             if has_dot:
 *                 raise ValueError(
*/
      goto __pyx_L10;
    }

    /* "utils.pxd":1422
 *             has_dot = True
 *         else:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Cannot convert '%s' to non-negative float: contains invalid character '%s' "
 *                 "at position %d." % (token[start: end], str_chr(ch), i)
*/
    /*else*/ {
      __pyx_t_7 = NULL;

      /* "utils.pxd":1424
 *             raise ValueError(
 *                 "Cannot convert '%s' to non-negative float: contains invalid character '%s' "
 *                 "at position %d." % (token[start: end], str_chr(ch), i)             # <<<<<<<<<<<<<<
 *             )
 * 
*/
      if (unlikely(__pyx_v_token == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(5, 1424, __pyx_L1_error)
      }
      __pyx_t_9 = __Pyx_PyUnicode_Substring(__pyx_v_token, __pyx_v_start, __pyx_v_end); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1424, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_5 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1424, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyUnicode_Unicode(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1424, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1424, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_convert;
      __pyx_t_8[1] = __pyx_t_9;
      __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_to_non_negative_float_contains;
      __pyx_t_8[3] = __pyx_t_3;
      __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u_at_position;
      __pyx_t_8[5] = __pyx_t_5;
      __pyx_t_8[6] = __pyx_mstate_global->__pyx_kp_u__2;

      /* "utils.pxd":1423
 *         else:
 *             raise ValueError(
 *                 "Cannot convert '%s' to non-negative float: contains invalid character '%s' "             # <<<<<<<<<<<<<<
 *                 "at position %d." % (token[start: end], str_chr(ch), i)
 *             )
*/
      __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_8, 7, 16 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 53 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 14 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
      if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 1423, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_4 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1422, __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_ERR(5, 1422, __pyx_L1_error)
    }
    __pyx_L10:;
  }

  /* "utils.pxd":1427
 *             )
 * 
 *     if not has_digit:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot convert '%s' to non-negative float: "
*/
  __pyx_t_1 = (!__pyx_v_has_digit);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1428
 * 
 *     if not has_digit:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot convert '%s' to non-negative float: "
 *             "no digits found." % (token[start: end])
*/
    __pyx_t_6 = NULL;

    /* "utils.pxd":1430
 *         raise ValueError(
 *             "Cannot convert '%s' to non-negative float: "
 *             "no digits found." % (token[start: end])             # <<<<<<<<<<<<<<
 *         )
 *     elif not has_dot:
*/
    if (unlikely(__pyx_v_token == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(5, 1430, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_PyUnicode_Substring(__pyx_v_token, __pyx_v_start, __pyx_v_end); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_convert_s_to_non_negative_2, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1428, __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_ERR(5, 1428, __pyx_L1_error)

    /* "utils.pxd":1427
 *             )
 * 
 *     if not has_digit:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot convert '%s' to non-negative float: "
*/
  }

  /* "utils.pxd":1432
 *             "no digits found." % (token[start: end])
 *         )
 *     elif not has_dot:             # <<<<<<<<<<<<<<
 *         return (<double> i_part)
 *     else:
*/
  __pyx_t_1 = (!__pyx_v_has_dot);
  if (__pyx_t_1) {

    /* "utils.pxd":1433
 *         )
 *     elif not has_dot:
 *         return (<double> i_part)             # <<<<<<<<<<<<<<
 *     else:
 *         return (<double> i_part) + (<double> f_part) * f_scale
*/
    __pyx_r = ((double)__pyx_v_i_part);
    goto __pyx_L0;

    /* "utils.pxd":1432
 *             "no digits found." % (token[start: end])
 *         )
 *     elif not has_dot:             # <<<<<<<<<<<<<<
 *         return (<double> i_part)
 *     else:
*/
  }

  /* "utils.pxd":1435
 *         return (<double> i_part)
 *     else:
 *         return (<double> i_part) + (<double> f_part) * f_scale             # <<<<<<<<<<<<<<
 * 
 * # . parse and convert
*/
  /*else*/ {
    __pyx_r = (((double)__pyx_v_i_part) + (((double)__pyx_v_f_part) * __pyx_v_f_scale));
    goto __pyx_L0;
  }

  /* "utils.pxd":1359
 *     return out
 * 
 * cdef inline double slice_to_ufloat(str token, Py_ssize_t start, Py_ssize_t size, Py_ssize_t token_len=-1) except *:             # <<<<<<<<<<<<<<
 *     """Slice a substring from a string and convert to a non-negative double-precision float `<'float'>`.
 * 
*/

  /* function exit code */
  __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);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytimes.utils.slice_to_ufloat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":1438
 * 
 * # . parse and convert
 * cpdef inline long long parse_to_int(str token) except *:             # <<<<<<<<<<<<<<
 *     """Parse the first numeric token from a string into a `long long` `<'int'>`.
 * 
*/

static PyObject *__pyx_pw_7cytimes_5utils_1parse_to_int(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_parse_to_int(PyObject *__pyx_v_token, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_token_len;
  PY_LONG_LONG __pyx_v_out;
  int __pyx_v_has_digit;
  int __pyx_v_has_pos;
  int __pyx_v_neg;
  Py_ssize_t __pyx_v_i;
  Py_UCS4 __pyx_v_ch;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12[7];
  PyObject *__pyx_t_13 = NULL;
  PY_LONG_LONG __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_to_int", 0);

  /* "utils.pxd":1459
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("parse_to_int: 'token' cannot be None")
 *     cdef Py_ssize_t token_len = str_len(token)
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1460
 *     # Validate
 *     if token is None:
 *         raise ValueError("parse_to_int: 'token' cannot be None")             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t token_len = str_len(token)
 *     if token_len <= 0:
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_parse_to_int_token_cannot_be_Non};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1460, __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_ERR(5, 1460, __pyx_L1_error)

    /* "utils.pxd":1459
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("parse_to_int: 'token' cannot be None")
 *     cdef Py_ssize_t token_len = str_len(token)
*/
  }

  /* "utils.pxd":1461
 *     if token is None:
 *         raise ValueError("parse_to_int: 'token' cannot be None")
 *     cdef Py_ssize_t token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         return 0  # empty string  0
*/
  __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

  /* "utils.pxd":1462
 *         raise ValueError("parse_to_int: 'token' cannot be None")
 *     cdef Py_ssize_t token_len = str_len(token)
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         return 0  # empty string  0
 * 
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1463
 *     cdef Py_ssize_t token_len = str_len(token)
 *     if token_len <= 0:
 *         return 0  # empty string  0             # <<<<<<<<<<<<<<
 * 
 *     # Slice and convert
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":1462
 *         raise ValueError("parse_to_int: 'token' cannot be None")
 *     cdef Py_ssize_t token_len = str_len(token)
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         return 0  # empty string  0
 * 
*/
  }

  /* "utils.pxd":1467
 *     # Slice and convert
 *     cdef:
 *         long long out = 0             # <<<<<<<<<<<<<<
 *         bint has_digit = False
 *         bint has_pos = False
*/
  __pyx_v_out = 0;

  /* "utils.pxd":1468
 *     cdef:
 *         long long out = 0
 *         bint has_digit = False             # <<<<<<<<<<<<<<
 *         bint has_pos = False
 *         bint neg = False
*/
  __pyx_v_has_digit = 0;

  /* "utils.pxd":1469
 *         long long out = 0
 *         bint has_digit = False
 *         bint has_pos = False             # <<<<<<<<<<<<<<
 *         bint neg = False
 *         Py_ssize_t i
*/
  __pyx_v_has_pos = 0;

  /* "utils.pxd":1470
 *         bint has_digit = False
 *         bint has_pos = False
 *         bint neg = False             # <<<<<<<<<<<<<<
 *         Py_ssize_t i
 *         Py_UCS4 ch
*/
  __pyx_v_neg = 0;

  /* "utils.pxd":1474
 *         Py_UCS4 ch
 * 
 *     for i in range(token_len):             # <<<<<<<<<<<<<<
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):
*/
  __pyx_t_5 = __pyx_v_token_len;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "utils.pxd":1475
 * 
 *     for i in range(token_len):
 *         ch = str_read(token, i)             # <<<<<<<<<<<<<<
 *         if is_ascii_digit(ch):
 *             out = out * 10 + (ord(ch) - 48)
*/
    __pyx_t_8 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_i); if (unlikely(__pyx_t_8 == ((Py_UCS4)-1))) __PYX_ERR(5, 1475, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_8;

    /* "utils.pxd":1476
 *     for i in range(token_len):
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             out = out * 10 + (ord(ch) - 48)
 *             has_digit = True
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_ch);
    if (__pyx_t_1) {

      /* "utils.pxd":1477
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):
 *             out = out * 10 + (ord(ch) - 48)             # <<<<<<<<<<<<<<
 *             has_digit = True
 *         elif ch == 45:  # '-'
*/
      __pyx_v_out = ((__pyx_v_out * 10) + (__Pyx_long_cast(__pyx_v_ch) - 48));

      /* "utils.pxd":1478
 *         if is_ascii_digit(ch):
 *             out = out * 10 + (ord(ch) - 48)
 *             has_digit = True             # <<<<<<<<<<<<<<
 *         elif ch == 45:  # '-'
 *             if has_digit:
*/
      __pyx_v_has_digit = 1;

      /* "utils.pxd":1476
 *     for i in range(token_len):
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             out = out * 10 + (ord(ch) - 48)
 *             has_digit = True
*/
      goto __pyx_L7;
    }

    /* "utils.pxd":1479
 *             out = out * 10 + (ord(ch) - 48)
 *             has_digit = True
 *         elif ch == 45:  # '-'             # <<<<<<<<<<<<<<
 *             if has_digit:
 *                 raise ValueError(
*/
    __pyx_t_1 = (__pyx_v_ch == 45);
    if (__pyx_t_1) {

      /* "utils.pxd":1480
 *             has_digit = True
 *         elif ch == 45:  # '-'
 *             if has_digit:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      if (unlikely(__pyx_v_has_digit)) {

        /* "utils.pxd":1481
 *         elif ch == 45:  # '-'
 *             if has_digit:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to integer: "
 *                     "negative sign found after digits." % token
*/
        __pyx_t_3 = NULL;

        /* "utils.pxd":1483
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
 *                     "negative sign found after digits." % token             # <<<<<<<<<<<<<<
 *                 )
 *             if neg:
*/
        __pyx_t_9 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_integer_negati, __pyx_v_token); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1483, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1481, __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_ERR(5, 1481, __pyx_L1_error)

        /* "utils.pxd":1480
 *             has_digit = True
 *         elif ch == 45:  # '-'
 *             if has_digit:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      }

      /* "utils.pxd":1485
 *                     "negative sign found after digits." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      if (unlikely(__pyx_v_neg)) {

        /* "utils.pxd":1486
 *                 )
 *             if neg:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to integer: "
 *                     "contains more than one negative sign." % token
*/
        __pyx_t_9 = NULL;

        /* "utils.pxd":1488
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
 *                     "contains more than one negative sign." % token             # <<<<<<<<<<<<<<
 *                 )
 *             if has_pos:
*/
        __pyx_t_3 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_integer_contai, __pyx_v_token); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1488, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1486, __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_ERR(5, 1486, __pyx_L1_error)

        /* "utils.pxd":1485
 *                     "negative sign found after digits." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      }

      /* "utils.pxd":1490
 *                     "contains more than one negative sign." % token
 *                 )
 *             if has_pos:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      if (unlikely(__pyx_v_has_pos)) {

        /* "utils.pxd":1491
 *                 )
 *             if has_pos:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to integer: "
 *                     "contains mixed positive and negative sign." % token
*/
        __pyx_t_3 = NULL;

        /* "utils.pxd":1493
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
 *                     "contains mixed positive and negative sign." % token             # <<<<<<<<<<<<<<
 *                 )
 *             neg = True
*/
        __pyx_t_9 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_integer_contai_2, __pyx_v_token); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1493, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1491, __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_ERR(5, 1491, __pyx_L1_error)

        /* "utils.pxd":1490
 *                     "contains more than one negative sign." % token
 *                 )
 *             if has_pos:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      }

      /* "utils.pxd":1495
 *                     "contains mixed positive and negative sign." % token
 *                 )
 *             neg = True             # <<<<<<<<<<<<<<
 *         elif ch == 43:  # '+'
 *             if has_digit:
*/
      __pyx_v_neg = 1;

      /* "utils.pxd":1479
 *             out = out * 10 + (ord(ch) - 48)
 *             has_digit = True
 *         elif ch == 45:  # '-'             # <<<<<<<<<<<<<<
 *             if has_digit:
 *                 raise ValueError(
*/
      goto __pyx_L7;
    }

    /* "utils.pxd":1496
 *                 )
 *             neg = True
 *         elif ch == 43:  # '+'             # <<<<<<<<<<<<<<
 *             if has_digit:
 *                 raise ValueError(
*/
    __pyx_t_1 = (__pyx_v_ch == 43);
    if (__pyx_t_1) {

      /* "utils.pxd":1497
 *             neg = True
 *         elif ch == 43:  # '+'
 *             if has_digit:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      if (unlikely(__pyx_v_has_digit)) {

        /* "utils.pxd":1498
 *         elif ch == 43:  # '+'
 *             if has_digit:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to integer: "
 *                     "positive sign found after digits." % token
*/
        __pyx_t_9 = NULL;

        /* "utils.pxd":1500
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
 *                     "positive sign found after digits." % token             # <<<<<<<<<<<<<<
 *                 )
 *             if has_pos:
*/
        __pyx_t_3 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_integer_positi, __pyx_v_token); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1500, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1498, __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_ERR(5, 1498, __pyx_L1_error)

        /* "utils.pxd":1497
 *             neg = True
 *         elif ch == 43:  # '+'
 *             if has_digit:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      }

      /* "utils.pxd":1502
 *                     "positive sign found after digits." % token
 *                 )
 *             if has_pos:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      if (unlikely(__pyx_v_has_pos)) {

        /* "utils.pxd":1503
 *                 )
 *             if has_pos:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to integer: "
 *                     "contains more than one positive sign." % token
*/
        __pyx_t_3 = NULL;

        /* "utils.pxd":1505
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
 *                     "contains more than one positive sign." % token             # <<<<<<<<<<<<<<
 *                 )
 *             if neg:
*/
        __pyx_t_9 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_integer_contai_3, __pyx_v_token); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1505, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1503, __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_ERR(5, 1503, __pyx_L1_error)

        /* "utils.pxd":1502
 *                     "positive sign found after digits." % token
 *                 )
 *             if has_pos:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      }

      /* "utils.pxd":1507
 *                     "contains more than one positive sign." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      if (unlikely(__pyx_v_neg)) {

        /* "utils.pxd":1508
 *                 )
 *             if neg:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to integer: "
 *                     "contains mixed positive and negative sign." % token
*/
        __pyx_t_9 = NULL;

        /* "utils.pxd":1510
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
 *                     "contains mixed positive and negative sign." % token             # <<<<<<<<<<<<<<
 *                 )
 *             has_pos = True
*/
        __pyx_t_3 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_integer_contai_2, __pyx_v_token); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1510, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1508, __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_ERR(5, 1508, __pyx_L1_error)

        /* "utils.pxd":1507
 *                     "contains more than one positive sign." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      }

      /* "utils.pxd":1512
 *                     "contains mixed positive and negative sign." % token
 *                 )
 *             has_pos = True             # <<<<<<<<<<<<<<
 *         elif not has_digit:
 *             continue
*/
      __pyx_v_has_pos = 1;

      /* "utils.pxd":1496
 *                 )
 *             neg = True
 *         elif ch == 43:  # '+'             # <<<<<<<<<<<<<<
 *             if has_digit:
 *                 raise ValueError(
*/
      goto __pyx_L7;
    }

    /* "utils.pxd":1513
 *                 )
 *             has_pos = True
 *         elif not has_digit:             # <<<<<<<<<<<<<<
 *             continue
 *         else:
*/
    __pyx_t_1 = (!__pyx_v_has_digit);
    if (likely(__pyx_t_1)) {

      /* "utils.pxd":1514
 *             has_pos = True
 *         elif not has_digit:
 *             continue             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError(
*/
      goto __pyx_L5_continue;

      /* "utils.pxd":1513
 *                 )
 *             has_pos = True
 *         elif not has_digit:             # <<<<<<<<<<<<<<
 *             continue
 *         else:
*/
    }

    /* "utils.pxd":1516
 *             continue
 *         else:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Cannot parse '%s' to integer. Contains invalid character '%s' "
 *                 "at position %d." % (token, str_chr(ch), i)
*/
    /*else*/ {
      __pyx_t_3 = NULL;

      /* "utils.pxd":1518
 *             raise ValueError(
 *                 "Cannot parse '%s' to integer. Contains invalid character '%s' "
 *                 "at position %d." % (token, str_chr(ch), i)             # <<<<<<<<<<<<<<
 *             )
 * 
*/
      __pyx_t_9 = __Pyx_PyUnicode_Unicode(__pyx_v_token); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 1518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyUnicode_Unicode(__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 1518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 1518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_12[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_parse;
      __pyx_t_12[1] = __pyx_t_9;
      __pyx_t_12[2] = __pyx_mstate_global->__pyx_kp_u_to_integer_Contains_invalid_cha;
      __pyx_t_12[3] = __pyx_t_11;
      __pyx_t_12[4] = __pyx_mstate_global->__pyx_kp_u_at_position;
      __pyx_t_12[5] = __pyx_t_10;
      __pyx_t_12[6] = __pyx_mstate_global->__pyx_kp_u__2;

      /* "utils.pxd":1517
 *         else:
 *             raise ValueError(
 *                 "Cannot parse '%s' to integer. Contains invalid character '%s' "             # <<<<<<<<<<<<<<
 *                 "at position %d." % (token, str_chr(ch), i)
 *             )
*/
      __pyx_t_13 = __Pyx_PyUnicode_Join(__pyx_t_12, 7, 14 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 42 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11));
      if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 1517, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_4 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_13};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1516, __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_ERR(5, 1516, __pyx_L1_error)
    }
    __pyx_L7:;
    __pyx_L5_continue:;
  }

  /* "utils.pxd":1521
 *             )
 * 
 *     if not has_digit:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot parse '%s' to integer: no digits found." % token
*/
  __pyx_t_1 = (!__pyx_v_has_digit);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1522
 * 
 *     if not has_digit:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot parse '%s' to integer: no digits found." % token
 *         )
*/
    __pyx_t_13 = NULL;

    /* "utils.pxd":1523
 *     if not has_digit:
 *         raise ValueError(
 *             "Cannot parse '%s' to integer: no digits found." % token             # <<<<<<<<<<<<<<
 *         )
 *     return -out if neg else out
*/
    __pyx_t_3 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_integer_no_dig, __pyx_v_token); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_3};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1522, __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_ERR(5, 1522, __pyx_L1_error)

    /* "utils.pxd":1521
 *             )
 * 
 *     if not has_digit:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot parse '%s' to integer: no digits found." % token
*/
  }

  /* "utils.pxd":1525
 *             "Cannot parse '%s' to integer: no digits found." % token
 *         )
 *     return -out if neg else out             # <<<<<<<<<<<<<<
 * 
 * cpdef inline double parse_to_float(str token) except *:
*/
  if (__pyx_v_neg) {
    __pyx_t_14 = (-__pyx_v_out);
  } else {
    __pyx_t_14 = __pyx_v_out;
  }
  __pyx_r = __pyx_t_14;
  goto __pyx_L0;

  /* "utils.pxd":1438
 * 
 * # . parse and convert
 * cpdef inline long long parse_to_int(str token) except *:             # <<<<<<<<<<<<<<
 *     """Parse the first numeric token from a string into a `long long` `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cytimes.utils.parse_to_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_1parse_to_int(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_5utils_parse_to_int, "Parse the first numeric token from a string into a `long long` `<'int'>`.\n\n    The parser scans `token` left-to-right and **ignores any characters before the\n    first digit**. Once the first ASCII digit is encountered, it parses a base-10\n    integer consisting of:\n\n    - an optional sign (`+` or `-`) **that must appear before any digits**, and\n    - ASCII digits (`0`-`9`) for the integer part.\n\n    After at least one digit has been consumed, any non-digit character is considered\n    invalid and raises an error.\n\n    Notice overflow is not checked for the integer accumulator and may lead to\n    undefined behavior for large inputs.\n\n    :param token `<'str'>`: Input string to parse. Must not be `None`.\n    :return `<'int'>`: Parsed integer value, or `0` for empty strings.\n    :raises `<'ValueError'>`: When the input cannot be parsed as a valid integer.\n    ");
static PyMethodDef __pyx_mdef_7cytimes_5utils_1parse_to_int = {"parse_to_int", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_5utils_1parse_to_int, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_5utils_parse_to_int};
static PyObject *__pyx_pw_7cytimes_5utils_1parse_to_int(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_token = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse_to_int (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_token,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 1438, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1438, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "parse_to_int", 0) < (0)) __PYX_ERR(5, 1438, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("parse_to_int", 1, 1, 1, i); __PYX_ERR(5, 1438, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1438, __pyx_L3_error)
    }
    __pyx_v_token = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parse_to_int", 1, 1, 1, __pyx_nargs); __PYX_ERR(5, 1438, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.utils.parse_to_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_token), (&PyUnicode_Type), 1, "token", 1))) __PYX_ERR(5, 1438, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_5utils_parse_to_int(__pyx_self, __pyx_v_token);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_5utils_parse_to_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_token) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PY_LONG_LONG __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_to_int", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_5utils_parse_to_int(__pyx_v_token, 1); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 1438, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.parse_to_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":1527
 *     return -out if neg else out
 * 
 * cpdef inline double parse_to_float(str token) except *:             # <<<<<<<<<<<<<<
 *     """Parse the first numeric token from a string into a `double` `<'float'>`.
 * 
*/

static PyObject *__pyx_pw_7cytimes_5utils_3parse_to_float(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static CYTHON_INLINE double __pyx_f_7cytimes_5utils_parse_to_float(PyObject *__pyx_v_token, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_token_len;
  unsigned PY_LONG_LONG __pyx_v_i_part;
  unsigned PY_LONG_LONG __pyx_v_f_part;
  double __pyx_v_f_scale;
  int __pyx_v_has_dot;
  int __pyx_v_has_digit;
  int __pyx_v_has_pos;
  int __pyx_v_neg;
  Py_ssize_t __pyx_v_i;
  Py_UCS4 __pyx_v_ch;
  double __pyx_v_out;
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12[7];
  PyObject *__pyx_t_13 = NULL;
  double __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_to_float", 0);

  /* "utils.pxd":1550
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("parse_to_float: 'token' cannot be None")
 *     cdef Py_ssize_t token_len = str_len(token)
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1551
 *     # Validate
 *     if token is None:
 *         raise ValueError("parse_to_float: 'token' cannot be None")             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t token_len = str_len(token)
 *     if token_len <= 0:
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_parse_to_float_token_cannot_be_N};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1551, __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_ERR(5, 1551, __pyx_L1_error)

    /* "utils.pxd":1550
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("parse_to_float: 'token' cannot be None")
 *     cdef Py_ssize_t token_len = str_len(token)
*/
  }

  /* "utils.pxd":1552
 *     if token is None:
 *         raise ValueError("parse_to_float: 'token' cannot be None")
 *     cdef Py_ssize_t token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         return 0.0  # empty string  0.0
*/
  __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

  /* "utils.pxd":1553
 *         raise ValueError("parse_to_float: 'token' cannot be None")
 *     cdef Py_ssize_t token_len = str_len(token)
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         return 0.0  # empty string  0.0
 * 
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1554
 *     cdef Py_ssize_t token_len = str_len(token)
 *     if token_len <= 0:
 *         return 0.0  # empty string  0.0             # <<<<<<<<<<<<<<
 * 
 *     # Slice and convert
*/
    __pyx_r = 0.0;
    goto __pyx_L0;

    /* "utils.pxd":1553
 *         raise ValueError("parse_to_float: 'token' cannot be None")
 *     cdef Py_ssize_t token_len = str_len(token)
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         return 0.0  # empty string  0.0
 * 
*/
  }

  /* "utils.pxd":1558
 *     # Slice and convert
 *     cdef:
 *         unsigned long long i_part = 0             # <<<<<<<<<<<<<<
 *         unsigned long long f_part = 0
 *         double f_scale = 1.0
*/
  __pyx_v_i_part = 0;

  /* "utils.pxd":1559
 *     cdef:
 *         unsigned long long i_part = 0
 *         unsigned long long f_part = 0             # <<<<<<<<<<<<<<
 *         double f_scale = 1.0
 *         bint has_dot = False
*/
  __pyx_v_f_part = 0;

  /* "utils.pxd":1560
 *         unsigned long long i_part = 0
 *         unsigned long long f_part = 0
 *         double f_scale = 1.0             # <<<<<<<<<<<<<<
 *         bint has_dot = False
 *         bint has_digit = False
*/
  __pyx_v_f_scale = 1.0;

  /* "utils.pxd":1561
 *         unsigned long long f_part = 0
 *         double f_scale = 1.0
 *         bint has_dot = False             # <<<<<<<<<<<<<<
 *         bint has_digit = False
 *         bint has_pos = False
*/
  __pyx_v_has_dot = 0;

  /* "utils.pxd":1562
 *         double f_scale = 1.0
 *         bint has_dot = False
 *         bint has_digit = False             # <<<<<<<<<<<<<<
 *         bint has_pos = False
 *         bint neg = False
*/
  __pyx_v_has_digit = 0;

  /* "utils.pxd":1563
 *         bint has_dot = False
 *         bint has_digit = False
 *         bint has_pos = False             # <<<<<<<<<<<<<<
 *         bint neg = False
 *         Py_ssize_t i
*/
  __pyx_v_has_pos = 0;

  /* "utils.pxd":1564
 *         bint has_digit = False
 *         bint has_pos = False
 *         bint neg = False             # <<<<<<<<<<<<<<
 *         Py_ssize_t i
 *         Py_UCS4 ch
*/
  __pyx_v_neg = 0;

  /* "utils.pxd":1569
 *         double out
 * 
 *     for i in range(token_len):             # <<<<<<<<<<<<<<
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):
*/
  __pyx_t_5 = __pyx_v_token_len;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "utils.pxd":1570
 * 
 *     for i in range(token_len):
 *         ch = str_read(token, i)             # <<<<<<<<<<<<<<
 *         if is_ascii_digit(ch):
 *             if not has_dot:
*/
    __pyx_t_8 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_i); if (unlikely(__pyx_t_8 == ((Py_UCS4)-1))) __PYX_ERR(5, 1570, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_8;

    /* "utils.pxd":1571
 *     for i in range(token_len):
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             if not has_dot:
 *                 i_part = i_part * 10 + (ord(ch) - 48)
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_ch);
    if (__pyx_t_1) {

      /* "utils.pxd":1572
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):
 *             if not has_dot:             # <<<<<<<<<<<<<<
 *                 i_part = i_part * 10 + (ord(ch) - 48)
 *             else:
*/
      __pyx_t_1 = (!__pyx_v_has_dot);
      if (__pyx_t_1) {

        /* "utils.pxd":1573
 *         if is_ascii_digit(ch):
 *             if not has_dot:
 *                 i_part = i_part * 10 + (ord(ch) - 48)             # <<<<<<<<<<<<<<
 *             else:
 *                 f_part = f_part * 10 + (ord(ch) - 48)
*/
        __pyx_v_i_part = ((__pyx_v_i_part * 10) + (__Pyx_long_cast(__pyx_v_ch) - 48));

        /* "utils.pxd":1572
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):
 *             if not has_dot:             # <<<<<<<<<<<<<<
 *                 i_part = i_part * 10 + (ord(ch) - 48)
 *             else:
*/
        goto __pyx_L8;
      }

      /* "utils.pxd":1575
 *                 i_part = i_part * 10 + (ord(ch) - 48)
 *             else:
 *                 f_part = f_part * 10 + (ord(ch) - 48)             # <<<<<<<<<<<<<<
 *                 f_scale *= 0.1
 *             has_digit = True
*/
      /*else*/ {
        __pyx_v_f_part = ((__pyx_v_f_part * 10) + (__Pyx_long_cast(__pyx_v_ch) - 48));

        /* "utils.pxd":1576
 *             else:
 *                 f_part = f_part * 10 + (ord(ch) - 48)
 *                 f_scale *= 0.1             # <<<<<<<<<<<<<<
 *             has_digit = True
 *         elif ch == 46:  # '.'
*/
        __pyx_v_f_scale = (__pyx_v_f_scale * 0.1);
      }
      __pyx_L8:;

      /* "utils.pxd":1577
 *                 f_part = f_part * 10 + (ord(ch) - 48)
 *                 f_scale *= 0.1
 *             has_digit = True             # <<<<<<<<<<<<<<
 *         elif ch == 46:  # '.'
 *             if has_dot:
*/
      __pyx_v_has_digit = 1;

      /* "utils.pxd":1571
 *     for i in range(token_len):
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             if not has_dot:
 *                 i_part = i_part * 10 + (ord(ch) - 48)
*/
      goto __pyx_L7;
    }

    /* "utils.pxd":1578
 *                 f_scale *= 0.1
 *             has_digit = True
 *         elif ch == 46:  # '.'             # <<<<<<<<<<<<<<
 *             if has_dot:
 *                 raise ValueError(
*/
    __pyx_t_1 = (__pyx_v_ch == 46);
    if (__pyx_t_1) {

      /* "utils.pxd":1579
 *             has_digit = True
 *         elif ch == 46:  # '.'
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      if (unlikely(__pyx_v_has_dot)) {

        /* "utils.pxd":1580
 *         elif ch == 46:  # '.'
 *             if has_dot:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "contains more than one decimal point." % token
*/
        __pyx_t_3 = NULL;

        /* "utils.pxd":1582
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
 *                     "contains more than one decimal point." % token             # <<<<<<<<<<<<<<
 *                 )
 *             has_dot = True
*/
        __pyx_t_9 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_float_contains, __pyx_v_token); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1582, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1580, __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_ERR(5, 1580, __pyx_L1_error)

        /* "utils.pxd":1579
 *             has_digit = True
 *         elif ch == 46:  # '.'
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "utils.pxd":1584
 *                     "contains more than one decimal point." % token
 *                 )
 *             has_dot = True             # <<<<<<<<<<<<<<
 *         elif ch == 45:  # '-'
 *             if has_digit:
*/
      __pyx_v_has_dot = 1;

      /* "utils.pxd":1578
 *                 f_scale *= 0.1
 *             has_digit = True
 *         elif ch == 46:  # '.'             # <<<<<<<<<<<<<<
 *             if has_dot:
 *                 raise ValueError(
*/
      goto __pyx_L7;
    }

    /* "utils.pxd":1585
 *                 )
 *             has_dot = True
 *         elif ch == 45:  # '-'             # <<<<<<<<<<<<<<
 *             if has_digit:
 *                 raise ValueError(
*/
    __pyx_t_1 = (__pyx_v_ch == 45);
    if (__pyx_t_1) {

      /* "utils.pxd":1586
 *             has_dot = True
 *         elif ch == 45:  # '-'
 *             if has_digit:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      if (unlikely(__pyx_v_has_digit)) {

        /* "utils.pxd":1587
 *         elif ch == 45:  # '-'
 *             if has_digit:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "negative sign found after digits." % token
*/
        __pyx_t_9 = NULL;

        /* "utils.pxd":1589
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
 *                     "negative sign found after digits." % token             # <<<<<<<<<<<<<<
 *                 )
 *             if has_dot:
*/
        __pyx_t_3 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_float_negative, __pyx_v_token); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1589, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1587, __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_ERR(5, 1587, __pyx_L1_error)

        /* "utils.pxd":1586
 *             has_dot = True
 *         elif ch == 45:  # '-'
 *             if has_digit:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "utils.pxd":1591
 *                     "negative sign found after digits." % token
 *                 )
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      if (unlikely(__pyx_v_has_dot)) {

        /* "utils.pxd":1592
 *                 )
 *             if has_dot:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "negative sign found after decimal point." % token
*/
        __pyx_t_3 = NULL;

        /* "utils.pxd":1594
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
 *                     "negative sign found after decimal point." % token             # <<<<<<<<<<<<<<
 *                 )
 *             if neg:
*/
        __pyx_t_9 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_float_negative_2, __pyx_v_token); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1594, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1592, __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_ERR(5, 1592, __pyx_L1_error)

        /* "utils.pxd":1591
 *                     "negative sign found after digits." % token
 *                 )
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "utils.pxd":1596
 *                     "negative sign found after decimal point." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      if (unlikely(__pyx_v_neg)) {

        /* "utils.pxd":1597
 *                 )
 *             if neg:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "contains more than one negative sign." % token
*/
        __pyx_t_9 = NULL;

        /* "utils.pxd":1599
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
 *                     "contains more than one negative sign." % token             # <<<<<<<<<<<<<<
 *                 )
 *             if has_pos:
*/
        __pyx_t_3 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_float_contains_2, __pyx_v_token); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1599, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1597, __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_ERR(5, 1597, __pyx_L1_error)

        /* "utils.pxd":1596
 *                     "negative sign found after decimal point." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "utils.pxd":1601
 *                     "contains more than one negative sign." % token
 *                 )
 *             if has_pos:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      if (unlikely(__pyx_v_has_pos)) {

        /* "utils.pxd":1602
 *                 )
 *             if has_pos:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "contains mixed positive and negative sign." % token
*/
        __pyx_t_3 = NULL;

        /* "utils.pxd":1604
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
 *                     "contains mixed positive and negative sign." % token             # <<<<<<<<<<<<<<
 *                 )
 *             neg = True
*/
        __pyx_t_9 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_float_contains_3, __pyx_v_token); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1604, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1602, __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_ERR(5, 1602, __pyx_L1_error)

        /* "utils.pxd":1601
 *                     "contains more than one negative sign." % token
 *                 )
 *             if has_pos:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "utils.pxd":1606
 *                     "contains mixed positive and negative sign." % token
 *                 )
 *             neg = True             # <<<<<<<<<<<<<<
 *         elif ch == 43:  # '+'
 *             if has_digit:
*/
      __pyx_v_neg = 1;

      /* "utils.pxd":1585
 *                 )
 *             has_dot = True
 *         elif ch == 45:  # '-'             # <<<<<<<<<<<<<<
 *             if has_digit:
 *                 raise ValueError(
*/
      goto __pyx_L7;
    }

    /* "utils.pxd":1607
 *                 )
 *             neg = True
 *         elif ch == 43:  # '+'             # <<<<<<<<<<<<<<
 *             if has_digit:
 *                 raise ValueError(
*/
    __pyx_t_1 = (__pyx_v_ch == 43);
    if (__pyx_t_1) {

      /* "utils.pxd":1608
 *             neg = True
 *         elif ch == 43:  # '+'
 *             if has_digit:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      if (unlikely(__pyx_v_has_digit)) {

        /* "utils.pxd":1609
 *         elif ch == 43:  # '+'
 *             if has_digit:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "positive sign found after digits." % token
*/
        __pyx_t_9 = NULL;

        /* "utils.pxd":1611
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
 *                     "positive sign found after digits." % token             # <<<<<<<<<<<<<<
 *                 )
 *             if has_dot:
*/
        __pyx_t_3 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_float_positive, __pyx_v_token); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1611, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1609, __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_ERR(5, 1609, __pyx_L1_error)

        /* "utils.pxd":1608
 *             neg = True
 *         elif ch == 43:  # '+'
 *             if has_digit:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "utils.pxd":1613
 *                     "positive sign found after digits." % token
 *                 )
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      if (unlikely(__pyx_v_has_dot)) {

        /* "utils.pxd":1614
 *                 )
 *             if has_dot:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "positive sign found after decimal point." % token
*/
        __pyx_t_3 = NULL;

        /* "utils.pxd":1616
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
 *                     "positive sign found after decimal point." % token             # <<<<<<<<<<<<<<
 *                 )
 *             if has_pos:
*/
        __pyx_t_9 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_float_positive_2, __pyx_v_token); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1616, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1614, __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_ERR(5, 1614, __pyx_L1_error)

        /* "utils.pxd":1613
 *                     "positive sign found after digits." % token
 *                 )
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "utils.pxd":1618
 *                     "positive sign found after decimal point." % token
 *                 )
 *             if has_pos:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      if (unlikely(__pyx_v_has_pos)) {

        /* "utils.pxd":1619
 *                 )
 *             if has_pos:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "contains more than one positive sign." % token
*/
        __pyx_t_9 = NULL;

        /* "utils.pxd":1621
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
 *                     "contains more than one positive sign." % token             # <<<<<<<<<<<<<<
 *                 )
 *             if neg:
*/
        __pyx_t_3 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_float_contains_4, __pyx_v_token); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1621, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1619, __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_ERR(5, 1619, __pyx_L1_error)

        /* "utils.pxd":1618
 *                     "positive sign found after decimal point." % token
 *                 )
 *             if has_pos:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "utils.pxd":1623
 *                     "contains more than one positive sign." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      if (unlikely(__pyx_v_neg)) {

        /* "utils.pxd":1624
 *                 )
 *             if neg:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "contains mixed positive and negative sign." % token
*/
        __pyx_t_3 = NULL;

        /* "utils.pxd":1626
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
 *                     "contains mixed positive and negative sign." % token             # <<<<<<<<<<<<<<
 *                 )
 *             has_pos = True
*/
        __pyx_t_9 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_float_contains_3, __pyx_v_token); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1626, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1624, __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_ERR(5, 1624, __pyx_L1_error)

        /* "utils.pxd":1623
 *                     "contains more than one positive sign." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "utils.pxd":1628
 *                     "contains mixed positive and negative sign." % token
 *                 )
 *             has_pos = True             # <<<<<<<<<<<<<<
 *         elif not has_digit:
 *             continue
*/
      __pyx_v_has_pos = 1;

      /* "utils.pxd":1607
 *                 )
 *             neg = True
 *         elif ch == 43:  # '+'             # <<<<<<<<<<<<<<
 *             if has_digit:
 *                 raise ValueError(
*/
      goto __pyx_L7;
    }

    /* "utils.pxd":1629
 *                 )
 *             has_pos = True
 *         elif not has_digit:             # <<<<<<<<<<<<<<
 *             continue
 *         else:
*/
    __pyx_t_1 = (!__pyx_v_has_digit);
    if (likely(__pyx_t_1)) {

      /* "utils.pxd":1630
 *             has_pos = True
 *         elif not has_digit:
 *             continue             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError(
*/
      goto __pyx_L5_continue;

      /* "utils.pxd":1629
 *                 )
 *             has_pos = True
 *         elif not has_digit:             # <<<<<<<<<<<<<<
 *             continue
 *         else:
*/
    }

    /* "utils.pxd":1632
 *             continue
 *         else:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Cannot parse '%s' to float: contains invalid character '%s' "
 *                 "at position %d." % (token, str_chr(ch), i)
*/
    /*else*/ {
      __pyx_t_9 = NULL;

      /* "utils.pxd":1634
 *             raise ValueError(
 *                 "Cannot parse '%s' to float: contains invalid character '%s' "
 *                 "at position %d." % (token, str_chr(ch), i)             # <<<<<<<<<<<<<<
 *             )
 * 
*/
      __pyx_t_3 = __Pyx_PyUnicode_Unicode(__pyx_v_token); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1634, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 1634, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyUnicode_Unicode(__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 1634, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 1634, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_12[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_parse;
      __pyx_t_12[1] = __pyx_t_3;
      __pyx_t_12[2] = __pyx_mstate_global->__pyx_kp_u_to_float_contains_invalid_chara;
      __pyx_t_12[3] = __pyx_t_11;
      __pyx_t_12[4] = __pyx_mstate_global->__pyx_kp_u_at_position;
      __pyx_t_12[5] = __pyx_t_10;
      __pyx_t_12[6] = __pyx_mstate_global->__pyx_kp_u__2;

      /* "utils.pxd":1633
 *         else:
 *             raise ValueError(
 *                 "Cannot parse '%s' to float: contains invalid character '%s' "             # <<<<<<<<<<<<<<
 *                 "at position %d." % (token, str_chr(ch), i)
 *             )
*/
      __pyx_t_13 = __Pyx_PyUnicode_Join(__pyx_t_12, 7, 14 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 40 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11));
      if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 1633, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_4 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_13};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1632, __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_ERR(5, 1632, __pyx_L1_error)
    }
    __pyx_L7:;
    __pyx_L5_continue:;
  }

  /* "utils.pxd":1637
 *             )
 * 
 *     if not has_digit:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot parse '%s' to float: no digits found." % token
*/
  __pyx_t_1 = (!__pyx_v_has_digit);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1638
 * 
 *     if not has_digit:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot parse '%s' to float: no digits found." % token
 *         )
*/
    __pyx_t_13 = NULL;

    /* "utils.pxd":1639
 *     if not has_digit:
 *         raise ValueError(
 *             "Cannot parse '%s' to float: no digits found." % token             # <<<<<<<<<<<<<<
 *         )
 *     elif not has_dot:
*/
    __pyx_t_9 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_float_no_digit, __pyx_v_token); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1638, __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_ERR(5, 1638, __pyx_L1_error)

    /* "utils.pxd":1637
 *             )
 * 
 *     if not has_digit:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot parse '%s' to float: no digits found." % token
*/
  }

  /* "utils.pxd":1641
 *             "Cannot parse '%s' to float: no digits found." % token
 *         )
 *     elif not has_dot:             # <<<<<<<<<<<<<<
 *         out = (<double> i_part)
 *     else:
*/
  __pyx_t_1 = (!__pyx_v_has_dot);
  if (__pyx_t_1) {

    /* "utils.pxd":1642
 *         )
 *     elif not has_dot:
 *         out = (<double> i_part)             # <<<<<<<<<<<<<<
 *     else:
 *         out = (<double> i_part) + (<double> f_part) * f_scale
*/
    __pyx_v_out = ((double)__pyx_v_i_part);

    /* "utils.pxd":1641
 *             "Cannot parse '%s' to float: no digits found." % token
 *         )
 *     elif not has_dot:             # <<<<<<<<<<<<<<
 *         out = (<double> i_part)
 *     else:
*/
    goto __pyx_L18;
  }

  /* "utils.pxd":1644
 *         out = (<double> i_part)
 *     else:
 *         out = (<double> i_part) + (<double> f_part) * f_scale             # <<<<<<<<<<<<<<
 *     return -out if neg else out
 * 
*/
  /*else*/ {
    __pyx_v_out = (((double)__pyx_v_i_part) + (((double)__pyx_v_f_part) * __pyx_v_f_scale));
  }
  __pyx_L18:;

  /* "utils.pxd":1645
 *     else:
 *         out = (<double> i_part) + (<double> f_part) * f_scale
 *     return -out if neg else out             # <<<<<<<<<<<<<<
 * 
 * # Time -------------------------------------------------------------------------------------------------
*/
  if (__pyx_v_neg) {
    __pyx_t_14 = (-__pyx_v_out);
  } else {
    __pyx_t_14 = __pyx_v_out;
  }
  __pyx_r = __pyx_t_14;
  goto __pyx_L0;

  /* "utils.pxd":1527
 *     return -out if neg else out
 * 
 * cpdef inline double parse_to_float(str token) except *:             # <<<<<<<<<<<<<<
 *     """Parse the first numeric token from a string into a `double` `<'float'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cytimes.utils.parse_to_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_3parse_to_float(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_5utils_2parse_to_float, "Parse the first numeric token from a string into a `double` `<'float'>`.\n\n    The parser scans `token` left-to-right and **ignores any characters before the\n    first digit**. Once the first ASCII digit is encountered, it parses a decimal\n    number consisting of:\n\n    - an optional sign (`+` or `-`) **that must appear before any digits and before\n      the decimal point**, and\n    - an optional decimal point (`.`), and\n    - ASCII digits (`0`-`9`) for the integer and/or fractional part.\n\n    After at least one digit has been consumed, any non-digit character other than\n    a single decimal point is considered invalid and raises an error.\n\n    Notice overflow is not checked at both integer and fraction parts\n    and may lead to undefined behavior.\n\n    :param token `<'str'>`: Input string to parse. Must not be `None`.\n    :return `<'float'>`: Parsed floating-point value, or `0.0` for empty strings.\n    :raises `<'ValueError'>`: When the input cannot be parsed as a valid float.\n    ");
static PyMethodDef __pyx_mdef_7cytimes_5utils_3parse_to_float = {"parse_to_float", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_5utils_3parse_to_float, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_5utils_2parse_to_float};
static PyObject *__pyx_pw_7cytimes_5utils_3parse_to_float(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_token = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse_to_float (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_token,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 1527, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1527, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "parse_to_float", 0) < (0)) __PYX_ERR(5, 1527, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("parse_to_float", 1, 1, 1, i); __PYX_ERR(5, 1527, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1527, __pyx_L3_error)
    }
    __pyx_v_token = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parse_to_float", 1, 1, 1, __pyx_nargs); __PYX_ERR(5, 1527, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.utils.parse_to_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_token), (&PyUnicode_Type), 1, "token", 1))) __PYX_ERR(5, 1527, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_5utils_2parse_to_float(__pyx_self, __pyx_v_token);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_5utils_2parse_to_float(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_token) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_to_float", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_5utils_parse_to_float(__pyx_v_token, 1); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(5, 1527, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.parse_to_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":1649
 * # Time -------------------------------------------------------------------------------------------------
 * # . gmtime
 * cdef inline tm tm_gmtime(double ts) except *:             # <<<<<<<<<<<<<<
 *     """Convert a Unix timestamp to UTC calendar time `<'struct:tm'>`.
 * 
*/

static CYTHON_INLINE struct tm __pyx_f_7cytimes_5utils_tm_gmtime(double __pyx_v_ts) {
  time_t __pyx_v_tic;
  struct tm *__pyx_v_t;
  struct tm __pyx_v_out;
  struct tm __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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tm_gmtime", 0);

  /* "utils.pxd":1670
 *     """
 *     cdef:
 *         time.time_t tic = <time.time_t> math.floor(ts)             # <<<<<<<<<<<<<<
 *         tm* t = time.gmtime(&tic)
 *     if t is NULL:
*/
  __pyx_v_tic = ((time_t)floor(__pyx_v_ts));

  /* "utils.pxd":1671
 *     cdef:
 *         time.time_t tic = <time.time_t> math.floor(ts)
 *         tm* t = time.gmtime(&tic)             # <<<<<<<<<<<<<<
 *     if t is NULL:
 *         raise RuntimeError("Fail to convert timestamp '%s' to UTC calendar time." % ts)
*/
  __pyx_v_t = gmtime((&__pyx_v_tic));

  /* "utils.pxd":1672
 *         time.time_t tic = <time.time_t> math.floor(ts)
 *         tm* t = time.gmtime(&tic)
 *     if t is NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Fail to convert timestamp '%s' to UTC calendar time." % ts)
 * 
*/
  __pyx_t_1 = (__pyx_v_t == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1673
 *         tm* t = time.gmtime(&tic)
 *     if t is NULL:
 *         raise RuntimeError("Fail to convert timestamp '%s' to UTC calendar time." % ts)             # <<<<<<<<<<<<<<
 * 
 *     # Fix 0-based date values (and the 1900-based year).
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_ts); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Fail_to_convert_timestamp_s_to_U, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1673, __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_ERR(5, 1673, __pyx_L1_error)

    /* "utils.pxd":1672
 *         time.time_t tic = <time.time_t> math.floor(ts)
 *         tm* t = time.gmtime(&tic)
 *     if t is NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Fail to convert timestamp '%s' to UTC calendar time." % ts)
 * 
*/
  }

  /* "utils.pxd":1677
 *     # Fix 0-based date values (and the 1900-based year).
 *     # See tmtotuple() in https://github.com/python/cpython/blob/master/Modules/timemodule.c
 *     cdef tm out = t[0]                   # copy struct             # <<<<<<<<<<<<<<
 *     out.tm_year += 1900                  # years since 1900  Gregorian absolute year
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12
*/
  __pyx_v_out = (__pyx_v_t[0]);

  /* "utils.pxd":1678
 *     # See tmtotuple() in https://github.com/python/cpython/blob/master/Modules/timemodule.c
 *     cdef tm out = t[0]                   # copy struct
 *     out.tm_year += 1900                  # years since 1900  Gregorian absolute year             # <<<<<<<<<<<<<<
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12
 *     if out.tm_sec > 59:                  # clamp leap seconds
*/
  __pyx_v_out.tm_year = (__pyx_v_out.tm_year + 0x76C);

  /* "utils.pxd":1679
 *     cdef tm out = t[0]                   # copy struct
 *     out.tm_year += 1900                  # years since 1900  Gregorian absolute year
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12             # <<<<<<<<<<<<<<
 *     if out.tm_sec > 59:                  # clamp leap seconds
 *         out.tm_sec = 59
*/
  __pyx_v_out.tm_mon = (__pyx_v_out.tm_mon + 1);

  /* "utils.pxd":1680
 *     out.tm_year += 1900                  # years since 1900  Gregorian absolute year
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12
 *     if out.tm_sec > 59:                  # clamp leap seconds             # <<<<<<<<<<<<<<
 *         out.tm_sec = 59
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)
*/
  __pyx_t_1 = (__pyx_v_out.tm_sec > 59);
  if (__pyx_t_1) {

    /* "utils.pxd":1681
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12
 *     if out.tm_sec > 59:                  # clamp leap seconds
 *         out.tm_sec = 59             # <<<<<<<<<<<<<<
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)
 *     out.tm_yday += 1                     # 0..365 (0-based day of year)  1..366
*/
    __pyx_v_out.tm_sec = 59;

    /* "utils.pxd":1680
 *     out.tm_year += 1900                  # years since 1900  Gregorian absolute year
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12
 *     if out.tm_sec > 59:                  # clamp leap seconds             # <<<<<<<<<<<<<<
 *         out.tm_sec = 59
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)
*/
  }

  /* "utils.pxd":1682
 *     if out.tm_sec > 59:                  # clamp leap seconds
 *         out.tm_sec = 59
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)             # <<<<<<<<<<<<<<
 *     out.tm_yday += 1                     # 0..365 (0-based day of year)  1..366
 *     return out
*/
  __pyx_v_out.tm_wday = __Pyx_mod_long((__pyx_v_out.tm_wday + 6), 7, 1);

  /* "utils.pxd":1683
 *         out.tm_sec = 59
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)
 *     out.tm_yday += 1                     # 0..365 (0-based day of year)  1..366             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
  __pyx_v_out.tm_yday = (__pyx_v_out.tm_yday + 1);

  /* "utils.pxd":1684
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)
 *     out.tm_yday += 1                     # 0..365 (0-based day of year)  1..366
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long ts_gmtime(double ts) except *:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":1649
 * # Time -------------------------------------------------------------------------------------------------
 * # . gmtime
 * cdef inline tm tm_gmtime(double ts) except *:             # <<<<<<<<<<<<<<
 *     """Convert a Unix timestamp to UTC calendar time `<'struct:tm'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils.tm_gmtime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":1686
 *     return out
 * 
 * cdef inline long long ts_gmtime(double ts) except *:             # <<<<<<<<<<<<<<
 *     """Convert a timestamp to UTC seconds ticks since the Unix Epoch `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_ts_gmtime(double __pyx_v_ts) {
  struct tm __pyx_v_t;
  PY_LONG_LONG __pyx_v_ord;
  PY_LONG_LONG __pyx_v_hh;
  PY_LONG_LONG __pyx_v_mi;
  PY_LONG_LONG __pyx_v_ss;
  PY_LONG_LONG __pyx_r;
  struct tm __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "utils.pxd":1694
 *     """
 *     cdef:
 *         tm t = tm_gmtime(ts)             # <<<<<<<<<<<<<<
 *         long long ord = ymd_to_ord(t.tm_year, t.tm_mon, t.tm_mday)
 *         long long hh = t.tm_hour
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tm_gmtime(__pyx_v_ts); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 1694, __pyx_L1_error)
  __pyx_v_t = __pyx_t_1;

  /* "utils.pxd":1695
 *     cdef:
 *         tm t = tm_gmtime(ts)
 *         long long ord = ymd_to_ord(t.tm_year, t.tm_mon, t.tm_mday)             # <<<<<<<<<<<<<<
 *         long long hh = t.tm_hour
 *         long long mi = t.tm_min
*/
  __pyx_v_ord = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v_t.tm_year, __pyx_v_t.tm_mon, __pyx_v_t.tm_mday);

  /* "utils.pxd":1696
 *         tm t = tm_gmtime(ts)
 *         long long ord = ymd_to_ord(t.tm_year, t.tm_mon, t.tm_mday)
 *         long long hh = t.tm_hour             # <<<<<<<<<<<<<<
 *         long long mi = t.tm_min
 *         long long ss = t.tm_sec
*/
  __pyx_t_2 = __pyx_v_t.tm_hour;
  __pyx_v_hh = __pyx_t_2;

  /* "utils.pxd":1697
 *         long long ord = ymd_to_ord(t.tm_year, t.tm_mon, t.tm_mday)
 *         long long hh = t.tm_hour
 *         long long mi = t.tm_min             # <<<<<<<<<<<<<<
 *         long long ss = t.tm_sec
 * 
*/
  __pyx_t_2 = __pyx_v_t.tm_min;
  __pyx_v_mi = __pyx_t_2;

  /* "utils.pxd":1698
 *         long long hh = t.tm_hour
 *         long long mi = t.tm_min
 *         long long ss = t.tm_sec             # <<<<<<<<<<<<<<
 * 
 *     return (ord - EPOCH_DAY) * SS_DAY + hh * SS_HOUR + mi * SS_MINUTE + ss
*/
  __pyx_t_2 = __pyx_v_t.tm_sec;
  __pyx_v_ss = __pyx_t_2;

  /* "utils.pxd":1700
 *         long long ss = t.tm_sec
 * 
 *     return (ord - EPOCH_DAY) * SS_DAY + hh * SS_HOUR + mi * SS_MINUTE + ss             # <<<<<<<<<<<<<<
 * 
 * # . localtime
*/
  __pyx_r = (((((__pyx_v_ord - __pyx_v_7cytimes_5utils_EPOCH_DAY) * __pyx_v_7cytimes_5utils_SS_DAY) + (__pyx_v_hh * __pyx_v_7cytimes_5utils_SS_HOUR)) + (__pyx_v_mi * __pyx_v_7cytimes_5utils_SS_MINUTE)) + __pyx_v_ss);
  goto __pyx_L0;

  /* "utils.pxd":1686
 *     return out
 * 
 * cdef inline long long ts_gmtime(double ts) except *:             # <<<<<<<<<<<<<<
 *     """Convert a timestamp to UTC seconds ticks since the Unix Epoch `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.ts_gmtime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1703
 * 
 * # . localtime
 * cdef inline tm tm_localtime(double ts) except *:             # <<<<<<<<<<<<<<
 *     """Convert a Unix timestamp to local calendar time `<'struct:tm'>`.
 * 
*/

static CYTHON_INLINE struct tm __pyx_f_7cytimes_5utils_tm_localtime(double __pyx_v_ts) {
  time_t __pyx_v_tic;
  struct tm *__pyx_v_t;
  struct tm __pyx_v_out;
  struct tm __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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tm_localtime", 0);

  /* "utils.pxd":1724
 *     """
 *     cdef:
 *         time.time_t tic = <time.time_t> math.floor(ts)             # <<<<<<<<<<<<<<
 *         tm* t = time.localtime(&tic)
 *     if t is NULL:
*/
  __pyx_v_tic = ((time_t)floor(__pyx_v_ts));

  /* "utils.pxd":1725
 *     cdef:
 *         time.time_t tic = <time.time_t> math.floor(ts)
 *         tm* t = time.localtime(&tic)             # <<<<<<<<<<<<<<
 *     if t is NULL:
 *         raise RuntimeError("Fail to convert timestamp '%s' to local calendar time." % ts)
*/
  __pyx_v_t = localtime((&__pyx_v_tic));

  /* "utils.pxd":1726
 *         time.time_t tic = <time.time_t> math.floor(ts)
 *         tm* t = time.localtime(&tic)
 *     if t is NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Fail to convert timestamp '%s' to local calendar time." % ts)
 * 
*/
  __pyx_t_1 = (__pyx_v_t == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1727
 *         tm* t = time.localtime(&tic)
 *     if t is NULL:
 *         raise RuntimeError("Fail to convert timestamp '%s' to local calendar time." % ts)             # <<<<<<<<<<<<<<
 * 
 *     # Fix 0-based date values (and the 1900-based year).
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_ts); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1727, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Fail_to_convert_timestamp_s_to_l, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1727, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1727, __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_ERR(5, 1727, __pyx_L1_error)

    /* "utils.pxd":1726
 *         time.time_t tic = <time.time_t> math.floor(ts)
 *         tm* t = time.localtime(&tic)
 *     if t is NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Fail to convert timestamp '%s' to local calendar time." % ts)
 * 
*/
  }

  /* "utils.pxd":1731
 *     # Fix 0-based date values (and the 1900-based year).
 *     # See tmtotuple() in https://github.com/python/cpython/blob/master/Modules/timemodule.c
 *     cdef tm out = t[0]                   # copy struct             # <<<<<<<<<<<<<<
 *     out.tm_year += 1900                  # years since 1900  Gregorian absolute year
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12
*/
  __pyx_v_out = (__pyx_v_t[0]);

  /* "utils.pxd":1732
 *     # See tmtotuple() in https://github.com/python/cpython/blob/master/Modules/timemodule.c
 *     cdef tm out = t[0]                   # copy struct
 *     out.tm_year += 1900                  # years since 1900  Gregorian absolute year             # <<<<<<<<<<<<<<
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12
 *     if out.tm_sec > 59:                  # clamp leap seconds
*/
  __pyx_v_out.tm_year = (__pyx_v_out.tm_year + 0x76C);

  /* "utils.pxd":1733
 *     cdef tm out = t[0]                   # copy struct
 *     out.tm_year += 1900                  # years since 1900  Gregorian absolute year
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12             # <<<<<<<<<<<<<<
 *     if out.tm_sec > 59:                  # clamp leap seconds
 *         out.tm_sec = 59
*/
  __pyx_v_out.tm_mon = (__pyx_v_out.tm_mon + 1);

  /* "utils.pxd":1734
 *     out.tm_year += 1900                  # years since 1900  Gregorian absolute year
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12
 *     if out.tm_sec > 59:                  # clamp leap seconds             # <<<<<<<<<<<<<<
 *         out.tm_sec = 59
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)
*/
  __pyx_t_1 = (__pyx_v_out.tm_sec > 59);
  if (__pyx_t_1) {

    /* "utils.pxd":1735
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12
 *     if out.tm_sec > 59:                  # clamp leap seconds
 *         out.tm_sec = 59             # <<<<<<<<<<<<<<
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)
 *     out.tm_yday += 1                     # 0..365 (0-based day of year)  1..366
*/
    __pyx_v_out.tm_sec = 59;

    /* "utils.pxd":1734
 *     out.tm_year += 1900                  # years since 1900  Gregorian absolute year
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12
 *     if out.tm_sec > 59:                  # clamp leap seconds             # <<<<<<<<<<<<<<
 *         out.tm_sec = 59
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)
*/
  }

  /* "utils.pxd":1736
 *     if out.tm_sec > 59:                  # clamp leap seconds
 *         out.tm_sec = 59
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)             # <<<<<<<<<<<<<<
 *     out.tm_yday += 1                     # 0..365 (0-based day of year)  1..366
 *     return out
*/
  __pyx_v_out.tm_wday = __Pyx_mod_long((__pyx_v_out.tm_wday + 6), 7, 1);

  /* "utils.pxd":1737
 *         out.tm_sec = 59
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)
 *     out.tm_yday += 1                     # 0..365 (0-based day of year)  1..366             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
  __pyx_v_out.tm_yday = (__pyx_v_out.tm_yday + 1);

  /* "utils.pxd":1738
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)
 *     out.tm_yday += 1                     # 0..365 (0-based day of year)  1..366
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long ts_localtime(double ts) except *:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":1703
 * 
 * # . localtime
 * cdef inline tm tm_localtime(double ts) except *:             # <<<<<<<<<<<<<<
 *     """Convert a Unix timestamp to local calendar time `<'struct:tm'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils.tm_localtime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":1740
 *     return out
 * 
 * cdef inline long long ts_localtime(double ts) except *:             # <<<<<<<<<<<<<<
 *     """Convert a timestamp to local seconds ticks since the Unix Epoch `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_ts_localtime(double __pyx_v_ts) {
  struct tm __pyx_v_t;
  PY_LONG_LONG __pyx_v_ord;
  PY_LONG_LONG __pyx_v_hh;
  PY_LONG_LONG __pyx_v_mi;
  PY_LONG_LONG __pyx_v_ss;
  PY_LONG_LONG __pyx_r;
  struct tm __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "utils.pxd":1748
 *     """
 *     cdef:
 *         tm t = tm_localtime(ts)             # <<<<<<<<<<<<<<
 *         long long ord = ymd_to_ord(t.tm_year, t.tm_mon, t.tm_mday)
 *         long long hh = t.tm_hour
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tm_localtime(__pyx_v_ts); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 1748, __pyx_L1_error)
  __pyx_v_t = __pyx_t_1;

  /* "utils.pxd":1749
 *     cdef:
 *         tm t = tm_localtime(ts)
 *         long long ord = ymd_to_ord(t.tm_year, t.tm_mon, t.tm_mday)             # <<<<<<<<<<<<<<
 *         long long hh = t.tm_hour
 *         long long mi = t.tm_min
*/
  __pyx_v_ord = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v_t.tm_year, __pyx_v_t.tm_mon, __pyx_v_t.tm_mday);

  /* "utils.pxd":1750
 *         tm t = tm_localtime(ts)
 *         long long ord = ymd_to_ord(t.tm_year, t.tm_mon, t.tm_mday)
 *         long long hh = t.tm_hour             # <<<<<<<<<<<<<<
 *         long long mi = t.tm_min
 *         long long ss = t.tm_sec
*/
  __pyx_t_2 = __pyx_v_t.tm_hour;
  __pyx_v_hh = __pyx_t_2;

  /* "utils.pxd":1751
 *         long long ord = ymd_to_ord(t.tm_year, t.tm_mon, t.tm_mday)
 *         long long hh = t.tm_hour
 *         long long mi = t.tm_min             # <<<<<<<<<<<<<<
 *         long long ss = t.tm_sec
 * 
*/
  __pyx_t_2 = __pyx_v_t.tm_min;
  __pyx_v_mi = __pyx_t_2;

  /* "utils.pxd":1752
 *         long long hh = t.tm_hour
 *         long long mi = t.tm_min
 *         long long ss = t.tm_sec             # <<<<<<<<<<<<<<
 * 
 *     return (ord - EPOCH_DAY) * SS_DAY + hh * SS_HOUR + mi * SS_MINUTE + ss
*/
  __pyx_t_2 = __pyx_v_t.tm_sec;
  __pyx_v_ss = __pyx_t_2;

  /* "utils.pxd":1754
 *         long long ss = t.tm_sec
 * 
 *     return (ord - EPOCH_DAY) * SS_DAY + hh * SS_HOUR + mi * SS_MINUTE + ss             # <<<<<<<<<<<<<<
 * 
 * # . conversion
*/
  __pyx_r = (((((__pyx_v_ord - __pyx_v_7cytimes_5utils_EPOCH_DAY) * __pyx_v_7cytimes_5utils_SS_DAY) + (__pyx_v_hh * __pyx_v_7cytimes_5utils_SS_HOUR)) + (__pyx_v_mi * __pyx_v_7cytimes_5utils_SS_MINUTE)) + __pyx_v_ss);
  goto __pyx_L0;

  /* "utils.pxd":1740
 *     return out
 * 
 * cdef inline long long ts_localtime(double ts) except *:             # <<<<<<<<<<<<<<
 *     """Convert a timestamp to local seconds ticks since the Unix Epoch `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.ts_localtime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1757
 * 
 * # . conversion
 * cdef inline long long sec_to_us(double value) except *:             # <<<<<<<<<<<<<<
 *     """Convert seconds (float) to microseconds (int) `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_sec_to_us(double __pyx_v_value) {
  PyObject *__pyx_v_s = 0;
  int __pyx_v_neg;
  Py_ssize_t __pyx_v_start;
  Py_ssize_t __pyx_v_dot;
  PY_LONG_LONG __pyx_v_sec;
  PY_LONG_LONG __pyx_v_us;
  PY_LONG_LONG __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;
  size_t __pyx_t_6;
  Py_UCS4 __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  unsigned PY_LONG_LONG __pyx_t_9;
  PY_LONG_LONG __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sec_to_us", 0);

  /* "utils.pxd":1774
 *     ```
 *     """
 *     if not math.isfinite(value):             # <<<<<<<<<<<<<<
 *         raise OverflowError("Seconds value must be finite, got '%s'" % value)
 * 
*/
  __pyx_t_1 = (!isfinite(__pyx_v_value));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1775
 *     """
 *     if not math.isfinite(value):
 *         raise OverflowError("Seconds value must be finite, got '%s'" % value)             # <<<<<<<<<<<<<<
 * 
 *     cdef:
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1775, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Seconds_value_must_be_finite_got, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1775, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1775, __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_ERR(5, 1775, __pyx_L1_error)

    /* "utils.pxd":1774
 *     ```
 *     """
 *     if not math.isfinite(value):             # <<<<<<<<<<<<<<
 *         raise OverflowError("Seconds value must be finite, got '%s'" % value)
 * 
*/
  }

  /* "utils.pxd":1778
 * 
 *     cdef:
 *         str s = "%.7f" % value             # <<<<<<<<<<<<<<
 *         bint neg = str_read(s, 0) == "-"
 *         Py_ssize_t start = 1 if neg else 0
*/
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_7f, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_s = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "utils.pxd":1779
 *     cdef:
 *         str s = "%.7f" % value
 *         bint neg = str_read(s, 0) == "-"             # <<<<<<<<<<<<<<
 *         Py_ssize_t start = 1 if neg else 0
 *         Py_ssize_t dot = str_len(s) - 8
*/
  __pyx_t_7 = PyUnicode_ReadChar(__pyx_v_s, 0); if (unlikely(__pyx_t_7 == ((Py_UCS4)-1))) __PYX_ERR(5, 1779, __pyx_L1_error)
  __pyx_v_neg = (__pyx_t_7 == 45);

  /* "utils.pxd":1780
 *         str s = "%.7f" % value
 *         bint neg = str_read(s, 0) == "-"
 *         Py_ssize_t start = 1 if neg else 0             # <<<<<<<<<<<<<<
 *         Py_ssize_t dot = str_len(s) - 8
 *         long long sec = slice_to_uint(s, start, dot - start)
*/
  if (__pyx_v_neg) {
    __pyx_t_8 = 1;
  } else {
    __pyx_t_8 = 0;
  }
  __pyx_v_start = __pyx_t_8;

  /* "utils.pxd":1781
 *         bint neg = str_read(s, 0) == "-"
 *         Py_ssize_t start = 1 if neg else 0
 *         Py_ssize_t dot = str_len(s) - 8             # <<<<<<<<<<<<<<
 *         long long sec = slice_to_uint(s, start, dot - start)
 *         long long us = slice_to_uint(s, dot + 1, 6)
*/
  __pyx_v_dot = (PyUnicode_GET_LENGTH(__pyx_v_s) - 8);

  /* "utils.pxd":1782
 *         Py_ssize_t start = 1 if neg else 0
 *         Py_ssize_t dot = str_len(s) - 8
 *         long long sec = slice_to_uint(s, start, dot - start)             # <<<<<<<<<<<<<<
 *         long long us = slice_to_uint(s, dot + 1, 6)
 * 
*/
  __pyx_t_9 = __pyx_f_7cytimes_5utils_slice_to_uint(__pyx_v_s, __pyx_v_start, (__pyx_v_dot - __pyx_v_start), NULL); if (unlikely(__pyx_t_9 == ((unsigned PY_LONG_LONG)-1LL))) __PYX_ERR(5, 1782, __pyx_L1_error)
  __pyx_v_sec = __pyx_t_9;

  /* "utils.pxd":1783
 *         Py_ssize_t dot = str_len(s) - 8
 *         long long sec = slice_to_uint(s, start, dot - start)
 *         long long us = slice_to_uint(s, dot + 1, 6)             # <<<<<<<<<<<<<<
 * 
 *     us = sec * US_SECOND + us
*/
  __pyx_t_9 = __pyx_f_7cytimes_5utils_slice_to_uint(__pyx_v_s, (__pyx_v_dot + 1), 6, NULL); if (unlikely(__pyx_t_9 == ((unsigned PY_LONG_LONG)-1LL))) __PYX_ERR(5, 1783, __pyx_L1_error)
  __pyx_v_us = __pyx_t_9;

  /* "utils.pxd":1785
 *         long long us = slice_to_uint(s, dot + 1, 6)
 * 
 *     us = sec * US_SECOND + us             # <<<<<<<<<<<<<<
 *     return -us if neg else us
 * 
*/
  __pyx_v_us = ((__pyx_v_sec * __pyx_v_7cytimes_5utils_US_SECOND) + __pyx_v_us);

  /* "utils.pxd":1786
 * 
 *     us = sec * US_SECOND + us
 *     return -us if neg else us             # <<<<<<<<<<<<<<
 * 
 * cdef inline str tm_strformat(tm t, str fmt):
*/
  if (__pyx_v_neg) {
    __pyx_t_10 = (-__pyx_v_us);
  } else {
    __pyx_t_10 = __pyx_v_us;
  }
  __pyx_r = __pyx_t_10;
  goto __pyx_L0;

  /* "utils.pxd":1757
 * 
 * # . conversion
 * cdef inline long long sec_to_us(double value) except *:             # <<<<<<<<<<<<<<
 *     """Convert seconds (float) to microseconds (int) `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils.sec_to_us", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":1788
 *     return -us if neg else us
 * 
 * cdef inline str tm_strformat(tm t, str fmt):             # <<<<<<<<<<<<<<
 *     """Format a calendar time `tm` using C `strftime`
 *     and return a Unicode string `<'str'>`.
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_tm_strformat(struct tm __pyx_v_t, PyObject *__pyx_v_fmt) {
  char const *__pyx_v_cfmt;
  size_t __pyx_v_cap;
  size_t __pyx_v_cap_max;
  char *__pyx_v_buf;
  size_t __pyx_v_n;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  char const *__pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  char const *__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;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tm_strformat", 0);

  /* "utils.pxd":1816
 *     """
 *     # Validate format
 *     if fmt is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("tm_strformat: 'fmt' cannot be None")
 *     if str_len(fmt) == 0:
*/
  __pyx_t_1 = (__pyx_v_fmt == ((PyObject*)Py_None));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1817
 *     # Validate format
 *     if fmt is None:
 *         raise ValueError("tm_strformat: 'fmt' cannot be None")             # <<<<<<<<<<<<<<
 *     if str_len(fmt) == 0:
 *         return fmt
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_tm_strformat_fmt_cannot_be_None};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1817, __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_ERR(5, 1817, __pyx_L1_error)

    /* "utils.pxd":1816
 *     """
 *     # Validate format
 *     if fmt is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("tm_strformat: 'fmt' cannot be None")
 *     if str_len(fmt) == 0:
*/
  }

  /* "utils.pxd":1818
 *     if fmt is None:
 *         raise ValueError("tm_strformat: 'fmt' cannot be None")
 *     if str_len(fmt) == 0:             # <<<<<<<<<<<<<<
 *         return fmt
 * 
*/
  __pyx_t_1 = (PyUnicode_GET_LENGTH(__pyx_v_fmt) == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1819
 *         raise ValueError("tm_strformat: 'fmt' cannot be None")
 *     if str_len(fmt) == 0:
 *         return fmt             # <<<<<<<<<<<<<<
 * 
 *     # Normalize fields back to POSIX conventions
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_fmt);
    __pyx_r = __pyx_v_fmt;
    goto __pyx_L0;

    /* "utils.pxd":1818
 *     if fmt is None:
 *         raise ValueError("tm_strformat: 'fmt' cannot be None")
 *     if str_len(fmt) == 0:             # <<<<<<<<<<<<<<
 *         return fmt
 * 
*/
  }

  /* "utils.pxd":1822
 * 
 *     # Normalize fields back to POSIX conventions
 *     t.tm_year -= 1900             # <<<<<<<<<<<<<<
 *     t.tm_mon -= 1
 *     t.tm_wday = (t.tm_wday + 1) % 7
*/
  __pyx_v_t.tm_year = (__pyx_v_t.tm_year - 0x76C);

  /* "utils.pxd":1823
 *     # Normalize fields back to POSIX conventions
 *     t.tm_year -= 1900
 *     t.tm_mon -= 1             # <<<<<<<<<<<<<<
 *     t.tm_wday = (t.tm_wday + 1) % 7
 *     t.tm_yday -= 1
*/
  __pyx_v_t.tm_mon = (__pyx_v_t.tm_mon - 1);

  /* "utils.pxd":1824
 *     t.tm_year -= 1900
 *     t.tm_mon -= 1
 *     t.tm_wday = (t.tm_wday + 1) % 7             # <<<<<<<<<<<<<<
 *     t.tm_yday -= 1
 * 
*/
  __pyx_v_t.tm_wday = __Pyx_mod_long((__pyx_v_t.tm_wday + 1), 7, 1);

  /* "utils.pxd":1825
 *     t.tm_mon -= 1
 *     t.tm_wday = (t.tm_wday + 1) % 7
 *     t.tm_yday -= 1             # <<<<<<<<<<<<<<
 * 
 *     # Perform strftime
*/
  __pyx_v_t.tm_yday = (__pyx_v_t.tm_yday - 1);

  /* "utils.pxd":1829
 *     # Perform strftime
 *     cdef:
 *         const char* cfmt = PyUnicode_AsUTF8(fmt)             # <<<<<<<<<<<<<<
 *         size_t cap = <size_t> 256            # Initial buffer size
 *         size_t cap_max = <size_t> (1 << 15)  # Maximum buffer size: 32 KiB
*/
  __pyx_t_5 = PyUnicode_AsUTF8(__pyx_v_fmt); if (unlikely(__pyx_t_5 == ((void *)NULL))) __PYX_ERR(5, 1829, __pyx_L1_error)
  __pyx_v_cfmt = __pyx_t_5;

  /* "utils.pxd":1830
 *     cdef:
 *         const char* cfmt = PyUnicode_AsUTF8(fmt)
 *         size_t cap = <size_t> 256            # Initial buffer size             # <<<<<<<<<<<<<<
 *         size_t cap_max = <size_t> (1 << 15)  # Maximum buffer size: 32 KiB
 *         char* buf
*/
  __pyx_v_cap = ((size_t)0x100);

  /* "utils.pxd":1831
 *         const char* cfmt = PyUnicode_AsUTF8(fmt)
 *         size_t cap = <size_t> 256            # Initial buffer size
 *         size_t cap_max = <size_t> (1 << 15)  # Maximum buffer size: 32 KiB             # <<<<<<<<<<<<<<
 *         char* buf
 *         size_t n
*/
  __pyx_v_cap_max = ((size_t)0x8000);

  /* "utils.pxd":1835
 *         size_t n
 * 
 *     while True:             # <<<<<<<<<<<<<<
 *         # Allocate buffer
 *         buf = <char*> stdlib.malloc(cap)
*/
  while (1) {

    /* "utils.pxd":1837
 *     while True:
 *         # Allocate buffer
 *         buf = <char*> stdlib.malloc(cap)             # <<<<<<<<<<<<<<
 *         if buf == NULL:
 *             raise MemoryError("tm_strformat: failed to allocate buffer")
*/
    __pyx_v_buf = ((char *)malloc(__pyx_v_cap));

    /* "utils.pxd":1838
 *         # Allocate buffer
 *         buf = <char*> stdlib.malloc(cap)
 *         if buf == NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError("tm_strformat: failed to allocate buffer")
 * 
*/
    __pyx_t_1 = (__pyx_v_buf == NULL);
    if (unlikely(__pyx_t_1)) {

      /* "utils.pxd":1839
 *         buf = <char*> stdlib.malloc(cap)
 *         if buf == NULL:
 *             raise MemoryError("tm_strformat: failed to allocate buffer")             # <<<<<<<<<<<<<<
 * 
 *         # Returns 0 if buffer too small (or other failure)
*/
      __pyx_t_3 = NULL;
      __pyx_t_4 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_tm_strformat_failed_to_allocate};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1839, __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_ERR(5, 1839, __pyx_L1_error)

      /* "utils.pxd":1838
 *         # Allocate buffer
 *         buf = <char*> stdlib.malloc(cap)
 *         if buf == NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError("tm_strformat: failed to allocate buffer")
 * 
*/
    }

    /* "utils.pxd":1842
 * 
 *         # Returns 0 if buffer too small (or other failure)
 *         n = time.strftime(buf, cap, cfmt, &t)             # <<<<<<<<<<<<<<
 *         if n > 0:
 *             # Decode as UTF-8 (assumes UTF-8 C locale)
*/
    __pyx_v_n = strftime(__pyx_v_buf, __pyx_v_cap, __pyx_v_cfmt, (&__pyx_v_t));

    /* "utils.pxd":1843
 *         # Returns 0 if buffer too small (or other failure)
 *         n = time.strftime(buf, cap, cfmt, &t)
 *         if n > 0:             # <<<<<<<<<<<<<<
 *             # Decode as UTF-8 (assumes UTF-8 C locale)
 *             try:
*/
    __pyx_t_1 = (__pyx_v_n > 0);
    if (__pyx_t_1) {

      /* "utils.pxd":1845
 *         if n > 0:
 *             # Decode as UTF-8 (assumes UTF-8 C locale)
 *             try:             # <<<<<<<<<<<<<<
 *                 return PyUnicode_DecodeUTF8(buf, n, NULL)
 *             finally:
*/
      /*try:*/ {

        /* "utils.pxd":1846
 *             # Decode as UTF-8 (assumes UTF-8 C locale)
 *             try:
 *                 return PyUnicode_DecodeUTF8(buf, n, NULL)             # <<<<<<<<<<<<<<
 *             finally:
 *                 stdlib.free(buf)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = PyUnicode_DecodeUTF8(__pyx_v_buf, __pyx_v_n, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1846, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        goto __pyx_L11_return;
      }

      /* "utils.pxd":1848
 *                 return PyUnicode_DecodeUTF8(buf, n, NULL)
 *             finally:
 *                 stdlib.free(buf)             # <<<<<<<<<<<<<<
 * 
 *         # Retry with larger buffer
*/
      /*finally:*/ {
        __pyx_L12_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
          if ( unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
          __Pyx_XGOTREF(__pyx_t_9);
          __Pyx_XGOTREF(__pyx_t_10);
          __Pyx_XGOTREF(__pyx_t_11);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
          {
            free(__pyx_v_buf);
          }
          __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_XGIVEREF(__pyx_t_9);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
          __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
          __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
          goto __pyx_L1_error;
        }
        __pyx_L11_return: {
          __pyx_t_15 = __pyx_r;
          __pyx_r = 0;
          free(__pyx_v_buf);
          __pyx_r = __pyx_t_15;
          __pyx_t_15 = 0;
          goto __pyx_L0;
        }
      }

      /* "utils.pxd":1843
 *         # Returns 0 if buffer too small (or other failure)
 *         n = time.strftime(buf, cap, cfmt, &t)
 *         if n > 0:             # <<<<<<<<<<<<<<
 *             # Decode as UTF-8 (assumes UTF-8 C locale)
 *             try:
*/
    }

    /* "utils.pxd":1851
 * 
 *         # Retry with larger buffer
 *         stdlib.free(buf)             # <<<<<<<<<<<<<<
 *         if cap >= cap_max:
 *             raise OverflowError("tm_strformat: expanded output exceeds buffer limit")
*/
    free(__pyx_v_buf);

    /* "utils.pxd":1852
 *         # Retry with larger buffer
 *         stdlib.free(buf)
 *         if cap >= cap_max:             # <<<<<<<<<<<<<<
 *             raise OverflowError("tm_strformat: expanded output exceeds buffer limit")
 *         cap <<= 1
*/
    __pyx_t_1 = (__pyx_v_cap >= __pyx_v_cap_max);
    if (unlikely(__pyx_t_1)) {

      /* "utils.pxd":1853
 *         stdlib.free(buf)
 *         if cap >= cap_max:
 *             raise OverflowError("tm_strformat: expanded output exceeds buffer limit")             # <<<<<<<<<<<<<<
 *         cap <<= 1
 * 
*/
      __pyx_t_3 = NULL;
      __pyx_t_4 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_tm_strformat_expanded_output_exc};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1853, __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_ERR(5, 1853, __pyx_L1_error)

      /* "utils.pxd":1852
 *         # Retry with larger buffer
 *         stdlib.free(buf)
 *         if cap >= cap_max:             # <<<<<<<<<<<<<<
 *             raise OverflowError("tm_strformat: expanded output exceeds buffer limit")
 *         cap <<= 1
*/
    }

    /* "utils.pxd":1854
 *         if cap >= cap_max:
 *             raise OverflowError("tm_strformat: expanded output exceeds buffer limit")
 *         cap <<= 1             # <<<<<<<<<<<<<<
 * 
 * cdef inline tm tm_fr_us(long long value) noexcept nogil:
*/
    __pyx_v_cap = (__pyx_v_cap << 1);
  }

  /* "utils.pxd":1788
 *     return -us if neg else us
 * 
 * cdef inline str tm_strformat(tm t, str fmt):             # <<<<<<<<<<<<<<
 *     """Format a calendar time `tm` using C `strftime`
 *     and return a Unicode string `<'str'>`.
*/

  /* function exit code */
  __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.tm_strformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":1856
 *         cap <<= 1
 * 
 * cdef inline tm tm_fr_us(long long value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert microseconds since the Unix epoch to 'struct:tm' `<'struct:tm'>`.
 * 
*/

static CYTHON_INLINE struct tm __pyx_f_7cytimes_5utils_tm_fr_us(PY_LONG_LONG __pyx_v_value) {
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_v_ord;
  int __pyx_v_yy;
  int __pyx_v_mm;
  int __pyx_v_dd;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  struct tm __pyx_v_out;
  struct tm __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PY_LONG_LONG __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save;

  /* "utils.pxd":1880
 *     with cython.cdivision(True):
 *         # Y/M/D from ordinal
 *         q = value / US_DAY; r = value % US_DAY             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1; r += US_DAY
*/
  __pyx_v_q = (__pyx_v_value / __pyx_v_7cytimes_5utils_US_DAY);
  __pyx_v_r = (__pyx_v_value % __pyx_v_7cytimes_5utils_US_DAY);

  /* "utils.pxd":1881
 *         # Y/M/D from ordinal
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += US_DAY
 *         ord = q + EPOCH_DAY
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1882
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:
 *             q -= 1; r += US_DAY             # <<<<<<<<<<<<<<
 *         ord = q + EPOCH_DAY
 *         _ymd = ymd_fr_ord(ord)
*/
    __pyx_v_q = (__pyx_v_q - 1);
    __pyx_v_r = (__pyx_v_r + __pyx_v_7cytimes_5utils_US_DAY);

    /* "utils.pxd":1881
 *         # Y/M/D from ordinal
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += US_DAY
 *         ord = q + EPOCH_DAY
*/
  }

  /* "utils.pxd":1883
 *         if r < 0:
 *             q -= 1; r += US_DAY
 *         ord = q + EPOCH_DAY             # <<<<<<<<<<<<<<
 *         _ymd = ymd_fr_ord(ord)
 *         yy, mm, dd = _ymd.year, _ymd.month, _ymd.day
*/
  __pyx_v_ord = (__pyx_v_q + __pyx_v_7cytimes_5utils_EPOCH_DAY);

  /* "utils.pxd":1884
 *             q -= 1; r += US_DAY
 *         ord = q + EPOCH_DAY
 *         _ymd = ymd_fr_ord(ord)             # <<<<<<<<<<<<<<
 *         yy, mm, dd = _ymd.year, _ymd.month, _ymd.day
 * 
*/
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord(__pyx_v_ord);

  /* "utils.pxd":1885
 *         ord = q + EPOCH_DAY
 *         _ymd = ymd_fr_ord(ord)
 *         yy, mm, dd = _ymd.year, _ymd.month, _ymd.day             # <<<<<<<<<<<<<<
 * 
 *         # Time-of-day
*/
  __pyx_t_2 = __pyx_v__ymd.year;
  __pyx_t_3 = __pyx_v__ymd.month;
  __pyx_t_4 = __pyx_v__ymd.day;
  __pyx_v_yy = __pyx_t_2;
  __pyx_v_mm = __pyx_t_3;
  __pyx_v_dd = __pyx_t_4;

  /* "utils.pxd":1888
 * 
 *         # Time-of-day
 *         out.tm_hour = r / US_HOUR;   r %= US_HOUR             # <<<<<<<<<<<<<<
 *         out.tm_min  = r / US_MINUTE; r %= US_MINUTE
 *         out.tm_sec  = r / US_SECOND
*/
  __pyx_v_out.tm_hour = (__pyx_v_r / __pyx_v_7cytimes_5utils_US_HOUR);
  if (unlikely(__pyx_v_7cytimes_5utils_US_HOUR == 0)) {
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    __PYX_ERR(5, 1888, __pyx_L1_error)
  }
  __pyx_v_r = __Pyx_mod_PY_LONG_LONG(__pyx_v_r, __pyx_v_7cytimes_5utils_US_HOUR, 0);

  /* "utils.pxd":1889
 *         # Time-of-day
 *         out.tm_hour = r / US_HOUR;   r %= US_HOUR
 *         out.tm_min  = r / US_MINUTE; r %= US_MINUTE             # <<<<<<<<<<<<<<
 *         out.tm_sec  = r / US_SECOND
 * 
*/
  __pyx_v_out.tm_min = (__pyx_v_r / __pyx_v_7cytimes_5utils_US_MINUTE);
  if (unlikely(__pyx_v_7cytimes_5utils_US_MINUTE == 0)) {
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    __PYX_ERR(5, 1889, __pyx_L1_error)
  }
  __pyx_v_r = __Pyx_mod_PY_LONG_LONG(__pyx_v_r, __pyx_v_7cytimes_5utils_US_MINUTE, 0);

  /* "utils.pxd":1890
 *         out.tm_hour = r / US_HOUR;   r %= US_HOUR
 *         out.tm_min  = r / US_MINUTE; r %= US_MINUTE
 *         out.tm_sec  = r / US_SECOND             # <<<<<<<<<<<<<<
 * 
 *         # Weekday
*/
  __pyx_v_out.tm_sec = (__pyx_v_r / __pyx_v_7cytimes_5utils_US_SECOND);

  /* "utils.pxd":1893
 * 
 *         # Weekday
 *         r = (ord - 1) % 7  # 0=Monday             # <<<<<<<<<<<<<<
 *         out.tm_wday = r + 7 if r < 0 else r
 * 
*/
  __pyx_v_r = ((__pyx_v_ord - 1) % 7);

  /* "utils.pxd":1894
 *         # Weekday
 *         r = (ord - 1) % 7  # 0=Monday
 *         out.tm_wday = r + 7 if r < 0 else r             # <<<<<<<<<<<<<<
 * 
 *     # Remaining tm fields
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {
    __pyx_t_5 = (__pyx_v_r + 7);
  } else {
    __pyx_t_5 = __pyx_v_r;
  }
  __pyx_v_out.tm_wday = __pyx_t_5;

  /* "utils.pxd":1897
 * 
 *     # Remaining tm fields
 *     out.tm_year = yy             # <<<<<<<<<<<<<<
 *     out.tm_mon  = mm
 *     out.tm_mday = dd
*/
  __pyx_v_out.tm_year = __pyx_v_yy;

  /* "utils.pxd":1898
 *     # Remaining tm fields
 *     out.tm_year = yy
 *     out.tm_mon  = mm             # <<<<<<<<<<<<<<
 *     out.tm_mday = dd
 *     out.tm_yday = days_bf_month(yy, mm) + dd
*/
  __pyx_v_out.tm_mon = __pyx_v_mm;

  /* "utils.pxd":1899
 *     out.tm_year = yy
 *     out.tm_mon  = mm
 *     out.tm_mday = dd             # <<<<<<<<<<<<<<
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = -1  # unknown
*/
  __pyx_v_out.tm_mday = __pyx_v_dd;

  /* "utils.pxd":1900
 *     out.tm_mon  = mm
 *     out.tm_mday = dd
 *     out.tm_yday = days_bf_month(yy, mm) + dd             # <<<<<<<<<<<<<<
 *     out.tm_isdst = -1  # unknown
 *     return out
*/
  __pyx_v_out.tm_yday = (__pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_yy, __pyx_v_mm) + __pyx_v_dd);

  /* "utils.pxd":1901
 *     out.tm_mday = dd
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = -1  # unknown             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
  __pyx_v_out.tm_isdst = -1;

  /* "utils.pxd":1902
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = -1  # unknown
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline tm tm_fr_sec(double value) noexcept nogil:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":1856
 *         cap <<= 1
 * 
 * cdef inline tm tm_fr_us(long long value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert microseconds since the Unix epoch to 'struct:tm' `<'struct:tm'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_WriteUnraisable("cytimes.utils.tm_fr_us", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1904
 *     return out
 * 
 * cdef inline tm tm_fr_sec(double value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert from seconds (float) epoch to 'struct:tm' `<'struct:tm'>`.
 * 
*/

static CYTHON_INLINE struct tm __pyx_f_7cytimes_5utils_tm_fr_sec(double __pyx_v_value) {
  PY_LONG_LONG __pyx_v_sec;
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_v_ord;
  int __pyx_v_yy;
  int __pyx_v_mm;
  int __pyx_v_dd;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  struct tm __pyx_v_out;
  struct tm __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PY_LONG_LONG __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save;

  /* "utils.pxd":1921
 *     """
 *     cdef:
 *         long long sec = <long long> math.floor(value)             # <<<<<<<<<<<<<<
 *         long long q, r, ord
 *         int yy, mm, dd
*/
  __pyx_v_sec = ((PY_LONG_LONG)floor(__pyx_v_value));

  /* "utils.pxd":1929
 *     with cython.cdivision(True):
 *         # Y/M/D from ordinal
 *         q = sec / SS_DAY; r = sec % SS_DAY             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1
*/
  __pyx_v_q = (__pyx_v_sec / __pyx_v_7cytimes_5utils_SS_DAY);
  __pyx_v_r = (__pyx_v_sec % __pyx_v_7cytimes_5utils_SS_DAY);

  /* "utils.pxd":1930
 *         # Y/M/D from ordinal
 *         q = sec / SS_DAY; r = sec % SS_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *             r += SS_DAY
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1931
 *         q = sec / SS_DAY; r = sec % SS_DAY
 *         if r < 0:
 *             q -= 1             # <<<<<<<<<<<<<<
 *             r += SS_DAY
 *         ord = q + EPOCH_DAY
*/
    __pyx_v_q = (__pyx_v_q - 1);

    /* "utils.pxd":1932
 *         if r < 0:
 *             q -= 1
 *             r += SS_DAY             # <<<<<<<<<<<<<<
 *         ord = q + EPOCH_DAY
 *         _ymd = ymd_fr_ord(ord)
*/
    __pyx_v_r = (__pyx_v_r + __pyx_v_7cytimes_5utils_SS_DAY);

    /* "utils.pxd":1930
 *         # Y/M/D from ordinal
 *         q = sec / SS_DAY; r = sec % SS_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *             r += SS_DAY
*/
  }

  /* "utils.pxd":1933
 *             q -= 1
 *             r += SS_DAY
 *         ord = q + EPOCH_DAY             # <<<<<<<<<<<<<<
 *         _ymd = ymd_fr_ord(ord)
 *         yy, mm, dd = _ymd.year, _ymd.month, _ymd.day
*/
  __pyx_v_ord = (__pyx_v_q + __pyx_v_7cytimes_5utils_EPOCH_DAY);

  /* "utils.pxd":1934
 *             r += SS_DAY
 *         ord = q + EPOCH_DAY
 *         _ymd = ymd_fr_ord(ord)             # <<<<<<<<<<<<<<
 *         yy, mm, dd = _ymd.year, _ymd.month, _ymd.day
 * 
*/
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord(__pyx_v_ord);

  /* "utils.pxd":1935
 *         ord = q + EPOCH_DAY
 *         _ymd = ymd_fr_ord(ord)
 *         yy, mm, dd = _ymd.year, _ymd.month, _ymd.day             # <<<<<<<<<<<<<<
 * 
 *         # Time-of-day
*/
  __pyx_t_2 = __pyx_v__ymd.year;
  __pyx_t_3 = __pyx_v__ymd.month;
  __pyx_t_4 = __pyx_v__ymd.day;
  __pyx_v_yy = __pyx_t_2;
  __pyx_v_mm = __pyx_t_3;
  __pyx_v_dd = __pyx_t_4;

  /* "utils.pxd":1938
 * 
 *         # Time-of-day
 *         out.tm_hour = r / SS_HOUR;   r %= SS_HOUR             # <<<<<<<<<<<<<<
 *         out.tm_min  = r / SS_MINUTE; r %= SS_MINUTE
 *         out.tm_sec  = r
*/
  __pyx_v_out.tm_hour = (__pyx_v_r / __pyx_v_7cytimes_5utils_SS_HOUR);
  if (unlikely(__pyx_v_7cytimes_5utils_SS_HOUR == 0)) {
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    __PYX_ERR(5, 1938, __pyx_L1_error)
  }
  __pyx_v_r = __Pyx_mod_PY_LONG_LONG(__pyx_v_r, __pyx_v_7cytimes_5utils_SS_HOUR, 0);

  /* "utils.pxd":1939
 *         # Time-of-day
 *         out.tm_hour = r / SS_HOUR;   r %= SS_HOUR
 *         out.tm_min  = r / SS_MINUTE; r %= SS_MINUTE             # <<<<<<<<<<<<<<
 *         out.tm_sec  = r
 * 
*/
  __pyx_v_out.tm_min = (__pyx_v_r / __pyx_v_7cytimes_5utils_SS_MINUTE);
  if (unlikely(__pyx_v_7cytimes_5utils_SS_MINUTE == 0)) {
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    __PYX_ERR(5, 1939, __pyx_L1_error)
  }
  __pyx_v_r = __Pyx_mod_PY_LONG_LONG(__pyx_v_r, __pyx_v_7cytimes_5utils_SS_MINUTE, 0);

  /* "utils.pxd":1940
 *         out.tm_hour = r / SS_HOUR;   r %= SS_HOUR
 *         out.tm_min  = r / SS_MINUTE; r %= SS_MINUTE
 *         out.tm_sec  = r             # <<<<<<<<<<<<<<
 * 
 *         # Weekday
*/
  __pyx_v_out.tm_sec = __pyx_v_r;

  /* "utils.pxd":1943
 * 
 *         # Weekday
 *         r = (ord - 1) % 7  # 0=Monday             # <<<<<<<<<<<<<<
 *         out.tm_wday = r + 7 if r < 0 else r
 * 
*/
  __pyx_v_r = ((__pyx_v_ord - 1) % 7);

  /* "utils.pxd":1944
 *         # Weekday
 *         r = (ord - 1) % 7  # 0=Monday
 *         out.tm_wday = r + 7 if r < 0 else r             # <<<<<<<<<<<<<<
 * 
 *     # Remaining tm fields
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {
    __pyx_t_5 = (__pyx_v_r + 7);
  } else {
    __pyx_t_5 = __pyx_v_r;
  }
  __pyx_v_out.tm_wday = __pyx_t_5;

  /* "utils.pxd":1947
 * 
 *     # Remaining tm fields
 *     out.tm_year = yy             # <<<<<<<<<<<<<<
 *     out.tm_mon  = mm
 *     out.tm_mday = dd
*/
  __pyx_v_out.tm_year = __pyx_v_yy;

  /* "utils.pxd":1948
 *     # Remaining tm fields
 *     out.tm_year = yy
 *     out.tm_mon  = mm             # <<<<<<<<<<<<<<
 *     out.tm_mday = dd
 *     out.tm_yday = days_bf_month(yy, mm) + dd
*/
  __pyx_v_out.tm_mon = __pyx_v_mm;

  /* "utils.pxd":1949
 *     out.tm_year = yy
 *     out.tm_mon  = mm
 *     out.tm_mday = dd             # <<<<<<<<<<<<<<
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = -1  # unknown
*/
  __pyx_v_out.tm_mday = __pyx_v_dd;

  /* "utils.pxd":1950
 *     out.tm_mon  = mm
 *     out.tm_mday = dd
 *     out.tm_yday = days_bf_month(yy, mm) + dd             # <<<<<<<<<<<<<<
 *     out.tm_isdst = -1  # unknown
 *     return out
*/
  __pyx_v_out.tm_yday = (__pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_yy, __pyx_v_mm) + __pyx_v_dd);

  /* "utils.pxd":1951
 *     out.tm_mday = dd
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = -1  # unknown             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
  __pyx_v_out.tm_isdst = -1;

  /* "utils.pxd":1952
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = -1  # unknown
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline hmsf hmsf_fr_us(long long value) noexcept nogil:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":1904
 *     return out
 * 
 * cdef inline tm tm_fr_sec(double value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert from seconds (float) epoch to 'struct:tm' `<'struct:tm'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_WriteUnraisable("cytimes.utils.tm_fr_sec", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1954
 *     return out
 * 
 * cdef inline hmsf hmsf_fr_us(long long value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Extract time-of-day from microsecond ticks since epoch `<'struct:hmsf'>`.
 * 
*/

static CYTHON_INLINE __pyx_t_7cytimes_5utils_hmsf __pyx_f_7cytimes_5utils_hmsf_fr_us(PY_LONG_LONG __pyx_v_value) {
  PY_LONG_LONG __pyx_v_r;
  __pyx_t_7cytimes_5utils_hmsf __pyx_v_out;
  __pyx_t_7cytimes_5utils_hmsf __pyx_r;
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save;

  /* "utils.pxd":1971
 *     with cython.cdivision(True):
 *         # Hour
 *         r = value % US_DAY             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             r += US_DAY
*/
  __pyx_v_r = (__pyx_v_value % __pyx_v_7cytimes_5utils_US_DAY);

  /* "utils.pxd":1972
 *         # Hour
 *         r = value % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             r += US_DAY
 *         out.hour   = r / US_HOUR;   r %= US_HOUR
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1973
 *         r = value % US_DAY
 *         if r < 0:
 *             r += US_DAY             # <<<<<<<<<<<<<<
 *         out.hour   = r / US_HOUR;   r %= US_HOUR
 *         # Minute
*/
    __pyx_v_r = (__pyx_v_r + __pyx_v_7cytimes_5utils_US_DAY);

    /* "utils.pxd":1972
 *         # Hour
 *         r = value % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             r += US_DAY
 *         out.hour   = r / US_HOUR;   r %= US_HOUR
*/
  }

  /* "utils.pxd":1974
 *         if r < 0:
 *             r += US_DAY
 *         out.hour   = r / US_HOUR;   r %= US_HOUR             # <<<<<<<<<<<<<<
 *         # Minute
 *         out.minute = r / US_MINUTE; r %= US_MINUTE
*/
  __pyx_v_out.hour = (__pyx_v_r / __pyx_v_7cytimes_5utils_US_HOUR);
  if (unlikely(__pyx_v_7cytimes_5utils_US_HOUR == 0)) {
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    __PYX_ERR(5, 1974, __pyx_L1_error)
  }
  __pyx_v_r = __Pyx_mod_PY_LONG_LONG(__pyx_v_r, __pyx_v_7cytimes_5utils_US_HOUR, 0);

  /* "utils.pxd":1976
 *         out.hour   = r / US_HOUR;   r %= US_HOUR
 *         # Minute
 *         out.minute = r / US_MINUTE; r %= US_MINUTE             # <<<<<<<<<<<<<<
 *         # Second
 *         out.second = r / US_SECOND; r %= US_SECOND
*/
  __pyx_v_out.minute = (__pyx_v_r / __pyx_v_7cytimes_5utils_US_MINUTE);
  if (unlikely(__pyx_v_7cytimes_5utils_US_MINUTE == 0)) {
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    __PYX_ERR(5, 1976, __pyx_L1_error)
  }
  __pyx_v_r = __Pyx_mod_PY_LONG_LONG(__pyx_v_r, __pyx_v_7cytimes_5utils_US_MINUTE, 0);

  /* "utils.pxd":1978
 *         out.minute = r / US_MINUTE; r %= US_MINUTE
 *         # Second
 *         out.second = r / US_SECOND; r %= US_SECOND             # <<<<<<<<<<<<<<
 *         # Microsecond
 *         out.microsecond = r
*/
  __pyx_v_out.second = (__pyx_v_r / __pyx_v_7cytimes_5utils_US_SECOND);
  if (unlikely(__pyx_v_7cytimes_5utils_US_SECOND == 0)) {
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    __PYX_ERR(5, 1978, __pyx_L1_error)
  }
  __pyx_v_r = __Pyx_mod_PY_LONG_LONG(__pyx_v_r, __pyx_v_7cytimes_5utils_US_SECOND, 0);

  /* "utils.pxd":1980
 *         out.second = r / US_SECOND; r %= US_SECOND
 *         # Microsecond
 *         out.microsecond = r             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
  __pyx_v_out.microsecond = __pyx_v_r;

  /* "utils.pxd":1982
 *         out.microsecond = r
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline hmsf hmsf_fr_sec(double value) except *:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":1954
 *     return out
 * 
 * cdef inline hmsf hmsf_fr_us(long long value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Extract time-of-day from microsecond ticks since epoch `<'struct:hmsf'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_WriteUnraisable("cytimes.utils.hmsf_fr_us", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1984
 *     return out
 * 
 * cdef inline hmsf hmsf_fr_sec(double value) except *:             # <<<<<<<<<<<<<<
 *     """Extract time-of-day from seconds (float) since epoch `<'struct:hmsf'>`.
 * 
*/

static CYTHON_INLINE __pyx_t_7cytimes_5utils_hmsf __pyx_f_7cytimes_5utils_hmsf_fr_sec(double __pyx_v_value) {
  __pyx_t_7cytimes_5utils_hmsf __pyx_r;
  PY_LONG_LONG __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "utils.pxd":1995
 *         - hmsf.microsecond [0..999_999].
 *     """
 *     return hmsf_fr_us(sec_to_us(value))             # <<<<<<<<<<<<<<
 * 
 * # Calendar ---------------------------------------------------------------------------------------------
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_sec_to_us(__pyx_v_value); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 1995, __pyx_L1_error)
  __pyx_r = __pyx_f_7cytimes_5utils_hmsf_fr_us(__pyx_t_1);
  goto __pyx_L0;

  /* "utils.pxd":1984
 *     return out
 * 
 * cdef inline hmsf hmsf_fr_sec(double value) except *:             # <<<<<<<<<<<<<<
 *     """Extract time-of-day from seconds (float) since epoch `<'struct:hmsf'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.hmsf_fr_sec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1999
 * # Calendar ---------------------------------------------------------------------------------------------
 * # . year
 * cdef inline bint is_leap_year(long long year) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Determine whether `year` is a leap year under
 *     the proleptic Gregorian rules `<'bool'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_leap_year(PY_LONG_LONG __pyx_v_year) {
  int __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":2007
 *     """
 *     with cython.cdivision(True):
 *         if (year % 4) != 0:             # <<<<<<<<<<<<<<
 *             return False
 *         if (year % 100) != 0:
*/
  __pyx_t_1 = ((__pyx_v_year % 4) != 0);
  if (__pyx_t_1) {

    /* "utils.pxd":2008
 *     with cython.cdivision(True):
 *         if (year % 4) != 0:
 *             return False             # <<<<<<<<<<<<<<
 *         if (year % 100) != 0:
 *             return True
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":2007
 *     """
 *     with cython.cdivision(True):
 *         if (year % 4) != 0:             # <<<<<<<<<<<<<<
 *             return False
 *         if (year % 100) != 0:
*/
  }

  /* "utils.pxd":2009
 *         if (year % 4) != 0:
 *             return False
 *         if (year % 100) != 0:             # <<<<<<<<<<<<<<
 *             return True
 *         return (year % 400) == 0
*/
  __pyx_t_1 = ((__pyx_v_year % 0x64) != 0);
  if (__pyx_t_1) {

    /* "utils.pxd":2010
 *             return False
 *         if (year % 100) != 0:
 *             return True             # <<<<<<<<<<<<<<
 *         return (year % 400) == 0
 * 
*/
    __pyx_r = 1;
    goto __pyx_L0;

    /* "utils.pxd":2009
 *         if (year % 4) != 0:
 *             return False
 *         if (year % 100) != 0:             # <<<<<<<<<<<<<<
 *             return True
 *         return (year % 400) == 0
*/
  }

  /* "utils.pxd":2011
 *         if (year % 100) != 0:
 *             return True
 *         return (year % 400) == 0             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_long_year(long long year) noexcept nogil:
*/
  __pyx_r = ((__pyx_v_year % 0x190) == 0);
  goto __pyx_L0;

  /* "utils.pxd":1999
 * # Calendar ---------------------------------------------------------------------------------------------
 * # . year
 * cdef inline bint is_leap_year(long long year) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Determine whether `year` is a leap year under
 *     the proleptic Gregorian rules `<'bool'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2013
 *         return (year % 400) == 0
 * 
 * cdef inline bint is_long_year(long long year) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Determine whether `year` is a long year (has ISO week 53)
 *     under the proleptic Gregorian rules `<'bool'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_long_year(PY_LONG_LONG __pyx_v_year) {
  int __pyx_v_wkd;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":2023
 *     :returns `<'bool'>`: True if `year` is a long year, else False.
 *     """
 *     cdef int wkd = ymd_weekday(year, 1, 1)             # <<<<<<<<<<<<<<
 *     return (wkd == 3) or (wkd == 2 and is_leap_year(year))
 * 
*/
  __pyx_v_wkd = __pyx_f_7cytimes_5utils_ymd_weekday(__pyx_v_year, 1, 1);

  /* "utils.pxd":2024
 *     """
 *     cdef int wkd = ymd_weekday(year, 1, 1)
 *     return (wkd == 3) or (wkd == 2 and is_leap_year(year))             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long leap_years(long long year, bint inclusive) noexcept nogil:
*/
  __pyx_t_2 = (__pyx_v_wkd == 3);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_wkd == 2);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = __pyx_f_7cytimes_5utils_is_leap_year(__pyx_v_year);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":2013
 *         return (year % 400) == 0
 * 
 * cdef inline bint is_long_year(long long year) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Determine whether `year` is a long year (has ISO week 53)
 *     under the proleptic Gregorian rules `<'bool'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2026
 *     return (wkd == 3) or (wkd == 2 and is_leap_year(year))
 * 
 * cdef inline long long leap_years(long long year, bint inclusive) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Count leap years between `year` and `0001-01-01` under
 *     the proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_leap_years(PY_LONG_LONG __pyx_v_year, int __pyx_v_inclusive) {
  PY_LONG_LONG __pyx_v_yy;
  PY_LONG_LONG __pyx_v_q4;
  PY_LONG_LONG __pyx_v_q100;
  PY_LONG_LONG __pyx_v_q400;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_v_out;
  PY_LONG_LONG __pyx_r;
  PY_LONG_LONG __pyx_t_1;
  int __pyx_t_2;
  PY_LONG_LONG __pyx_t_3;

  /* "utils.pxd":2040
 *     """
 *     cdef:
 *         long long yy = year if inclusive else year - 1             # <<<<<<<<<<<<<<
 *         long long q4, q100, q400, r
 *         long long out
*/
  if (__pyx_v_inclusive) {
    __pyx_t_1 = __pyx_v_year;
  } else {
    __pyx_t_1 = (__pyx_v_year - 1);
  }
  __pyx_v_yy = __pyx_t_1;

  /* "utils.pxd":2046
 *     with cython.cdivision(True):
 *         # Positive
 *         if yy >= 0:             # <<<<<<<<<<<<<<
 *             out = (yy // 4) - (yy // 100) + (yy // 400)
 * 
*/
  __pyx_t_2 = (__pyx_v_yy >= 0);
  if (__pyx_t_2) {

    /* "utils.pxd":2047
 *         # Positive
 *         if yy >= 0:
 *             out = (yy // 4) - (yy // 100) + (yy // 400)             # <<<<<<<<<<<<<<
 * 
 *         # Negative
*/
    __pyx_v_out = (((__pyx_v_yy / 4) - (__pyx_v_yy / 0x64)) + (__pyx_v_yy / 0x190));

    /* "utils.pxd":2046
 *     with cython.cdivision(True):
 *         # Positive
 *         if yy >= 0:             # <<<<<<<<<<<<<<
 *             out = (yy // 4) - (yy // 100) + (yy // 400)
 * 
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":2052
 *         else:
 *             # floor(yy / 4)
 *             q4, r = yy / 4, yy % 4             # <<<<<<<<<<<<<<
 *             if r != 0:
 *                 q4 -= 1
*/
  /*else*/ {
    __pyx_t_1 = (__pyx_v_yy / 4);
    __pyx_t_3 = (__pyx_v_yy % 4);
    __pyx_v_q4 = __pyx_t_1;
    __pyx_v_r = __pyx_t_3;

    /* "utils.pxd":2053
 *             # floor(yy / 4)
 *             q4, r = yy / 4, yy % 4
 *             if r != 0:             # <<<<<<<<<<<<<<
 *                 q4 -= 1
 *             # floor(yy / 100)
*/
    __pyx_t_2 = (__pyx_v_r != 0);
    if (__pyx_t_2) {

      /* "utils.pxd":2054
 *             q4, r = yy / 4, yy % 4
 *             if r != 0:
 *                 q4 -= 1             # <<<<<<<<<<<<<<
 *             # floor(yy / 100)
 *             q100, r = yy / 100, yy % 100
*/
      __pyx_v_q4 = (__pyx_v_q4 - 1);

      /* "utils.pxd":2053
 *             # floor(yy / 4)
 *             q4, r = yy / 4, yy % 4
 *             if r != 0:             # <<<<<<<<<<<<<<
 *                 q4 -= 1
 *             # floor(yy / 100)
*/
    }

    /* "utils.pxd":2056
 *                 q4 -= 1
 *             # floor(yy / 100)
 *             q100, r = yy / 100, yy % 100             # <<<<<<<<<<<<<<
 *             if r != 0:
 *                 q100 -= 1
*/
    __pyx_t_3 = (__pyx_v_yy / 0x64);
    __pyx_t_1 = (__pyx_v_yy % 0x64);
    __pyx_v_q100 = __pyx_t_3;
    __pyx_v_r = __pyx_t_1;

    /* "utils.pxd":2057
 *             # floor(yy / 100)
 *             q100, r = yy / 100, yy % 100
 *             if r != 0:             # <<<<<<<<<<<<<<
 *                 q100 -= 1
 *             # floor(yy / 400)
*/
    __pyx_t_2 = (__pyx_v_r != 0);
    if (__pyx_t_2) {

      /* "utils.pxd":2058
 *             q100, r = yy / 100, yy % 100
 *             if r != 0:
 *                 q100 -= 1             # <<<<<<<<<<<<<<
 *             # floor(yy / 400)
 *             q400, r = yy / 400, yy % 400
*/
      __pyx_v_q100 = (__pyx_v_q100 - 1);

      /* "utils.pxd":2057
 *             # floor(yy / 100)
 *             q100, r = yy / 100, yy % 100
 *             if r != 0:             # <<<<<<<<<<<<<<
 *                 q100 -= 1
 *             # floor(yy / 400)
*/
    }

    /* "utils.pxd":2060
 *                 q100 -= 1
 *             # floor(yy / 400)
 *             q400, r = yy / 400, yy % 400             # <<<<<<<<<<<<<<
 *             if r != 0:
 *                 q400 -= 1
*/
    __pyx_t_1 = (__pyx_v_yy / 0x190);
    __pyx_t_3 = (__pyx_v_yy % 0x190);
    __pyx_v_q400 = __pyx_t_1;
    __pyx_v_r = __pyx_t_3;

    /* "utils.pxd":2061
 *             # floor(yy / 400)
 *             q400, r = yy / 400, yy % 400
 *             if r != 0:             # <<<<<<<<<<<<<<
 *                 q400 -= 1
 *             out = q4 - q100 + q400
*/
    __pyx_t_2 = (__pyx_v_r != 0);
    if (__pyx_t_2) {

      /* "utils.pxd":2062
 *             q400, r = yy / 400, yy % 400
 *             if r != 0:
 *                 q400 -= 1             # <<<<<<<<<<<<<<
 *             out = q4 - q100 + q400
 * 
*/
      __pyx_v_q400 = (__pyx_v_q400 - 1);

      /* "utils.pxd":2061
 *             # floor(yy / 400)
 *             q400, r = yy / 400, yy % 400
 *             if r != 0:             # <<<<<<<<<<<<<<
 *                 q400 -= 1
 *             out = q4 - q100 + q400
*/
    }

    /* "utils.pxd":2063
 *             if r != 0:
 *                 q400 -= 1
 *             out = q4 - q100 + q400             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    __pyx_v_out = ((__pyx_v_q4 - __pyx_v_q100) + __pyx_v_q400);
  }
  __pyx_L3:;

  /* "utils.pxd":2065
 *             out = q4 - q100 + q400
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long leaps_bt_years(long long year1, long long year2) noexcept nogil:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":2026
 *     return (wkd == 3) or (wkd == 2 and is_leap_year(year))
 * 
 * cdef inline long long leap_years(long long year, bint inclusive) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Count leap years between `year` and `0001-01-01` under
 *     the proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2067
 *     return out
 * 
 * cdef inline long long leaps_bt_years(long long year1, long long year2) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the total number of Gregorian leap years between `year1` and `year2`
 *     under the proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_leaps_bt_years(PY_LONG_LONG __pyx_v_year1, PY_LONG_LONG __pyx_v_year2) {
  PY_LONG_LONG __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":2075
 *     :returns `<'int'>`: Number of leap years between the two years.
 *     """
 *     if year1 > year2:             # <<<<<<<<<<<<<<
 *         return leap_years(year1, False) - leap_years(year2, False)
 *     else:
*/
  __pyx_t_1 = (__pyx_v_year1 > __pyx_v_year2);
  if (__pyx_t_1) {

    /* "utils.pxd":2076
 *     """
 *     if year1 > year2:
 *         return leap_years(year1, False) - leap_years(year2, False)             # <<<<<<<<<<<<<<
 *     else:
 *         return leap_years(year2, False) - leap_years(year1, False)
*/
    __pyx_r = (__pyx_f_7cytimes_5utils_leap_years(__pyx_v_year1, 0) - __pyx_f_7cytimes_5utils_leap_years(__pyx_v_year2, 0));
    goto __pyx_L0;

    /* "utils.pxd":2075
 *     :returns `<'int'>`: Number of leap years between the two years.
 *     """
 *     if year1 > year2:             # <<<<<<<<<<<<<<
 *         return leap_years(year1, False) - leap_years(year2, False)
 *     else:
*/
  }

  /* "utils.pxd":2078
 *         return leap_years(year1, False) - leap_years(year2, False)
 *     else:
 *         return leap_years(year2, False) - leap_years(year1, False)             # <<<<<<<<<<<<<<
 * 
 * cdef inline int days_in_year(long long year) noexcept nogil:
*/
  /*else*/ {
    __pyx_r = (__pyx_f_7cytimes_5utils_leap_years(__pyx_v_year2, 0) - __pyx_f_7cytimes_5utils_leap_years(__pyx_v_year1, 0));
    goto __pyx_L0;
  }

  /* "utils.pxd":2067
 *     return out
 * 
 * cdef inline long long leaps_bt_years(long long year1, long long year2) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the total number of Gregorian leap years between `year1` and `year2`
 *     under the proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2080
 *         return leap_years(year2, False) - leap_years(year1, False)
 * 
 * cdef inline int days_in_year(long long year) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Determine the number of days in `year` under the
 *     proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_days_in_year(PY_LONG_LONG __pyx_v_year) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":2087
 *     :returns `<'int'>`: 366 for leap years, else 365.
 *     """
 *     return 366 if is_leap_year(year) else 365             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long days_bf_year(long long year) noexcept nogil:
*/
  __pyx_t_2 = __pyx_f_7cytimes_5utils_is_leap_year(__pyx_v_year);
  if (__pyx_t_2) {
    __pyx_t_1 = 0x16E;
  } else {
    __pyx_t_1 = 0x16D;
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":2080
 *         return leap_years(year2, False) - leap_years(year1, False)
 * 
 * cdef inline int days_in_year(long long year) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Determine the number of days in `year` under the
 *     proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2089
 *     return 366 if is_leap_year(year) else 365
 * 
 * cdef inline long long days_bf_year(long long year) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the number of days strictly before `January 1` of `year`
 *     under the proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_days_bf_year(PY_LONG_LONG __pyx_v_year) {
  PY_LONG_LONG __pyx_v_y0;
  PY_LONG_LONG __pyx_r;

  /* "utils.pxd":2102
 *     :returns `<'int'>`: Signed count of days before Jan-1 of `year`.
 *     """
 *     cdef long long y0 = year - 1  # 0-based year             # <<<<<<<<<<<<<<
 *     return 365 * y0 + leap_years(y0, True)
 * 
*/
  __pyx_v_y0 = (__pyx_v_year - 1);

  /* "utils.pxd":2103
 *     """
 *     cdef long long y0 = year - 1  # 0-based year
 *     return 365 * y0 + leap_years(y0, True)             # <<<<<<<<<<<<<<
 * 
 * cdef inline int day_of_year(long long year, int month, int day) noexcept nogil:
*/
  __pyx_r = ((0x16D * __pyx_v_y0) + __pyx_f_7cytimes_5utils_leap_years(__pyx_v_y0, 1));
  goto __pyx_L0;

  /* "utils.pxd":2089
 *     return 366 if is_leap_year(year) else 365
 * 
 * cdef inline long long days_bf_year(long long year) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the number of days strictly before `January 1` of `year`
 *     under the proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2105
 *     return 365 * y0 + leap_years(y0, True)
 * 
 * cdef inline int day_of_year(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the `1-based` ordinal day-of-year for the given Y/M/D
 *     under the proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_day_of_year(PY_LONG_LONG __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;

  /* "utils.pxd":2116
 *     :returns `<'int'>`: `1..365/366`  ordinal day of year (Jan-01  1).
 *     """
 *     if day > 28:             # <<<<<<<<<<<<<<
 *         day = min(day, days_in_month(year, month))
 *     elif day < 1:
*/
  __pyx_t_1 = (__pyx_v_day > 28);
  if (__pyx_t_1) {

    /* "utils.pxd":2117
 *     """
 *     if day > 28:
 *         day = min(day, days_in_month(year, month))             # <<<<<<<<<<<<<<
 *     elif day < 1:
 *         day = 1
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v_year, __pyx_v_month);
    __pyx_t_3 = __pyx_v_day;
    __pyx_t_1 = (__pyx_t_2 < __pyx_t_3);
    if (__pyx_t_1) {
      __pyx_t_4 = __pyx_t_2;
    } else {
      __pyx_t_4 = __pyx_t_3;
    }
    __pyx_v_day = __pyx_t_4;

    /* "utils.pxd":2116
 *     :returns `<'int'>`: `1..365/366`  ordinal day of year (Jan-01  1).
 *     """
 *     if day > 28:             # <<<<<<<<<<<<<<
 *         day = min(day, days_in_month(year, month))
 *     elif day < 1:
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":2118
 *     if day > 28:
 *         day = min(day, days_in_month(year, month))
 *     elif day < 1:             # <<<<<<<<<<<<<<
 *         day = 1
 *     return days_bf_month(year, month) + day
*/
  __pyx_t_1 = (__pyx_v_day < 1);
  if (__pyx_t_1) {

    /* "utils.pxd":2119
 *         day = min(day, days_in_month(year, month))
 *     elif day < 1:
 *         day = 1             # <<<<<<<<<<<<<<
 *     return days_bf_month(year, month) + day
 * 
*/
    __pyx_v_day = 1;

    /* "utils.pxd":2118
 *     if day > 28:
 *         day = min(day, days_in_month(year, month))
 *     elif day < 1:             # <<<<<<<<<<<<<<
 *         day = 1
 *     return days_bf_month(year, month) + day
*/
  }
  __pyx_L3:;

  /* "utils.pxd":2120
 *     elif day < 1:
 *         day = 1
 *     return days_bf_month(year, month) + day             # <<<<<<<<<<<<<<
 * 
 * # . quarter
*/
  __pyx_r = (__pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_year, __pyx_v_month) + __pyx_v_day);
  goto __pyx_L0;

  /* "utils.pxd":2105
 *     return 365 * y0 + leap_years(y0, True)
 * 
 * cdef inline int day_of_year(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the `1-based` ordinal day-of-year for the given Y/M/D
 *     under the proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2123
 * 
 * # . quarter
 * cdef inline int quarter_of_month(int month) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the calendar quarter index (1..4) for `month`
 *     under the Gregorian calendar `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_quarter_of_month(int __pyx_v_month) {
  int __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":2133
 *     """
 *     # Jan - Mar & out-of-range: Q1
 *     if month < 4:             # <<<<<<<<<<<<<<
 *         return 1
 *     # Apr - Jun: Q2
*/
  __pyx_t_1 = (__pyx_v_month < 4);
  if (__pyx_t_1) {

    /* "utils.pxd":2134
 *     # Jan - Mar & out-of-range: Q1
 *     if month < 4:
 *         return 1             # <<<<<<<<<<<<<<
 *     # Apr - Jun: Q2
 *     elif month < 7:
*/
    __pyx_r = 1;
    goto __pyx_L0;

    /* "utils.pxd":2133
 *     """
 *     # Jan - Mar & out-of-range: Q1
 *     if month < 4:             # <<<<<<<<<<<<<<
 *         return 1
 *     # Apr - Jun: Q2
*/
  }

  /* "utils.pxd":2136
 *         return 1
 *     # Apr - Jun: Q2
 *     elif month < 7:             # <<<<<<<<<<<<<<
 *         return 2
 *     # Jul - Sep: Q3
*/
  __pyx_t_1 = (__pyx_v_month < 7);
  if (__pyx_t_1) {

    /* "utils.pxd":2137
 *     # Apr - Jun: Q2
 *     elif month < 7:
 *         return 2             # <<<<<<<<<<<<<<
 *     # Jul - Sep: Q3
 *     elif month < 10:
*/
    __pyx_r = 2;
    goto __pyx_L0;

    /* "utils.pxd":2136
 *         return 1
 *     # Apr - Jun: Q2
 *     elif month < 7:             # <<<<<<<<<<<<<<
 *         return 2
 *     # Jul - Sep: Q3
*/
  }

  /* "utils.pxd":2139
 *         return 2
 *     # Jul - Sep: Q3
 *     elif month < 10:             # <<<<<<<<<<<<<<
 *         return 3
 *     # Oct - Dec & out-of-range: Q4
*/
  __pyx_t_1 = (__pyx_v_month < 10);
  if (__pyx_t_1) {

    /* "utils.pxd":2140
 *     # Jul - Sep: Q3
 *     elif month < 10:
 *         return 3             # <<<<<<<<<<<<<<
 *     # Oct - Dec & out-of-range: Q4
 *     else:
*/
    __pyx_r = 3;
    goto __pyx_L0;

    /* "utils.pxd":2139
 *         return 2
 *     # Jul - Sep: Q3
 *     elif month < 10:             # <<<<<<<<<<<<<<
 *         return 3
 *     # Oct - Dec & out-of-range: Q4
*/
  }

  /* "utils.pxd":2143
 *     # Oct - Dec & out-of-range: Q4
 *     else:
 *         return 4             # <<<<<<<<<<<<<<
 * 
 * cdef inline int days_in_quarter(long long year, int month) noexcept nogil:
*/
  /*else*/ {
    __pyx_r = 4;
    goto __pyx_L0;
  }

  /* "utils.pxd":2123
 * 
 * # . quarter
 * cdef inline int quarter_of_month(int month) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the calendar quarter index (1..4) for `month`
 *     under the Gregorian calendar `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2145
 *         return 4
 * 
 * cdef inline int days_in_quarter(long long year, int month) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the number of days in calendar quarter containing
 *     `month` in `year` under the proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_days_in_quarter(PY_LONG_LONG __pyx_v_year, int __pyx_v_month) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":2157
 *         - Leap     [Q1=91, Q2=91, Q3=92, Q4=92]
 *     """
 *     if month < 4: # Q1             # <<<<<<<<<<<<<<
 *         return 91 if is_leap_year(year) else 90
 *     elif month < 7:
*/
  __pyx_t_1 = (__pyx_v_month < 4);
  if (__pyx_t_1) {

    /* "utils.pxd":2158
 *     """
 *     if month < 4: # Q1
 *         return 91 if is_leap_year(year) else 90             # <<<<<<<<<<<<<<
 *     elif month < 7:
 *         return 91  # Q2
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_is_leap_year(__pyx_v_year);
    if (__pyx_t_1) {
      __pyx_t_2 = 91;
    } else {
      __pyx_t_2 = 90;
    }
    __pyx_r = __pyx_t_2;
    goto __pyx_L0;

    /* "utils.pxd":2157
 *         - Leap     [Q1=91, Q2=91, Q3=92, Q4=92]
 *     """
 *     if month < 4: # Q1             # <<<<<<<<<<<<<<
 *         return 91 if is_leap_year(year) else 90
 *     elif month < 7:
*/
  }

  /* "utils.pxd":2159
 *     if month < 4: # Q1
 *         return 91 if is_leap_year(year) else 90
 *     elif month < 7:             # <<<<<<<<<<<<<<
 *         return 91  # Q2
 *     else:
*/
  __pyx_t_1 = (__pyx_v_month < 7);
  if (__pyx_t_1) {

    /* "utils.pxd":2160
 *         return 91 if is_leap_year(year) else 90
 *     elif month < 7:
 *         return 91  # Q2             # <<<<<<<<<<<<<<
 *     else:
 *         return 92  # Q3 & Q4
*/
    __pyx_r = 91;
    goto __pyx_L0;

    /* "utils.pxd":2159
 *     if month < 4: # Q1
 *         return 91 if is_leap_year(year) else 90
 *     elif month < 7:             # <<<<<<<<<<<<<<
 *         return 91  # Q2
 *     else:
*/
  }

  /* "utils.pxd":2162
 *         return 91  # Q2
 *     else:
 *         return 92  # Q3 & Q4             # <<<<<<<<<<<<<<
 * 
 * cdef inline int days_bf_quarter(long long year, int month) noexcept nogil:
*/
  /*else*/ {
    __pyx_r = 92;
    goto __pyx_L0;
  }

  /* "utils.pxd":2145
 *         return 4
 * 
 * cdef inline int days_in_quarter(long long year, int month) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the number of days in calendar quarter containing
 *     `month` in `year` under the proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2164
 *         return 92  # Q3 & Q4
 * 
 * cdef inline int days_bf_quarter(long long year, int month) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the number of days strictly before the first day of the
 *     calendar quarter containing `month` in `year` under the proleptic
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_days_bf_quarter(PY_LONG_LONG __pyx_v_year, int __pyx_v_month) {
  int __pyx_v_leap;
  int __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":2177
 *         - Leap     [Q1=0, Q2=91, Q3=182, Q4=274]
 *     """
 *     if month < 4:             # <<<<<<<<<<<<<<
 *         return 0  # Q1
 *     cdef int leap = <int> is_leap_year(year)
*/
  __pyx_t_1 = (__pyx_v_month < 4);
  if (__pyx_t_1) {

    /* "utils.pxd":2178
 *     """
 *     if month < 4:
 *         return 0  # Q1             # <<<<<<<<<<<<<<
 *     cdef int leap = <int> is_leap_year(year)
 *     if month < 7:
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":2177
 *         - Leap     [Q1=0, Q2=91, Q3=182, Q4=274]
 *     """
 *     if month < 4:             # <<<<<<<<<<<<<<
 *         return 0  # Q1
 *     cdef int leap = <int> is_leap_year(year)
*/
  }

  /* "utils.pxd":2179
 *     if month < 4:
 *         return 0  # Q1
 *     cdef int leap = <int> is_leap_year(year)             # <<<<<<<<<<<<<<
 *     if month < 7:
 *         return 90 + leap  # Q2
*/
  __pyx_v_leap = ((int)__pyx_f_7cytimes_5utils_is_leap_year(__pyx_v_year));

  /* "utils.pxd":2180
 *         return 0  # Q1
 *     cdef int leap = <int> is_leap_year(year)
 *     if month < 7:             # <<<<<<<<<<<<<<
 *         return 90 + leap  # Q2
 *     elif month < 10:
*/
  __pyx_t_1 = (__pyx_v_month < 7);
  if (__pyx_t_1) {

    /* "utils.pxd":2181
 *     cdef int leap = <int> is_leap_year(year)
 *     if month < 7:
 *         return 90 + leap  # Q2             # <<<<<<<<<<<<<<
 *     elif month < 10:
 *         return 181 + leap # Q3
*/
    __pyx_r = (90 + __pyx_v_leap);
    goto __pyx_L0;

    /* "utils.pxd":2180
 *         return 0  # Q1
 *     cdef int leap = <int> is_leap_year(year)
 *     if month < 7:             # <<<<<<<<<<<<<<
 *         return 90 + leap  # Q2
 *     elif month < 10:
*/
  }

  /* "utils.pxd":2182
 *     if month < 7:
 *         return 90 + leap  # Q2
 *     elif month < 10:             # <<<<<<<<<<<<<<
 *         return 181 + leap # Q3
 *     else:
*/
  __pyx_t_1 = (__pyx_v_month < 10);
  if (__pyx_t_1) {

    /* "utils.pxd":2183
 *         return 90 + leap  # Q2
 *     elif month < 10:
 *         return 181 + leap # Q3             # <<<<<<<<<<<<<<
 *     else:
 *         return 273 + leap # Q4
*/
    __pyx_r = (0xB5 + __pyx_v_leap);
    goto __pyx_L0;

    /* "utils.pxd":2182
 *     if month < 7:
 *         return 90 + leap  # Q2
 *     elif month < 10:             # <<<<<<<<<<<<<<
 *         return 181 + leap # Q3
 *     else:
*/
  }

  /* "utils.pxd":2185
 *         return 181 + leap # Q3
 *     else:
 *         return 273 + leap # Q4             # <<<<<<<<<<<<<<
 * 
 * cdef inline int day_of_quarter(long long year, int month, int day) noexcept nogil:
*/
  /*else*/ {
    __pyx_r = (0x111 + __pyx_v_leap);
    goto __pyx_L0;
  }

  /* "utils.pxd":2164
 *         return 92  # Q3 & Q4
 * 
 * cdef inline int days_bf_quarter(long long year, int month) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the number of days strictly before the first day of the
 *     calendar quarter containing `month` in `year` under the proleptic
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2187
 *         return 273 + leap # Q4
 * 
 * cdef inline int day_of_quarter(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the number of days between the 1st day of the quarter and the
 *     given Y/M/D under the proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_day_of_quarter(PY_LONG_LONG __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  int __pyx_r;

  /* "utils.pxd":2198
 *     :returns `<'int'>`: 0-based days since the quarter start.
 *     """
 *     return day_of_year(year, month, day) - days_bf_quarter(year, month)             # <<<<<<<<<<<<<<
 * 
 * # . month
*/
  __pyx_r = (__pyx_f_7cytimes_5utils_day_of_year(__pyx_v_year, __pyx_v_month, __pyx_v_day) - __pyx_f_7cytimes_5utils_days_bf_quarter(__pyx_v_year, __pyx_v_month));
  goto __pyx_L0;

  /* "utils.pxd":2187
 *         return 273 + leap # Q4
 * 
 * cdef inline int day_of_quarter(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the number of days between the 1st day of the quarter and the
 *     given Y/M/D under the proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2201
 * 
 * # . month
 * cdef inline int days_in_month(long long year, int month) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the number of days in `month` of `year` under
 *     the proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_days_in_month(PY_LONG_LONG __pyx_v_year, int __pyx_v_month) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":2211
 *     """
 *     # Month Jan(1) or out-of-range: 31 days
 *     if month <= 1:             # <<<<<<<<<<<<<<
 *         return 31
 *     # Month Feb(2): 28 or 29 days (leap)
*/
  __pyx_t_1 = (__pyx_v_month <= 1);
  if (__pyx_t_1) {

    /* "utils.pxd":2212
 *     # Month Jan(1) or out-of-range: 31 days
 *     if month <= 1:
 *         return 31             # <<<<<<<<<<<<<<
 *     # Month Feb(2): 28 or 29 days (leap)
 *     elif month == 2:
*/
    __pyx_r = 31;
    goto __pyx_L0;

    /* "utils.pxd":2211
 *     """
 *     # Month Jan(1) or out-of-range: 31 days
 *     if month <= 1:             # <<<<<<<<<<<<<<
 *         return 31
 *     # Month Feb(2): 28 or 29 days (leap)
*/
  }

  /* "utils.pxd":2214
 *         return 31
 *     # Month Feb(2): 28 or 29 days (leap)
 *     elif month == 2:             # <<<<<<<<<<<<<<
 *         return 29 if is_leap_year(year) else 28
 *     # Month Apr(4), Jun(6), Sep(9), Nov(11): 30 days
*/
  __pyx_t_1 = (__pyx_v_month == 2);
  if (__pyx_t_1) {

    /* "utils.pxd":2215
 *     # Month Feb(2): 28 or 29 days (leap)
 *     elif month == 2:
 *         return 29 if is_leap_year(year) else 28             # <<<<<<<<<<<<<<
 *     # Month Apr(4), Jun(6), Sep(9), Nov(11): 30 days
 *     elif month == 4 or month == 6 or month == 9 or month == 11:
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_is_leap_year(__pyx_v_year);
    if (__pyx_t_1) {
      __pyx_t_2 = 29;
    } else {
      __pyx_t_2 = 28;
    }
    __pyx_r = __pyx_t_2;
    goto __pyx_L0;

    /* "utils.pxd":2214
 *         return 31
 *     # Month Feb(2): 28 or 29 days (leap)
 *     elif month == 2:             # <<<<<<<<<<<<<<
 *         return 29 if is_leap_year(year) else 28
 *     # Month Apr(4), Jun(6), Sep(9), Nov(11): 30 days
*/
  }

  /* "utils.pxd":2217
 *         return 29 if is_leap_year(year) else 28
 *     # Month Apr(4), Jun(6), Sep(9), Nov(11): 30 days
 *     elif month == 4 or month == 6 or month == 9 or month == 11:             # <<<<<<<<<<<<<<
 *         return 30
 *     # Other months: 31 days
*/
  switch (__pyx_v_month) {
    case 4:
    case 6:
    case 9:
    case 11:
    __pyx_t_1 = 1;
    break;
    default:
    __pyx_t_1 = 0;
    break;
  }
  if (__pyx_t_1) {

    /* "utils.pxd":2218
 *     # Month Apr(4), Jun(6), Sep(9), Nov(11): 30 days
 *     elif month == 4 or month == 6 or month == 9 or month == 11:
 *         return 30             # <<<<<<<<<<<<<<
 *     # Other months: 31 days
 *     else:
*/
    __pyx_r = 30;
    goto __pyx_L0;

    /* "utils.pxd":2217
 *         return 29 if is_leap_year(year) else 28
 *     # Month Apr(4), Jun(6), Sep(9), Nov(11): 30 days
 *     elif month == 4 or month == 6 or month == 9 or month == 11:             # <<<<<<<<<<<<<<
 *         return 30
 *     # Other months: 31 days
*/
  }

  /* "utils.pxd":2221
 *     # Other months: 31 days
 *     else:
 *         return 31             # <<<<<<<<<<<<<<
 * 
 * cdef inline int days_bf_month(long long year, int month) noexcept nogil:
*/
  /*else*/ {
    __pyx_r = 31;
    goto __pyx_L0;
  }

  /* "utils.pxd":2201
 * 
 * # . month
 * cdef inline int days_in_month(long long year, int month) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the number of days in `month` of `year` under
 *     the proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2223
 *         return 31
 * 
 * cdef inline int days_bf_month(long long year, int month) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the number of days strictly before the first day of `month`
 *     in `year` under the proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_days_bf_month(PY_LONG_LONG __pyx_v_year, int __pyx_v_month) {
  int __pyx_v_days;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  long __pyx_t_3;

  /* "utils.pxd":2233
 *     """
 *     # Jan(1) or out-of-range: 0 days
 *     if month <= 1:             # <<<<<<<<<<<<<<
 *         return 0
 *     # Feb(2): 31 days
*/
  __pyx_t_1 = (__pyx_v_month <= 1);
  if (__pyx_t_1) {

    /* "utils.pxd":2234
 *     # Jan(1) or out-of-range: 0 days
 *     if month <= 1:
 *         return 0             # <<<<<<<<<<<<<<
 *     # Feb(2): 31 days
 *     if month == 2:
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":2233
 *     """
 *     # Jan(1) or out-of-range: 0 days
 *     if month <= 1:             # <<<<<<<<<<<<<<
 *         return 0
 *     # Feb(2): 31 days
*/
  }

  /* "utils.pxd":2236
 *         return 0
 *     # Feb(2): 31 days
 *     if month == 2:             # <<<<<<<<<<<<<<
 *         return 31
 *     # Mar(3)..Dec(12)
*/
  __pyx_t_1 = (__pyx_v_month == 2);
  if (__pyx_t_1) {

    /* "utils.pxd":2237
 *     # Feb(2): 31 days
 *     if month == 2:
 *         return 31             # <<<<<<<<<<<<<<
 *     # Mar(3)..Dec(12)
 *     cdef int days = DAYS_BR_MONTH[month - 1] if month < 12 else 334
*/
    __pyx_r = 31;
    goto __pyx_L0;

    /* "utils.pxd":2236
 *         return 0
 *     # Feb(2): 31 days
 *     if month == 2:             # <<<<<<<<<<<<<<
 *         return 31
 *     # Mar(3)..Dec(12)
*/
  }

  /* "utils.pxd":2239
 *         return 31
 *     # Mar(3)..Dec(12)
 *     cdef int days = DAYS_BR_MONTH[month - 1] if month < 12 else 334             # <<<<<<<<<<<<<<
 *     return days + 1 if is_leap_year(year) else days
 * 
*/
  __pyx_t_1 = (__pyx_v_month < 12);
  if (__pyx_t_1) {
    __pyx_t_2 = (__pyx_v_7cytimes_5utils_DAYS_BR_MONTH[(__pyx_v_month - 1)]);
  } else {
    __pyx_t_2 = 0x14E;
  }
  __pyx_v_days = __pyx_t_2;

  /* "utils.pxd":2240
 *     # Mar(3)..Dec(12)
 *     cdef int days = DAYS_BR_MONTH[month - 1] if month < 12 else 334
 *     return days + 1 if is_leap_year(year) else days             # <<<<<<<<<<<<<<
 * 
 * # . week
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_is_leap_year(__pyx_v_year);
  if (__pyx_t_1) {
    __pyx_t_3 = (__pyx_v_days + 1);
  } else {
    __pyx_t_3 = __pyx_v_days;
  }
  __pyx_r = __pyx_t_3;
  goto __pyx_L0;

  /* "utils.pxd":2223
 *         return 31
 * 
 * cdef inline int days_bf_month(long long year, int month) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the number of days strictly before the first day of `month`
 *     in `year` under the proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2243
 * 
 * # . week
 * cdef inline int ymd_weekday(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the weekday for Y/M/D (`0=Mon  6=Sun`) under
 *     the proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_ymd_weekday(PY_LONG_LONG __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  PY_LONG_LONG __pyx_v_ord0;
  PY_LONG_LONG __pyx_v_r;
  int __pyx_r;
  PY_LONG_LONG __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":2254
 *     :returns `<'int'>`: Weekday number in 0..6 (Mon=0).
 *     """
 *     cdef long long ord0 = ymd_to_ord(year, month, day) - 1  # 0-based, Mon=0 at 0001-01-01             # <<<<<<<<<<<<<<
 *     cdef long long r
 *     with cython.cdivision(True):
*/
  __pyx_v_ord0 = (__pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v_year, __pyx_v_month, __pyx_v_day) - 1);

  /* "utils.pxd":2257
 *     cdef long long r
 *     with cython.cdivision(True):
 *         r = ord0 % 7             # <<<<<<<<<<<<<<
 *     return <int> (r + 7 if r < 0 else r)
 * 
*/
  __pyx_v_r = (__pyx_v_ord0 % 7);

  /* "utils.pxd":2258
 *     with cython.cdivision(True):
 *         r = ord0 % 7
 *     return <int> (r + 7 if r < 0 else r)             # <<<<<<<<<<<<<<
 * 
 * # . iso
*/
  __pyx_t_2 = (__pyx_v_r < 0);
  if (__pyx_t_2) {
    __pyx_t_1 = (__pyx_v_r + 7);
  } else {
    __pyx_t_1 = __pyx_v_r;
  }
  __pyx_r = ((int)__pyx_t_1);
  goto __pyx_L0;

  /* "utils.pxd":2243
 * 
 * # . week
 * cdef inline int ymd_weekday(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the weekday for Y/M/D (`0=Mon  6=Sun`) under
 *     the proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2261
 * 
 * # . iso
 * cdef inline iso ymd_isocalendar(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the ISO calendar from the Gregorian date Y/M/D `<'struct:iso'>`.
 * 
*/

static CYTHON_INLINE __pyx_t_7cytimes_5utils_iso __pyx_f_7cytimes_5utils_ymd_isocalendar(PY_LONG_LONG __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  PY_LONG_LONG __pyx_v_ord;
  PY_LONG_LONG __pyx_v_ord_w1;
  PY_LONG_LONG __pyx_v_iso_year;
  PY_LONG_LONG __pyx_v_iso_week;
  PY_LONG_LONG __pyx_v_iso_wday;
  PY_LONG_LONG __pyx_v_w1;
  PY_LONG_LONG __pyx_v_w1_next;
  PY_LONG_LONG __pyx_v_r;
  __pyx_t_7cytimes_5utils_iso __pyx_v_out;
  __pyx_t_7cytimes_5utils_iso __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":2277
 *     # Find ISO year by comparing against ISO week-1 Monday boundaries
 *     cdef:
 *         long long ord    = ymd_to_ord(year, month, day)             # <<<<<<<<<<<<<<
 *         long long ord_w1 = iso_week1_mon_ord(year)
 *         long long iso_year, iso_week, iso_wday, w1, w1_next, r
*/
  __pyx_v_ord = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v_year, __pyx_v_month, __pyx_v_day);

  /* "utils.pxd":2278
 *     cdef:
 *         long long ord    = ymd_to_ord(year, month, day)
 *         long long ord_w1 = iso_week1_mon_ord(year)             # <<<<<<<<<<<<<<
 *         long long iso_year, iso_week, iso_wday, w1, w1_next, r
 *         iso out
*/
  __pyx_v_ord_w1 = __pyx_f_7cytimes_5utils_iso_week1_mon_ord(__pyx_v_year);

  /* "utils.pxd":2283
 * 
 *     # ISO year
 *     if ord < ord_w1:             # <<<<<<<<<<<<<<
 *         iso_year = year - 1
 *         w1 = iso_week1_mon_ord(iso_year)
*/
  __pyx_t_1 = (__pyx_v_ord < __pyx_v_ord_w1);
  if (__pyx_t_1) {

    /* "utils.pxd":2284
 *     # ISO year
 *     if ord < ord_w1:
 *         iso_year = year - 1             # <<<<<<<<<<<<<<
 *         w1 = iso_week1_mon_ord(iso_year)
 *     else:
*/
    __pyx_v_iso_year = (__pyx_v_year - 1);

    /* "utils.pxd":2285
 *     if ord < ord_w1:
 *         iso_year = year - 1
 *         w1 = iso_week1_mon_ord(iso_year)             # <<<<<<<<<<<<<<
 *     else:
 *         w1_next = iso_week1_mon_ord(year + 1)
*/
    __pyx_v_w1 = __pyx_f_7cytimes_5utils_iso_week1_mon_ord(__pyx_v_iso_year);

    /* "utils.pxd":2283
 * 
 *     # ISO year
 *     if ord < ord_w1:             # <<<<<<<<<<<<<<
 *         iso_year = year - 1
 *         w1 = iso_week1_mon_ord(iso_year)
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":2287
 *         w1 = iso_week1_mon_ord(iso_year)
 *     else:
 *         w1_next = iso_week1_mon_ord(year + 1)             # <<<<<<<<<<<<<<
 *         if ord >= w1_next:
 *             iso_year = year + 1
*/
  /*else*/ {
    __pyx_v_w1_next = __pyx_f_7cytimes_5utils_iso_week1_mon_ord((__pyx_v_year + 1));

    /* "utils.pxd":2288
 *     else:
 *         w1_next = iso_week1_mon_ord(year + 1)
 *         if ord >= w1_next:             # <<<<<<<<<<<<<<
 *             iso_year = year + 1
 *             w1 = w1_next
*/
    __pyx_t_1 = (__pyx_v_ord >= __pyx_v_w1_next);
    if (__pyx_t_1) {

      /* "utils.pxd":2289
 *         w1_next = iso_week1_mon_ord(year + 1)
 *         if ord >= w1_next:
 *             iso_year = year + 1             # <<<<<<<<<<<<<<
 *             w1 = w1_next
 *         else:
*/
      __pyx_v_iso_year = (__pyx_v_year + 1);

      /* "utils.pxd":2290
 *         if ord >= w1_next:
 *             iso_year = year + 1
 *             w1 = w1_next             # <<<<<<<<<<<<<<
 *         else:
 *             iso_year = year
*/
      __pyx_v_w1 = __pyx_v_w1_next;

      /* "utils.pxd":2288
 *     else:
 *         w1_next = iso_week1_mon_ord(year + 1)
 *         if ord >= w1_next:             # <<<<<<<<<<<<<<
 *             iso_year = year + 1
 *             w1 = w1_next
*/
      goto __pyx_L4;
    }

    /* "utils.pxd":2292
 *             w1 = w1_next
 *         else:
 *             iso_year = year             # <<<<<<<<<<<<<<
 *             w1 = ord_w1
 * 
*/
    /*else*/ {
      __pyx_v_iso_year = __pyx_v_year;

      /* "utils.pxd":2293
 *         else:
 *             iso_year = year
 *             w1 = ord_w1             # <<<<<<<<<<<<<<
 * 
 *     # ISO week & weekday
*/
      __pyx_v_w1 = __pyx_v_ord_w1;
    }
    __pyx_L4:;
  }
  __pyx_L3:;

  /* "utils.pxd":2297
 *     # ISO week & weekday
 *     with cython.cdivision(True):
 *         iso_week = (ord - w1) // 7 + 1             # <<<<<<<<<<<<<<
 *         r = (ord - 1) % 7
 *         if r < 0:
*/
  __pyx_v_iso_week = (((__pyx_v_ord - __pyx_v_w1) / 7) + 1);

  /* "utils.pxd":2298
 *     with cython.cdivision(True):
 *         iso_week = (ord - w1) // 7 + 1
 *         r = (ord - 1) % 7             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             r += 7
*/
  __pyx_v_r = ((__pyx_v_ord - 1) % 7);

  /* "utils.pxd":2299
 *         iso_week = (ord - w1) // 7 + 1
 *         r = (ord - 1) % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             r += 7
 *         iso_wday = r + 1
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":2300
 *         r = (ord - 1) % 7
 *         if r < 0:
 *             r += 7             # <<<<<<<<<<<<<<
 *         iso_wday = r + 1
 * 
*/
    __pyx_v_r = (__pyx_v_r + 7);

    /* "utils.pxd":2299
 *         iso_week = (ord - w1) // 7 + 1
 *         r = (ord - 1) % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             r += 7
 *         iso_wday = r + 1
*/
  }

  /* "utils.pxd":2301
 *         if r < 0:
 *             r += 7
 *         iso_wday = r + 1             # <<<<<<<<<<<<<<
 * 
 *     out.year = iso_year
*/
  __pyx_v_iso_wday = (__pyx_v_r + 1);

  /* "utils.pxd":2303
 *         iso_wday = r + 1
 * 
 *     out.year = iso_year             # <<<<<<<<<<<<<<
 *     out.week = iso_week
 *     out.weekday = iso_wday
*/
  __pyx_v_out.year = __pyx_v_iso_year;

  /* "utils.pxd":2304
 * 
 *     out.year = iso_year
 *     out.week = iso_week             # <<<<<<<<<<<<<<
 *     out.weekday = iso_wday
 *     return out
*/
  __pyx_v_out.week = __pyx_v_iso_week;

  /* "utils.pxd":2305
 *     out.year = iso_year
 *     out.week = iso_week
 *     out.weekday = iso_wday             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
  __pyx_v_out.weekday = __pyx_v_iso_wday;

  /* "utils.pxd":2306
 *     out.week = iso_week
 *     out.weekday = iso_wday
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long ymd_isoyear(long long year, int month, int day) noexcept nogil:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":2261
 * 
 * # . iso
 * cdef inline iso ymd_isocalendar(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the ISO calendar from the Gregorian date Y/M/D `<'struct:iso'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2308
 *     return out
 * 
 * cdef inline long long ymd_isoyear(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the ISO calendar `year` from the Gregorian date Y/M/D `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_ymd_isoyear(PY_LONG_LONG __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  PY_LONG_LONG __pyx_v_ord;
  PY_LONG_LONG __pyx_v_ord_w1;
  PY_LONG_LONG __pyx_v_w1_next;
  PY_LONG_LONG __pyx_r;
  int __pyx_t_1;
  PY_LONG_LONG __pyx_t_2;

  /* "utils.pxd":2319
 *     """
 *     cdef:
 *         long long ord    = ymd_to_ord(year, month, day)             # <<<<<<<<<<<<<<
 *         long long ord_w1 = iso_week1_mon_ord(year)
 *         long long w1_next
*/
  __pyx_v_ord = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v_year, __pyx_v_month, __pyx_v_day);

  /* "utils.pxd":2320
 *     cdef:
 *         long long ord    = ymd_to_ord(year, month, day)
 *         long long ord_w1 = iso_week1_mon_ord(year)             # <<<<<<<<<<<<<<
 *         long long w1_next
 * 
*/
  __pyx_v_ord_w1 = __pyx_f_7cytimes_5utils_iso_week1_mon_ord(__pyx_v_year);

  /* "utils.pxd":2323
 *         long long w1_next
 * 
 *     if ord < ord_w1:             # <<<<<<<<<<<<<<
 *         return year - 1
 *     else:
*/
  __pyx_t_1 = (__pyx_v_ord < __pyx_v_ord_w1);
  if (__pyx_t_1) {

    /* "utils.pxd":2324
 * 
 *     if ord < ord_w1:
 *         return year - 1             # <<<<<<<<<<<<<<
 *     else:
 *         w1_next = iso_week1_mon_ord(year + 1)
*/
    __pyx_r = (__pyx_v_year - 1);
    goto __pyx_L0;

    /* "utils.pxd":2323
 *         long long w1_next
 * 
 *     if ord < ord_w1:             # <<<<<<<<<<<<<<
 *         return year - 1
 *     else:
*/
  }

  /* "utils.pxd":2326
 *         return year - 1
 *     else:
 *         w1_next = iso_week1_mon_ord(year + 1)             # <<<<<<<<<<<<<<
 *         return year if ord < w1_next else year + 1
 * 
*/
  /*else*/ {
    __pyx_v_w1_next = __pyx_f_7cytimes_5utils_iso_week1_mon_ord((__pyx_v_year + 1));

    /* "utils.pxd":2327
 *     else:
 *         w1_next = iso_week1_mon_ord(year + 1)
 *         return year if ord < w1_next else year + 1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int ymd_isoweek(long long year, int month, int day) noexcept nogil:
*/
    __pyx_t_1 = (__pyx_v_ord < __pyx_v_w1_next);
    if (__pyx_t_1) {
      __pyx_t_2 = __pyx_v_year;
    } else {
      __pyx_t_2 = (__pyx_v_year + 1);
    }
    __pyx_r = __pyx_t_2;
    goto __pyx_L0;
  }

  /* "utils.pxd":2308
 *     return out
 * 
 * cdef inline long long ymd_isoyear(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the ISO calendar `year` from the Gregorian date Y/M/D `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2329
 *         return year if ord < w1_next else year + 1
 * 
 * cdef inline int ymd_isoweek(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the ISO calendar `week` from the Gregorian date Y/M/D `<'int'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_ymd_isoweek(PY_LONG_LONG __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  PY_LONG_LONG __pyx_v_ord;
  PY_LONG_LONG __pyx_v_ord_w1;
  PY_LONG_LONG __pyx_v_w1;
  PY_LONG_LONG __pyx_v_w1_next;
  int __pyx_r;
  int __pyx_t_1;
  PY_LONG_LONG __pyx_t_2;

  /* "utils.pxd":2340
 *     """
 *     cdef:
 *         long long ord    = ymd_to_ord(year, month, day)             # <<<<<<<<<<<<<<
 *         long long ord_w1 = iso_week1_mon_ord(year)
 *         long long w1, w1_next
*/
  __pyx_v_ord = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v_year, __pyx_v_month, __pyx_v_day);

  /* "utils.pxd":2341
 *     cdef:
 *         long long ord    = ymd_to_ord(year, month, day)
 *         long long ord_w1 = iso_week1_mon_ord(year)             # <<<<<<<<<<<<<<
 *         long long w1, w1_next
 * 
*/
  __pyx_v_ord_w1 = __pyx_f_7cytimes_5utils_iso_week1_mon_ord(__pyx_v_year);

  /* "utils.pxd":2344
 *         long long w1, w1_next
 * 
 *     if ord < ord_w1:             # <<<<<<<<<<<<<<
 *         w1 = iso_week1_mon_ord(year - 1)
 *     else:
*/
  __pyx_t_1 = (__pyx_v_ord < __pyx_v_ord_w1);
  if (__pyx_t_1) {

    /* "utils.pxd":2345
 * 
 *     if ord < ord_w1:
 *         w1 = iso_week1_mon_ord(year - 1)             # <<<<<<<<<<<<<<
 *     else:
 *         w1_next = iso_week1_mon_ord(year + 1)
*/
    __pyx_v_w1 = __pyx_f_7cytimes_5utils_iso_week1_mon_ord((__pyx_v_year - 1));

    /* "utils.pxd":2344
 *         long long w1, w1_next
 * 
 *     if ord < ord_w1:             # <<<<<<<<<<<<<<
 *         w1 = iso_week1_mon_ord(year - 1)
 *     else:
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":2347
 *         w1 = iso_week1_mon_ord(year - 1)
 *     else:
 *         w1_next = iso_week1_mon_ord(year + 1)             # <<<<<<<<<<<<<<
 *         w1 = ord_w1 if ord < w1_next else w1_next
 * 
*/
  /*else*/ {
    __pyx_v_w1_next = __pyx_f_7cytimes_5utils_iso_week1_mon_ord((__pyx_v_year + 1));

    /* "utils.pxd":2348
 *     else:
 *         w1_next = iso_week1_mon_ord(year + 1)
 *         w1 = ord_w1 if ord < w1_next else w1_next             # <<<<<<<<<<<<<<
 * 
 *     with cython.cdivision(True):
*/
    __pyx_t_1 = (__pyx_v_ord < __pyx_v_w1_next);
    if (__pyx_t_1) {
      __pyx_t_2 = __pyx_v_ord_w1;
    } else {
      __pyx_t_2 = __pyx_v_w1_next;
    }
    __pyx_v_w1 = __pyx_t_2;
  }
  __pyx_L3:;

  /* "utils.pxd":2351
 * 
 *     with cython.cdivision(True):
 *         return (ord - w1) // 7 + 1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int ymd_isoweekday(long long year, int month, int day) noexcept nogil:
*/
  __pyx_r = (((__pyx_v_ord - __pyx_v_w1) / 7) + 1);
  goto __pyx_L0;

  /* "utils.pxd":2329
 *         return year if ord < w1_next else year + 1
 * 
 * cdef inline int ymd_isoweek(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the ISO calendar `week` from the Gregorian date Y/M/D `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2353
 *         return (ord - w1) // 7 + 1
 * 
 * cdef inline int ymd_isoweekday(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the ISO calendar `weekday` from the Gregorian date Y/M/D `<'int'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_ymd_isoweekday(PY_LONG_LONG __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  int __pyx_r;

  /* "utils.pxd":2363
 *     :returns `<'int'>`: The ISO calendar weekday (1=Mon...7=Sun).
 *     """
 *     return ymd_weekday(year, month, day) + 1             # <<<<<<<<<<<<<<
 * 
 * # . Y/M/D
*/
  __pyx_r = (__pyx_f_7cytimes_5utils_ymd_weekday(__pyx_v_year, __pyx_v_month, __pyx_v_day) + 1);
  goto __pyx_L0;

  /* "utils.pxd":2353
 *         return (ord - w1) // 7 + 1
 * 
 * cdef inline int ymd_isoweekday(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the ISO calendar `weekday` from the Gregorian date Y/M/D `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2366
 * 
 * # . Y/M/D
 * cdef inline long long ymd_to_ord(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert a Gregorian Y/M/D to a **1-based** ordinal day under
 *     the proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_ymd_to_ord(PY_LONG_LONG __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  PY_LONG_LONG __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;

  /* "utils.pxd":2381
 *     :returns `<'int'>`: Ordinal day count (1-based).
 *     """
 *     if day > 28:             # <<<<<<<<<<<<<<
 *         day = min(day, days_in_month(year, month))
 *     elif day < 1:
*/
  __pyx_t_1 = (__pyx_v_day > 28);
  if (__pyx_t_1) {

    /* "utils.pxd":2382
 *     """
 *     if day > 28:
 *         day = min(day, days_in_month(year, month))             # <<<<<<<<<<<<<<
 *     elif day < 1:
 *         day = 1
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v_year, __pyx_v_month);
    __pyx_t_3 = __pyx_v_day;
    __pyx_t_1 = (__pyx_t_2 < __pyx_t_3);
    if (__pyx_t_1) {
      __pyx_t_4 = __pyx_t_2;
    } else {
      __pyx_t_4 = __pyx_t_3;
    }
    __pyx_v_day = __pyx_t_4;

    /* "utils.pxd":2381
 *     :returns `<'int'>`: Ordinal day count (1-based).
 *     """
 *     if day > 28:             # <<<<<<<<<<<<<<
 *         day = min(day, days_in_month(year, month))
 *     elif day < 1:
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":2383
 *     if day > 28:
 *         day = min(day, days_in_month(year, month))
 *     elif day < 1:             # <<<<<<<<<<<<<<
 *         day = 1
 *     return days_bf_year(year) + days_bf_month(year, month) + day
*/
  __pyx_t_1 = (__pyx_v_day < 1);
  if (__pyx_t_1) {

    /* "utils.pxd":2384
 *         day = min(day, days_in_month(year, month))
 *     elif day < 1:
 *         day = 1             # <<<<<<<<<<<<<<
 *     return days_bf_year(year) + days_bf_month(year, month) + day
 * 
*/
    __pyx_v_day = 1;

    /* "utils.pxd":2383
 *     if day > 28:
 *         day = min(day, days_in_month(year, month))
 *     elif day < 1:             # <<<<<<<<<<<<<<
 *         day = 1
 *     return days_bf_year(year) + days_bf_month(year, month) + day
*/
  }
  __pyx_L3:;

  /* "utils.pxd":2385
 *     elif day < 1:
 *         day = 1
 *     return days_bf_year(year) + days_bf_month(year, month) + day             # <<<<<<<<<<<<<<
 * 
 * cdef inline ymd ymd_fr_ord(long long value) noexcept nogil:
*/
  __pyx_r = ((__pyx_f_7cytimes_5utils_days_bf_year(__pyx_v_year) + __pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_year, __pyx_v_month)) + __pyx_v_day);
  goto __pyx_L0;

  /* "utils.pxd":2366
 * 
 * # . Y/M/D
 * cdef inline long long ymd_to_ord(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert a Gregorian Y/M/D to a **1-based** ordinal day under
 *     the proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2387
 *     return days_bf_year(year) + days_bf_month(year, month) + day
 * 
 * cdef inline ymd ymd_fr_ord(long long value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert Gregorian ordinal day to Y/M/D `<'struct:ymd'>`.
 * 
*/

static CYTHON_INLINE __pyx_t_7cytimes_5utils_ymd __pyx_f_7cytimes_5utils_ymd_fr_ord(PY_LONG_LONG __pyx_v_value) {
  PY_LONG_LONG __pyx_v_n;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_v_n400;
  PY_LONG_LONG __pyx_v_n100;
  PY_LONG_LONG __pyx_v_n4;
  PY_LONG_LONG __pyx_v_n1;
  PY_LONG_LONG __pyx_v_yy;
  PY_LONG_LONG __pyx_v_mm;
  PY_LONG_LONG __pyx_v_days_bf;
  __pyx_t_7cytimes_5utils_ymd __pyx_v_out;
  __pyx_t_7cytimes_5utils_ymd __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  PY_LONG_LONG __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PY_LONG_LONG __pyx_t_6;
  PY_LONG_LONG __pyx_t_7;

  /* "utils.pxd":2401
 *         long long n, r, n400, n100, n4, n1, yy, mm, days_bf
 *         ymd out
 *     n = value - 1             # <<<<<<<<<<<<<<
 * 
 *     with cython.cdivision(True):
*/
  __pyx_v_n = (__pyx_v_value - 1);

  /* "utils.pxd":2405
 *     with cython.cdivision(True):
 *         # Number of complete 400-year cycles
 *         n400 = n / 146_097; r = n % 146_097             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             n400 -= 1; r += 146_097
*/
  __pyx_v_n400 = (__pyx_v_n / 0x23AB1);
  __pyx_v_r = (__pyx_v_n % 0x23AB1);

  /* "utils.pxd":2406
 *         # Number of complete 400-year cycles
 *         n400 = n / 146_097; r = n % 146_097
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             n400 -= 1; r += 146_097
 *         n = r
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":2407
 *         n400 = n / 146_097; r = n % 146_097
 *         if r < 0:
 *             n400 -= 1; r += 146_097             # <<<<<<<<<<<<<<
 *         n = r
 *         # Number of complete 100-year cycles within the 400-year cycle
*/
    __pyx_v_n400 = (__pyx_v_n400 - 1);
    __pyx_v_r = (__pyx_v_r + 0x23AB1);

    /* "utils.pxd":2406
 *         # Number of complete 400-year cycles
 *         n400 = n / 146_097; r = n % 146_097
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             n400 -= 1; r += 146_097
 *         n = r
*/
  }

  /* "utils.pxd":2408
 *         if r < 0:
 *             n400 -= 1; r += 146_097
 *         n = r             # <<<<<<<<<<<<<<
 *         # Number of complete 100-year cycles within the 400-year cycle
 *         n100 = n / 36_524;  n %= 36_524
*/
  __pyx_v_n = __pyx_v_r;

  /* "utils.pxd":2410
 *         n = r
 *         # Number of complete 100-year cycles within the 400-year cycle
 *         n100 = n / 36_524;  n %= 36_524             # <<<<<<<<<<<<<<
 *         # Number of complete 4-year cycles within the 100-year cycle
 *         n4   = n / 1_461;   n %= 1_461
*/
  __pyx_v_n100 = (__pyx_v_n / 0x8EAC);
  __pyx_v_n = __Pyx_mod_PY_LONG_LONG(__pyx_v_n, 0x8EAC, 1);

  /* "utils.pxd":2412
 *         n100 = n / 36_524;  n %= 36_524
 *         # Number of complete 4-year cycles within the 100-year cycle
 *         n4   = n / 1_461;   n %= 1_461             # <<<<<<<<<<<<<<
 *         # Number of complete years within the 4-year cycle
 *         n1   = n / 365;     n %= 365
*/
  __pyx_v_n4 = (__pyx_v_n / 0x5B5);
  __pyx_v_n = __Pyx_mod_PY_LONG_LONG(__pyx_v_n, 0x5B5, 1);

  /* "utils.pxd":2414
 *         n4   = n / 1_461;   n %= 1_461
 *         # Number of complete years within the 4-year cycle
 *         n1   = n / 365;     n %= 365             # <<<<<<<<<<<<<<
 * 
 *     # We now know the year and the offset from January 1st.  Leap years are
*/
  __pyx_v_n1 = (__pyx_v_n / 0x16D);
  __pyx_v_n = __Pyx_mod_PY_LONG_LONG(__pyx_v_n, 0x16D, 1);

  /* "utils.pxd":2422
 *     # whether year is divisible by 4.  If not, then we're done -- the answer
 *     # is December 31 at the end of the year.
 *     yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1             # <<<<<<<<<<<<<<
 *     if n100 == 4 or n1 == 4:
 *         out.year, out.month, out.day = yy - 1, 12, 31
*/
  __pyx_v_yy = (((((__pyx_v_n400 * 0x190) + (__pyx_v_n100 * 0x64)) + (__pyx_v_n4 * 4)) + __pyx_v_n1) + 1);

  /* "utils.pxd":2423
 *     # is December 31 at the end of the year.
 *     yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1
 *     if n100 == 4 or n1 == 4:             # <<<<<<<<<<<<<<
 *         out.year, out.month, out.day = yy - 1, 12, 31
 * 
*/
  __pyx_t_2 = (__pyx_v_n100 == 4);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_n1 == 4);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":2424
 *     yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1
 *     if n100 == 4 or n1 == 4:
 *         out.year, out.month, out.day = yy - 1, 12, 31             # <<<<<<<<<<<<<<
 * 
 *     # Now the year is correct, and n is the offset from January 1.  We find
*/
    __pyx_t_3 = (__pyx_v_yy - 1);
    __pyx_t_4 = 12;
    __pyx_t_5 = 31;
    __pyx_v_out.year = __pyx_t_3;
    __pyx_v_out.month = __pyx_t_4;
    __pyx_v_out.day = __pyx_t_5;

    /* "utils.pxd":2423
 *     # is December 31 at the end of the year.
 *     yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1
 *     if n100 == 4 or n1 == 4:             # <<<<<<<<<<<<<<
 *         out.year, out.month, out.day = yy - 1, 12, 31
 * 
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":2429
 *     # the month via an estimate that's either exact or one too large.
 *     else:
 *         mm = (n + 50) >> 5             # <<<<<<<<<<<<<<
 *         days_bf = days_bf_month(yy, mm)
 *         if days_bf > n:
*/
  /*else*/ {
    __pyx_v_mm = ((__pyx_v_n + 50) >> 5);

    /* "utils.pxd":2430
 *     else:
 *         mm = (n + 50) >> 5
 *         days_bf = days_bf_month(yy, mm)             # <<<<<<<<<<<<<<
 *         if days_bf > n:
 *             mm -= 1
*/
    __pyx_v_days_bf = __pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_yy, __pyx_v_mm);

    /* "utils.pxd":2431
 *         mm = (n + 50) >> 5
 *         days_bf = days_bf_month(yy, mm)
 *         if days_bf > n:             # <<<<<<<<<<<<<<
 *             mm -= 1
 *             days_bf = days_bf_month(yy, mm)
*/
    __pyx_t_1 = (__pyx_v_days_bf > __pyx_v_n);
    if (__pyx_t_1) {

      /* "utils.pxd":2432
 *         days_bf = days_bf_month(yy, mm)
 *         if days_bf > n:
 *             mm -= 1             # <<<<<<<<<<<<<<
 *             days_bf = days_bf_month(yy, mm)
 *         out.year, out.month, out.day = yy, mm, n - days_bf + 1
*/
      __pyx_v_mm = (__pyx_v_mm - 1);

      /* "utils.pxd":2433
 *         if days_bf > n:
 *             mm -= 1
 *             days_bf = days_bf_month(yy, mm)             # <<<<<<<<<<<<<<
 *         out.year, out.month, out.day = yy, mm, n - days_bf + 1
 * 
*/
      __pyx_v_days_bf = __pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_yy, __pyx_v_mm);

      /* "utils.pxd":2431
 *         mm = (n + 50) >> 5
 *         days_bf = days_bf_month(yy, mm)
 *         if days_bf > n:             # <<<<<<<<<<<<<<
 *             mm -= 1
 *             days_bf = days_bf_month(yy, mm)
*/
    }

    /* "utils.pxd":2434
 *             mm -= 1
 *             days_bf = days_bf_month(yy, mm)
 *         out.year, out.month, out.day = yy, mm, n - days_bf + 1             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    __pyx_t_3 = __pyx_v_yy;
    __pyx_t_6 = __pyx_v_mm;
    __pyx_t_7 = ((__pyx_v_n - __pyx_v_days_bf) + 1);
    __pyx_v_out.year = __pyx_t_3;
    __pyx_v_out.month = __pyx_t_6;
    __pyx_v_out.day = __pyx_t_7;
  }
  __pyx_L4:;

  /* "utils.pxd":2436
 *         out.year, out.month, out.day = yy, mm, n - days_bf + 1
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline ymd ymd_fr_us(long long value) noexcept nogil:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":2387
 *     return days_bf_year(year) + days_bf_month(year, month) + day
 * 
 * cdef inline ymd ymd_fr_ord(long long value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert Gregorian ordinal day to Y/M/D `<'struct:ymd'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2438
 *     return out
 * 
 * cdef inline ymd ymd_fr_us(long long value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert microsecond ticks since the Unix epoch to Y/M/D `<'struct:ymd'>`.
 * 
*/

static CYTHON_INLINE __pyx_t_7cytimes_5utils_ymd __pyx_f_7cytimes_5utils_ymd_fr_us(PY_LONG_LONG __pyx_v_value) {
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  __pyx_t_7cytimes_5utils_ymd __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":2451
 *     cdef long long q, r
 *     with cython.cdivision(True):
 *         q = value / US_DAY; r = value % US_DAY             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1
*/
  __pyx_v_q = (__pyx_v_value / __pyx_v_7cytimes_5utils_US_DAY);
  __pyx_v_r = (__pyx_v_value % __pyx_v_7cytimes_5utils_US_DAY);

  /* "utils.pxd":2452
 *     with cython.cdivision(True):
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *     return ymd_fr_ord(q + EPOCH_DAY)
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":2453
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:
 *             q -= 1             # <<<<<<<<<<<<<<
 *     return ymd_fr_ord(q + EPOCH_DAY)
 * 
*/
    __pyx_v_q = (__pyx_v_q - 1);

    /* "utils.pxd":2452
 *     with cython.cdivision(True):
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *     return ymd_fr_ord(q + EPOCH_DAY)
*/
  }

  /* "utils.pxd":2454
 *         if r < 0:
 *             q -= 1
 *     return ymd_fr_ord(q + EPOCH_DAY)             # <<<<<<<<<<<<<<
 * 
 * cdef inline ymd ymd_fr_sec(double value) noexcept nogil:
*/
  __pyx_r = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_q + __pyx_v_7cytimes_5utils_EPOCH_DAY));
  goto __pyx_L0;

  /* "utils.pxd":2438
 *     return out
 * 
 * cdef inline ymd ymd_fr_us(long long value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert microsecond ticks since the Unix epoch to Y/M/D `<'struct:ymd'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2456
 *     return ymd_fr_ord(q + EPOCH_DAY)
 * 
 * cdef inline ymd ymd_fr_sec(double value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert seconds (float) since the Unix epoch to Y/M/D `<'struct:ymd'>`.
 * 
*/

static CYTHON_INLINE __pyx_t_7cytimes_5utils_ymd __pyx_f_7cytimes_5utils_ymd_fr_sec(double __pyx_v_value) {
  PY_LONG_LONG __pyx_v_sec;
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  __pyx_t_7cytimes_5utils_ymd __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":2468
 *     # Convert to ordinal
 *     cdef:
 *         long long sec = <long long> math.floor(value)             # <<<<<<<<<<<<<<
 *         long long q, r
 *     with cython.cdivision(True):
*/
  __pyx_v_sec = ((PY_LONG_LONG)floor(__pyx_v_value));

  /* "utils.pxd":2471
 *         long long q, r
 *     with cython.cdivision(True):
 *         q = sec / SS_DAY; r = sec % SS_DAY             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1
*/
  __pyx_v_q = (__pyx_v_sec / __pyx_v_7cytimes_5utils_SS_DAY);
  __pyx_v_r = (__pyx_v_sec % __pyx_v_7cytimes_5utils_SS_DAY);

  /* "utils.pxd":2472
 *     with cython.cdivision(True):
 *         q = sec / SS_DAY; r = sec % SS_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *     return ymd_fr_ord(q + EPOCH_DAY)
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":2473
 *         q = sec / SS_DAY; r = sec % SS_DAY
 *         if r < 0:
 *             q -= 1             # <<<<<<<<<<<<<<
 *     return ymd_fr_ord(q + EPOCH_DAY)
 * 
*/
    __pyx_v_q = (__pyx_v_q - 1);

    /* "utils.pxd":2472
 *     with cython.cdivision(True):
 *         q = sec / SS_DAY; r = sec % SS_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *     return ymd_fr_ord(q + EPOCH_DAY)
*/
  }

  /* "utils.pxd":2474
 *         if r < 0:
 *             q -= 1
 *     return ymd_fr_ord(q + EPOCH_DAY)             # <<<<<<<<<<<<<<
 * 
 * cdef inline ymd ymd_fr_iso(long long year, int week, int weekday) noexcept nogil:
*/
  __pyx_r = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_q + __pyx_v_7cytimes_5utils_EPOCH_DAY));
  goto __pyx_L0;

  /* "utils.pxd":2456
 *     return ymd_fr_ord(q + EPOCH_DAY)
 * 
 * cdef inline ymd ymd_fr_sec(double value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert seconds (float) since the Unix epoch to Y/M/D `<'struct:ymd'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2476
 *     return ymd_fr_ord(q + EPOCH_DAY)
 * 
 * cdef inline ymd ymd_fr_iso(long long year, int week, int weekday) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Create `struct:ymd` from ISO calendar values
 *     (ISO year, ISO week, ISO weekday) `<'struct:ymd'>`.
*/

static CYTHON_INLINE __pyx_t_7cytimes_5utils_ymd __pyx_f_7cytimes_5utils_ymd_fr_iso(PY_LONG_LONG __pyx_v_year, int __pyx_v_week, int __pyx_v_weekday) {
  PY_LONG_LONG __pyx_v_ord_w1;
  PY_LONG_LONG __pyx_v_days;
  __pyx_t_7cytimes_5utils_ymd __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":2492
 *     """
 *     # Clamp weekday to [1..7]
 *     if weekday < 1:             # <<<<<<<<<<<<<<
 *         weekday = 1
 *     elif weekday > 7:
*/
  __pyx_t_1 = (__pyx_v_weekday < 1);
  if (__pyx_t_1) {

    /* "utils.pxd":2493
 *     # Clamp weekday to [1..7]
 *     if weekday < 1:
 *         weekday = 1             # <<<<<<<<<<<<<<
 *     elif weekday > 7:
 *         weekday = 7
*/
    __pyx_v_weekday = 1;

    /* "utils.pxd":2492
 *     """
 *     # Clamp weekday to [1..7]
 *     if weekday < 1:             # <<<<<<<<<<<<<<
 *         weekday = 1
 *     elif weekday > 7:
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":2494
 *     if weekday < 1:
 *         weekday = 1
 *     elif weekday > 7:             # <<<<<<<<<<<<<<
 *         weekday = 7
 * 
*/
  __pyx_t_1 = (__pyx_v_weekday > 7);
  if (__pyx_t_1) {

    /* "utils.pxd":2495
 *         weekday = 1
 *     elif weekday > 7:
 *         weekday = 7             # <<<<<<<<<<<<<<
 * 
 *     # Clamp week to [1..53]
*/
    __pyx_v_weekday = 7;

    /* "utils.pxd":2494
 *     if weekday < 1:
 *         weekday = 1
 *     elif weekday > 7:             # <<<<<<<<<<<<<<
 *         weekday = 7
 * 
*/
  }
  __pyx_L3:;

  /* "utils.pxd":2498
 * 
 *     # Clamp week to [1..53]
 *     if week < 1:             # <<<<<<<<<<<<<<
 *         week = 1
 *     elif week > 53:
*/
  __pyx_t_1 = (__pyx_v_week < 1);
  if (__pyx_t_1) {

    /* "utils.pxd":2499
 *     # Clamp week to [1..53]
 *     if week < 1:
 *         week = 1             # <<<<<<<<<<<<<<
 *     elif week > 53:
 *         week = 53
*/
    __pyx_v_week = 1;

    /* "utils.pxd":2498
 * 
 *     # Clamp week to [1..53]
 *     if week < 1:             # <<<<<<<<<<<<<<
 *         week = 1
 *     elif week > 53:
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":2500
 *     if week < 1:
 *         week = 1
 *     elif week > 53:             # <<<<<<<<<<<<<<
 *         week = 53
 * 
*/
  __pyx_t_1 = (__pyx_v_week > 53);
  if (__pyx_t_1) {

    /* "utils.pxd":2501
 *         week = 1
 *     elif week > 53:
 *         week = 53             # <<<<<<<<<<<<<<
 * 
 *     # Handle week 53 in a non-long ISO year by rolling into the next ISO year.
*/
    __pyx_v_week = 53;

    /* "utils.pxd":2500
 *     if week < 1:
 *         week = 1
 *     elif week > 53:             # <<<<<<<<<<<<<<
 *         week = 53
 * 
*/
  }
  __pyx_L4:;

  /* "utils.pxd":2504
 * 
 *     # Handle week 53 in a non-long ISO year by rolling into the next ISO year.
 *     if week == 53 and not is_long_year(year):             # <<<<<<<<<<<<<<
 *         year += 1
 *         week = 1
*/
  __pyx_t_2 = (__pyx_v_week == 53);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = (!__pyx_f_7cytimes_5utils_is_long_year(__pyx_v_year));
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":2505
 *     # Handle week 53 in a non-long ISO year by rolling into the next ISO year.
 *     if week == 53 and not is_long_year(year):
 *         year += 1             # <<<<<<<<<<<<<<
 *         week = 1
 * 
*/
    __pyx_v_year = (__pyx_v_year + 1);

    /* "utils.pxd":2506
 *     if week == 53 and not is_long_year(year):
 *         year += 1
 *         week = 1             # <<<<<<<<<<<<<<
 * 
 *     # Monday of ISO week 1 for the (possibly adjusted) ISO year
*/
    __pyx_v_week = 1;

    /* "utils.pxd":2504
 * 
 *     # Handle week 53 in a non-long ISO year by rolling into the next ISO year.
 *     if week == 53 and not is_long_year(year):             # <<<<<<<<<<<<<<
 *         year += 1
 *         week = 1
*/
  }

  /* "utils.pxd":2509
 * 
 *     # Monday of ISO week 1 for the (possibly adjusted) ISO year
 *     cdef long long ord_w1 = iso_week1_mon_ord(year)             # <<<<<<<<<<<<<<
 * 
 *     # Target ordinal: Monday of week 1 + (week-1)*7 + (weekday-1)
*/
  __pyx_v_ord_w1 = __pyx_f_7cytimes_5utils_iso_week1_mon_ord(__pyx_v_year);

  /* "utils.pxd":2512
 * 
 *     # Target ordinal: Monday of week 1 + (week-1)*7 + (weekday-1)
 *     cdef long long days = (week - 1) * 7 + (weekday - 1)             # <<<<<<<<<<<<<<
 * 
 *     # Convert from ordinal to Y/M/D
*/
  __pyx_v_days = (((__pyx_v_week - 1) * 7) + (__pyx_v_weekday - 1));

  /* "utils.pxd":2515
 * 
 *     # Convert from ordinal to Y/M/D
 *     return ymd_fr_ord(ord_w1 + days)             # <<<<<<<<<<<<<<
 * 
 * cdef inline ymd ymd_fr_doy(long long year, int doy) noexcept nogil:
*/
  __pyx_r = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_ord_w1 + __pyx_v_days));
  goto __pyx_L0;

  /* "utils.pxd":2476
 *     return ymd_fr_ord(q + EPOCH_DAY)
 * 
 * cdef inline ymd ymd_fr_iso(long long year, int week, int weekday) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Create `struct:ymd` from ISO calendar values
 *     (ISO year, ISO week, ISO weekday) `<'struct:ymd'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2517
 *     return ymd_fr_ord(ord_w1 + days)
 * 
 * cdef inline ymd ymd_fr_doy(long long year, int doy) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Create `struct:ymd` from Gregorian year and day-of-year `<'struct:ymd'>`.
 * 
*/

static CYTHON_INLINE __pyx_t_7cytimes_5utils_ymd __pyx_f_7cytimes_5utils_ymd_fr_doy(PY_LONG_LONG __pyx_v_year, int __pyx_v_doy) {
  int __pyx_v_leap;
  int __pyx_v_max_d;
  __pyx_t_7cytimes_5utils_ymd __pyx_v_out;
  int __pyx_v_d_before_mar;
  int __pyx_v_d;
  int __pyx_v_m_from_mar;
  int __pyx_v_mon;
  int __pyx_v_dom;
  __pyx_t_7cytimes_5utils_ymd __pyx_r;
  int __pyx_t_1;
  PY_LONG_LONG __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  long __pyx_t_5;

  /* "utils.pxd":2530
 *     """
 *     cdef:
 *         int leap = is_leap_year(year)             # <<<<<<<<<<<<<<
 *         int max_d = 365 + leap
 *         ymd out
*/
  __pyx_v_leap = __pyx_f_7cytimes_5utils_is_leap_year(__pyx_v_year);

  /* "utils.pxd":2531
 *     cdef:
 *         int leap = is_leap_year(year)
 *         int max_d = 365 + leap             # <<<<<<<<<<<<<<
 *         ymd out
 * 
*/
  __pyx_v_max_d = (0x16D + __pyx_v_leap);

  /* "utils.pxd":2535
 * 
 *     # Clamp days
 *     if doy < 1:             # <<<<<<<<<<<<<<
 *         doy = 1
 *     elif doy > max_d:
*/
  __pyx_t_1 = (__pyx_v_doy < 1);
  if (__pyx_t_1) {

    /* "utils.pxd":2536
 *     # Clamp days
 *     if doy < 1:
 *         doy = 1             # <<<<<<<<<<<<<<
 *     elif doy > max_d:
 *         doy = max_d
*/
    __pyx_v_doy = 1;

    /* "utils.pxd":2535
 * 
 *     # Clamp days
 *     if doy < 1:             # <<<<<<<<<<<<<<
 *         doy = 1
 *     elif doy > max_d:
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":2537
 *     if doy < 1:
 *         doy = 1
 *     elif doy > max_d:             # <<<<<<<<<<<<<<
 *         doy = max_d
 * 
*/
  __pyx_t_1 = (__pyx_v_doy > __pyx_v_max_d);
  if (__pyx_t_1) {

    /* "utils.pxd":2538
 *         doy = 1
 *     elif doy > max_d:
 *         doy = max_d             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path: Jan
*/
    __pyx_v_doy = __pyx_v_max_d;

    /* "utils.pxd":2537
 *     if doy < 1:
 *         doy = 1
 *     elif doy > max_d:             # <<<<<<<<<<<<<<
 *         doy = max_d
 * 
*/
  }
  __pyx_L3:;

  /* "utils.pxd":2541
 * 
 *     # Fast-path: Jan
 *     if doy <= 31:             # <<<<<<<<<<<<<<
 *         out.year, out.month, out.day = year, 1, doy
 *         return out
*/
  __pyx_t_1 = (__pyx_v_doy <= 31);
  if (__pyx_t_1) {

    /* "utils.pxd":2542
 *     # Fast-path: Jan
 *     if doy <= 31:
 *         out.year, out.month, out.day = year, 1, doy             # <<<<<<<<<<<<<<
 *         return out
 * 
*/
    __pyx_t_2 = __pyx_v_year;
    __pyx_t_3 = 1;
    __pyx_t_4 = __pyx_v_doy;
    __pyx_v_out.year = __pyx_t_2;
    __pyx_v_out.month = __pyx_t_3;
    __pyx_v_out.day = __pyx_t_4;

    /* "utils.pxd":2543
 *     if doy <= 31:
 *         out.year, out.month, out.day = year, 1, doy
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path: Feb
*/
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "utils.pxd":2541
 * 
 *     # Fast-path: Jan
 *     if doy <= 31:             # <<<<<<<<<<<<<<
 *         out.year, out.month, out.day = year, 1, doy
 *         return out
*/
  }

  /* "utils.pxd":2546
 * 
 *     # Fast-path: Feb
 *     cdef int d_before_mar = 59 + leap  # days before March 1             # <<<<<<<<<<<<<<
 *     if doy <= d_before_mar:
 *         out.year, out.month, out.day = year, 2, doy - 31
*/
  __pyx_v_d_before_mar = (59 + __pyx_v_leap);

  /* "utils.pxd":2547
 *     # Fast-path: Feb
 *     cdef int d_before_mar = 59 + leap  # days before March 1
 *     if doy <= d_before_mar:             # <<<<<<<<<<<<<<
 *         out.year, out.month, out.day = year, 2, doy - 31
 *         return out
*/
  __pyx_t_1 = (__pyx_v_doy <= __pyx_v_d_before_mar);
  if (__pyx_t_1) {

    /* "utils.pxd":2548
 *     cdef int d_before_mar = 59 + leap  # days before March 1
 *     if doy <= d_before_mar:
 *         out.year, out.month, out.day = year, 2, doy - 31             # <<<<<<<<<<<<<<
 *         return out
 * 
*/
    __pyx_t_2 = __pyx_v_year;
    __pyx_t_4 = 2;
    __pyx_t_5 = (__pyx_v_doy - 31);
    __pyx_v_out.year = __pyx_t_2;
    __pyx_v_out.month = __pyx_t_4;
    __pyx_v_out.day = __pyx_t_5;

    /* "utils.pxd":2549
 *     if doy <= d_before_mar:
 *         out.year, out.month, out.day = year, 2, doy - 31
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     # March-based conversion using 153-day month blocks
*/
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "utils.pxd":2547
 *     # Fast-path: Feb
 *     cdef int d_before_mar = 59 + leap  # days before March 1
 *     if doy <= d_before_mar:             # <<<<<<<<<<<<<<
 *         out.year, out.month, out.day = year, 2, doy - 31
 *         return out
*/
  }

  /* "utils.pxd":2554
 *     # Convert to "days since March 1" (1-based -> 0-based)
 *     cdef int d, m_from_mar, mon, dom
 *     d = doy - d_before_mar - 1  # 1 => # 0..306 (0=Mar-1)             # <<<<<<<<<<<<<<
 * 
 *     with cython.cdivision(True):
*/
  __pyx_v_d = ((__pyx_v_doy - __pyx_v_d_before_mar) - 1);

  /* "utils.pxd":2558
 *     with cython.cdivision(True):
 *         # Month index from March: 0..9
 *         m_from_mar = (5 * d + 2) // 153             # <<<<<<<<<<<<<<
 *         # Day (1-based)
 *         dom = d - (153 * m_from_mar + 2) // 5 + 1
*/
  __pyx_v_m_from_mar = (((5 * __pyx_v_d) + 2) / 0x99);

  /* "utils.pxd":2560
 *         m_from_mar = (5 * d + 2) // 153
 *         # Day (1-based)
 *         dom = d - (153 * m_from_mar + 2) // 5 + 1             # <<<<<<<<<<<<<<
 *         # month (3..12)
 *         mon = m_from_mar + 3
*/
  __pyx_v_dom = ((__pyx_v_d - (((0x99 * __pyx_v_m_from_mar) + 2) / 5)) + 1);

  /* "utils.pxd":2562
 *         dom = d - (153 * m_from_mar + 2) // 5 + 1
 *         # month (3..12)
 *         mon = m_from_mar + 3             # <<<<<<<<<<<<<<
 * 
 *     out.year, out.month, out.day = year, mon, dom
*/
  __pyx_v_mon = (__pyx_v_m_from_mar + 3);

  /* "utils.pxd":2564
 *         mon = m_from_mar + 3
 * 
 *     out.year, out.month, out.day = year, mon, dom             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
  __pyx_t_2 = __pyx_v_year;
  __pyx_t_4 = __pyx_v_mon;
  __pyx_t_3 = __pyx_v_dom;
  __pyx_v_out.year = __pyx_t_2;
  __pyx_v_out.month = __pyx_t_4;
  __pyx_v_out.day = __pyx_t_3;

  /* "utils.pxd":2565
 * 
 *     out.year, out.month, out.day = year, mon, dom
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long iso_week1_mon_ord(long long year) noexcept nogil:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":2517
 *     return ymd_fr_ord(ord_w1 + days)
 * 
 * cdef inline ymd ymd_fr_doy(long long year, int doy) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Create `struct:ymd` from Gregorian year and day-of-year `<'struct:ymd'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2567
 *     return out
 * 
 * cdef inline long long iso_week1_mon_ord(long long year) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the ordinal (1-based) of the Monday starting ISO week 1
 *     of `year` under the proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_iso_week1_mon_ord(PY_LONG_LONG __pyx_v_year) {
  PY_LONG_LONG __pyx_v_jan4;
  PY_LONG_LONG __pyx_v_wkd;
  PY_LONG_LONG __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":2578
 *     :returns `<'int'>`: Ordinal of the Monday starting ISO week 1.
 *     """
 *     cdef long long jan4 = ymd_to_ord(year, 1, 4)  # ordinal of Jan 4             # <<<<<<<<<<<<<<
 *     cdef long long wkd  = (jan4 - 1) % 7
 *     if wkd < 0:
*/
  __pyx_v_jan4 = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v_year, 1, 4);

  /* "utils.pxd":2579
 *     """
 *     cdef long long jan4 = ymd_to_ord(year, 1, 4)  # ordinal of Jan 4
 *     cdef long long wkd  = (jan4 - 1) % 7             # <<<<<<<<<<<<<<
 *     if wkd < 0:
 *         wkd += 7
*/
  __pyx_v_wkd = __Pyx_mod_PY_LONG_LONG((__pyx_v_jan4 - 1), 7, 1);

  /* "utils.pxd":2580
 *     cdef long long jan4 = ymd_to_ord(year, 1, 4)  # ordinal of Jan 4
 *     cdef long long wkd  = (jan4 - 1) % 7
 *     if wkd < 0:             # <<<<<<<<<<<<<<
 *         wkd += 7
 *     return jan4 - wkd
*/
  __pyx_t_1 = (__pyx_v_wkd < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":2581
 *     cdef long long wkd  = (jan4 - 1) % 7
 *     if wkd < 0:
 *         wkd += 7             # <<<<<<<<<<<<<<
 *     return jan4 - wkd
 * 
*/
    __pyx_v_wkd = (__pyx_v_wkd + 7);

    /* "utils.pxd":2580
 *     cdef long long jan4 = ymd_to_ord(year, 1, 4)  # ordinal of Jan 4
 *     cdef long long wkd  = (jan4 - 1) % 7
 *     if wkd < 0:             # <<<<<<<<<<<<<<
 *         wkd += 7
 *     return jan4 - wkd
*/
  }

  /* "utils.pxd":2582
 *     if wkd < 0:
 *         wkd += 7
 *     return jan4 - wkd             # <<<<<<<<<<<<<<
 * 
 * # . date & time
*/
  __pyx_r = (__pyx_v_jan4 - __pyx_v_wkd);
  goto __pyx_L0;

  /* "utils.pxd":2567
 *     return out
 * 
 * cdef inline long long iso_week1_mon_ord(long long year) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the ordinal (1-based) of the Monday starting ISO week 1
 *     of `year` under the proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2585
 * 
 * # . date & time
 * cdef inline dtm dtm_fr_us(long long value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert microsecond ticks since the Unix epoch to `struct:dtm` (date + time).
 * 
*/

static CYTHON_INLINE __pyx_t_7cytimes_5utils_dtm __pyx_f_7cytimes_5utils_dtm_fr_us(PY_LONG_LONG __pyx_v_value) {
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  __pyx_t_7cytimes_5utils_dtm __pyx_v_out;
  __pyx_t_7cytimes_5utils_dtm __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save;

  /* "utils.pxd":2606
 *     with cython.cdivision(True):
 *         # Split into days and remainder (mathematical floor)
 *         q = value / US_DAY; r = value % US_DAY             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1; r += US_DAY
*/
  __pyx_v_q = (__pyx_v_value / __pyx_v_7cytimes_5utils_US_DAY);
  __pyx_v_r = (__pyx_v_value % __pyx_v_7cytimes_5utils_US_DAY);

  /* "utils.pxd":2607
 *         # Split into days and remainder (mathematical floor)
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += US_DAY
 * 
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":2608
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:
 *             q -= 1; r += US_DAY             # <<<<<<<<<<<<<<
 * 
 *         # Date
*/
    __pyx_v_q = (__pyx_v_q - 1);
    __pyx_v_r = (__pyx_v_r + __pyx_v_7cytimes_5utils_US_DAY);

    /* "utils.pxd":2607
 *         # Split into days and remainder (mathematical floor)
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += US_DAY
 * 
*/
  }

  /* "utils.pxd":2611
 * 
 *         # Date
 *         _ymd = ymd_fr_ord(q + EPOCH_DAY)             # <<<<<<<<<<<<<<
 *         out.year  = _ymd.year
 *         out.month = _ymd.month
*/
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_q + __pyx_v_7cytimes_5utils_EPOCH_DAY));

  /* "utils.pxd":2612
 *         # Date
 *         _ymd = ymd_fr_ord(q + EPOCH_DAY)
 *         out.year  = _ymd.year             # <<<<<<<<<<<<<<
 *         out.month = _ymd.month
 *         out.day   = _ymd.day
*/
  __pyx_t_2 = __pyx_v__ymd.year;
  __pyx_v_out.year = __pyx_t_2;

  /* "utils.pxd":2613
 *         _ymd = ymd_fr_ord(q + EPOCH_DAY)
 *         out.year  = _ymd.year
 *         out.month = _ymd.month             # <<<<<<<<<<<<<<
 *         out.day   = _ymd.day
 * 
*/
  __pyx_t_2 = __pyx_v__ymd.month;
  __pyx_v_out.month = __pyx_t_2;

  /* "utils.pxd":2614
 *         out.year  = _ymd.year
 *         out.month = _ymd.month
 *         out.day   = _ymd.day             # <<<<<<<<<<<<<<
 * 
 *         # Time-of-day
*/
  __pyx_t_2 = __pyx_v__ymd.day;
  __pyx_v_out.day = __pyx_t_2;

  /* "utils.pxd":2617
 * 
 *         # Time-of-day
 *         out.hour   = r / US_HOUR;   r %= US_HOUR             # <<<<<<<<<<<<<<
 *         out.minute = r / US_MINUTE; r %= US_MINUTE
 *         out.second = r / US_SECOND
*/
  __pyx_v_out.hour = (__pyx_v_r / __pyx_v_7cytimes_5utils_US_HOUR);
  if (unlikely(__pyx_v_7cytimes_5utils_US_HOUR == 0)) {
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    __PYX_ERR(5, 2617, __pyx_L1_error)
  }
  __pyx_v_r = __Pyx_mod_PY_LONG_LONG(__pyx_v_r, __pyx_v_7cytimes_5utils_US_HOUR, 0);

  /* "utils.pxd":2618
 *         # Time-of-day
 *         out.hour   = r / US_HOUR;   r %= US_HOUR
 *         out.minute = r / US_MINUTE; r %= US_MINUTE             # <<<<<<<<<<<<<<
 *         out.second = r / US_SECOND
 *         out.microsecond = r % US_SECOND
*/
  __pyx_v_out.minute = (__pyx_v_r / __pyx_v_7cytimes_5utils_US_MINUTE);
  if (unlikely(__pyx_v_7cytimes_5utils_US_MINUTE == 0)) {
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    __PYX_ERR(5, 2618, __pyx_L1_error)
  }
  __pyx_v_r = __Pyx_mod_PY_LONG_LONG(__pyx_v_r, __pyx_v_7cytimes_5utils_US_MINUTE, 0);

  /* "utils.pxd":2619
 *         out.hour   = r / US_HOUR;   r %= US_HOUR
 *         out.minute = r / US_MINUTE; r %= US_MINUTE
 *         out.second = r / US_SECOND             # <<<<<<<<<<<<<<
 *         out.microsecond = r % US_SECOND
 * 
*/
  __pyx_v_out.second = (__pyx_v_r / __pyx_v_7cytimes_5utils_US_SECOND);

  /* "utils.pxd":2620
 *         out.minute = r / US_MINUTE; r %= US_MINUTE
 *         out.second = r / US_SECOND
 *         out.microsecond = r % US_SECOND             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
  __pyx_v_out.microsecond = (__pyx_v_r % __pyx_v_7cytimes_5utils_US_SECOND);

  /* "utils.pxd":2622
 *         out.microsecond = r % US_SECOND
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline dtm dtm_fr_sec(double value) except *:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":2585
 * 
 * # . date & time
 * cdef inline dtm dtm_fr_us(long long value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert microsecond ticks since the Unix epoch to `struct:dtm` (date + time).
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_WriteUnraisable("cytimes.utils.dtm_fr_us", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2624
 *     return out
 * 
 * cdef inline dtm dtm_fr_sec(double value) except *:             # <<<<<<<<<<<<<<
 *     """Convert seconds (float) since the Unix epoch to `struct:dtm` (date + time).
 * 
*/

static CYTHON_INLINE __pyx_t_7cytimes_5utils_dtm __pyx_f_7cytimes_5utils_dtm_fr_sec(double __pyx_v_value) {
  __pyx_t_7cytimes_5utils_dtm __pyx_r;
  PY_LONG_LONG __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "utils.pxd":2638
 *         - dtm.microsecond   [0..999999]
 *     """
 *     return dtm_fr_us(sec_to_us(value))             # <<<<<<<<<<<<<<
 * 
 * # . fractions
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_sec_to_us(__pyx_v_value); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 2638, __pyx_L1_error)
  __pyx_r = __pyx_f_7cytimes_5utils_dtm_fr_us(__pyx_t_1);
  goto __pyx_L0;

  /* "utils.pxd":2624
 *     return out
 * 
 * cdef inline dtm dtm_fr_sec(double value) except *:             # <<<<<<<<<<<<<<
 *     """Convert seconds (float) since the Unix epoch to `struct:dtm` (date + time).
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.dtm_fr_sec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2641
 * 
 * # . fractions
 * cdef inline int combine_absolute_ms_us(int ms, int us) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Combine milliseconds and microseconds into total microseconds (replacement semantics) `<'int'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_combine_absolute_ms_us(int __pyx_v_ms, int __pyx_v_us) {
  int __pyx_r;
  int __pyx_t_1;
  long __pyx_t_2;
  int __pyx_t_3;
  long __pyx_t_4;

  /* "utils.pxd":2660
 *     """
 *     # Valid millisecond
 *     if ms >= 0:             # <<<<<<<<<<<<<<
 *         # clamp 'ms' to 0..999
 *         ms = min(ms, 999) * 1_000
*/
  __pyx_t_1 = (__pyx_v_ms >= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":2662
 *     if ms >= 0:
 *         # clamp 'ms' to 0..999
 *         ms = min(ms, 999) * 1_000             # <<<<<<<<<<<<<<
 *         # 'us' acts only as sub-ms remainder
 *         us = ms + (us % 1_000) if us > 0 else ms
*/
    __pyx_t_2 = 0x3E7;
    __pyx_t_3 = __pyx_v_ms;
    __pyx_t_1 = (__pyx_t_2 < __pyx_t_3);
    if (__pyx_t_1) {
      __pyx_t_4 = __pyx_t_2;
    } else {
      __pyx_t_4 = __pyx_t_3;
    }
    __pyx_v_ms = (__pyx_t_4 * 0x3E8);

    /* "utils.pxd":2664
 *         ms = min(ms, 999) * 1_000
 *         # 'us' acts only as sub-ms remainder
 *         us = ms + (us % 1_000) if us > 0 else ms             # <<<<<<<<<<<<<<
 * 
 *     # Valid microsecond
*/
    __pyx_t_1 = (__pyx_v_us > 0);
    if (__pyx_t_1) {
      __pyx_t_4 = (__pyx_v_ms + __Pyx_mod_long(__pyx_v_us, 0x3E8, 1));
    } else {
      __pyx_t_4 = __pyx_v_ms;
    }
    __pyx_v_us = __pyx_t_4;

    /* "utils.pxd":2660
 *     """
 *     # Valid millisecond
 *     if ms >= 0:             # <<<<<<<<<<<<<<
 *         # clamp 'ms' to 0..999
 *         ms = min(ms, 999) * 1_000
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":2667
 * 
 *     # Valid microsecond
 *     elif us >= 0:             # <<<<<<<<<<<<<<
 *         # clamp 'us' to 0..999,999
 *         us = min(us, 999_999)
*/
  __pyx_t_1 = (__pyx_v_us >= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":2669
 *     elif us >= 0:
 *         # clamp 'us' to 0..999,999
 *         us = min(us, 999_999)             # <<<<<<<<<<<<<<
 * 
 *     # Both invalid
*/
    __pyx_t_4 = 0xF423F;
    __pyx_t_3 = __pyx_v_us;
    __pyx_t_1 = (__pyx_t_4 < __pyx_t_3);
    if (__pyx_t_1) {
      __pyx_t_2 = __pyx_t_4;
    } else {
      __pyx_t_2 = __pyx_t_3;
    }
    __pyx_v_us = __pyx_t_2;

    /* "utils.pxd":2667
 * 
 *     # Valid microsecond
 *     elif us >= 0:             # <<<<<<<<<<<<<<
 *         # clamp 'us' to 0..999,999
 *         us = min(us, 999_999)
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":2673
 *     # Both invalid
 *     else:
 *         us = -1             # <<<<<<<<<<<<<<
 * 
 *     return us
*/
  /*else*/ {
    __pyx_v_us = -1;
  }
  __pyx_L3:;

  /* "utils.pxd":2675
 *         us = -1
 * 
 *     return us             # <<<<<<<<<<<<<<
 * 
 * # datetime.date ----------------------------------------------------------------------------------------
*/
  __pyx_r = __pyx_v_us;
  goto __pyx_L0;

  /* "utils.pxd":2641
 * 
 * # . fractions
 * cdef inline int combine_absolute_ms_us(int ms, int us) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Combine milliseconds and microseconds into total microseconds (replacement semantics) `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2679
 * # datetime.date ----------------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.date date_new(int year=1, int month=1, int day=1, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create a new date `<'datetime.date'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_new(struct __pyx_opt_args_7cytimes_5utils_date_new *__pyx_optional_args) {
  int __pyx_v_year = ((int)1);
  int __pyx_v_month = ((int)1);
  int __pyx_v_day = ((int)1);
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  PyObject *__pyx_v_err = NULL;
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  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;
  size_t __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  PyObject *__pyx_t_15[4];
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  char const *__pyx_t_18;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_new", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_year = __pyx_optional_args->year;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_month = __pyx_optional_args->month;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_day = __pyx_optional_args->day;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_dclass = __pyx_optional_args->dclass;
          }
        }
      }
    }
  }

  /* "utils.pxd":2690
 *     """
 *     # Construct date
 *     if dclass is not None and dclass is not datetime.date:             # <<<<<<<<<<<<<<
 *         try:
 *             return dclass(year=year, month=month, day=day)
*/
  __pyx_t_2 = (__pyx_v_dclass != Py_None);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_dclass != ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date));
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":2691
 *     # Construct date
 *     if dclass is not None and dclass is not datetime.date:
 *         try:             # <<<<<<<<<<<<<<
 *             return dclass(year=year, month=month, day=day)
 *         except Exception as err:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __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:*/ {

        /* "utils.pxd":2692
 *     if dclass is not None and dclass is not datetime.date:
 *         try:
 *             return dclass(year=year, month=month, day=day)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             raise ValueError("Cannot create date using custom 'dclass' %s, %s" % (dclass, err)) from err
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = NULL;
        __Pyx_INCREF(__pyx_v_dclass);
        __pyx_t_8 = __pyx_v_dclass; 
        __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_year); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 2692, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 2692, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 2692, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
          assert(__pyx_t_7);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
          __pyx_t_12 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_7, NULL};
          __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 2692, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_13);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_year, __pyx_t_9, __pyx_t_13, __pyx_callargs+1, 0) < (0)) __PYX_ERR(5, 2692, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_month, __pyx_t_10, __pyx_t_13, __pyx_callargs+1, 1) < (0)) __PYX_ERR(5, 2692, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_day, __pyx_t_11, __pyx_t_13, __pyx_callargs+1, 2) < (0)) __PYX_ERR(5, 2692, __pyx_L6_error)
          __pyx_t_6 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 2692, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
        }
        if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(5, 2692, __pyx_L6_error)
        __pyx_r = ((PyDateTime_Date *)__pyx_t_6);
        __pyx_t_6 = 0;
        goto __pyx_L10_try_return;

        /* "utils.pxd":2691
 *     # Construct date
 *     if dclass is not None and dclass is not datetime.date:
 *         try:             # <<<<<<<<<<<<<<
 *             return dclass(year=year, month=month, day=day)
 *         except Exception as err:
*/
      }
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "utils.pxd":2693
 *         try:
 *             return dclass(year=year, month=month, day=day)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot create date using custom 'dclass' %s, %s" % (dclass, err)) from err
 *     return datetime.date_new(year, month, day)
*/
      __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_14) {
        __Pyx_AddTraceback("cytimes.utils.date_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_13) < 0) __PYX_ERR(5, 2693, __pyx_L8_except_error)
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_13);
        __Pyx_INCREF(__pyx_t_8);
        __pyx_v_err = __pyx_t_8;
        /*try:*/ {

          /* "utils.pxd":2694
 *             return dclass(year=year, month=month, day=day)
 *         except Exception as err:
 *             raise ValueError("Cannot create date using custom 'dclass' %s, %s" % (dclass, err)) from err             # <<<<<<<<<<<<<<
 *     return datetime.date_new(year, month, day)
 * 
*/
          __pyx_t_10 = NULL;
          __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_dclass), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 2694, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_err), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 2694, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_15[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_create_date_using_custom;
          __pyx_t_15[1] = __pyx_t_9;
          __pyx_t_15[2] = __pyx_mstate_global->__pyx_kp_u__3;
          __pyx_t_15[3] = __pyx_t_7;
          __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_15, 4, 41 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
          if (unlikely(!__pyx_t_16)) __PYX_ERR(5, 2694, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_12 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_16};
            __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 2694, __pyx_L17_error)
            __Pyx_GOTREF(__pyx_t_11);
          }
          __Pyx_Raise(__pyx_t_11, 0, 0, __pyx_v_err);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __PYX_ERR(5, 2694, __pyx_L17_error)
        }

        /* "utils.pxd":2693
 *         try:
 *             return dclass(year=year, month=month, day=day)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot create date using custom 'dclass' %s, %s" % (dclass, err)) from err
 *     return datetime.date_new(year, month, day)
*/
        /*finally:*/ {
          __pyx_L17_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
            if ( unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_23);
            __Pyx_XGOTREF(__pyx_t_24);
            __pyx_t_14 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            }
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
            __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
            __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
            goto __pyx_L8_except_error;
          }
        }
      }
      goto __pyx_L8_except_error;

      /* "utils.pxd":2691
 *     # Construct date
 *     if dclass is not None and dclass is not datetime.date:
 *         try:             # <<<<<<<<<<<<<<
 *             return dclass(year=year, month=month, day=day)
 *         except Exception as err:
*/
      __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_L10_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;
    }

    /* "utils.pxd":2690
 *     """
 *     # Construct date
 *     if dclass is not None and dclass is not datetime.date:             # <<<<<<<<<<<<<<
 *         try:
 *             return dclass(year=year, month=month, day=day)
*/
  }

  /* "utils.pxd":2695
 *         except Exception as err:
 *             raise ValueError("Cannot create date using custom 'dclass' %s, %s" % (dclass, err)) from err
 *     return datetime.date_new(year, month, day)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.date date_now(object tzinfo=None, object dclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_13 = ((PyObject *)__pyx_f_7cpython_8datetime_date_new(__pyx_v_year, __pyx_v_month, __pyx_v_day)); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 2695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_13);
  __pyx_t_13 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2679
 * # datetime.date ----------------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.date date_new(int year=1, int month=1, int day=1, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create a new date `<'datetime.date'>`.
 * 
*/

  /* function exit code */
  __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_13);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("cytimes.utils.date_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2697
 *     return datetime.date_new(year, month, day)
 * 
 * cdef inline datetime.date date_now(object tzinfo=None, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Get today's date `<'datetime.date'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_now(struct __pyx_opt_args_7cytimes_5utils_date_now *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_now __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_date_fr_dt __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_now", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_dclass = __pyx_optional_args->dclass;
      }
    }
  }

  /* "utils.pxd":2710
 *     :returns `<'datetime.date'>`: Today's date (or subclass if `dclass` is specified).
 *     """
 *     return date_fr_dt(dt_now(tzinfo, None), dclass)             # <<<<<<<<<<<<<<
 * 
 * # . type check
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.tzinfo = __pyx_v_tzinfo;
  __pyx_t_2.dtclass = Py_None;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_now(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 2710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.dclass = __pyx_v_dclass;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_dt(((PyDateTime_DateTime *)__pyx_t_1), &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 2710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyDateTime_Date *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2697
 *     return datetime.date_new(year, month, day)
 * 
 * cdef inline datetime.date date_now(object tzinfo=None, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Get today's date `<'datetime.date'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.date_now", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2713
 * 
 * # . type check
 * cdef inline bint is_date(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `datetime.date` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_date(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":2722
 *     >>> isinstance(obj, datetime.date)
 *     """
 *     return datetime.PyDate_Check(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_date_exact(object obj) except -1:
*/
  __pyx_r = PyDate_Check(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":2713
 * 
 * # . type check
 * cdef inline bint is_date(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `datetime.date` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2724
 *     return datetime.PyDate_Check(obj)
 * 
 * cdef inline bint is_date_exact(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an exact `datetime.date` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_date_exact(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":2733
 *     >>> type(obj) is datetime.date
 *     """
 *     return datetime.PyDate_CheckExact(obj)             # <<<<<<<<<<<<<<
 * 
 * # . conversion: to
*/
  __pyx_r = PyDate_CheckExact(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":2724
 *     return datetime.PyDate_Check(obj)
 * 
 * cdef inline bint is_date_exact(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an exact `datetime.date` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2736
 * 
 * # . conversion: to
 * cdef inline str date_strformat(datetime.date date, str fmt):             # <<<<<<<<<<<<<<
 *     """Format a `datetime.date` with a strftime-style format `<'str'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_date_strformat(PyDateTime_Date *__pyx_v_date, PyObject *__pyx_v_fmt) {
  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("date_strformat", 0);

  /* "utils.pxd":2749
 *     >>> date.strftime(fmt)
 *     """
 *     return tm_strformat(date_to_tm(date), fmt)             # <<<<<<<<<<<<<<
 * 
 * cdef inline str date_isoformat(datetime.date date):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tm_strformat(__pyx_f_7cytimes_5utils_date_to_tm(__pyx_v_date), __pyx_v_fmt); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 2749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2736
 * 
 * # . conversion: to
 * cdef inline str date_strformat(datetime.date date, str fmt):             # <<<<<<<<<<<<<<
 *     """Format a `datetime.date` with a strftime-style format `<'str'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.date_strformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2751
 *     return tm_strformat(date_to_tm(date), fmt)
 * 
 * cdef inline str date_isoformat(datetime.date date):             # <<<<<<<<<<<<<<
 *     """Format `datetime.date` to the ISO-8601 calendar string `YYYY-MM-DD` `<'str'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_date_isoformat(PyDateTime_Date *__pyx_v_date) {
  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[5];
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_isoformat", 0);

  /* "utils.pxd":2757
 *     :returns `<'str'>`: ISO string in the form `YYYY-MM-DD`.
 *     """
 *     return "%04d-%02d-%02d" % (date.year, date.month, date.day)             # <<<<<<<<<<<<<<
 * 
 * cdef inline tm date_to_tm(datetime.date date) noexcept:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4date_4year_year(__pyx_v_date), 4, '0', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 2757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4date_5month_month(__pyx_v_date), 2, '0', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 2757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4date_3day_day(__pyx_v_date), 2, '0', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 2757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4[0] = __pyx_t_1;
  __pyx_t_4[1] = __pyx_mstate_global->__pyx_kp_u__4;
  __pyx_t_4[2] = __pyx_t_2;
  __pyx_t_4[3] = __pyx_mstate_global->__pyx_kp_u__4;
  __pyx_t_4[4] = __pyx_t_3;
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127);
  if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 2757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __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 = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2751
 *     return tm_strformat(date_to_tm(date), fmt)
 * 
 * cdef inline str date_isoformat(datetime.date date):             # <<<<<<<<<<<<<<
 *     """Format `datetime.date` to the ISO-8601 calendar string `YYYY-MM-DD` `<'str'>`.
 * 
*/

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

/* "utils.pxd":2759
 *     return "%04d-%02d-%02d" % (date.year, date.month, date.day)
 * 
 * cdef inline tm date_to_tm(datetime.date date) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.date` to `<'struct:tm'>`.
 * 
*/

static CYTHON_INLINE struct tm __pyx_f_7cytimes_5utils_date_to_tm(PyDateTime_Date *__pyx_v_date) {
  int __pyx_v_yy;
  int __pyx_v_mm;
  int __pyx_v_dd;
  struct tm __pyx_v_out;
  struct tm __pyx_r;

  /* "utils.pxd":2776
 *     """
 *     cdef:
 *         int yy = date.year             # <<<<<<<<<<<<<<
 *         int mm = date.month
 *         int dd = date.day
*/
  __pyx_v_yy = __pyx_f_7cpython_8datetime_4date_4year_year(__pyx_v_date);

  /* "utils.pxd":2777
 *     cdef:
 *         int yy = date.year
 *         int mm = date.month             # <<<<<<<<<<<<<<
 *         int dd = date.day
 *         tm out
*/
  __pyx_v_mm = __pyx_f_7cpython_8datetime_4date_5month_month(__pyx_v_date);

  /* "utils.pxd":2778
 *         int yy = date.year
 *         int mm = date.month
 *         int dd = date.day             # <<<<<<<<<<<<<<
 *         tm out
 * 
*/
  __pyx_v_dd = __pyx_f_7cpython_8datetime_4date_3day_day(__pyx_v_date);

  /* "utils.pxd":2781
 *         tm out
 * 
 *     out.tm_sec = 0             # <<<<<<<<<<<<<<
 *     out.tm_min = 0
 *     out.tm_hour = 0
*/
  __pyx_v_out.tm_sec = 0;

  /* "utils.pxd":2782
 * 
 *     out.tm_sec = 0
 *     out.tm_min = 0             # <<<<<<<<<<<<<<
 *     out.tm_hour = 0
 *     out.tm_mday = dd
*/
  __pyx_v_out.tm_min = 0;

  /* "utils.pxd":2783
 *     out.tm_sec = 0
 *     out.tm_min = 0
 *     out.tm_hour = 0             # <<<<<<<<<<<<<<
 *     out.tm_mday = dd
 *     out.tm_mon = mm
*/
  __pyx_v_out.tm_hour = 0;

  /* "utils.pxd":2784
 *     out.tm_min = 0
 *     out.tm_hour = 0
 *     out.tm_mday = dd             # <<<<<<<<<<<<<<
 *     out.tm_mon = mm
 *     out.tm_year = yy
*/
  __pyx_v_out.tm_mday = __pyx_v_dd;

  /* "utils.pxd":2785
 *     out.tm_hour = 0
 *     out.tm_mday = dd
 *     out.tm_mon = mm             # <<<<<<<<<<<<<<
 *     out.tm_year = yy
 *     out.tm_wday = ymd_weekday(yy, mm, dd)
*/
  __pyx_v_out.tm_mon = __pyx_v_mm;

  /* "utils.pxd":2786
 *     out.tm_mday = dd
 *     out.tm_mon = mm
 *     out.tm_year = yy             # <<<<<<<<<<<<<<
 *     out.tm_wday = ymd_weekday(yy, mm, dd)
 *     out.tm_yday = days_bf_month(yy, mm) + dd
*/
  __pyx_v_out.tm_year = __pyx_v_yy;

  /* "utils.pxd":2787
 *     out.tm_mon = mm
 *     out.tm_year = yy
 *     out.tm_wday = ymd_weekday(yy, mm, dd)             # <<<<<<<<<<<<<<
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = -1
*/
  __pyx_v_out.tm_wday = __pyx_f_7cytimes_5utils_ymd_weekday(__pyx_v_yy, __pyx_v_mm, __pyx_v_dd);

  /* "utils.pxd":2788
 *     out.tm_year = yy
 *     out.tm_wday = ymd_weekday(yy, mm, dd)
 *     out.tm_yday = days_bf_month(yy, mm) + dd             # <<<<<<<<<<<<<<
 *     out.tm_isdst = -1
 *     return out
*/
  __pyx_v_out.tm_yday = (__pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_yy, __pyx_v_mm) + __pyx_v_dd);

  /* "utils.pxd":2789
 *     out.tm_wday = ymd_weekday(yy, mm, dd)
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = -1             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
  __pyx_v_out.tm_isdst = -1;

  /* "utils.pxd":2790
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = -1
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long date_to_us(datetime.date date) noexcept:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":2759
 *     return "%04d-%02d-%02d" % (date.year, date.month, date.day)
 * 
 * cdef inline tm date_to_tm(datetime.date date) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.date` to `<'struct:tm'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2792
 *     return out
 * 
 * cdef inline long long date_to_us(datetime.date date) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.date` to microseconds since the
 *     Unix epoch (UTC midnight) `<'int'>`.
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_date_to_us(PyDateTime_Date *__pyx_v_date) {
  PY_LONG_LONG __pyx_r;

  /* "utils.pxd":2800
 *         Negative for dates before 1970-01-01.
 *     """
 *     return (date_to_ord(date) - EPOCH_DAY) * US_DAY             # <<<<<<<<<<<<<<
 * 
 * cdef inline double date_to_sec(datetime.date date) noexcept:
*/
  __pyx_r = ((__pyx_f_7cytimes_5utils_date_to_ord(__pyx_v_date) - __pyx_v_7cytimes_5utils_EPOCH_DAY) * __pyx_v_7cytimes_5utils_US_DAY);
  goto __pyx_L0;

  /* "utils.pxd":2792
 *     return out
 * 
 * cdef inline long long date_to_us(datetime.date date) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.date` to microseconds since the
 *     Unix epoch (UTC midnight) `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2802
 *     return (date_to_ord(date) - EPOCH_DAY) * US_DAY
 * 
 * cdef inline double date_to_sec(datetime.date date) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.date` to seconds since the
 *     Unix epoch (UTC midnight) `<'float'>`.
*/

static CYTHON_INLINE double __pyx_f_7cytimes_5utils_date_to_sec(PyDateTime_Date *__pyx_v_date) {
  double __pyx_r;

  /* "utils.pxd":2810
 *         Negative for dates before 1970-01-01.
 *     """
 *     return <double> ((date_to_ord(date) - EPOCH_DAY) * SS_DAY)             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long date_to_ord(datetime.date date) noexcept:
*/
  __pyx_r = ((double)((__pyx_f_7cytimes_5utils_date_to_ord(__pyx_v_date) - __pyx_v_7cytimes_5utils_EPOCH_DAY) * __pyx_v_7cytimes_5utils_SS_DAY));
  goto __pyx_L0;

  /* "utils.pxd":2802
 *     return (date_to_ord(date) - EPOCH_DAY) * US_DAY
 * 
 * cdef inline double date_to_sec(datetime.date date) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.date` to seconds since the
 *     Unix epoch (UTC midnight) `<'float'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2812
 *     return <double> ((date_to_ord(date) - EPOCH_DAY) * SS_DAY)
 * 
 * cdef inline long long date_to_ord(datetime.date date) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.date` to the Gregorian ordinal (0001-01-01 = 1) `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_date_to_ord(PyDateTime_Date *__pyx_v_date) {
  PY_LONG_LONG __pyx_r;

  /* "utils.pxd":2818
 *     :returns `<'int'>`: Ordinal day number in the proleptic Gregorian calendar.
 *     """
 *     return ymd_to_ord(date.year, date.month, date.day)             # <<<<<<<<<<<<<<
 * 
 * # . conversion: from
*/
  __pyx_r = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_f_7cpython_8datetime_4date_4year_year(__pyx_v_date), __pyx_f_7cpython_8datetime_4date_5month_month(__pyx_v_date), __pyx_f_7cpython_8datetime_4date_3day_day(__pyx_v_date));
  goto __pyx_L0;

  /* "utils.pxd":2812
 *     return <double> ((date_to_ord(date) - EPOCH_DAY) * SS_DAY)
 * 
 * cdef inline long long date_to_ord(datetime.date date) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.date` to the Gregorian ordinal (0001-01-01 = 1) `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2821
 * 
 * # . conversion: from
 * cdef inline datetime.date date_fr_us(long long value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from microseconds since the Unix epoch `<'datetime.date'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_fr_us(PY_LONG_LONG __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_date_fr_us *__pyx_optional_args) {
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_date_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_fr_us", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dclass = __pyx_optional_args->dclass;
    }
  }

  /* "utils.pxd":2829
 *     :returns `<'datetime.date'>`: The resulting date (or subclass if `dclass` is specified).
 *     """
 *     cdef ymd _ymd = ymd_fr_us(value)             # <<<<<<<<<<<<<<
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
*/
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_us(__pyx_v_value);

  /* "utils.pxd":2830
 *     """
 *     cdef ymd _ymd = ymd_fr_us(value)
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.date date_fr_sec(double value, object dclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.year = __pyx_v__ymd.year;
  __pyx_t_2.month = __pyx_v__ymd.month;
  __pyx_t_2.day = __pyx_v__ymd.day;
  __pyx_t_2.dclass = __pyx_v_dclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 2830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2821
 * 
 * # . conversion: from
 * cdef inline datetime.date date_fr_us(long long value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from microseconds since the Unix epoch `<'datetime.date'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.date_fr_us", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2832
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_sec(double value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from seconds since the Unix epoch `<'datetime.date'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_fr_sec(double __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_date_fr_sec *__pyx_optional_args) {
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_date_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_fr_sec", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dclass = __pyx_optional_args->dclass;
    }
  }

  /* "utils.pxd":2840
 *     :returns `<'datetime.date'>`: The resulting date (or subclass if `dclass` is specified).
 *     """
 *     cdef ymd _ymd = ymd_fr_sec(value)             # <<<<<<<<<<<<<<
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
*/
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_sec(__pyx_v_value);

  /* "utils.pxd":2841
 *     """
 *     cdef ymd _ymd = ymd_fr_sec(value)
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.date date_fr_ord(int value, object dclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.year = __pyx_v__ymd.year;
  __pyx_t_2.month = __pyx_v__ymd.month;
  __pyx_t_2.day = __pyx_v__ymd.day;
  __pyx_t_2.dclass = __pyx_v_dclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 2841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2832
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_sec(double value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from seconds since the Unix epoch `<'datetime.date'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.date_fr_sec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2843
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_ord(int value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from a Gregorian ordinal (0001-01-01 = 1) `<'datetime.date'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_fr_ord(int __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_date_fr_ord *__pyx_optional_args) {
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_date_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_fr_ord", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dclass = __pyx_optional_args->dclass;
    }
  }

  /* "utils.pxd":2851
 *     :returns `<'datetime.date'>`: The resulting date (or subclass if `dclass` is specified).
 *     """
 *     cdef ymd _ymd = ymd_fr_ord(value)             # <<<<<<<<<<<<<<
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
*/
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord(__pyx_v_value);

  /* "utils.pxd":2852
 *     """
 *     cdef ymd _ymd = ymd_fr_ord(value)
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.date date_fr_iso(int year, int week, int weekday, object dclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.year = __pyx_v__ymd.year;
  __pyx_t_2.month = __pyx_v__ymd.month;
  __pyx_t_2.day = __pyx_v__ymd.day;
  __pyx_t_2.dclass = __pyx_v_dclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 2852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2843
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_ord(int value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from a Gregorian ordinal (0001-01-01 = 1) `<'datetime.date'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.date_fr_ord", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2854
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_iso(int year, int week, int weekday, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from ISO calendar values (year, week, weekday) `<'datetime.date'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_fr_iso(int __pyx_v_year, int __pyx_v_week, int __pyx_v_weekday, struct __pyx_opt_args_7cytimes_5utils_date_fr_iso *__pyx_optional_args) {
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_date_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_fr_iso", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dclass = __pyx_optional_args->dclass;
    }
  }

  /* "utils.pxd":2866
 *     :returns `<'datetime.date'>`: The resulting date (or subclass if `dclass` is specified).
 *     """
 *     cdef ymd _ymd = ymd_fr_iso(year, week, weekday)             # <<<<<<<<<<<<<<
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
*/
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_iso(__pyx_v_year, __pyx_v_week, __pyx_v_weekday);

  /* "utils.pxd":2867
 *     """
 *     cdef ymd _ymd = ymd_fr_iso(year, week, weekday)
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.date date_fr_doy(int year, int doy, object dclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.year = __pyx_v__ymd.year;
  __pyx_t_2.month = __pyx_v__ymd.month;
  __pyx_t_2.day = __pyx_v__ymd.day;
  __pyx_t_2.dclass = __pyx_v_dclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 2867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2854
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_iso(int year, int week, int weekday, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from ISO calendar values (year, week, weekday) `<'datetime.date'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.date_fr_iso", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2869
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_doy(int year, int doy, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from Gregorian year and day-of-year `<'datetime.date'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_fr_doy(int __pyx_v_year, int __pyx_v_doy, struct __pyx_opt_args_7cytimes_5utils_date_fr_doy *__pyx_optional_args) {
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_date_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_fr_doy", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dclass = __pyx_optional_args->dclass;
    }
  }

  /* "utils.pxd":2879
 *     :returns `<'datetime.date'>`: The resulting date (or subclass if `dclass` is specified).
 *     """
 *     cdef ymd _ymd = ymd_fr_doy(year, doy)             # <<<<<<<<<<<<<<
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
*/
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_doy(__pyx_v_year, __pyx_v_doy);

  /* "utils.pxd":2880
 *     """
 *     cdef ymd _ymd = ymd_fr_doy(year, doy)
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.date date_fr_ts(double value, object dclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.year = __pyx_v__ymd.year;
  __pyx_t_2.month = __pyx_v__ymd.month;
  __pyx_t_2.day = __pyx_v__ymd.day;
  __pyx_t_2.dclass = __pyx_v_dclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 2880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2869
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_doy(int year, int doy, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from Gregorian year and day-of-year `<'datetime.date'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.date_fr_doy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2882
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_ts(double value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from a POSIX timestamp in **local** time `<'datetime.date'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_fr_ts(double __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_date_fr_ts *__pyx_optional_args) {
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  PyDateTime_Date *__pyx_v_date = 0;
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_date_fr_date __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_fr_ts", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dclass = __pyx_optional_args->dclass;
    }
  }

  /* "utils.pxd":2891
 *         in the system **local** timezone.
 *     """
 *     cdef datetime.date date = datetime.date_from_timestamp(value)             # <<<<<<<<<<<<<<
 *     return date if dclass is None else date_fr_date(date, dclass)
 * 
*/
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 2891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_date_from_timestamp(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 2891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_date = ((PyDateTime_Date *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":2892
 *     """
 *     cdef datetime.date date = datetime.date_from_timestamp(value)
 *     return date if dclass is None else date_fr_date(date, dclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.date date_fr_date(datetime.date date, object dclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3 = (__pyx_v_dclass == Py_None);
  if (__pyx_t_3) {
    __Pyx_INCREF((PyObject *)__pyx_v_date);
    __pyx_t_2 = ((PyObject *)__pyx_v_date);
  } else {
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.dclass = __pyx_v_dclass;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_date(__pyx_v_date, &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 2892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_r = ((PyDateTime_Date *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2882
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_ts(double value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from a POSIX timestamp in **local** time `<'datetime.date'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.date_fr_ts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_date);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2894
 *     return date if dclass is None else date_fr_date(date, dclass)
 * 
 * cdef inline datetime.date date_fr_date(datetime.date date, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from another date (or subclass) `<'datetime.date'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_fr_date(PyDateTime_Date *__pyx_v_date, struct __pyx_opt_args_7cytimes_5utils_date_fr_date *__pyx_optional_args) {
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_date_new __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_fr_date", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dclass = __pyx_optional_args->dclass;
    }
  }
  __Pyx_INCREF(__pyx_v_dclass);

  /* "utils.pxd":2904
 *         with the same date fields.
 *     """
 *     if dclass is None:             # <<<<<<<<<<<<<<
 *         dclass = datetime.date
 *     if dclass is type(date):
*/
  __pyx_t_1 = (__pyx_v_dclass == Py_None);
  if (__pyx_t_1) {

    /* "utils.pxd":2905
 *     """
 *     if dclass is None:
 *         dclass = datetime.date             # <<<<<<<<<<<<<<
 *     if dclass is type(date):
 *         return date
*/
    __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date);
    __Pyx_DECREF_SET(__pyx_v_dclass, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date));

    /* "utils.pxd":2904
 *         with the same date fields.
 *     """
 *     if dclass is None:             # <<<<<<<<<<<<<<
 *         dclass = datetime.date
 *     if dclass is type(date):
*/
  }

  /* "utils.pxd":2906
 *     if dclass is None:
 *         dclass = datetime.date
 *     if dclass is type(date):             # <<<<<<<<<<<<<<
 *         return date
 *     return date_new(date.year, date.month, date.day, dclass)
*/
  __pyx_t_1 = (__pyx_v_dclass == ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_date))));
  if (__pyx_t_1) {

    /* "utils.pxd":2907
 *         dclass = datetime.date
 *     if dclass is type(date):
 *         return date             # <<<<<<<<<<<<<<
 *     return date_new(date.year, date.month, date.day, dclass)
 * 
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_date);
    __pyx_r = __pyx_v_date;
    goto __pyx_L0;

    /* "utils.pxd":2906
 *     if dclass is None:
 *         dclass = datetime.date
 *     if dclass is type(date):             # <<<<<<<<<<<<<<
 *         return date
 *     return date_new(date.year, date.month, date.day, dclass)
*/
  }

  /* "utils.pxd":2908
 *     if dclass is type(date):
 *         return date
 *     return date_new(date.year, date.month, date.day, dclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.date date_fr_dt(datetime.datetime dt, object dclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3.__pyx_n = 4;
  __pyx_t_3.year = __pyx_f_7cpython_8datetime_4date_4year_year(__pyx_v_date);
  __pyx_t_3.month = __pyx_f_7cpython_8datetime_4date_5month_month(__pyx_v_date);
  __pyx_t_3.day = __pyx_f_7cpython_8datetime_4date_3day_day(__pyx_v_date);
  __pyx_t_3.dclass = __pyx_v_dclass;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 2908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2894
 *     return date if dclass is None else date_fr_date(date, dclass)
 * 
 * cdef inline datetime.date date_fr_date(datetime.date date, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from another date (or subclass) `<'datetime.date'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.date_fr_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dclass);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2910
 *     return date_new(date.year, date.month, date.day, dclass)
 * 
 * cdef inline datetime.date date_fr_dt(datetime.datetime dt, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from a datetime (include subclass) `<'datetime.date'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_fr_dt(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_date_fr_dt *__pyx_optional_args) {
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_date_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_fr_dt", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dclass = __pyx_optional_args->dclass;
    }
  }

  /* "utils.pxd":2919
 *         with the same date fields.
 *     """
 *     return date_new(dt.year, dt.month, dt.day, dclass)             # <<<<<<<<<<<<<<
 * 
 * # . manipulation
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.year = __pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt);
  __pyx_t_2.month = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);
  __pyx_t_2.day = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt);
  __pyx_t_2.dclass = __pyx_v_dclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 2919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2910
 *     return date_new(date.year, date.month, date.day, dclass)
 * 
 * cdef inline datetime.date date_fr_dt(datetime.datetime dt, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from a datetime (include subclass) `<'datetime.date'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.date_fr_dt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2922
 * 
 * # . manipulation
 * cdef inline datetime.date date_replace(datetime.date date, int year=-1, int month=-1, int day=-1, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Replace specified fields in date `<'datetime.date'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_replace(PyDateTime_Date *__pyx_v_date, struct __pyx_opt_args_7cytimes_5utils_date_replace *__pyx_optional_args) {
  int __pyx_v_year = ((int)-1);
  int __pyx_v_month = ((int)-1);
  int __pyx_v_day = ((int)-1);
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  int __pyx_v_yy;
  int __pyx_v_mm;
  int __pyx_v_dd;
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  long __pyx_t_4;
  int __pyx_t_5;
  long __pyx_t_6;
  long __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_date_fr_date __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_date_new __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_replace", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_year = __pyx_optional_args->year;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_month = __pyx_optional_args->month;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_day = __pyx_optional_args->day;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_dclass = __pyx_optional_args->dclass;
          }
        }
      }
    }
  }

  /* "utils.pxd":2939
 *     # Get old fields
 *     cdef int yy, mm, dd
 *     yy, mm, dd = date.year, date.month, date.day             # <<<<<<<<<<<<<<
 * 
 *     # Gen new fields
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_4date_4year_year(__pyx_v_date);
  __pyx_t_2 = __pyx_f_7cpython_8datetime_4date_5month_month(__pyx_v_date);
  __pyx_t_3 = __pyx_f_7cpython_8datetime_4date_3day_day(__pyx_v_date);
  __pyx_v_yy = __pyx_t_1;
  __pyx_v_mm = __pyx_t_2;
  __pyx_v_dd = __pyx_t_3;

  /* "utils.pxd":2942
 * 
 *     # Gen new fields
 *     year  = yy if year < 1 else min(year, 9999)             # <<<<<<<<<<<<<<
 *     month = mm if month < 1 else min(month, 12)
 *     if day < 1:
*/
  __pyx_t_5 = (__pyx_v_year < 1);
  if (__pyx_t_5) {
    __pyx_t_4 = __pyx_v_yy;
  } else {
    __pyx_t_6 = 0x270F;
    __pyx_t_3 = __pyx_v_year;
    __pyx_t_8 = (__pyx_t_6 < __pyx_t_3);
    if (__pyx_t_8) {
      __pyx_t_7 = __pyx_t_6;
    } else {
      __pyx_t_7 = __pyx_t_3;
    }
    __pyx_t_4 = __pyx_t_7;
  }
  __pyx_v_year = __pyx_t_4;

  /* "utils.pxd":2943
 *     # Gen new fields
 *     year  = yy if year < 1 else min(year, 9999)
 *     month = mm if month < 1 else min(month, 12)             # <<<<<<<<<<<<<<
 *     if day < 1:
 *         day = dd
*/
  __pyx_t_5 = (__pyx_v_month < 1);
  if (__pyx_t_5) {
    __pyx_t_4 = __pyx_v_mm;
  } else {
    __pyx_t_7 = 12;
    __pyx_t_3 = __pyx_v_month;
    __pyx_t_8 = (__pyx_t_7 < __pyx_t_3);
    if (__pyx_t_8) {
      __pyx_t_6 = __pyx_t_7;
    } else {
      __pyx_t_6 = __pyx_t_3;
    }
    __pyx_t_4 = __pyx_t_6;
  }
  __pyx_v_month = __pyx_t_4;

  /* "utils.pxd":2944
 *     year  = yy if year < 1 else min(year, 9999)
 *     month = mm if month < 1 else min(month, 12)
 *     if day < 1:             # <<<<<<<<<<<<<<
 *         day = dd
 *     elif day > 28:
*/
  __pyx_t_5 = (__pyx_v_day < 1);
  if (__pyx_t_5) {

    /* "utils.pxd":2945
 *     month = mm if month < 1 else min(month, 12)
 *     if day < 1:
 *         day = dd             # <<<<<<<<<<<<<<
 *     elif day > 28:
 *         day = min(day, days_in_month(year, month))
*/
    __pyx_v_day = __pyx_v_dd;

    /* "utils.pxd":2944
 *     year  = yy if year < 1 else min(year, 9999)
 *     month = mm if month < 1 else min(month, 12)
 *     if day < 1:             # <<<<<<<<<<<<<<
 *         day = dd
 *     elif day > 28:
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":2946
 *     if day < 1:
 *         day = dd
 *     elif day > 28:             # <<<<<<<<<<<<<<
 *         day = min(day, days_in_month(year, month))
 * 
*/
  __pyx_t_5 = (__pyx_v_day > 28);
  if (__pyx_t_5) {

    /* "utils.pxd":2947
 *         day = dd
 *     elif day > 28:
 *         day = min(day, days_in_month(year, month))             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path: same fields
*/
    __pyx_t_3 = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v_year, __pyx_v_month);
    __pyx_t_2 = __pyx_v_day;
    __pyx_t_5 = (__pyx_t_3 < __pyx_t_2);
    if (__pyx_t_5) {
      __pyx_t_1 = __pyx_t_3;
    } else {
      __pyx_t_1 = __pyx_t_2;
    }
    __pyx_v_day = __pyx_t_1;

    /* "utils.pxd":2946
 *     if day < 1:
 *         day = dd
 *     elif day > 28:             # <<<<<<<<<<<<<<
 *         day = min(day, days_in_month(year, month))
 * 
*/
  }
  __pyx_L3:;

  /* "utils.pxd":2950
 * 
 *     # Fast-path: same fields
 *     if yy == year and mm == month and dd == day:             # <<<<<<<<<<<<<<
 *         return date_fr_date(date, dclass)
 * 
*/
  __pyx_t_8 = (__pyx_v_yy == __pyx_v_year);
  if (__pyx_t_8) {
  } else {
    __pyx_t_5 = __pyx_t_8;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_8 = (__pyx_v_mm == __pyx_v_month);
  if (__pyx_t_8) {
  } else {
    __pyx_t_5 = __pyx_t_8;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_8 = (__pyx_v_dd == __pyx_v_day);
  __pyx_t_5 = __pyx_t_8;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_5) {

    /* "utils.pxd":2951
 *     # Fast-path: same fields
 *     if yy == year and mm == month and dd == day:
 *         return date_fr_date(date, dclass)             # <<<<<<<<<<<<<<
 * 
 *     # New date
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_10.__pyx_n = 1;
    __pyx_t_10.dclass = __pyx_v_dclass;
    __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_date(__pyx_v_date, &__pyx_t_10)); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 2951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_r = ((PyDateTime_Date *)__pyx_t_9);
    __pyx_t_9 = 0;
    goto __pyx_L0;

    /* "utils.pxd":2950
 * 
 *     # Fast-path: same fields
 *     if yy == year and mm == month and dd == day:             # <<<<<<<<<<<<<<
 *         return date_fr_date(date, dclass)
 * 
*/
  }

  /* "utils.pxd":2954
 * 
 *     # New date
 *     return date_new(year, month, day, dclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.date date_add_delta(datetime.date date,
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_11.__pyx_n = 4;
  __pyx_t_11.year = __pyx_v_year;
  __pyx_t_11.month = __pyx_v_month;
  __pyx_t_11.day = __pyx_v_day;
  __pyx_t_11.dclass = __pyx_v_dclass;
  __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_11)); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 2954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_9);
  __pyx_t_9 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2922
 * 
 * # . manipulation
 * cdef inline datetime.date date_replace(datetime.date date, int year=-1, int month=-1, int day=-1, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Replace specified fields in date `<'datetime.date'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytimes.utils.date_replace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2956
 *     return date_new(year, month, day, dclass)
 * 
 * cdef inline datetime.date date_add_delta(datetime.date date,             # <<<<<<<<<<<<<<
 *     int years=0, int quarters=0, int months=0, int weeks=0, long long days=0, long long hours=0,
 *     long long minutes=0, long long seconds=0, long long milliseconds=0, long long microseconds=0,
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_add_delta(PyDateTime_Date *__pyx_v_date, struct __pyx_opt_args_7cytimes_5utils_date_add_delta *__pyx_optional_args) {
  int __pyx_v_years = ((int)0);
  int __pyx_v_quarters = ((int)0);
  int __pyx_v_months = ((int)0);
  int __pyx_v_weeks = ((int)0);
  PY_LONG_LONG __pyx_v_days = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_hours = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_minutes = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_seconds = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_milliseconds = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_microseconds = ((PY_LONG_LONG)0);
  int __pyx_v_year = ((int)-1);
  int __pyx_v_month = ((int)-1);
  int __pyx_v_day = ((int)-1);
  int __pyx_v_weekday = ((int)-1);
  int __pyx_v_hour = ((int)-1);
  int __pyx_v_minute = ((int)-1);
  int __pyx_v_second = ((int)-1);
  int __pyx_v_millisecond = ((int)-1);
  int __pyx_v_microsecond = ((int)-1);

  /* "utils.pxd":2960
 *     long long minutes=0, long long seconds=0, long long milliseconds=0, long long microseconds=0,
 *     int year=-1, int month=-1, int day=-1, int weekday=-1, int hour=-1, int minute=-1,
 *     int second=-1, int millisecond=-1, int microsecond=-1, object dclass=None             # <<<<<<<<<<<<<<
 * ):
 *     """Add relative and absolute deltas to date `<'datetime.date'>`.
*/
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  int __pyx_v_o_yy;
  int __pyx_v_yy;
  int __pyx_v_o_mm;
  int __pyx_v_mm;
  int __pyx_v_o_dd;
  int __pyx_v_dd;
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_v_rel_days;
  PY_LONG_LONG __pyx_v_us;
  PY_LONG_LONG __pyx_v_old_ord;
  PY_LONG_LONG __pyx_v_new_ord;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PY_LONG_LONG __pyx_t_3;
  PY_LONG_LONG __pyx_t_4;
  PY_LONG_LONG __pyx_t_5;
  PY_LONG_LONG __pyx_t_6;
  int __pyx_t_7;
  long __pyx_t_8;
  long __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_date_fr_date __pyx_t_13;
  struct __pyx_opt_args_7cytimes_5utils_date_new __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_add_delta", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_years = __pyx_optional_args->years;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_quarters = __pyx_optional_args->quarters;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_months = __pyx_optional_args->months;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_weeks = __pyx_optional_args->weeks;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_days = __pyx_optional_args->days;
              if (__pyx_optional_args->__pyx_n > 5) {
                __pyx_v_hours = __pyx_optional_args->hours;
                if (__pyx_optional_args->__pyx_n > 6) {
                  __pyx_v_minutes = __pyx_optional_args->minutes;
                  if (__pyx_optional_args->__pyx_n > 7) {
                    __pyx_v_seconds = __pyx_optional_args->seconds;
                    if (__pyx_optional_args->__pyx_n > 8) {
                      __pyx_v_milliseconds = __pyx_optional_args->milliseconds;
                      if (__pyx_optional_args->__pyx_n > 9) {
                        __pyx_v_microseconds = __pyx_optional_args->microseconds;
                        if (__pyx_optional_args->__pyx_n > 10) {
                          __pyx_v_year = __pyx_optional_args->year;
                          if (__pyx_optional_args->__pyx_n > 11) {
                            __pyx_v_month = __pyx_optional_args->month;
                            if (__pyx_optional_args->__pyx_n > 12) {
                              __pyx_v_day = __pyx_optional_args->day;
                              if (__pyx_optional_args->__pyx_n > 13) {
                                __pyx_v_weekday = __pyx_optional_args->weekday;
                                if (__pyx_optional_args->__pyx_n > 14) {
                                  __pyx_v_hour = __pyx_optional_args->hour;
                                  if (__pyx_optional_args->__pyx_n > 15) {
                                    __pyx_v_minute = __pyx_optional_args->minute;
                                    if (__pyx_optional_args->__pyx_n > 16) {
                                      __pyx_v_second = __pyx_optional_args->second;
                                      if (__pyx_optional_args->__pyx_n > 17) {
                                        __pyx_v_millisecond = __pyx_optional_args->millisecond;
                                        if (__pyx_optional_args->__pyx_n > 18) {
                                          __pyx_v_microsecond = __pyx_optional_args->microsecond;
                                          if (__pyx_optional_args->__pyx_n > 19) {
                                            __pyx_v_dclass = __pyx_optional_args->dclass;
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }

  /* "utils.pxd":3001
 *     # ----------------------------------------------------
 *     cdef:
 *         int o_yy = date.year             # <<<<<<<<<<<<<<
 *         int yy = (year if year > 0 else o_yy) + years
 *         int o_mm = date.month
*/
  __pyx_v_o_yy = __pyx_f_7cpython_8datetime_4date_4year_year(__pyx_v_date);

  /* "utils.pxd":3002
 *     cdef:
 *         int o_yy = date.year
 *         int yy = (year if year > 0 else o_yy) + years             # <<<<<<<<<<<<<<
 *         int o_mm = date.month
 *         int mm = (month if month > 0 else o_mm) + months + (quarters * 3)
*/
  __pyx_t_2 = (__pyx_v_year > 0);
  if (__pyx_t_2) {
    __pyx_t_1 = __pyx_v_year;
  } else {
    __pyx_t_1 = __pyx_v_o_yy;
  }
  __pyx_v_yy = (__pyx_t_1 + __pyx_v_years);

  /* "utils.pxd":3003
 *         int o_yy = date.year
 *         int yy = (year if year > 0 else o_yy) + years
 *         int o_mm = date.month             # <<<<<<<<<<<<<<
 *         int mm = (month if month > 0 else o_mm) + months + (quarters * 3)
 *         int o_dd = date.day
*/
  __pyx_v_o_mm = __pyx_f_7cpython_8datetime_4date_5month_month(__pyx_v_date);

  /* "utils.pxd":3004
 *         int yy = (year if year > 0 else o_yy) + years
 *         int o_mm = date.month
 *         int mm = (month if month > 0 else o_mm) + months + (quarters * 3)             # <<<<<<<<<<<<<<
 *         int o_dd = date.day
 *         int dd = (day if day > 0 else o_dd)
*/
  __pyx_t_2 = (__pyx_v_month > 0);
  if (__pyx_t_2) {
    __pyx_t_1 = __pyx_v_month;
  } else {
    __pyx_t_1 = __pyx_v_o_mm;
  }
  __pyx_v_mm = ((__pyx_t_1 + __pyx_v_months) + (__pyx_v_quarters * 3));

  /* "utils.pxd":3005
 *         int o_mm = date.month
 *         int mm = (month if month > 0 else o_mm) + months + (quarters * 3)
 *         int o_dd = date.day             # <<<<<<<<<<<<<<
 *         int dd = (day if day > 0 else o_dd)
 *         long long q, r
*/
  __pyx_v_o_dd = __pyx_f_7cpython_8datetime_4date_3day_day(__pyx_v_date);

  /* "utils.pxd":3006
 *         int mm = (month if month > 0 else o_mm) + months + (quarters * 3)
 *         int o_dd = date.day
 *         int dd = (day if day > 0 else o_dd)             # <<<<<<<<<<<<<<
 *         long long q, r
 *     # . normalize month
*/
  __pyx_t_2 = (__pyx_v_day > 0);
  if (__pyx_t_2) {
    __pyx_t_1 = __pyx_v_day;
  } else {
    __pyx_t_1 = __pyx_v_o_dd;
  }
  __pyx_v_dd = __pyx_t_1;

  /* "utils.pxd":3009
 *         long long q, r
 *     # . normalize month
 *     if mm != o_mm:             # <<<<<<<<<<<<<<
 *         mm -= 1
 *         with cython.cdivision(True):
*/
  __pyx_t_2 = (__pyx_v_mm != __pyx_v_o_mm);
  if (__pyx_t_2) {

    /* "utils.pxd":3010
 *     # . normalize month
 *     if mm != o_mm:
 *         mm -= 1             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = mm / 12; r = mm % 12
*/
    __pyx_v_mm = (__pyx_v_mm - 1);

    /* "utils.pxd":3012
 *         mm -= 1
 *         with cython.cdivision(True):
 *             q = mm / 12; r = mm % 12             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1; r += 12
*/
    __pyx_v_q = (((long)__pyx_v_mm) / 12);
    __pyx_v_r = (__pyx_v_mm % 12);

    /* "utils.pxd":3013
 *         with cython.cdivision(True):
 *             q = mm / 12; r = mm % 12
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += 12
 *         yy += q; mm = r + 1
*/
    __pyx_t_2 = (__pyx_v_r < 0);
    if (__pyx_t_2) {

      /* "utils.pxd":3014
 *             q = mm / 12; r = mm % 12
 *         if r < 0:
 *             q -= 1; r += 12             # <<<<<<<<<<<<<<
 *         yy += q; mm = r + 1
 *     # . relative days
*/
      __pyx_v_q = (__pyx_v_q - 1);
      __pyx_v_r = (__pyx_v_r + 12);

      /* "utils.pxd":3013
 *         with cython.cdivision(True):
 *             q = mm / 12; r = mm % 12
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += 12
 *         yy += q; mm = r + 1
*/
    }

    /* "utils.pxd":3015
 *         if r < 0:
 *             q -= 1; r += 12
 *         yy += q; mm = r + 1             # <<<<<<<<<<<<<<
 *     # . relative days
 *     cdef long long rel_days = days + (weeks * 7)
*/
    __pyx_v_yy = (__pyx_v_yy + __pyx_v_q);
    __pyx_v_mm = (__pyx_v_r + 1);

    /* "utils.pxd":3009
 *         long long q, r
 *     # . normalize month
 *     if mm != o_mm:             # <<<<<<<<<<<<<<
 *         mm -= 1
 *         with cython.cdivision(True):
*/
  }

  /* "utils.pxd":3017
 *         yy += q; mm = r + 1
 *     # . relative days
 *     cdef long long rel_days = days + (weeks * 7)             # <<<<<<<<<<<<<<
 * 
 *     # Time fields
*/
  __pyx_v_rel_days = (__pyx_v_days + (__pyx_v_weeks * 7));

  /* "utils.pxd":3021
 *     # Time fields
 *     # ----------------------------------------------------
 *     cdef long long us = combine_absolute_ms_us(millisecond, microsecond)             # <<<<<<<<<<<<<<
 *     us = (
 *         (us if us >= 0 else 0) + milliseconds * US_MILLISECOND + microseconds +
*/
  __pyx_v_us = __pyx_f_7cytimes_5utils_combine_absolute_ms_us(__pyx_v_millisecond, __pyx_v_microsecond);

  /* "utils.pxd":3023
 *     cdef long long us = combine_absolute_ms_us(millisecond, microsecond)
 *     us = (
 *         (us if us >= 0 else 0) + milliseconds * US_MILLISECOND + microseconds +             # <<<<<<<<<<<<<<
 *         ((second if second >= 0 else 0) + seconds) * US_SECOND +
 *         ((minute if minute >= 0 else 0) + minutes) * US_MINUTE +
*/
  __pyx_t_2 = (__pyx_v_us >= 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_us;
  } else {
    __pyx_t_3 = 0;
  }

  /* "utils.pxd":3024
 *     us = (
 *         (us if us >= 0 else 0) + milliseconds * US_MILLISECOND + microseconds +
 *         ((second if second >= 0 else 0) + seconds) * US_SECOND +             # <<<<<<<<<<<<<<
 *         ((minute if minute >= 0 else 0) + minutes) * US_MINUTE +
 *         ((hour if hour >= 0 else 0) + hours)       * US_HOUR
*/
  __pyx_t_2 = (__pyx_v_second >= 0);
  if (__pyx_t_2) {
    __pyx_t_4 = __pyx_v_second;
  } else {
    __pyx_t_4 = 0;
  }

  /* "utils.pxd":3025
 *         (us if us >= 0 else 0) + milliseconds * US_MILLISECOND + microseconds +
 *         ((second if second >= 0 else 0) + seconds) * US_SECOND +
 *         ((minute if minute >= 0 else 0) + minutes) * US_MINUTE +             # <<<<<<<<<<<<<<
 *         ((hour if hour >= 0 else 0) + hours)       * US_HOUR
 *     )
*/
  __pyx_t_2 = (__pyx_v_minute >= 0);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_v_minute;
  } else {
    __pyx_t_5 = 0;
  }

  /* "utils.pxd":3026
 *         ((second if second >= 0 else 0) + seconds) * US_SECOND +
 *         ((minute if minute >= 0 else 0) + minutes) * US_MINUTE +
 *         ((hour if hour >= 0 else 0) + hours)       * US_HOUR             # <<<<<<<<<<<<<<
 *     )
 *     # . normalize time to days
*/
  __pyx_t_2 = (__pyx_v_hour >= 0);
  if (__pyx_t_2) {
    __pyx_t_6 = __pyx_v_hour;
  } else {
    __pyx_t_6 = 0;
  }

  /* "utils.pxd":3025
 *         (us if us >= 0 else 0) + milliseconds * US_MILLISECOND + microseconds +
 *         ((second if second >= 0 else 0) + seconds) * US_SECOND +
 *         ((minute if minute >= 0 else 0) + minutes) * US_MINUTE +             # <<<<<<<<<<<<<<
 *         ((hour if hour >= 0 else 0) + hours)       * US_HOUR
 *     )
*/
  __pyx_v_us = (((((__pyx_t_3 + (__pyx_v_milliseconds * __pyx_v_7cytimes_5utils_US_MILLISECOND)) + __pyx_v_microseconds) + ((__pyx_t_4 + __pyx_v_seconds) * __pyx_v_7cytimes_5utils_US_SECOND)) + ((__pyx_t_5 + __pyx_v_minutes) * __pyx_v_7cytimes_5utils_US_MINUTE)) + ((__pyx_t_6 + __pyx_v_hours) * __pyx_v_7cytimes_5utils_US_HOUR));

  /* "utils.pxd":3029
 *     )
 *     # . normalize time to days
 *     if us != 0:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = us / US_DAY; r = us % US_DAY
*/
  __pyx_t_2 = (__pyx_v_us != 0);
  if (__pyx_t_2) {

    /* "utils.pxd":3031
 *     if us != 0:
 *         with cython.cdivision(True):
 *             q = us / US_DAY; r = us % US_DAY             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1
*/
    __pyx_v_q = (__pyx_v_us / __pyx_v_7cytimes_5utils_US_DAY);
    __pyx_v_r = (__pyx_v_us % __pyx_v_7cytimes_5utils_US_DAY);

    /* "utils.pxd":3032
 *         with cython.cdivision(True):
 *             q = us / US_DAY; r = us % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *         rel_days += q
*/
    __pyx_t_2 = (__pyx_v_r < 0);
    if (__pyx_t_2) {

      /* "utils.pxd":3033
 *             q = us / US_DAY; r = us % US_DAY
 *         if r < 0:
 *             q -= 1             # <<<<<<<<<<<<<<
 *         rel_days += q
 * 
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":3032
 *         with cython.cdivision(True):
 *             q = us / US_DAY; r = us % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *         rel_days += q
*/
    }

    /* "utils.pxd":3034
 *         if r < 0:
 *             q -= 1
 *         rel_days += q             # <<<<<<<<<<<<<<
 * 
 *     # Handle day delta
*/
    __pyx_v_rel_days = (__pyx_v_rel_days + __pyx_v_q);

    /* "utils.pxd":3029
 *     )
 *     # . normalize time to days
 *     if us != 0:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = us / US_DAY; r = us % US_DAY
*/
  }

  /* "utils.pxd":3040
 *     cdef long long old_ord, new_ord
 *     cdef ymd _ymd
 *     if rel_days != 0 or weekday >= 0:             # <<<<<<<<<<<<<<
 *         old_ord = ymd_to_ord(yy, mm, dd)
 *         new_ord = old_ord + rel_days
*/
  __pyx_t_7 = (__pyx_v_rel_days != 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_2 = __pyx_t_7;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_weekday >= 0);
  __pyx_t_2 = __pyx_t_7;
  __pyx_L8_bool_binop_done:;
  if (__pyx_t_2) {

    /* "utils.pxd":3041
 *     cdef ymd _ymd
 *     if rel_days != 0 or weekday >= 0:
 *         old_ord = ymd_to_ord(yy, mm, dd)             # <<<<<<<<<<<<<<
 *         new_ord = old_ord + rel_days
 *         # . adjust to weekday if needed
*/
    __pyx_v_old_ord = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v_yy, __pyx_v_mm, __pyx_v_dd);

    /* "utils.pxd":3042
 *     if rel_days != 0 or weekday >= 0:
 *         old_ord = ymd_to_ord(yy, mm, dd)
 *         new_ord = old_ord + rel_days             # <<<<<<<<<<<<<<
 *         # . adjust to weekday if needed
 *         if weekday >= 0:
*/
    __pyx_v_new_ord = (__pyx_v_old_ord + __pyx_v_rel_days);

    /* "utils.pxd":3044
 *         new_ord = old_ord + rel_days
 *         # . adjust to weekday if needed
 *         if weekday >= 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 r = (new_ord + 6) % 7
*/
    __pyx_t_2 = (__pyx_v_weekday >= 0);
    if (__pyx_t_2) {

      /* "utils.pxd":3046
 *         if weekday >= 0:
 *             with cython.cdivision(True):
 *                 r = (new_ord + 6) % 7             # <<<<<<<<<<<<<<
 *                 if r < 0:
 *                     r += 7
*/
      __pyx_v_r = ((__pyx_v_new_ord + 6) % 7);

      /* "utils.pxd":3047
 *             with cython.cdivision(True):
 *                 r = (new_ord + 6) % 7
 *                 if r < 0:             # <<<<<<<<<<<<<<
 *                     r += 7
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
*/
      __pyx_t_2 = (__pyx_v_r < 0);
      if (__pyx_t_2) {

        /* "utils.pxd":3048
 *                 r = (new_ord + 6) % 7
 *                 if r < 0:
 *                     r += 7             # <<<<<<<<<<<<<<
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
 *         if old_ord != new_ord:
*/
        __pyx_v_r = (__pyx_v_r + 7);

        /* "utils.pxd":3047
 *             with cython.cdivision(True):
 *                 r = (new_ord + 6) % 7
 *                 if r < 0:             # <<<<<<<<<<<<<<
 *                     r += 7
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
*/
      }

      /* "utils.pxd":3049
 *                 if r < 0:
 *                     r += 7
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6             # <<<<<<<<<<<<<<
 *         if old_ord != new_ord:
 *             _ymd = ymd_fr_ord(new_ord)
*/
      __pyx_t_8 = 6;
      __pyx_t_1 = __pyx_v_weekday;
      __pyx_t_2 = (__pyx_t_8 < __pyx_t_1);
      if (__pyx_t_2) {
        __pyx_t_9 = __pyx_t_8;
      } else {
        __pyx_t_9 = __pyx_t_1;
      }
      __pyx_v_new_ord = (__pyx_v_new_ord + (__pyx_t_9 - __pyx_v_r));

      /* "utils.pxd":3044
 *         new_ord = old_ord + rel_days
 *         # . adjust to weekday if needed
 *         if weekday >= 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 r = (new_ord + 6) % 7
*/
    }

    /* "utils.pxd":3050
 *                     r += 7
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
 *         if old_ord != new_ord:             # <<<<<<<<<<<<<<
 *             _ymd = ymd_fr_ord(new_ord)
 *             yy, mm, dd = _ymd.year, _ymd.month, _ymd.day
*/
    __pyx_t_2 = (__pyx_v_old_ord != __pyx_v_new_ord);
    if (__pyx_t_2) {

      /* "utils.pxd":3051
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
 *         if old_ord != new_ord:
 *             _ymd = ymd_fr_ord(new_ord)             # <<<<<<<<<<<<<<
 *             yy, mm, dd = _ymd.year, _ymd.month, _ymd.day
 * 
*/
      __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord(__pyx_v_new_ord);

      /* "utils.pxd":3052
 *         if old_ord != new_ord:
 *             _ymd = ymd_fr_ord(new_ord)
 *             yy, mm, dd = _ymd.year, _ymd.month, _ymd.day             # <<<<<<<<<<<<<<
 * 
 *     # Compare new dates
*/
      __pyx_t_1 = __pyx_v__ymd.year;
      __pyx_t_10 = __pyx_v__ymd.month;
      __pyx_t_11 = __pyx_v__ymd.day;
      __pyx_v_yy = __pyx_t_1;
      __pyx_v_mm = __pyx_t_10;
      __pyx_v_dd = __pyx_t_11;

      /* "utils.pxd":3050
 *                     r += 7
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
 *         if old_ord != new_ord:             # <<<<<<<<<<<<<<
 *             _ymd = ymd_fr_ord(new_ord)
 *             yy, mm, dd = _ymd.year, _ymd.month, _ymd.day
*/
    }

    /* "utils.pxd":3040
 *     cdef long long old_ord, new_ord
 *     cdef ymd _ymd
 *     if rel_days != 0 or weekday >= 0:             # <<<<<<<<<<<<<<
 *         old_ord = ymd_to_ord(yy, mm, dd)
 *         new_ord = old_ord + rel_days
*/
  }

  /* "utils.pxd":3055
 * 
 *     # Compare new dates
 *     if yy == o_yy and mm == o_mm and dd == o_dd:             # <<<<<<<<<<<<<<
 *         return date_fr_date(date, dclass)
 * 
*/
  __pyx_t_7 = (__pyx_v_yy == __pyx_v_o_yy);
  if (__pyx_t_7) {
  } else {
    __pyx_t_2 = __pyx_t_7;
    goto __pyx_L14_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_mm == __pyx_v_o_mm);
  if (__pyx_t_7) {
  } else {
    __pyx_t_2 = __pyx_t_7;
    goto __pyx_L14_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_dd == __pyx_v_o_dd);
  __pyx_t_2 = __pyx_t_7;
  __pyx_L14_bool_binop_done:;
  if (__pyx_t_2) {

    /* "utils.pxd":3056
 *     # Compare new dates
 *     if yy == o_yy and mm == o_mm and dd == o_dd:
 *         return date_fr_date(date, dclass)             # <<<<<<<<<<<<<<
 * 
 *     # Clamp day to valid days in month
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_13.__pyx_n = 1;
    __pyx_t_13.dclass = __pyx_v_dclass;
    __pyx_t_12 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_date(__pyx_v_date, &__pyx_t_13)); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 3056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_r = ((PyDateTime_Date *)__pyx_t_12);
    __pyx_t_12 = 0;
    goto __pyx_L0;

    /* "utils.pxd":3055
 * 
 *     # Compare new dates
 *     if yy == o_yy and mm == o_mm and dd == o_dd:             # <<<<<<<<<<<<<<
 *         return date_fr_date(date, dclass)
 * 
*/
  }

  /* "utils.pxd":3059
 * 
 *     # Clamp day to valid days in month
 *     if dd > 28:             # <<<<<<<<<<<<<<
 *         dd = min(dd, days_in_month(yy, mm))
 * 
*/
  __pyx_t_2 = (__pyx_v_dd > 28);
  if (__pyx_t_2) {

    /* "utils.pxd":3060
 *     # Clamp day to valid days in month
 *     if dd > 28:
 *         dd = min(dd, days_in_month(yy, mm))             # <<<<<<<<<<<<<<
 * 
 *     # New date
*/
    __pyx_t_11 = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v_yy, __pyx_v_mm);
    __pyx_t_10 = __pyx_v_dd;
    __pyx_t_2 = (__pyx_t_11 < __pyx_t_10);
    if (__pyx_t_2) {
      __pyx_t_1 = __pyx_t_11;
    } else {
      __pyx_t_1 = __pyx_t_10;
    }
    __pyx_v_dd = __pyx_t_1;

    /* "utils.pxd":3059
 * 
 *     # Clamp day to valid days in month
 *     if dd > 28:             # <<<<<<<<<<<<<<
 *         dd = min(dd, days_in_month(yy, mm))
 * 
*/
  }

  /* "utils.pxd":3063
 * 
 *     # New date
 *     return date_new(yy, mm, dd, dclass)             # <<<<<<<<<<<<<<
 * 
 * # datetime.datetime ------------------------------------------------------------------------------------
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_14.__pyx_n = 4;
  __pyx_t_14.year = __pyx_v_yy;
  __pyx_t_14.month = __pyx_v_mm;
  __pyx_t_14.day = __pyx_v_dd;
  __pyx_t_14.dclass = __pyx_v_dclass;
  __pyx_t_12 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_14)); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 3063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_12);
  __pyx_t_12 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2956
 *     return date_new(year, month, day, dclass)
 * 
 * cdef inline datetime.date date_add_delta(datetime.date date,             # <<<<<<<<<<<<<<
 *     int years=0, int quarters=0, int months=0, int weeks=0, long long days=0, long long hours=0,
 *     long long minutes=0, long long seconds=0, long long milliseconds=0, long long microseconds=0,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cytimes.utils.date_add_delta", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3067
 * # datetime.datetime ------------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.datetime dt_new(             # <<<<<<<<<<<<<<
 *     int year=1, int month=1, int day=1, int hour=0, int minute=0, int second=0,
 *     int microsecond=0, object tzinfo=None, int fold=0, object dtclass=None,
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_new(struct __pyx_opt_args_7cytimes_5utils_dt_new *__pyx_optional_args) {
  int __pyx_v_year = ((int)1);
  int __pyx_v_month = ((int)1);
  int __pyx_v_day = ((int)1);
  int __pyx_v_hour = ((int)0);
  int __pyx_v_minute = ((int)0);
  int __pyx_v_second = ((int)0);
  int __pyx_v_microsecond = ((int)0);

  /* "utils.pxd":3069
 * cdef inline datetime.datetime dt_new(
 *     int year=1, int month=1, int day=1, int hour=0, int minute=0, int second=0,
 *     int microsecond=0, object tzinfo=None, int fold=0, object dtclass=None,             # <<<<<<<<<<<<<<
 * ):
 *     """Create a new datetime `<'datetime.datetime'>`.
*/
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  int __pyx_v_fold = ((int)0);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyObject *__pyx_v_err = NULL;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  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;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  size_t __pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_t_19;
  PyObject *__pyx_t_20[4];
  int __pyx_t_21;
  char const *__pyx_t_22;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  PyObject *__pyx_t_28 = NULL;
  struct __pyx_opt_args_7cpython_8datetime_datetime_new __pyx_t_29;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_new", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_year = __pyx_optional_args->year;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_month = __pyx_optional_args->month;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_day = __pyx_optional_args->day;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_hour = __pyx_optional_args->hour;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_minute = __pyx_optional_args->minute;
              if (__pyx_optional_args->__pyx_n > 5) {
                __pyx_v_second = __pyx_optional_args->second;
                if (__pyx_optional_args->__pyx_n > 6) {
                  __pyx_v_microsecond = __pyx_optional_args->microsecond;
                  if (__pyx_optional_args->__pyx_n > 7) {
                    __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
                    if (__pyx_optional_args->__pyx_n > 8) {
                      __pyx_v_fold = __pyx_optional_args->fold;
                      if (__pyx_optional_args->__pyx_n > 9) {
                        __pyx_v_dtclass = __pyx_optional_args->dtclass;
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }

  /* "utils.pxd":3088
 *     """
 *     # Construct datetime
 *     fold = fold == 1             # <<<<<<<<<<<<<<
 *     if dtclass is not None and dtclass is not datetime.datetime:
 *         try:
*/
  __pyx_v_fold = (__pyx_v_fold == 1);

  /* "utils.pxd":3089
 *     # Construct datetime
 *     fold = fold == 1
 *     if dtclass is not None and dtclass is not datetime.datetime:             # <<<<<<<<<<<<<<
 *         try:
 *             return dtclass(
*/
  __pyx_t_2 = (__pyx_v_dtclass != Py_None);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_dtclass != ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime));
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":3090
 *     fold = fold == 1
 *     if dtclass is not None and dtclass is not datetime.datetime:
 *         try:             # <<<<<<<<<<<<<<
 *             return dtclass(
 *                 year=year,
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __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:*/ {

        /* "utils.pxd":3091
 *     if dtclass is not None and dtclass is not datetime.datetime:
 *         try:
 *             return dtclass(             # <<<<<<<<<<<<<<
 *                 year=year,
 *                 month=month,
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = NULL;
        __Pyx_INCREF(__pyx_v_dtclass);
        __pyx_t_8 = __pyx_v_dtclass; 

        /* "utils.pxd":3092
 *         try:
 *             return dtclass(
 *                 year=year,             # <<<<<<<<<<<<<<
 *                 month=month,
 *                 day=day,
*/
        __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_year); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 3092, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_9);

        /* "utils.pxd":3093
 *             return dtclass(
 *                 year=year,
 *                 month=month,             # <<<<<<<<<<<<<<
 *                 day=day,
 *                 hour=hour,
*/
        __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 3093, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_10);

        /* "utils.pxd":3094
 *                 year=year,
 *                 month=month,
 *                 day=day,             # <<<<<<<<<<<<<<
 *                 hour=hour,
 *                 minute=minute,
*/
        __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 3094, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_11);

        /* "utils.pxd":3095
 *                 month=month,
 *                 day=day,
 *                 hour=hour,             # <<<<<<<<<<<<<<
 *                 minute=minute,
 *                 second=second,
*/
        __pyx_t_12 = __Pyx_PyLong_From_int(__pyx_v_hour); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 3095, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_12);

        /* "utils.pxd":3096
 *                 day=day,
 *                 hour=hour,
 *                 minute=minute,             # <<<<<<<<<<<<<<
 *                 second=second,
 *                 microsecond=microsecond,
*/
        __pyx_t_13 = __Pyx_PyLong_From_int(__pyx_v_minute); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 3096, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_13);

        /* "utils.pxd":3097
 *                 hour=hour,
 *                 minute=minute,
 *                 second=second,             # <<<<<<<<<<<<<<
 *                 microsecond=microsecond,
 *                 tzinfo=tzinfo,
*/
        __pyx_t_14 = __Pyx_PyLong_From_int(__pyx_v_second); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 3097, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_14);

        /* "utils.pxd":3098
 *                 minute=minute,
 *                 second=second,
 *                 microsecond=microsecond,             # <<<<<<<<<<<<<<
 *                 tzinfo=tzinfo,
 *                 fold=fold,
*/
        __pyx_t_15 = __Pyx_PyLong_From_int(__pyx_v_microsecond); if (unlikely(!__pyx_t_15)) __PYX_ERR(5, 3098, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_15);

        /* "utils.pxd":3100
 *                 microsecond=microsecond,
 *                 tzinfo=tzinfo,
 *                 fold=fold,             # <<<<<<<<<<<<<<
 *             )
 *         except Exception as err:
*/
        __pyx_t_16 = __Pyx_PyLong_From_int(__pyx_v_fold); if (unlikely(!__pyx_t_16)) __PYX_ERR(5, 3100, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_17 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
          assert(__pyx_t_7);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
          __pyx_t_17 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 9 : 0)] = {__pyx_t_7, NULL};
          __pyx_t_18 = __Pyx_MakeVectorcallBuilderKwds(9); if (unlikely(!__pyx_t_18)) __PYX_ERR(5, 3091, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_18);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_year, __pyx_t_9, __pyx_t_18, __pyx_callargs+1, 0) < (0)) __PYX_ERR(5, 3091, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_month, __pyx_t_10, __pyx_t_18, __pyx_callargs+1, 1) < (0)) __PYX_ERR(5, 3091, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_day, __pyx_t_11, __pyx_t_18, __pyx_callargs+1, 2) < (0)) __PYX_ERR(5, 3091, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hour, __pyx_t_12, __pyx_t_18, __pyx_callargs+1, 3) < (0)) __PYX_ERR(5, 3091, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minute, __pyx_t_13, __pyx_t_18, __pyx_callargs+1, 4) < (0)) __PYX_ERR(5, 3091, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_second, __pyx_t_14, __pyx_t_18, __pyx_callargs+1, 5) < (0)) __PYX_ERR(5, 3091, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_microsecond, __pyx_t_15, __pyx_t_18, __pyx_callargs+1, 6) < (0)) __PYX_ERR(5, 3091, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_v_tzinfo, __pyx_t_18, __pyx_callargs+1, 7) < (0)) __PYX_ERR(5, 3091, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_fold, __pyx_t_16, __pyx_t_18, __pyx_callargs+1, 8) < (0)) __PYX_ERR(5, 3091, __pyx_L6_error)
          __pyx_t_6 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_17, (1-__pyx_t_17) | (__pyx_t_17*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_18);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 3091, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
        }

        /* "utils.pxd":3091
 *     if dtclass is not None and dtclass is not datetime.datetime:
 *         try:
 *             return dtclass(             # <<<<<<<<<<<<<<
 *                 year=year,
 *                 month=month,
*/
        if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(5, 3091, __pyx_L6_error)
        __pyx_r = ((PyDateTime_DateTime *)__pyx_t_6);
        __pyx_t_6 = 0;
        goto __pyx_L10_try_return;

        /* "utils.pxd":3090
 *     fold = fold == 1
 *     if dtclass is not None and dtclass is not datetime.datetime:
 *         try:             # <<<<<<<<<<<<<<
 *             return dtclass(
 *                 year=year,
*/
      }
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 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;
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "utils.pxd":3102
 *                 fold=fold,
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot create datetime using custom 'dtclass' %s, %s" % (dtclass, err)) from err
 *     return datetime.datetime_new(year, month, day, hour, minute, second, microsecond, tzinfo, fold)
*/
      __pyx_t_19 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_19) {
        __Pyx_AddTraceback("cytimes.utils.dt_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_18) < 0) __PYX_ERR(5, 3102, __pyx_L8_except_error)
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_18);
        __Pyx_INCREF(__pyx_t_8);
        __pyx_v_err = __pyx_t_8;
        /*try:*/ {

          /* "utils.pxd":3103
 *             )
 *         except Exception as err:
 *             raise ValueError("Cannot create datetime using custom 'dtclass' %s, %s" % (dtclass, err)) from err             # <<<<<<<<<<<<<<
 *     return datetime.datetime_new(year, month, day, hour, minute, second, microsecond, tzinfo, fold)
 * 
*/
          __pyx_t_15 = NULL;
          __pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_dtclass), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 3103, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_13 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_err), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 3103, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_20[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_create_datetime_using_cus;
          __pyx_t_20[1] = __pyx_t_14;
          __pyx_t_20[2] = __pyx_mstate_global->__pyx_kp_u__3;
          __pyx_t_20[3] = __pyx_t_13;
          __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_20, 4, 46 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13));
          if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 3103, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __pyx_t_17 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_12};
            __pyx_t_16 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_17, (2-__pyx_t_17) | (__pyx_t_17*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            if (unlikely(!__pyx_t_16)) __PYX_ERR(5, 3103, __pyx_L17_error)
            __Pyx_GOTREF(__pyx_t_16);
          }
          __Pyx_Raise(__pyx_t_16, 0, 0, __pyx_v_err);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __PYX_ERR(5, 3103, __pyx_L17_error)
        }

        /* "utils.pxd":3102
 *                 fold=fold,
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot create datetime using custom 'dtclass' %s, %s" % (dtclass, err)) from err
 *     return datetime.datetime_new(year, month, day, hour, minute, second, microsecond, tzinfo, fold)
*/
        /*finally:*/ {
          __pyx_L17_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 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;
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_26, &__pyx_t_27, &__pyx_t_28);
            if ( unlikely(__Pyx_GetException(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25) < 0)) __Pyx_ErrFetch(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25);
            __Pyx_XGOTREF(__pyx_t_23);
            __Pyx_XGOTREF(__pyx_t_24);
            __Pyx_XGOTREF(__pyx_t_25);
            __Pyx_XGOTREF(__pyx_t_26);
            __Pyx_XGOTREF(__pyx_t_27);
            __Pyx_XGOTREF(__pyx_t_28);
            __pyx_t_19 = __pyx_lineno; __pyx_t_21 = __pyx_clineno; __pyx_t_22 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            }
            __Pyx_XGIVEREF(__pyx_t_26);
            __Pyx_XGIVEREF(__pyx_t_27);
            __Pyx_XGIVEREF(__pyx_t_28);
            __Pyx_ExceptionReset(__pyx_t_26, __pyx_t_27, __pyx_t_28);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_XGIVEREF(__pyx_t_25);
            __Pyx_ErrRestore(__pyx_t_23, __pyx_t_24, __pyx_t_25);
            __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0;
            __pyx_lineno = __pyx_t_19; __pyx_clineno = __pyx_t_21; __pyx_filename = __pyx_t_22;
            goto __pyx_L8_except_error;
          }
        }
      }
      goto __pyx_L8_except_error;

      /* "utils.pxd":3090
 *     fold = fold == 1
 *     if dtclass is not None and dtclass is not datetime.datetime:
 *         try:             # <<<<<<<<<<<<<<
 *             return dtclass(
 *                 year=year,
*/
      __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_L10_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;
    }

    /* "utils.pxd":3089
 *     # Construct datetime
 *     fold = fold == 1
 *     if dtclass is not None and dtclass is not datetime.datetime:             # <<<<<<<<<<<<<<
 *         try:
 *             return dtclass(
*/
  }

  /* "utils.pxd":3104
 *         except Exception as err:
 *             raise ValueError("Cannot create datetime using custom 'dtclass' %s, %s" % (dtclass, err)) from err
 *     return datetime.datetime_new(year, month, day, hour, minute, second, microsecond, tzinfo, fold)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.datetime dt_now(object tzinfo=None, object dtclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_29.__pyx_n = 1;
  __pyx_t_29.fold = __pyx_v_fold;
  __pyx_t_18 = ((PyObject *)__pyx_f_7cpython_8datetime_datetime_new(__pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tzinfo, &__pyx_t_29)); if (unlikely(!__pyx_t_18)) __PYX_ERR(5, 3104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_18);
  __pyx_t_18 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3067
 * # datetime.datetime ------------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.datetime dt_new(             # <<<<<<<<<<<<<<
 *     int year=1, int month=1, int day=1, int hour=0, int minute=0, int second=0,
 *     int microsecond=0, object tzinfo=None, int fold=0, object dtclass=None,
*/

  /* function exit code */
  __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_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("cytimes.utils.dt_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3106
 *     return datetime.datetime_new(year, month, day, hour, minute, second, microsecond, tzinfo, fold)
 * 
 * cdef inline datetime.datetime dt_now(object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Get the current datetime `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_now(struct __pyx_opt_args_7cytimes_5utils_dt_now *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  double __pyx_v_tic;
  PyDateTime_DateTime *__pyx_v_dt = 0;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp __pyx_t_3;
  int __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_now", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_dtclass = __pyx_optional_args->dtclass;
      }
    }
  }

  /* "utils.pxd":3122
 *     >>> datetime.datetime.now(tzinfo)
 *     """
 *     cdef double tic = unix_time()             # <<<<<<<<<<<<<<
 *     cdef datetime.datetime dt = datetime.datetime_from_timestamp(tic, tzinfo)
 *     return dt if dtclass is None else dt_fr_dt(dt, dtclass)
*/
  __pyx_v_tic = __pyx_f_7cpython_4time_time();

  /* "utils.pxd":3123
 *     """
 *     cdef double tic = unix_time()
 *     cdef datetime.datetime dt = datetime.datetime_from_timestamp(tic, tzinfo)             # <<<<<<<<<<<<<<
 *     return dt if dtclass is None else dt_fr_dt(dt, dtclass)
 * 
*/
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_tic); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.tz = __pyx_v_tzinfo;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_datetime_from_timestamp(__pyx_t_1, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":3124
 *     cdef double tic = unix_time()
 *     cdef datetime.datetime dt = datetime.datetime_from_timestamp(tic, tzinfo)
 *     return dt if dtclass is None else dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 * 
 * # . type check
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_4 = (__pyx_v_dtclass == Py_None);
  if (__pyx_t_4) {
    __Pyx_INCREF((PyObject *)__pyx_v_dt);
    __pyx_t_2 = ((PyObject *)__pyx_v_dt);
  } else {
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.dtclass = __pyx_v_dtclass;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3106
 *     return datetime.datetime_new(year, month, day, hour, minute, second, microsecond, tzinfo, fold)
 * 
 * cdef inline datetime.datetime dt_now(object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Get the current datetime `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.dt_now", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3127
 * 
 * # . type check
 * cdef inline bint is_dt(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `datetime.datetime` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_dt(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":3136
 *     >>> isinstance(obj, datetime.datetime)
 *     """
 *     return datetime.PyDateTime_Check(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_dt_exact(object obj) except -1:
*/
  __pyx_r = PyDateTime_Check(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":3127
 * 
 * # . type check
 * cdef inline bint is_dt(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `datetime.datetime` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":3138
 *     return datetime.PyDateTime_Check(obj)
 * 
 * cdef inline bint is_dt_exact(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an exact `datetime.datetime` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_dt_exact(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":3147
 *     >>> type(obj) is datetime.datetime
 *     """
 *     return datetime.PyDateTime_CheckExact(obj)             # <<<<<<<<<<<<<<
 * 
 * # . conversion: to
*/
  __pyx_r = PyDateTime_CheckExact(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":3138
 *     return datetime.PyDateTime_Check(obj)
 * 
 * cdef inline bint is_dt_exact(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an exact `datetime.datetime` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":3150
 * 
 * # . conversion: to
 * cdef inline long long dt_local_mktime(datetime.datetime dt) except *:             # <<<<<<<<<<<<<<
 *     """Interpret a naive `datetime.datetime` as local POSIX timestamp `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_dt_local_mktime(PyDateTime_DateTime *__pyx_v_dt) {
  PY_LONG_LONG __pyx_v_ord;
  PY_LONG_LONG __pyx_v_t;
  PY_LONG_LONG __pyx_v_hh;
  PY_LONG_LONG __pyx_v_mi;
  PY_LONG_LONG __pyx_v_ss;
  PY_LONG_LONG __pyx_v_adj1;
  PY_LONG_LONG __pyx_v_adj2;
  PY_LONG_LONG __pyx_v_u1;
  PY_LONG_LONG __pyx_v_u2;
  PY_LONG_LONG __pyx_v_t1;
  PY_LONG_LONG __pyx_v_t2;
  PY_LONG_LONG __pyx_r;
  PY_LONG_LONG __pyx_t_1;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_ord __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PY_LONG_LONG __pyx_t_7;
  PY_LONG_LONG __pyx_t_8;
  PY_LONG_LONG __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "utils.pxd":3165
 * 
 *     # Seconds since epoch from local wall fields (no timezone adjustment here)
 *     ord = dt_to_ord(dt, False)            # <-- make sure this is the right helper             # <<<<<<<<<<<<<<
 *     hh, mi, ss = dt.hour, dt.minute, dt.second
 *     t = (ord - EPOCH_DAY) * SS_DAY + hh * SS_HOUR + mi * SS_MINUTE + ss
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.utc = 0;
  __pyx_t_1 = __pyx_f_7cytimes_5utils_dt_to_ord(__pyx_v_dt, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(5, 3165, __pyx_L1_error)
  __pyx_v_ord = __pyx_t_1;

  /* "utils.pxd":3166
 *     # Seconds since epoch from local wall fields (no timezone adjustment here)
 *     ord = dt_to_ord(dt, False)            # <-- make sure this is the right helper
 *     hh, mi, ss = dt.hour, dt.minute, dt.second             # <<<<<<<<<<<<<<
 *     t = (ord - EPOCH_DAY) * SS_DAY + hh * SS_HOUR + mi * SS_MINUTE + ss
 * 
*/
  __pyx_t_3 = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);
  __pyx_t_4 = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);
  __pyx_t_5 = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);
  __pyx_v_hh = __pyx_t_3;
  __pyx_v_mi = __pyx_t_4;
  __pyx_v_ss = __pyx_t_5;

  /* "utils.pxd":3167
 *     ord = dt_to_ord(dt, False)            # <-- make sure this is the right helper
 *     hh, mi, ss = dt.hour, dt.minute, dt.second
 *     t = (ord - EPOCH_DAY) * SS_DAY + hh * SS_HOUR + mi * SS_MINUTE + ss             # <<<<<<<<<<<<<<
 * 
 *     # local(u) := ts_localtime(u)
*/
  __pyx_v_t = (((((__pyx_v_ord - __pyx_v_7cytimes_5utils_EPOCH_DAY) * __pyx_v_7cytimes_5utils_SS_DAY) + (__pyx_v_hh * __pyx_v_7cytimes_5utils_SS_HOUR)) + (__pyx_v_mi * __pyx_v_7cytimes_5utils_SS_MINUTE)) + __pyx_v_ss);

  /* "utils.pxd":3170
 * 
 *     # local(u) := ts_localtime(u)
 *     adj1 = ts_localtime(t) - t             # <<<<<<<<<<<<<<
 *     u1 = t - adj1
 *     t1 = ts_localtime(u1)
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_ts_localtime(__pyx_v_t); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 3170, __pyx_L1_error)
  __pyx_v_adj1 = (__pyx_t_1 - __pyx_v_t);

  /* "utils.pxd":3171
 *     # local(u) := ts_localtime(u)
 *     adj1 = ts_localtime(t) - t
 *     u1 = t - adj1             # <<<<<<<<<<<<<<
 *     t1 = ts_localtime(u1)
 * 
*/
  __pyx_v_u1 = (__pyx_v_t - __pyx_v_adj1);

  /* "utils.pxd":3172
 *     adj1 = ts_localtime(t) - t
 *     u1 = t - adj1
 *     t1 = ts_localtime(u1)             # <<<<<<<<<<<<<<
 * 
 *     if t1 == t:
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_ts_localtime(__pyx_v_u1); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 3172, __pyx_L1_error)
  __pyx_v_t1 = __pyx_t_1;

  /* "utils.pxd":3174
 *     t1 = ts_localtime(u1)
 * 
 *     if t1 == t:             # <<<<<<<<<<<<<<
 *         # We found one solution, but it may not be the one we need.
 *         # Look for an earlier solution (if `fold` is 0), or a later
*/
  __pyx_t_6 = (__pyx_v_t1 == __pyx_v_t);
  if (__pyx_t_6) {

    /* "utils.pxd":3178
 *         # Look for an earlier solution (if `fold` is 0), or a later
 *         # one (if `fold` is 1).
 *         u2  = u1 - SS_DAY if dt.fold == 0 else u1 + SS_DAY             # <<<<<<<<<<<<<<
 *         adj2 = ts_localtime(u2) - u2
 *         if adj1 == adj2:
*/
    __pyx_t_6 = (__pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt) == 0);
    if (__pyx_t_6) {
      __pyx_t_1 = (__pyx_v_u1 - __pyx_v_7cytimes_5utils_SS_DAY);
    } else {
      __pyx_t_1 = (__pyx_v_u1 + __pyx_v_7cytimes_5utils_SS_DAY);
    }
    __pyx_v_u2 = __pyx_t_1;

    /* "utils.pxd":3179
 *         # one (if `fold` is 1).
 *         u2  = u1 - SS_DAY if dt.fold == 0 else u1 + SS_DAY
 *         adj2 = ts_localtime(u2) - u2             # <<<<<<<<<<<<<<
 *         if adj1 == adj2:
 *             return u1
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_ts_localtime(__pyx_v_u2); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 3179, __pyx_L1_error)
    __pyx_v_adj2 = (__pyx_t_1 - __pyx_v_u2);

    /* "utils.pxd":3180
 *         u2  = u1 - SS_DAY if dt.fold == 0 else u1 + SS_DAY
 *         adj2 = ts_localtime(u2) - u2
 *         if adj1 == adj2:             # <<<<<<<<<<<<<<
 *             return u1
 *     else:
*/
    __pyx_t_6 = (__pyx_v_adj1 == __pyx_v_adj2);
    if (__pyx_t_6) {

      /* "utils.pxd":3181
 *         adj2 = ts_localtime(u2) - u2
 *         if adj1 == adj2:
 *             return u1             # <<<<<<<<<<<<<<
 *     else:
 *         adj2 = t1 - u1
*/
      __pyx_r = __pyx_v_u1;
      goto __pyx_L0;

      /* "utils.pxd":3180
 *         u2  = u1 - SS_DAY if dt.fold == 0 else u1 + SS_DAY
 *         adj2 = ts_localtime(u2) - u2
 *         if adj1 == adj2:             # <<<<<<<<<<<<<<
 *             return u1
 *     else:
*/
    }

    /* "utils.pxd":3174
 *     t1 = ts_localtime(u1)
 * 
 *     if t1 == t:             # <<<<<<<<<<<<<<
 *         # We found one solution, but it may not be the one we need.
 *         # Look for an earlier solution (if `fold` is 0), or a later
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":3183
 *             return u1
 *     else:
 *         adj2 = t1 - u1             # <<<<<<<<<<<<<<
 * 
 *     # Final attempt with the other offset
*/
  /*else*/ {
    __pyx_v_adj2 = (__pyx_v_t1 - __pyx_v_u1);
  }
  __pyx_L3:;

  /* "utils.pxd":3186
 * 
 *     # Final attempt with the other offset
 *     u2 = t - adj2             # <<<<<<<<<<<<<<
 *     t2 = ts_localtime(u2)
 *     if t2 == t:
*/
  __pyx_v_u2 = (__pyx_v_t - __pyx_v_adj2);

  /* "utils.pxd":3187
 *     # Final attempt with the other offset
 *     u2 = t - adj2
 *     t2 = ts_localtime(u2)             # <<<<<<<<<<<<<<
 *     if t2 == t:
 *         return u2
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_ts_localtime(__pyx_v_u2); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 3187, __pyx_L1_error)
  __pyx_v_t2 = __pyx_t_1;

  /* "utils.pxd":3188
 *     u2 = t - adj2
 *     t2 = ts_localtime(u2)
 *     if t2 == t:             # <<<<<<<<<<<<<<
 *         return u2
 *     if t1 == t:
*/
  __pyx_t_6 = (__pyx_v_t2 == __pyx_v_t);
  if (__pyx_t_6) {

    /* "utils.pxd":3189
 *     t2 = ts_localtime(u2)
 *     if t2 == t:
 *         return u2             # <<<<<<<<<<<<<<
 *     if t1 == t:
 *         return u1
*/
    __pyx_r = __pyx_v_u2;
    goto __pyx_L0;

    /* "utils.pxd":3188
 *     u2 = t - adj2
 *     t2 = ts_localtime(u2)
 *     if t2 == t:             # <<<<<<<<<<<<<<
 *         return u2
 *     if t1 == t:
*/
  }

  /* "utils.pxd":3190
 *     if t2 == t:
 *         return u2
 *     if t1 == t:             # <<<<<<<<<<<<<<
 *         return u1
 * 
*/
  __pyx_t_6 = (__pyx_v_t1 == __pyx_v_t);
  if (__pyx_t_6) {

    /* "utils.pxd":3191
 *         return u2
 *     if t1 == t:
 *         return u1             # <<<<<<<<<<<<<<
 * 
 *     # We have found both offsets adj1 and adj2,
*/
    __pyx_r = __pyx_v_u1;
    goto __pyx_L0;

    /* "utils.pxd":3190
 *     if t2 == t:
 *         return u2
 *     if t1 == t:             # <<<<<<<<<<<<<<
 *         return u1
 * 
*/
  }

  /* "utils.pxd":3196
 *     # but neither t - adj1 nor t - adj2 is the
 *     # solution. This means t is in the gap.
 *     return max(u1, u2) if dt.fold == 0 else min(u1, u2)             # <<<<<<<<<<<<<<
 * 
 * cdef inline str dt_strformat(datetime.datetime dt, str fmt):
*/
  __pyx_t_6 = (__pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt) == 0);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_u2;
    __pyx_t_8 = __pyx_v_u1;
    __pyx_t_10 = (__pyx_t_7 > __pyx_t_8);
    if (__pyx_t_10) {
      __pyx_t_9 = __pyx_t_7;
    } else {
      __pyx_t_9 = __pyx_t_8;
    }
    __pyx_t_1 = __pyx_t_9;
  } else {
    __pyx_t_9 = __pyx_v_u2;
    __pyx_t_7 = __pyx_v_u1;
    __pyx_t_10 = (__pyx_t_9 < __pyx_t_7);
    if (__pyx_t_10) {
      __pyx_t_8 = __pyx_t_9;
    } else {
      __pyx_t_8 = __pyx_t_7;
    }
    __pyx_t_1 = __pyx_t_8;
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":3150
 * 
 * # . conversion: to
 * cdef inline long long dt_local_mktime(datetime.datetime dt) except *:             # <<<<<<<<<<<<<<
 *     """Interpret a naive `datetime.datetime` as local POSIX timestamp `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.dt_local_mktime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":3198
 *     return max(u1, u2) if dt.fold == 0 else min(u1, u2)
 * 
 * cdef inline str dt_strformat(datetime.datetime dt, str fmt):             # <<<<<<<<<<<<<<
 *     """Format a `datetime.datetime` with a strftime-style format `<'str'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_dt_strformat(PyDateTime_DateTime *__pyx_v_dt, PyObject *__pyx_v_fmt) {
  PyObject *__pyx_v_parts = 0;
  Py_ssize_t __pyx_v_size;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_frepl = 0;
  PyObject *__pyx_v_zrepl = 0;
  PyObject *__pyx_v_Zrepl = 0;
  PyObject *__pyx_v_s_tmp = 0;
  Py_UCS4 __pyx_v_ch;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_tz_utcformat __pyx_t_7;
  struct tm __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_tm __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_strformat", 0);

  /* "utils.pxd":3208
 *     >>> dt.strftime(fmt)
 *     """
 *     if fmt is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("dt_strformat: 'fmt' cannot be None")
 *     cdef:
*/
  __pyx_t_1 = (__pyx_v_fmt == ((PyObject*)Py_None));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":3209
 *     """
 *     if fmt is None:
 *         raise ValueError("dt_strformat: 'fmt' cannot be None")             # <<<<<<<<<<<<<<
 *     cdef:
 *         list parts = []
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_dt_strformat_fmt_cannot_be_None};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3209, __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_ERR(5, 3209, __pyx_L1_error)

    /* "utils.pxd":3208
 *     >>> dt.strftime(fmt)
 *     """
 *     if fmt is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("dt_strformat: 'fmt' cannot be None")
 *     cdef:
*/
  }

  /* "utils.pxd":3211
 *         raise ValueError("dt_strformat: 'fmt' cannot be None")
 *     cdef:
 *         list parts = []             # <<<<<<<<<<<<<<
 *         Py_ssize_t size = str_len(fmt)
 *         Py_ssize_t i = 0
*/
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_parts = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":3212
 *     cdef:
 *         list parts = []
 *         Py_ssize_t size = str_len(fmt)             # <<<<<<<<<<<<<<
 *         Py_ssize_t i = 0
 *         str frepl = None
*/
  __pyx_v_size = PyUnicode_GET_LENGTH(__pyx_v_fmt);

  /* "utils.pxd":3213
 *         list parts = []
 *         Py_ssize_t size = str_len(fmt)
 *         Py_ssize_t i = 0             # <<<<<<<<<<<<<<
 *         str frepl = None
 *         str zrepl = None
*/
  __pyx_v_i = 0;

  /* "utils.pxd":3214
 *         Py_ssize_t size = str_len(fmt)
 *         Py_ssize_t i = 0
 *         str frepl = None             # <<<<<<<<<<<<<<
 *         str zrepl = None
 *         str Zrepl = None
*/
  __Pyx_INCREF(Py_None);
  __pyx_v_frepl = ((PyObject*)Py_None);

  /* "utils.pxd":3215
 *         Py_ssize_t i = 0
 *         str frepl = None
 *         str zrepl = None             # <<<<<<<<<<<<<<
 *         str Zrepl = None
 *         str s_tmp = None
*/
  __Pyx_INCREF(Py_None);
  __pyx_v_zrepl = ((PyObject*)Py_None);

  /* "utils.pxd":3216
 *         str frepl = None
 *         str zrepl = None
 *         str Zrepl = None             # <<<<<<<<<<<<<<
 *         str s_tmp = None
 *         Py_UCS4 ch
*/
  __Pyx_INCREF(Py_None);
  __pyx_v_Zrepl = ((PyObject*)Py_None);

  /* "utils.pxd":3217
 *         str zrepl = None
 *         str Zrepl = None
 *         str s_tmp = None             # <<<<<<<<<<<<<<
 *         Py_UCS4 ch
 * 
*/
  __Pyx_INCREF(Py_None);
  __pyx_v_s_tmp = ((PyObject*)Py_None);

  /* "utils.pxd":3221
 * 
 *     # Scan once, expand %f/%z/%Z, pass through others
 *     while i < size:             # <<<<<<<<<<<<<<
 *         ch = str_read(fmt, i)
 *         i += 1
*/
  while (1) {
    __pyx_t_1 = (__pyx_v_i < __pyx_v_size);
    if (!__pyx_t_1) break;

    /* "utils.pxd":3222
 *     # Scan once, expand %f/%z/%Z, pass through others
 *     while i < size:
 *         ch = str_read(fmt, i)             # <<<<<<<<<<<<<<
 *         i += 1
 * 
*/
    __pyx_t_5 = PyUnicode_ReadChar(__pyx_v_fmt, __pyx_v_i); if (unlikely(__pyx_t_5 == ((Py_UCS4)-1))) __PYX_ERR(5, 3222, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_5;

    /* "utils.pxd":3223
 *     while i < size:
 *         ch = str_read(fmt, i)
 *         i += 1             # <<<<<<<<<<<<<<
 * 
 *         # Format identifier: '%'
*/
    __pyx_v_i = (__pyx_v_i + 1);

    /* "utils.pxd":3226
 * 
 *         # Format identifier: '%'
 *         if ch == "%":             # <<<<<<<<<<<<<<
 *             if i < size:
 *                 ch = str_read(fmt, i)
*/
    __pyx_t_1 = (__pyx_v_ch == 37);
    if (__pyx_t_1) {

      /* "utils.pxd":3227
 *         # Format identifier: '%'
 *         if ch == "%":
 *             if i < size:             # <<<<<<<<<<<<<<
 *                 ch = str_read(fmt, i)
 *                 i += 1
*/
      __pyx_t_1 = (__pyx_v_i < __pyx_v_size);
      if (__pyx_t_1) {

        /* "utils.pxd":3228
 *         if ch == "%":
 *             if i < size:
 *                 ch = str_read(fmt, i)             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 # . fraction
*/
        __pyx_t_5 = PyUnicode_ReadChar(__pyx_v_fmt, __pyx_v_i); if (unlikely(__pyx_t_5 == ((Py_UCS4)-1))) __PYX_ERR(5, 3228, __pyx_L1_error)
        __pyx_v_ch = __pyx_t_5;

        /* "utils.pxd":3229
 *             if i < size:
 *                 ch = str_read(fmt, i)
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 # . fraction
 *                 if ch == "f":
*/
        __pyx_v_i = (__pyx_v_i + 1);

        /* "utils.pxd":3231
 *                 i += 1
 *                 # . fraction
 *                 if ch == "f":             # <<<<<<<<<<<<<<
 *                     if frepl is None:
 *                         frepl = "%06d" % dt.microsecond
*/
        switch (__pyx_v_ch) {
          case 0x66:

          /* "utils.pxd":3232
 *                 # . fraction
 *                 if ch == "f":
 *                     if frepl is None:             # <<<<<<<<<<<<<<
 *                         frepl = "%06d" % dt.microsecond
 *                     parts.append(frepl)
*/
          __pyx_t_1 = (__pyx_v_frepl == ((PyObject*)Py_None));
          if (__pyx_t_1) {

            /* "utils.pxd":3233
 *                 if ch == "f":
 *                     if frepl is None:
 *                         frepl = "%06d" % dt.microsecond             # <<<<<<<<<<<<<<
 *                     parts.append(frepl)
 *                 # . utc offset
*/
            __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3233, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_3 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_06d, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3233, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF_SET(__pyx_v_frepl, ((PyObject*)__pyx_t_3));
            __pyx_t_3 = 0;

            /* "utils.pxd":3232
 *                 # . fraction
 *                 if ch == "f":
 *                     if frepl is None:             # <<<<<<<<<<<<<<
 *                         frepl = "%06d" % dt.microsecond
 *                     parts.append(frepl)
*/
          }

          /* "utils.pxd":3234
 *                     if frepl is None:
 *                         frepl = "%06d" % dt.microsecond
 *                     parts.append(frepl)             # <<<<<<<<<<<<<<
 *                 # . utc offset
 *                 elif ch == "z":
*/
          __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_v_frepl); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(5, 3234, __pyx_L1_error)

          /* "utils.pxd":3231
 *                 i += 1
 *                 # . fraction
 *                 if ch == "f":             # <<<<<<<<<<<<<<
 *                     if frepl is None:
 *                         frepl = "%06d" % dt.microsecond
*/
          break;
          case 0x7A:

          /* "utils.pxd":3237
 *                 # . utc offset
 *                 elif ch == "z":
 *                     if zrepl is None:             # <<<<<<<<<<<<<<
 *                         s_tmp = tz_utcformat(dt.tzinfo, dt)
 *                         zrepl = "" if s_tmp is None else s_tmp
*/
          __pyx_t_1 = (__pyx_v_zrepl == ((PyObject*)Py_None));
          if (__pyx_t_1) {

            /* "utils.pxd":3238
 *                 elif ch == "z":
 *                     if zrepl is None:
 *                         s_tmp = tz_utcformat(dt.tzinfo, dt)             # <<<<<<<<<<<<<<
 *                         zrepl = "" if s_tmp is None else s_tmp
 *                     parts.append(zrepl)
*/
            __pyx_t_3 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3238, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_7.__pyx_n = 1;
            __pyx_t_7.dt = __pyx_v_dt;
            __pyx_t_2 = __pyx_f_7cytimes_5utils_tz_utcformat(__pyx_t_3, &__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3238, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF_SET(__pyx_v_s_tmp, ((PyObject*)__pyx_t_2));
            __pyx_t_2 = 0;

            /* "utils.pxd":3239
 *                     if zrepl is None:
 *                         s_tmp = tz_utcformat(dt.tzinfo, dt)
 *                         zrepl = "" if s_tmp is None else s_tmp             # <<<<<<<<<<<<<<
 *                     parts.append(zrepl)
 *                 # . timezone name
*/
            __pyx_t_1 = (__pyx_v_s_tmp == ((PyObject*)Py_None));
            if (__pyx_t_1) {
              __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__5);
              __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u__5;
            } else {
              __Pyx_INCREF(__pyx_v_s_tmp);
              __pyx_t_2 = __pyx_v_s_tmp;
            }
            __Pyx_DECREF_SET(__pyx_v_zrepl, ((PyObject*)__pyx_t_2));
            __pyx_t_2 = 0;

            /* "utils.pxd":3237
 *                 # . utc offset
 *                 elif ch == "z":
 *                     if zrepl is None:             # <<<<<<<<<<<<<<
 *                         s_tmp = tz_utcformat(dt.tzinfo, dt)
 *                         zrepl = "" if s_tmp is None else s_tmp
*/
          }

          /* "utils.pxd":3240
 *                         s_tmp = tz_utcformat(dt.tzinfo, dt)
 *                         zrepl = "" if s_tmp is None else s_tmp
 *                     parts.append(zrepl)             # <<<<<<<<<<<<<<
 *                 # . timezone name
 *                 elif ch == "Z":
*/
          __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_v_zrepl); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(5, 3240, __pyx_L1_error)

          /* "utils.pxd":3236
 *                     parts.append(frepl)
 *                 # . utc offset
 *                 elif ch == "z":             # <<<<<<<<<<<<<<
 *                     if zrepl is None:
 *                         s_tmp = tz_utcformat(dt.tzinfo, dt)
*/
          break;
          case 90:

          /* "utils.pxd":3243
 *                 # . timezone name
 *                 elif ch == "Z":
 *                     if Zrepl is None:             # <<<<<<<<<<<<<<
 *                         s_tmp = dt_tzname(dt)
 *                         Zrepl = "" if s_tmp is None else s_tmp
*/
          __pyx_t_1 = (__pyx_v_Zrepl == ((PyObject*)Py_None));
          if (__pyx_t_1) {

            /* "utils.pxd":3244
 *                 elif ch == "Z":
 *                     if Zrepl is None:
 *                         s_tmp = dt_tzname(dt)             # <<<<<<<<<<<<<<
 *                         Zrepl = "" if s_tmp is None else s_tmp
 *                     parts.append(Zrepl)
*/
            __pyx_t_2 = __pyx_f_7cytimes_5utils_dt_tzname(__pyx_v_dt); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3244, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF_SET(__pyx_v_s_tmp, ((PyObject*)__pyx_t_2));
            __pyx_t_2 = 0;

            /* "utils.pxd":3245
 *                     if Zrepl is None:
 *                         s_tmp = dt_tzname(dt)
 *                         Zrepl = "" if s_tmp is None else s_tmp             # <<<<<<<<<<<<<<
 *                     parts.append(Zrepl)
 *                 # . Pass through unknown/regular specifiers and %%
*/
            __pyx_t_1 = (__pyx_v_s_tmp == ((PyObject*)Py_None));
            if (__pyx_t_1) {
              __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__5);
              __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u__5;
            } else {
              __Pyx_INCREF(__pyx_v_s_tmp);
              __pyx_t_2 = __pyx_v_s_tmp;
            }
            __Pyx_DECREF_SET(__pyx_v_Zrepl, ((PyObject*)__pyx_t_2));
            __pyx_t_2 = 0;

            /* "utils.pxd":3243
 *                 # . timezone name
 *                 elif ch == "Z":
 *                     if Zrepl is None:             # <<<<<<<<<<<<<<
 *                         s_tmp = dt_tzname(dt)
 *                         Zrepl = "" if s_tmp is None else s_tmp
*/
          }

          /* "utils.pxd":3246
 *                         s_tmp = dt_tzname(dt)
 *                         Zrepl = "" if s_tmp is None else s_tmp
 *                     parts.append(Zrepl)             # <<<<<<<<<<<<<<
 *                 # . Pass through unknown/regular specifiers and %%
 *                 else:
*/
          __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_v_Zrepl); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(5, 3246, __pyx_L1_error)

          /* "utils.pxd":3242
 *                     parts.append(zrepl)
 *                 # . timezone name
 *                 elif ch == "Z":             # <<<<<<<<<<<<<<
 *                     if Zrepl is None:
 *                         s_tmp = dt_tzname(dt)
*/
          break;
          default:

          /* "utils.pxd":3249
 *                 # . Pass through unknown/regular specifiers and %%
 *                 else:
 *                     parts.append("%")             # <<<<<<<<<<<<<<
 *                     parts.append(str_chr(ch))
 * 
*/
          __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_mstate_global->__pyx_kp_u__6); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(5, 3249, __pyx_L1_error)

          /* "utils.pxd":3250
 *                 else:
 *                     parts.append("%")
 *                     parts.append(str_chr(ch))             # <<<<<<<<<<<<<<
 * 
 *             else:
*/
          __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3250, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(5, 3250, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          break;
        }

        /* "utils.pxd":3227
 *         # Format identifier: '%'
 *         if ch == "%":
 *             if i < size:             # <<<<<<<<<<<<<<
 *                 ch = str_read(fmt, i)
 *                 i += 1
*/
        goto __pyx_L7;
      }

      /* "utils.pxd":3254
 *             else:
 *                 # Trailing '%': treat as literal '%'
 *                 parts.append("%")             # <<<<<<<<<<<<<<
 * 
 *         # Normal character
*/
      /*else*/ {
        __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_mstate_global->__pyx_kp_u__6); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(5, 3254, __pyx_L1_error)
      }
      __pyx_L7:;

      /* "utils.pxd":3226
 * 
 *         # Format identifier: '%'
 *         if ch == "%":             # <<<<<<<<<<<<<<
 *             if i < size:
 *                 ch = str_read(fmt, i)
*/
      goto __pyx_L6;
    }

    /* "utils.pxd":3258
 *         # Normal character
 *         else:
 *             parts.append(str_chr(ch))             # <<<<<<<<<<<<<<
 * 
 *     # Format to string
*/
    /*else*/ {
      __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3258, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(5, 3258, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_L6:;
  }

  /* "utils.pxd":3261
 * 
 *     # Format to string
 *     return tm_strformat(dt_to_tm(dt, False), "".join(parts))             # <<<<<<<<<<<<<<
 * 
 * cdef inline str dt_isoformat(datetime.datetime dt, str sep="T", bint utc=False):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.utc = 0;
  __pyx_t_8 = __pyx_f_7cytimes_5utils_dt_to_tm(__pyx_v_dt, &__pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 3261, __pyx_L1_error)
  __pyx_t_2 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__5, __pyx_v_parts); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_7cytimes_5utils_tm_strformat(__pyx_t_8, ((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3198
 *     return max(u1, u2) if dt.fold == 0 else min(u1, u2)
 * 
 * cdef inline str dt_strformat(datetime.datetime dt, str fmt):             # <<<<<<<<<<<<<<
 *     """Format a `datetime.datetime` with a strftime-style format `<'str'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt_strformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_parts);
  __Pyx_XDECREF(__pyx_v_frepl);
  __Pyx_XDECREF(__pyx_v_zrepl);
  __Pyx_XDECREF(__pyx_v_Zrepl);
  __Pyx_XDECREF(__pyx_v_s_tmp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3263
 *     return tm_strformat(dt_to_tm(dt, False), "".join(parts))
 * 
 * cdef inline str dt_isoformat(datetime.datetime dt, str sep="T", bint utc=False):             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to ISO string `<'str'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_dt_isoformat(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_dt_isoformat *__pyx_optional_args) {
  PyObject *__pyx_v_sep = ((PyObject*)__pyx_mstate_global->__pyx_n_u_T);
  int __pyx_v_utc = ((int)0);
  int __pyx_v_us;
  PyObject *__pyx_v_s_utc = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_tz_utcformat __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11[11];
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13[12];
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15[13];
  PyObject *__pyx_t_16[14];
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_isoformat", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_sep = __pyx_optional_args->sep;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_utc = __pyx_optional_args->utc;
      }
    }
  }

  /* "utils.pxd":3275
 *     :returns `<'str'>`: Formatted text.
 *     """
 *     if sep is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("dt_isoformat: 'sep' cannot be None.")
 *     cdef:
*/
  __pyx_t_1 = (__pyx_v_sep == ((PyObject*)Py_None));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":3276
 *     """
 *     if sep is None:
 *         raise ValueError("dt_isoformat: 'sep' cannot be None.")             # <<<<<<<<<<<<<<
 *     cdef:
 *         int us = dt.microsecond
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_dt_isoformat_sep_cannot_be_None};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3276, __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_ERR(5, 3276, __pyx_L1_error)

    /* "utils.pxd":3275
 *     :returns `<'str'>`: Formatted text.
 *     """
 *     if sep is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("dt_isoformat: 'sep' cannot be None.")
 *     cdef:
*/
  }

  /* "utils.pxd":3278
 *         raise ValueError("dt_isoformat: 'sep' cannot be None.")
 *     cdef:
 *         int us = dt.microsecond             # <<<<<<<<<<<<<<
 *         str s_utc = tz_utcformat(dt.tzinfo, dt) if utc else None
 * 
*/
  __pyx_v_us = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt);

  /* "utils.pxd":3279
 *     cdef:
 *         int us = dt.microsecond
 *         str s_utc = tz_utcformat(dt.tzinfo, dt) if utc else None             # <<<<<<<<<<<<<<
 * 
 *     if us == 0:
*/
  if (__pyx_v_utc) {
    __pyx_t_3 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.dt = __pyx_v_dt;
    __pyx_t_5 = __pyx_f_7cytimes_5utils_tz_utcformat(__pyx_t_3, &__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 3279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __pyx_t_5;
    __pyx_t_5 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_2 = Py_None;
  }
  if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(5, 3279, __pyx_L1_error)
  __pyx_v_s_utc = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":3281
 *         str s_utc = tz_utcformat(dt.tzinfo, dt) if utc else None
 * 
 *     if us == 0:             # <<<<<<<<<<<<<<
 *         if s_utc is None:
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d" % (
*/
  __pyx_t_1 = (__pyx_v_us == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":3282
 * 
 *     if us == 0:
 *         if s_utc is None:             # <<<<<<<<<<<<<<
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d" % (
 *                 dt.year, dt.month, dt.day, sep,
*/
    __pyx_t_1 = (__pyx_v_s_utc == ((PyObject*)Py_None));
    if (__pyx_t_1) {

      /* "utils.pxd":3283
 *     if us == 0:
 *         if s_utc is None:
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d" % (             # <<<<<<<<<<<<<<
 *                 dt.year, dt.month, dt.day, sep,
 *                 dt.hour, dt.minute, dt.second,
*/
      __Pyx_XDECREF(__pyx_r);

      /* "utils.pxd":3284
 *         if s_utc is None:
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d" % (
 *                 dt.year, dt.month, dt.day, sep,             # <<<<<<<<<<<<<<
 *                 dt.hour, dt.minute, dt.second,
 *             )
*/
      __pyx_t_2 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt), 4, '0', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3284, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 3284, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3284, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyUnicode_Unicode(__pyx_v_sep); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 3284, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);

      /* "utils.pxd":3285
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d" % (
 *                 dt.year, dt.month, dt.day, sep,
 *                 dt.hour, dt.minute, dt.second,             # <<<<<<<<<<<<<<
 *             )
 *         return "%04d-%02d-%02d%s%02d:%02d:%02d%s" % (
*/
      __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 3285, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 3285, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 3285, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11[0] = __pyx_t_2;
      __pyx_t_11[1] = __pyx_mstate_global->__pyx_kp_u__4;
      __pyx_t_11[2] = __pyx_t_5;
      __pyx_t_11[3] = __pyx_mstate_global->__pyx_kp_u__4;
      __pyx_t_11[4] = __pyx_t_3;
      __pyx_t_11[5] = __pyx_t_7;
      __pyx_t_11[6] = __pyx_t_8;
      __pyx_t_11[7] = __pyx_mstate_global->__pyx_kp_u__7;
      __pyx_t_11[8] = __pyx_t_9;
      __pyx_t_11[9] = __pyx_mstate_global->__pyx_kp_u__7;
      __pyx_t_11[10] = __pyx_t_10;

      /* "utils.pxd":3283
 *     if us == 0:
 *         if s_utc is None:
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d" % (             # <<<<<<<<<<<<<<
 *                 dt.year, dt.month, dt.day, sep,
 *                 dt.hour, dt.minute, dt.second,
*/
      __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_11, 11, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 1 * 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
      if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 3283, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __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;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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_r = ((PyObject*)__pyx_t_12);
      __pyx_t_12 = 0;
      goto __pyx_L0;

      /* "utils.pxd":3282
 * 
 *     if us == 0:
 *         if s_utc is None:             # <<<<<<<<<<<<<<
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d" % (
 *                 dt.year, dt.month, dt.day, sep,
*/
    }

    /* "utils.pxd":3287
 *                 dt.hour, dt.minute, dt.second,
 *             )
 *         return "%04d-%02d-%02d%s%02d:%02d:%02d%s" % (             # <<<<<<<<<<<<<<
 *             dt.year, dt.month, dt.day, sep,
 *             dt.hour, dt.minute, dt.second, s_utc,
*/
    __Pyx_XDECREF(__pyx_r);

    /* "utils.pxd":3288
 *             )
 *         return "%04d-%02d-%02d%s%02d:%02d:%02d%s" % (
 *             dt.year, dt.month, dt.day, sep,             # <<<<<<<<<<<<<<
 *             dt.hour, dt.minute, dt.second, s_utc,
 *         )
*/
    __pyx_t_12 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt), 4, '0', 'd'); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 3288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_10 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 3288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 3288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = __Pyx_PyUnicode_Unicode(__pyx_v_sep); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 3288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);

    /* "utils.pxd":3289
 *         return "%04d-%02d-%02d%s%02d:%02d:%02d%s" % (
 *             dt.year, dt.month, dt.day, sep,
 *             dt.hour, dt.minute, dt.second, s_utc,             # <<<<<<<<<<<<<<
 *         )
 *     else:
*/
    __pyx_t_7 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 3289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 3289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyUnicode_Unicode(__pyx_v_s_utc); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_13[0] = __pyx_t_12;
    __pyx_t_13[1] = __pyx_mstate_global->__pyx_kp_u__4;
    __pyx_t_13[2] = __pyx_t_10;
    __pyx_t_13[3] = __pyx_mstate_global->__pyx_kp_u__4;
    __pyx_t_13[4] = __pyx_t_9;
    __pyx_t_13[5] = __pyx_t_8;
    __pyx_t_13[6] = __pyx_t_7;
    __pyx_t_13[7] = __pyx_mstate_global->__pyx_kp_u__7;
    __pyx_t_13[8] = __pyx_t_3;
    __pyx_t_13[9] = __pyx_mstate_global->__pyx_kp_u__7;
    __pyx_t_13[10] = __pyx_t_5;
    __pyx_t_13[11] = __pyx_t_2;

    /* "utils.pxd":3287
 *                 dt.hour, dt.minute, dt.second,
 *             )
 *         return "%04d-%02d-%02d%s%02d:%02d:%02d%s" % (             # <<<<<<<<<<<<<<
 *             dt.year, dt.month, dt.day, sep,
 *             dt.hour, dt.minute, dt.second, s_utc,
*/
    __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_13, 12, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 1 * 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2));
    if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 3287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = ((PyObject*)__pyx_t_14);
    __pyx_t_14 = 0;
    goto __pyx_L0;

    /* "utils.pxd":3281
 *         str s_utc = tz_utcformat(dt.tzinfo, dt) if utc else None
 * 
 *     if us == 0:             # <<<<<<<<<<<<<<
 *         if s_utc is None:
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d" % (
*/
  }

  /* "utils.pxd":3292
 *         )
 *     else:
 *         if s_utc is None:             # <<<<<<<<<<<<<<
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d.%06d" % (
 *                 dt.year, dt.month, dt.day, sep,
*/
  /*else*/ {
    __pyx_t_1 = (__pyx_v_s_utc == ((PyObject*)Py_None));
    if (__pyx_t_1) {

      /* "utils.pxd":3293
 *     else:
 *         if s_utc is None:
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d.%06d" % (             # <<<<<<<<<<<<<<
 *                 dt.year, dt.month, dt.day, sep,
 *                 dt.hour, dt.minute, dt.second, us,
*/
      __Pyx_XDECREF(__pyx_r);

      /* "utils.pxd":3294
 *         if s_utc is None:
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d.%06d" % (
 *                 dt.year, dt.month, dt.day, sep,             # <<<<<<<<<<<<<<
 *                 dt.hour, dt.minute, dt.second, us,
 *             )
*/
      __pyx_t_14 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt), 4, '0', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 3294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_2 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 3294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyUnicode_Unicode(__pyx_v_sep); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

      /* "utils.pxd":3295
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d.%06d" % (
 *                 dt.year, dt.month, dt.day, sep,
 *                 dt.hour, dt.minute, dt.second, us,             # <<<<<<<<<<<<<<
 *             )
 *         return "%04d-%02d-%02d%s%02d:%02d:%02d.%06d%s" % (
*/
      __pyx_t_7 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 3295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 3295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 3295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyUnicode_From_int(__pyx_v_us, 6, '0', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 3295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_15[0] = __pyx_t_14;
      __pyx_t_15[1] = __pyx_mstate_global->__pyx_kp_u__4;
      __pyx_t_15[2] = __pyx_t_2;
      __pyx_t_15[3] = __pyx_mstate_global->__pyx_kp_u__4;
      __pyx_t_15[4] = __pyx_t_5;
      __pyx_t_15[5] = __pyx_t_3;
      __pyx_t_15[6] = __pyx_t_7;
      __pyx_t_15[7] = __pyx_mstate_global->__pyx_kp_u__7;
      __pyx_t_15[8] = __pyx_t_8;
      __pyx_t_15[9] = __pyx_mstate_global->__pyx_kp_u__7;
      __pyx_t_15[10] = __pyx_t_9;
      __pyx_t_15[11] = __pyx_mstate_global->__pyx_kp_u__2;
      __pyx_t_15[12] = __pyx_t_10;

      /* "utils.pxd":3293
 *     else:
 *         if s_utc is None:
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d.%06d" % (             # <<<<<<<<<<<<<<
 *                 dt.year, dt.month, dt.day, sep,
 *                 dt.hour, dt.minute, dt.second, us,
*/
      __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_15, 13, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 1 * 5 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
      if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 3293, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __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;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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_r = ((PyObject*)__pyx_t_12);
      __pyx_t_12 = 0;
      goto __pyx_L0;

      /* "utils.pxd":3292
 *         )
 *     else:
 *         if s_utc is None:             # <<<<<<<<<<<<<<
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d.%06d" % (
 *                 dt.year, dt.month, dt.day, sep,
*/
    }

    /* "utils.pxd":3297
 *                 dt.hour, dt.minute, dt.second, us,
 *             )
 *         return "%04d-%02d-%02d%s%02d:%02d:%02d.%06d%s" % (             # <<<<<<<<<<<<<<
 *             dt.year, dt.month, dt.day, sep,
 *             dt.hour, dt.minute, dt.second, us, s_utc,
*/
    __Pyx_XDECREF(__pyx_r);

    /* "utils.pxd":3298
 *             )
 *         return "%04d-%02d-%02d%s%02d:%02d:%02d.%06d%s" % (
 *             dt.year, dt.month, dt.day, sep,             # <<<<<<<<<<<<<<
 *             dt.hour, dt.minute, dt.second, us, s_utc,
 *         )
*/
    __pyx_t_12 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt), 4, '0', 'd'); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 3298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_10 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 3298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 3298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = __Pyx_PyUnicode_Unicode(__pyx_v_sep); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 3298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);

    /* "utils.pxd":3299
 *         return "%04d-%02d-%02d%s%02d:%02d:%02d.%06d%s" % (
 *             dt.year, dt.month, dt.day, sep,
 *             dt.hour, dt.minute, dt.second, us, s_utc,             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_7 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 3299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 3299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyUnicode_From_int(__pyx_v_us, 6, '0', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_14 = __Pyx_PyUnicode_Unicode(__pyx_v_s_utc); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 3299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_16[0] = __pyx_t_12;
    __pyx_t_16[1] = __pyx_mstate_global->__pyx_kp_u__4;
    __pyx_t_16[2] = __pyx_t_10;
    __pyx_t_16[3] = __pyx_mstate_global->__pyx_kp_u__4;
    __pyx_t_16[4] = __pyx_t_9;
    __pyx_t_16[5] = __pyx_t_8;
    __pyx_t_16[6] = __pyx_t_7;
    __pyx_t_16[7] = __pyx_mstate_global->__pyx_kp_u__7;
    __pyx_t_16[8] = __pyx_t_3;
    __pyx_t_16[9] = __pyx_mstate_global->__pyx_kp_u__7;
    __pyx_t_16[10] = __pyx_t_5;
    __pyx_t_16[11] = __pyx_mstate_global->__pyx_kp_u__2;
    __pyx_t_16[12] = __pyx_t_2;
    __pyx_t_16[13] = __pyx_t_14;

    /* "utils.pxd":3297
 *                 dt.hour, dt.minute, dt.second, us,
 *             )
 *         return "%04d-%02d-%02d%s%02d:%02d:%02d.%06d%s" % (             # <<<<<<<<<<<<<<
 *             dt.year, dt.month, dt.day, sep,
 *             dt.hour, dt.minute, dt.second, us, s_utc,
*/
    __pyx_t_17 = __Pyx_PyUnicode_Join(__pyx_t_16, 14, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 1 * 5 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14));
    if (unlikely(!__pyx_t_17)) __PYX_ERR(5, 3297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_r = ((PyObject*)__pyx_t_17);
    __pyx_t_17 = 0;
    goto __pyx_L0;
  }

  /* "utils.pxd":3263
 *     return tm_strformat(dt_to_tm(dt, False), "".join(parts))
 * 
 * cdef inline str dt_isoformat(datetime.datetime dt, str sep="T", bint utc=False):             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to ISO string `<'str'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("cytimes.utils.dt_isoformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s_utc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3302
 *         )
 * 
 * cdef inline tm dt_to_tm(datetime.datetime dt, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to 'struct:tm' `<'struct:tm'>`.
 * 
*/

static CYTHON_INLINE struct tm __pyx_f_7cytimes_5utils_dt_to_tm(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_dt_to_tm *__pyx_optional_args) {
  int __pyx_v_utc = ((int)0);
  int __pyx_v_yy;
  int __pyx_v_mm;
  int __pyx_v_dd;
  int __pyx_v_hh;
  int __pyx_v_mi;
  int __pyx_v_ss;
  PyObject *__pyx_v_tzinfo = 0;
  int __pyx_v_isdst;
  PyDateTime_Delta *__pyx_v_off = 0;
  struct tm __pyx_v_out;
  struct tm __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_dt_add __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_tz_dst __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_to_tm", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_utc = __pyx_optional_args->utc;
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_dt);

  /* "utils.pxd":3329
 *     """
 *     cdef:
 *         int yy = dt.year             # <<<<<<<<<<<<<<
 *         int mm = dt.month
 *         int dd = dt.day
*/
  __pyx_v_yy = __pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt);

  /* "utils.pxd":3330
 *     cdef:
 *         int yy = dt.year
 *         int mm = dt.month             # <<<<<<<<<<<<<<
 *         int dd = dt.day
 *         int hh = dt.hour
*/
  __pyx_v_mm = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);

  /* "utils.pxd":3331
 *         int yy = dt.year
 *         int mm = dt.month
 *         int dd = dt.day             # <<<<<<<<<<<<<<
 *         int hh = dt.hour
 *         int mi = dt.minute
*/
  __pyx_v_dd = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt);

  /* "utils.pxd":3332
 *         int mm = dt.month
 *         int dd = dt.day
 *         int hh = dt.hour             # <<<<<<<<<<<<<<
 *         int mi = dt.minute
 *         int ss = dt.second
*/
  __pyx_v_hh = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);

  /* "utils.pxd":3333
 *         int dd = dt.day
 *         int hh = dt.hour
 *         int mi = dt.minute             # <<<<<<<<<<<<<<
 *         int ss = dt.second
 *         object tzinfo = dt.tzinfo
*/
  __pyx_v_mi = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);

  /* "utils.pxd":3334
 *         int hh = dt.hour
 *         int mi = dt.minute
 *         int ss = dt.second             # <<<<<<<<<<<<<<
 *         object tzinfo = dt.tzinfo
 *         int isdst
*/
  __pyx_v_ss = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);

  /* "utils.pxd":3335
 *         int mi = dt.minute
 *         int ss = dt.second
 *         object tzinfo = dt.tzinfo             # <<<<<<<<<<<<<<
 *         int isdst
 *         datetime.timedelta off
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_tzinfo = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "utils.pxd":3341
 * 
 *     # Naive: utc=True -> treat as UTC
 *     if tzinfo is None:             # <<<<<<<<<<<<<<
 *         isdst = 0 if utc else -1
 * 
*/
  __pyx_t_2 = (__pyx_v_tzinfo == Py_None);
  if (__pyx_t_2) {

    /* "utils.pxd":3342
 *     # Naive: utc=True -> treat as UTC
 *     if tzinfo is None:
 *         isdst = 0 if utc else -1             # <<<<<<<<<<<<<<
 * 
 *     # Aware -> UTC: subtract utcoffset
*/
    if (__pyx_v_utc) {
      __pyx_t_3 = 0;
    } else {
      __pyx_t_3 = -1;
    }
    __pyx_v_isdst = __pyx_t_3;

    /* "utils.pxd":3341
 * 
 *     # Naive: utc=True -> treat as UTC
 *     if tzinfo is None:             # <<<<<<<<<<<<<<
 *         isdst = 0 if utc else -1
 * 
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":3345
 * 
 *     # Aware -> UTC: subtract utcoffset
 *     elif utc:             # <<<<<<<<<<<<<<
 *         off = tz_utcoffset(tzinfo, dt)
 *         if off is not None:
*/
  if (__pyx_v_utc) {

    /* "utils.pxd":3346
 *     # Aware -> UTC: subtract utcoffset
 *     elif utc:
 *         off = tz_utcoffset(tzinfo, dt)             # <<<<<<<<<<<<<<
 *         if off is not None:
 *             dt = dt_add(dt, -off.day, -off.second, -off.microsecond, None)
*/
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.dt = __pyx_v_dt;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_utcoffset(__pyx_v_tzinfo, &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_off = ((PyDateTime_Delta *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "utils.pxd":3347
 *     elif utc:
 *         off = tz_utcoffset(tzinfo, dt)
 *         if off is not None:             # <<<<<<<<<<<<<<
 *             dt = dt_add(dt, -off.day, -off.second, -off.microsecond, None)
 *             yy, mm, dd = dt.year, dt.month, dt.day
*/
    __pyx_t_2 = (((PyObject *)__pyx_v_off) != Py_None);
    if (__pyx_t_2) {

      /* "utils.pxd":3348
 *         off = tz_utcoffset(tzinfo, dt)
 *         if off is not None:
 *             dt = dt_add(dt, -off.day, -off.second, -off.microsecond, None)             # <<<<<<<<<<<<<<
 *             yy, mm, dd = dt.year, dt.month, dt.day
 *             hh, mi, ss = dt.hour, dt.minute, dt.second
*/
      __pyx_t_5.__pyx_n = 4;
      __pyx_t_5.days = (-__pyx_f_7cpython_8datetime_9timedelta_3day_day(__pyx_v_off));
      __pyx_t_5.seconds = (-__pyx_f_7cpython_8datetime_9timedelta_6second_second(__pyx_v_off));
      __pyx_t_5.microseconds = (-__pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(__pyx_v_off));
      __pyx_t_5.dtclass = Py_None;
      __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_add(__pyx_v_dt, &__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3348, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "utils.pxd":3349
 *         if off is not None:
 *             dt = dt_add(dt, -off.day, -off.second, -off.microsecond, None)
 *             yy, mm, dd = dt.year, dt.month, dt.day             # <<<<<<<<<<<<<<
 *             hh, mi, ss = dt.hour, dt.minute, dt.second
 *         isdst = 0
*/
      __pyx_t_3 = __pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt);
      __pyx_t_6 = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);
      __pyx_t_7 = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt);
      __pyx_v_yy = __pyx_t_3;
      __pyx_v_mm = __pyx_t_6;
      __pyx_v_dd = __pyx_t_7;

      /* "utils.pxd":3350
 *             dt = dt_add(dt, -off.day, -off.second, -off.microsecond, None)
 *             yy, mm, dd = dt.year, dt.month, dt.day
 *             hh, mi, ss = dt.hour, dt.minute, dt.second             # <<<<<<<<<<<<<<
 *         isdst = 0
 * 
*/
      __pyx_t_7 = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);
      __pyx_t_6 = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);
      __pyx_t_3 = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);
      __pyx_v_hh = __pyx_t_7;
      __pyx_v_mi = __pyx_t_6;
      __pyx_v_ss = __pyx_t_3;

      /* "utils.pxd":3347
 *     elif utc:
 *         off = tz_utcoffset(tzinfo, dt)
 *         if off is not None:             # <<<<<<<<<<<<<<
 *             dt = dt_add(dt, -off.day, -off.second, -off.microsecond, None)
 *             yy, mm, dd = dt.year, dt.month, dt.day
*/
    }

    /* "utils.pxd":3351
 *             yy, mm, dd = dt.year, dt.month, dt.day
 *             hh, mi, ss = dt.hour, dt.minute, dt.second
 *         isdst = 0             # <<<<<<<<<<<<<<
 * 
 *     # Aware, local wall time: set DST flag from tzinfo.dst(dt)
*/
    __pyx_v_isdst = 0;

    /* "utils.pxd":3345
 * 
 *     # Aware -> UTC: subtract utcoffset
 *     elif utc:             # <<<<<<<<<<<<<<
 *         off = tz_utcoffset(tzinfo, dt)
 *         if off is not None:
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":3355
 *     # Aware, local wall time: set DST flag from tzinfo.dst(dt)
 *     else:
 *         off = tz_dst(tzinfo, dt)             # <<<<<<<<<<<<<<
 *         if off is not None:
 *             isdst = 1 if td_to_us(off) else 0
*/
  /*else*/ {
    __pyx_t_8.__pyx_n = 1;
    __pyx_t_8.dt = __pyx_v_dt;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_dst(__pyx_v_tzinfo, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_off = ((PyDateTime_Delta *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "utils.pxd":3356
 *     else:
 *         off = tz_dst(tzinfo, dt)
 *         if off is not None:             # <<<<<<<<<<<<<<
 *             isdst = 1 if td_to_us(off) else 0
 *         else:
*/
    __pyx_t_2 = (((PyObject *)__pyx_v_off) != Py_None);
    if (__pyx_t_2) {

      /* "utils.pxd":3357
 *         off = tz_dst(tzinfo, dt)
 *         if off is not None:
 *             isdst = 1 if td_to_us(off) else 0             # <<<<<<<<<<<<<<
 *         else:
 *             isdst = -1
*/
      __pyx_t_2 = (__pyx_f_7cytimes_5utils_td_to_us(__pyx_v_off) != 0);
      if (__pyx_t_2) {
        __pyx_t_3 = 1;
      } else {
        __pyx_t_3 = 0;
      }
      __pyx_v_isdst = __pyx_t_3;

      /* "utils.pxd":3356
 *     else:
 *         off = tz_dst(tzinfo, dt)
 *         if off is not None:             # <<<<<<<<<<<<<<
 *             isdst = 1 if td_to_us(off) else 0
 *         else:
*/
      goto __pyx_L5;
    }

    /* "utils.pxd":3359
 *             isdst = 1 if td_to_us(off) else 0
 *         else:
 *             isdst = -1             # <<<<<<<<<<<<<<
 * 
 *     out.tm_sec, out.tm_min, out.tm_hour = ss, mi, hh
*/
    /*else*/ {
      __pyx_v_isdst = -1;
    }
    __pyx_L5:;
  }
  __pyx_L3:;

  /* "utils.pxd":3361
 *             isdst = -1
 * 
 *     out.tm_sec, out.tm_min, out.tm_hour = ss, mi, hh             # <<<<<<<<<<<<<<
 *     out.tm_mday, out.tm_mon, out.tm_year = dd, mm, yy
 *     out.tm_wday = ymd_weekday(yy, mm, dd)
*/
  __pyx_t_3 = __pyx_v_ss;
  __pyx_t_6 = __pyx_v_mi;
  __pyx_t_7 = __pyx_v_hh;
  __pyx_v_out.tm_sec = __pyx_t_3;
  __pyx_v_out.tm_min = __pyx_t_6;
  __pyx_v_out.tm_hour = __pyx_t_7;

  /* "utils.pxd":3362
 * 
 *     out.tm_sec, out.tm_min, out.tm_hour = ss, mi, hh
 *     out.tm_mday, out.tm_mon, out.tm_year = dd, mm, yy             # <<<<<<<<<<<<<<
 *     out.tm_wday = ymd_weekday(yy, mm, dd)
 *     out.tm_yday = days_bf_month(yy, mm) + dd
*/
  __pyx_t_7 = __pyx_v_dd;
  __pyx_t_6 = __pyx_v_mm;
  __pyx_t_3 = __pyx_v_yy;
  __pyx_v_out.tm_mday = __pyx_t_7;
  __pyx_v_out.tm_mon = __pyx_t_6;
  __pyx_v_out.tm_year = __pyx_t_3;

  /* "utils.pxd":3363
 *     out.tm_sec, out.tm_min, out.tm_hour = ss, mi, hh
 *     out.tm_mday, out.tm_mon, out.tm_year = dd, mm, yy
 *     out.tm_wday = ymd_weekday(yy, mm, dd)             # <<<<<<<<<<<<<<
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = isdst
*/
  __pyx_v_out.tm_wday = __pyx_f_7cytimes_5utils_ymd_weekday(__pyx_v_yy, __pyx_v_mm, __pyx_v_dd);

  /* "utils.pxd":3364
 *     out.tm_mday, out.tm_mon, out.tm_year = dd, mm, yy
 *     out.tm_wday = ymd_weekday(yy, mm, dd)
 *     out.tm_yday = days_bf_month(yy, mm) + dd             # <<<<<<<<<<<<<<
 *     out.tm_isdst = isdst
 *     return out
*/
  __pyx_v_out.tm_yday = (__pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_yy, __pyx_v_mm) + __pyx_v_dd);

  /* "utils.pxd":3365
 *     out.tm_wday = ymd_weekday(yy, mm, dd)
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = isdst             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
  __pyx_v_out.tm_isdst = __pyx_v_isdst;

  /* "utils.pxd":3366
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = isdst
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline str dt_to_ctime(datetime.datetime dt):
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":3302
 *         )
 * 
 * cdef inline tm dt_to_tm(datetime.datetime dt, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to 'struct:tm' `<'struct:tm'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt_to_tm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tzinfo);
  __Pyx_XDECREF((PyObject *)__pyx_v_off);
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3368
 *     return out
 * 
 * cdef inline str dt_to_ctime(datetime.datetime dt):             # <<<<<<<<<<<<<<
 *     """Convert a datetime to a C `ctime-style` string `<'str'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_dt_to_ctime(PyDateTime_DateTime *__pyx_v_dt) {
  int __pyx_v_yy;
  int __pyx_v_mm;
  int __pyx_v_dd;
  int __pyx_v_hh;
  int __pyx_v_mi;
  int __pyx_v_ss;
  int __pyx_v_wkd;
  PyObject *__pyx_v_s_wkd = 0;
  PyObject *__pyx_v_s_mm = 0;
  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[13];
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_to_ctime", 0);

  /* "utils.pxd":3379
 *     """
 *     cdef:
 *         int yy = dt.year             # <<<<<<<<<<<<<<
 *         int mm = dt.month
 *         int dd = dt.day
*/
  __pyx_v_yy = __pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt);

  /* "utils.pxd":3380
 *     cdef:
 *         int yy = dt.year
 *         int mm = dt.month             # <<<<<<<<<<<<<<
 *         int dd = dt.day
 *         int hh = dt.hour
*/
  __pyx_v_mm = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);

  /* "utils.pxd":3381
 *         int yy = dt.year
 *         int mm = dt.month
 *         int dd = dt.day             # <<<<<<<<<<<<<<
 *         int hh = dt.hour
 *         int mi = dt.minute
*/
  __pyx_v_dd = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt);

  /* "utils.pxd":3382
 *         int mm = dt.month
 *         int dd = dt.day
 *         int hh = dt.hour             # <<<<<<<<<<<<<<
 *         int mi = dt.minute
 *         int ss = dt.second
*/
  __pyx_v_hh = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);

  /* "utils.pxd":3383
 *         int dd = dt.day
 *         int hh = dt.hour
 *         int mi = dt.minute             # <<<<<<<<<<<<<<
 *         int ss = dt.second
 *         int wkd = ymd_weekday(yy, mm, dd)
*/
  __pyx_v_mi = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);

  /* "utils.pxd":3384
 *         int hh = dt.hour
 *         int mi = dt.minute
 *         int ss = dt.second             # <<<<<<<<<<<<<<
 *         int wkd = ymd_weekday(yy, mm, dd)
 *         str s_wkd, s_mm
*/
  __pyx_v_ss = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);

  /* "utils.pxd":3385
 *         int mi = dt.minute
 *         int ss = dt.second
 *         int wkd = ymd_weekday(yy, mm, dd)             # <<<<<<<<<<<<<<
 *         str s_wkd, s_mm
 * 
*/
  __pyx_v_wkd = __pyx_f_7cytimes_5utils_ymd_weekday(__pyx_v_yy, __pyx_v_mm, __pyx_v_dd);

  /* "utils.pxd":3389
 * 
 *     # Weekday
 *     if wkd == 0:             # <<<<<<<<<<<<<<
 *         s_wkd = "Mon"
 *     elif wkd == 1:
*/
  switch (__pyx_v_wkd) {
    case 0:

    /* "utils.pxd":3390
 *     # Weekday
 *     if wkd == 0:
 *         s_wkd = "Mon"             # <<<<<<<<<<<<<<
 *     elif wkd == 1:
 *         s_wkd = "Tue"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Mon);
    __pyx_v_s_wkd = __pyx_mstate_global->__pyx_n_u_Mon;

    /* "utils.pxd":3389
 * 
 *     # Weekday
 *     if wkd == 0:             # <<<<<<<<<<<<<<
 *         s_wkd = "Mon"
 *     elif wkd == 1:
*/
    break;
    case 1:

    /* "utils.pxd":3392
 *         s_wkd = "Mon"
 *     elif wkd == 1:
 *         s_wkd = "Tue"             # <<<<<<<<<<<<<<
 *     elif wkd == 2:
 *         s_wkd = "Wed"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Tue);
    __pyx_v_s_wkd = __pyx_mstate_global->__pyx_n_u_Tue;

    /* "utils.pxd":3391
 *     if wkd == 0:
 *         s_wkd = "Mon"
 *     elif wkd == 1:             # <<<<<<<<<<<<<<
 *         s_wkd = "Tue"
 *     elif wkd == 2:
*/
    break;
    case 2:

    /* "utils.pxd":3394
 *         s_wkd = "Tue"
 *     elif wkd == 2:
 *         s_wkd = "Wed"             # <<<<<<<<<<<<<<
 *     elif wkd == 3:
 *         s_wkd = "Thu"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Wed);
    __pyx_v_s_wkd = __pyx_mstate_global->__pyx_n_u_Wed;

    /* "utils.pxd":3393
 *     elif wkd == 1:
 *         s_wkd = "Tue"
 *     elif wkd == 2:             # <<<<<<<<<<<<<<
 *         s_wkd = "Wed"
 *     elif wkd == 3:
*/
    break;
    case 3:

    /* "utils.pxd":3396
 *         s_wkd = "Wed"
 *     elif wkd == 3:
 *         s_wkd = "Thu"             # <<<<<<<<<<<<<<
 *     elif wkd == 4:
 *         s_wkd = "Fri"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Thu);
    __pyx_v_s_wkd = __pyx_mstate_global->__pyx_n_u_Thu;

    /* "utils.pxd":3395
 *     elif wkd == 2:
 *         s_wkd = "Wed"
 *     elif wkd == 3:             # <<<<<<<<<<<<<<
 *         s_wkd = "Thu"
 *     elif wkd == 4:
*/
    break;
    case 4:

    /* "utils.pxd":3398
 *         s_wkd = "Thu"
 *     elif wkd == 4:
 *         s_wkd = "Fri"             # <<<<<<<<<<<<<<
 *     elif wkd == 5:
 *         s_wkd = "Sat"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Fri);
    __pyx_v_s_wkd = __pyx_mstate_global->__pyx_n_u_Fri;

    /* "utils.pxd":3397
 *     elif wkd == 3:
 *         s_wkd = "Thu"
 *     elif wkd == 4:             # <<<<<<<<<<<<<<
 *         s_wkd = "Fri"
 *     elif wkd == 5:
*/
    break;
    case 5:

    /* "utils.pxd":3400
 *         s_wkd = "Fri"
 *     elif wkd == 5:
 *         s_wkd = "Sat"             # <<<<<<<<<<<<<<
 *     else:
 *         s_wkd = "Sun"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Sat);
    __pyx_v_s_wkd = __pyx_mstate_global->__pyx_n_u_Sat;

    /* "utils.pxd":3399
 *     elif wkd == 4:
 *         s_wkd = "Fri"
 *     elif wkd == 5:             # <<<<<<<<<<<<<<
 *         s_wkd = "Sat"
 *     else:
*/
    break;
    default:

    /* "utils.pxd":3402
 *         s_wkd = "Sat"
 *     else:
 *         s_wkd = "Sun"             # <<<<<<<<<<<<<<
 * 
 *     # Month
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Sun);
    __pyx_v_s_wkd = __pyx_mstate_global->__pyx_n_u_Sun;
    break;
  }

  /* "utils.pxd":3405
 * 
 *     # Month
 *     if mm == 1:             # <<<<<<<<<<<<<<
 *         s_mm = "Jan"
 *     elif mm == 2:
*/
  switch (__pyx_v_mm) {
    case 1:

    /* "utils.pxd":3406
 *     # Month
 *     if mm == 1:
 *         s_mm = "Jan"             # <<<<<<<<<<<<<<
 *     elif mm == 2:
 *         s_mm = "Feb"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Jan);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_Jan;

    /* "utils.pxd":3405
 * 
 *     # Month
 *     if mm == 1:             # <<<<<<<<<<<<<<
 *         s_mm = "Jan"
 *     elif mm == 2:
*/
    break;
    case 2:

    /* "utils.pxd":3408
 *         s_mm = "Jan"
 *     elif mm == 2:
 *         s_mm = "Feb"             # <<<<<<<<<<<<<<
 *     elif mm == 3:
 *         s_mm = "Mar"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Feb);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_Feb;

    /* "utils.pxd":3407
 *     if mm == 1:
 *         s_mm = "Jan"
 *     elif mm == 2:             # <<<<<<<<<<<<<<
 *         s_mm = "Feb"
 *     elif mm == 3:
*/
    break;
    case 3:

    /* "utils.pxd":3410
 *         s_mm = "Feb"
 *     elif mm == 3:
 *         s_mm = "Mar"             # <<<<<<<<<<<<<<
 *     elif mm == 4:
 *         s_mm = "Apr"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Mar);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_Mar;

    /* "utils.pxd":3409
 *     elif mm == 2:
 *         s_mm = "Feb"
 *     elif mm == 3:             # <<<<<<<<<<<<<<
 *         s_mm = "Mar"
 *     elif mm == 4:
*/
    break;
    case 4:

    /* "utils.pxd":3412
 *         s_mm = "Mar"
 *     elif mm == 4:
 *         s_mm = "Apr"             # <<<<<<<<<<<<<<
 *     elif mm == 5:
 *         s_mm = "May"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Apr);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_Apr;

    /* "utils.pxd":3411
 *     elif mm == 3:
 *         s_mm = "Mar"
 *     elif mm == 4:             # <<<<<<<<<<<<<<
 *         s_mm = "Apr"
 *     elif mm == 5:
*/
    break;
    case 5:

    /* "utils.pxd":3414
 *         s_mm = "Apr"
 *     elif mm == 5:
 *         s_mm = "May"             # <<<<<<<<<<<<<<
 *     elif mm == 6:
 *         s_mm = "Jun"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_May);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_May;

    /* "utils.pxd":3413
 *     elif mm == 4:
 *         s_mm = "Apr"
 *     elif mm == 5:             # <<<<<<<<<<<<<<
 *         s_mm = "May"
 *     elif mm == 6:
*/
    break;
    case 6:

    /* "utils.pxd":3416
 *         s_mm = "May"
 *     elif mm == 6:
 *         s_mm = "Jun"             # <<<<<<<<<<<<<<
 *     elif mm == 7:
 *         s_mm = "Jul"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Jun);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_Jun;

    /* "utils.pxd":3415
 *     elif mm == 5:
 *         s_mm = "May"
 *     elif mm == 6:             # <<<<<<<<<<<<<<
 *         s_mm = "Jun"
 *     elif mm == 7:
*/
    break;
    case 7:

    /* "utils.pxd":3418
 *         s_mm = "Jun"
 *     elif mm == 7:
 *         s_mm = "Jul"             # <<<<<<<<<<<<<<
 *     elif mm == 8:
 *         s_mm = "Aug"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Jul);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_Jul;

    /* "utils.pxd":3417
 *     elif mm == 6:
 *         s_mm = "Jun"
 *     elif mm == 7:             # <<<<<<<<<<<<<<
 *         s_mm = "Jul"
 *     elif mm == 8:
*/
    break;
    case 8:

    /* "utils.pxd":3420
 *         s_mm = "Jul"
 *     elif mm == 8:
 *         s_mm = "Aug"             # <<<<<<<<<<<<<<
 *     elif mm == 9:
 *         s_mm = "Sep"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Aug);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_Aug;

    /* "utils.pxd":3419
 *     elif mm == 7:
 *         s_mm = "Jul"
 *     elif mm == 8:             # <<<<<<<<<<<<<<
 *         s_mm = "Aug"
 *     elif mm == 9:
*/
    break;
    case 9:

    /* "utils.pxd":3422
 *         s_mm = "Aug"
 *     elif mm == 9:
 *         s_mm = "Sep"             # <<<<<<<<<<<<<<
 *     elif mm == 10:
 *         s_mm = "Oct"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Sep);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_Sep;

    /* "utils.pxd":3421
 *     elif mm == 8:
 *         s_mm = "Aug"
 *     elif mm == 9:             # <<<<<<<<<<<<<<
 *         s_mm = "Sep"
 *     elif mm == 10:
*/
    break;
    case 10:

    /* "utils.pxd":3424
 *         s_mm = "Sep"
 *     elif mm == 10:
 *         s_mm = "Oct"             # <<<<<<<<<<<<<<
 *     elif mm == 11:
 *         s_mm = "Nov"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Oct);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_Oct;

    /* "utils.pxd":3423
 *     elif mm == 9:
 *         s_mm = "Sep"
 *     elif mm == 10:             # <<<<<<<<<<<<<<
 *         s_mm = "Oct"
 *     elif mm == 11:
*/
    break;
    case 11:

    /* "utils.pxd":3426
 *         s_mm = "Oct"
 *     elif mm == 11:
 *         s_mm = "Nov"             # <<<<<<<<<<<<<<
 *     else:
 *         s_mm = "Dec"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Nov);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_Nov;

    /* "utils.pxd":3425
 *     elif mm == 10:
 *         s_mm = "Oct"
 *     elif mm == 11:             # <<<<<<<<<<<<<<
 *         s_mm = "Nov"
 *     else:
*/
    break;
    default:

    /* "utils.pxd":3428
 *         s_mm = "Nov"
 *     else:
 *         s_mm = "Dec"             # <<<<<<<<<<<<<<
 * 
 *     # Fromat
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Dec);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_Dec;
    break;
  }

  /* "utils.pxd":3431
 * 
 *     # Fromat
 *     return "%s %s %2d %02d:%02d:%02d %04d" % (s_wkd, s_mm, dd, hh, mi, ss, yy)             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long dt_to_us(datetime.datetime dt, bint utc=False) except *:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_dd, 2, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyUnicode_From_int(__pyx_v_hh, 2, '0', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_v_mi, 2, '0', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_ss, 2, '0', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 3431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_yy, 4, '0', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 3431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6[0] = __pyx_v_s_wkd;
  __pyx_t_6[1] = __pyx_mstate_global->__pyx_kp_u__8;
  __pyx_t_6[2] = __pyx_v_s_mm;
  __pyx_t_6[3] = __pyx_mstate_global->__pyx_kp_u__8;
  __pyx_t_6[4] = __pyx_t_1;
  __pyx_t_6[5] = __pyx_mstate_global->__pyx_kp_u__8;
  __pyx_t_6[6] = __pyx_t_2;
  __pyx_t_6[7] = __pyx_mstate_global->__pyx_kp_u__7;
  __pyx_t_6[8] = __pyx_t_3;
  __pyx_t_6[9] = __pyx_mstate_global->__pyx_kp_u__7;
  __pyx_t_6[10] = __pyx_t_4;
  __pyx_t_6[11] = __pyx_mstate_global->__pyx_kp_u__8;
  __pyx_t_6[12] = __pyx_t_5;
  __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 13, __Pyx_PyUnicode_GET_LENGTH(__pyx_v_s_wkd) + 1 * 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_v_s_mm) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_s_wkd) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_s_mm));
  if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 3431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __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_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3368
 *     return out
 * 
 * cdef inline str dt_to_ctime(datetime.datetime dt):             # <<<<<<<<<<<<<<
 *     """Convert a datetime to a C `ctime-style` string `<'str'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.utils.dt_to_ctime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s_wkd);
  __Pyx_XDECREF(__pyx_v_s_mm);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3433
 *     return "%s %s %2d %02d:%02d:%02d %04d" % (s_wkd, s_mm, dd, hh, mi, ss, yy)
 * 
 * cdef inline long long dt_to_us(datetime.datetime dt, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to microseconds since the Unix epoch `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_dt_to_us(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_dt_to_us *__pyx_optional_args) {
  int __pyx_v_utc = ((int)0);
  PY_LONG_LONG __pyx_v_ord;
  PY_LONG_LONG __pyx_v_us;
  PyDateTime_Delta *__pyx_v_off = 0;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  PY_LONG_LONG __pyx_t_1;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_ord __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_to_us", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_utc = __pyx_optional_args->utc;
    }
  }

  /* "utils.pxd":3448
 *     # Compute microseconds
 *     cdef:
 *         long long ord = dt_to_ord(dt, False)             # <<<<<<<<<<<<<<
 *         long long us  = (
 *             (ord - EPOCH_DAY)           * US_DAY +
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.utc = 0;
  __pyx_t_1 = __pyx_f_7cytimes_5utils_dt_to_ord(__pyx_v_dt, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(5, 3448, __pyx_L1_error)
  __pyx_v_ord = __pyx_t_1;

  /* "utils.pxd":3453
 *             (<long long> dt.hour)       * US_HOUR +
 *             (<long long> dt.minute)     * US_MINUTE +
 *             (<long long> dt.second)     * US_SECOND +             # <<<<<<<<<<<<<<
 *             (<long long> dt.microsecond)
 *         )
*/
  __pyx_v_us = ((((((__pyx_v_ord - __pyx_v_7cytimes_5utils_EPOCH_DAY) * __pyx_v_7cytimes_5utils_US_DAY) + (((PY_LONG_LONG)__pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt)) * __pyx_v_7cytimes_5utils_US_HOUR)) + (((PY_LONG_LONG)__pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt)) * __pyx_v_7cytimes_5utils_US_MINUTE)) + (((PY_LONG_LONG)__pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt)) * __pyx_v_7cytimes_5utils_US_SECOND)) + ((PY_LONG_LONG)__pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt)));

  /* "utils.pxd":3456
 *             (<long long> dt.microsecond)
 *         )
 *     if not utc:             # <<<<<<<<<<<<<<
 *         return us
 * 
*/
  __pyx_t_3 = (!__pyx_v_utc);
  if (__pyx_t_3) {

    /* "utils.pxd":3457
 *         )
 *     if not utc:
 *         return us             # <<<<<<<<<<<<<<
 * 
 *     # Aware-only: get UTC offset; None means treat as naive
*/
    __pyx_r = __pyx_v_us;
    goto __pyx_L0;

    /* "utils.pxd":3456
 *             (<long long> dt.microsecond)
 *         )
 *     if not utc:             # <<<<<<<<<<<<<<
 *         return us
 * 
*/
  }

  /* "utils.pxd":3460
 * 
 *     # Aware-only: get UTC offset; None means treat as naive
 *     cdef datetime.timedelta off = dt_utcoffset(dt)             # <<<<<<<<<<<<<<
 *     return us if off is None else us - td_to_us(off)
 * 
*/
  __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_utcoffset(__pyx_v_dt)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 3460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_off = ((PyDateTime_Delta *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "utils.pxd":3461
 *     # Aware-only: get UTC offset; None means treat as naive
 *     cdef datetime.timedelta off = dt_utcoffset(dt)
 *     return us if off is None else us - td_to_us(off)             # <<<<<<<<<<<<<<
 * 
 * cdef inline double dt_to_sec(datetime.datetime dt, bint utc=False) except *:
*/
  __pyx_t_3 = (((PyObject *)__pyx_v_off) == Py_None);
  if (__pyx_t_3) {
    __pyx_t_1 = __pyx_v_us;
  } else {
    __pyx_t_1 = (__pyx_v_us - __pyx_f_7cytimes_5utils_td_to_us(__pyx_v_off));
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":3433
 *     return "%s %s %2d %02d:%02d:%02d %04d" % (s_wkd, s_mm, dd, hh, mi, ss, yy)
 * 
 * cdef inline long long dt_to_us(datetime.datetime dt, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to microseconds since the Unix epoch `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.utils.dt_to_us", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_off);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3463
 *     return us if off is None else us - td_to_us(off)
 * 
 * cdef inline double dt_to_sec(datetime.datetime dt, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to seconds since the Unix epoch `<'float'>`.
 * 
*/

static CYTHON_INLINE double __pyx_f_7cytimes_5utils_dt_to_sec(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_dt_to_sec *__pyx_optional_args) {
  int __pyx_v_utc = ((int)0);
  PY_LONG_LONG __pyx_v_us;
  double __pyx_r;
  PY_LONG_LONG __pyx_t_1;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_us __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_utc = __pyx_optional_args->utc;
    }
  }

  /* "utils.pxd":3476
 *     :returns `<'float'>`: Seconds since the Unix epoch.
 *     """
 *     cdef long long us = dt_to_us(dt, utc)             # <<<<<<<<<<<<<<
 *     return <double> us * 1e-6
 * 
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.utc = __pyx_v_utc;
  __pyx_t_1 = __pyx_f_7cytimes_5utils_dt_to_us(__pyx_v_dt, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 3476, __pyx_L1_error)
  __pyx_v_us = __pyx_t_1;

  /* "utils.pxd":3477
 *     """
 *     cdef long long us = dt_to_us(dt, utc)
 *     return <double> us * 1e-6             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long dt_to_ord(datetime.datetime dt, bint utc=False) except -1:
*/
  __pyx_r = (((double)__pyx_v_us) * 1e-6);
  goto __pyx_L0;

  /* "utils.pxd":3463
 *     return us if off is None else us - td_to_us(off)
 * 
 * cdef inline double dt_to_sec(datetime.datetime dt, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to seconds since the Unix epoch `<'float'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.dt_to_sec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":3479
 *     return <double> us * 1e-6
 * 
 * cdef inline long long dt_to_ord(datetime.datetime dt, bint utc=False) except -1:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to its Gregorian ordinal day `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_dt_to_ord(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_dt_to_ord *__pyx_optional_args) {
  int __pyx_v_utc = ((int)0);
  PY_LONG_LONG __pyx_v_ord;
  PyDateTime_Delta *__pyx_v_off = 0;
  PY_LONG_LONG __pyx_v_us;
  PY_LONG_LONG __pyx_v_us_off;
  PY_LONG_LONG __pyx_v_adj;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_to_ord", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_utc = __pyx_optional_args->utc;
    }
  }

  /* "utils.pxd":3494
 *     """
 *     # Compute ordinal from Y/M/D
 *     cdef long long ord = ymd_to_ord(dt.year, dt.month, dt.day)             # <<<<<<<<<<<<<<
 *     if not utc:
 *         return ord
*/
  __pyx_v_ord = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt), __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt), __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt));

  /* "utils.pxd":3495
 *     # Compute ordinal from Y/M/D
 *     cdef long long ord = ymd_to_ord(dt.year, dt.month, dt.day)
 *     if not utc:             # <<<<<<<<<<<<<<
 *         return ord
 * 
*/
  __pyx_t_1 = (!__pyx_v_utc);
  if (__pyx_t_1) {

    /* "utils.pxd":3496
 *     cdef long long ord = ymd_to_ord(dt.year, dt.month, dt.day)
 *     if not utc:
 *         return ord             # <<<<<<<<<<<<<<
 * 
 *     # Aware-only: get UTC offset; None means treat as naive
*/
    __pyx_r = __pyx_v_ord;
    goto __pyx_L0;

    /* "utils.pxd":3495
 *     # Compute ordinal from Y/M/D
 *     cdef long long ord = ymd_to_ord(dt.year, dt.month, dt.day)
 *     if not utc:             # <<<<<<<<<<<<<<
 *         return ord
 * 
*/
  }

  /* "utils.pxd":3499
 * 
 *     # Aware-only: get UTC offset; None means treat as naive
 *     cdef datetime.timedelta off = dt_utcoffset(dt)             # <<<<<<<<<<<<<<
 *     if off is None:
 *         return ord
*/
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_utcoffset(__pyx_v_dt)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_off = ((PyDateTime_Delta *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":3500
 *     # Aware-only: get UTC offset; None means treat as naive
 *     cdef datetime.timedelta off = dt_utcoffset(dt)
 *     if off is None:             # <<<<<<<<<<<<<<
 *         return ord
 * 
*/
  __pyx_t_1 = (((PyObject *)__pyx_v_off) == Py_None);
  if (__pyx_t_1) {

    /* "utils.pxd":3501
 *     cdef datetime.timedelta off = dt_utcoffset(dt)
 *     if off is None:
 *         return ord             # <<<<<<<<<<<<<<
 * 
 *     # Compare at microsecond precision: local TOD vs offset
*/
    __pyx_r = __pyx_v_ord;
    goto __pyx_L0;

    /* "utils.pxd":3500
 *     # Aware-only: get UTC offset; None means treat as naive
 *     cdef datetime.timedelta off = dt_utcoffset(dt)
 *     if off is None:             # <<<<<<<<<<<<<<
 *         return ord
 * 
*/
  }

  /* "utils.pxd":3508
 *         (<long long>dt.hour)            * US_HOUR +
 *         (<long long>dt.minute)          * US_MINUTE +
 *         (<long long>dt.second)          * US_SECOND +             # <<<<<<<<<<<<<<
 *         (<long long>dt.microsecond)
 *     )
*/
  __pyx_v_us = ((((((PY_LONG_LONG)__pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt)) * __pyx_v_7cytimes_5utils_US_HOUR) + (((PY_LONG_LONG)__pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt)) * __pyx_v_7cytimes_5utils_US_MINUTE)) + (((PY_LONG_LONG)__pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt)) * __pyx_v_7cytimes_5utils_US_SECOND)) + ((PY_LONG_LONG)__pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt)));

  /* "utils.pxd":3515
 *     cdef long long us_off = (
 *         (<long long> off.day)        * US_DAY +
 *         (<long long> off.second)     * US_SECOND +             # <<<<<<<<<<<<<<
 *         (<long long> off.microsecond)
 *     )
*/
  __pyx_v_us_off = (((((PY_LONG_LONG)__pyx_f_7cpython_8datetime_9timedelta_3day_day(__pyx_v_off)) * __pyx_v_7cytimes_5utils_US_DAY) + (((PY_LONG_LONG)__pyx_f_7cpython_8datetime_9timedelta_6second_second(__pyx_v_off)) * __pyx_v_7cytimes_5utils_US_SECOND)) + ((PY_LONG_LONG)__pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(__pyx_v_off)));

  /* "utils.pxd":3520
 * 
 *     # Adjust ordinal according to the offset
 *     cdef long long adj = us - us_off             # <<<<<<<<<<<<<<
 *     if adj < 0:
 *         ord -= 1          # UTC is "earlier" calendar day
*/
  __pyx_v_adj = (__pyx_v_us - __pyx_v_us_off);

  /* "utils.pxd":3521
 *     # Adjust ordinal according to the offset
 *     cdef long long adj = us - us_off
 *     if adj < 0:             # <<<<<<<<<<<<<<
 *         ord -= 1          # UTC is "earlier" calendar day
 *     elif adj >= US_DAY:
*/
  __pyx_t_1 = (__pyx_v_adj < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":3522
 *     cdef long long adj = us - us_off
 *     if adj < 0:
 *         ord -= 1          # UTC is "earlier" calendar day             # <<<<<<<<<<<<<<
 *     elif adj >= US_DAY:
 *         ord += 1          # UTC is "later" calendar day
*/
    __pyx_v_ord = (__pyx_v_ord - 1);

    /* "utils.pxd":3521
 *     # Adjust ordinal according to the offset
 *     cdef long long adj = us - us_off
 *     if adj < 0:             # <<<<<<<<<<<<<<
 *         ord -= 1          # UTC is "earlier" calendar day
 *     elif adj >= US_DAY:
*/
    goto __pyx_L5;
  }

  /* "utils.pxd":3523
 *     if adj < 0:
 *         ord -= 1          # UTC is "earlier" calendar day
 *     elif adj >= US_DAY:             # <<<<<<<<<<<<<<
 *         ord += 1          # UTC is "later" calendar day
 *     return ord
*/
  __pyx_t_1 = (__pyx_v_adj >= __pyx_v_7cytimes_5utils_US_DAY);
  if (__pyx_t_1) {

    /* "utils.pxd":3524
 *         ord -= 1          # UTC is "earlier" calendar day
 *     elif adj >= US_DAY:
 *         ord += 1          # UTC is "later" calendar day             # <<<<<<<<<<<<<<
 *     return ord
 * 
*/
    __pyx_v_ord = (__pyx_v_ord + 1);

    /* "utils.pxd":3523
 *     if adj < 0:
 *         ord -= 1          # UTC is "earlier" calendar day
 *     elif adj >= US_DAY:             # <<<<<<<<<<<<<<
 *         ord += 1          # UTC is "later" calendar day
 *     return ord
*/
  }
  __pyx_L5:;

  /* "utils.pxd":3525
 *     elif adj >= US_DAY:
 *         ord += 1          # UTC is "later" calendar day
 *     return ord             # <<<<<<<<<<<<<<
 * 
 * cdef inline double dt_to_ts(datetime.datetime dt) except *:
*/
  __pyx_r = __pyx_v_ord;
  goto __pyx_L0;

  /* "utils.pxd":3479
 *     return <double> us * 1e-6
 * 
 * cdef inline long long dt_to_ord(datetime.datetime dt, bint utc=False) except -1:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to its Gregorian ordinal day `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.dt_to_ord", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_off);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3527
 *     return ord
 * 
 * cdef inline double dt_to_ts(datetime.datetime dt) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to POSIX timestamp (seconds since the Unix epoch) `<'float'>`.
 * 
*/

static CYTHON_INLINE double __pyx_f_7cytimes_5utils_dt_to_ts(PyDateTime_DateTime *__pyx_v_dt) {
  double __pyx_v_t;
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  double __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_sec __pyx_t_4;
  PY_LONG_LONG __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_to_ts", 0);

  /* "utils.pxd":3541
 *     """
 *     # Timezone-aware
 *     if dt.tzinfo is not None:             # <<<<<<<<<<<<<<
 *         return dt_to_sec(dt, True)
 * 
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3541, __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) {

    /* "utils.pxd":3542
 *     # Timezone-aware
 *     if dt.tzinfo is not None:
 *         return dt_to_sec(dt, True)             # <<<<<<<<<<<<<<
 * 
 *     # Timezone-naive: interpret as local time
*/
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.utc = 1;
    __pyx_t_3 = __pyx_f_7cytimes_5utils_dt_to_sec(__pyx_v_dt, &__pyx_t_4); if (unlikely(__pyx_t_3 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(5, 3542, __pyx_L1_error)
    __pyx_r = __pyx_t_3;
    goto __pyx_L0;

    /* "utils.pxd":3541
 *     """
 *     # Timezone-aware
 *     if dt.tzinfo is not None:             # <<<<<<<<<<<<<<
 *         return dt_to_sec(dt, True)
 * 
*/
  }

  /* "utils.pxd":3545
 * 
 *     # Timezone-naive: interpret as local time
 *     cdef double t = <double> dt_local_mktime(dt)             # <<<<<<<<<<<<<<
 *     return t + (<double> dt.microsecond) * 1e-6
 * 
*/
  __pyx_t_5 = __pyx_f_7cytimes_5utils_dt_local_mktime(__pyx_v_dt); if (unlikely(__pyx_t_5 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 3545, __pyx_L1_error)
  __pyx_v_t = ((double)__pyx_t_5);

  /* "utils.pxd":3546
 *     # Timezone-naive: interpret as local time
 *     cdef double t = <double> dt_local_mktime(dt)
 *     return t + (<double> dt.microsecond) * 1e-6             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long dt_as_epoch(datetime.datetime dt, str as_unit, bint utc=False) except *:
*/
  __pyx_r = (__pyx_v_t + (((double)__pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt)) * 1e-6));
  goto __pyx_L0;

  /* "utils.pxd":3527
 *     return ord
 * 
 * cdef inline double dt_to_ts(datetime.datetime dt) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to POSIX timestamp (seconds since the Unix epoch) `<'float'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt_to_ts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3548
 *     return t + (<double> dt.microsecond) * 1e-6
 * 
 * cdef inline long long dt_as_epoch(datetime.datetime dt, str as_unit, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to an integer count since the Unix epoch `<'int'>`,
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_dt_as_epoch(PyDateTime_DateTime *__pyx_v_dt, PyObject *__pyx_v_as_unit, struct __pyx_opt_args_7cytimes_5utils_dt_as_epoch *__pyx_optional_args) {
  int __pyx_v_utc = ((int)0);
  PyDateTime_Delta *__pyx_v_off = 0;
  Py_ssize_t __pyx_v_size;
  PY_LONG_LONG __pyx_v_n;
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_v_hh;
  PY_LONG_LONG __pyx_v_mi;
  PY_LONG_LONG __pyx_v_ss;
  PY_LONG_LONG __pyx_v_us;
  Py_UCS4 __pyx_v_ch;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_dt_add __pyx_t_5;
  Py_UCS4 __pyx_t_6;
  PY_LONG_LONG __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_ord __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_as_epoch", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_utc = __pyx_optional_args->utc;
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_dt);

  /* "utils.pxd":3583
 *         * 'us' reproduces the exact microsecond field.
 *     """
 *     if as_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(as_unit)
 *     cdef:
*/
  __pyx_t_1 = (__pyx_v_as_unit == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":3584
 *     """
 *     if as_unit is None:
 *         _raise_invalid_nptime_str_unit_error(as_unit)             # <<<<<<<<<<<<<<
 *     cdef:
 *         datetime.timedelta off
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(__pyx_v_as_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 3584, __pyx_L1_error)

    /* "utils.pxd":3583
 *         * 'us' reproduces the exact microsecond field.
 *     """
 *     if as_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(as_unit)
 *     cdef:
*/
  }

  /* "utils.pxd":3587
 *     cdef:
 *         datetime.timedelta off
 *         Py_ssize_t size = str_len(as_unit)             # <<<<<<<<<<<<<<
 *         long long n, q, r, hh, mi, ss, us
 *         Py_UCS4 ch
*/
  __pyx_v_size = PyUnicode_GET_LENGTH(__pyx_v_as_unit);

  /* "utils.pxd":3592
 * 
 *     # Optional UTC adjustment
 *     if utc:             # <<<<<<<<<<<<<<
 *         off = tz_utcoffset(dt.tzinfo, dt)
 *         if off is not None:
*/
  if (__pyx_v_utc) {

    /* "utils.pxd":3593
 *     # Optional UTC adjustment
 *     if utc:
 *         off = tz_utcoffset(dt.tzinfo, dt)             # <<<<<<<<<<<<<<
 *         if off is not None:
 *             dt = dt_add(dt, -off.day, -off.second, -off.microsecond, None)
*/
    __pyx_t_2 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.dt = __pyx_v_dt;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_utcoffset(__pyx_t_2, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_off = ((PyDateTime_Delta *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":3594
 *     if utc:
 *         off = tz_utcoffset(dt.tzinfo, dt)
 *         if off is not None:             # <<<<<<<<<<<<<<
 *             dt = dt_add(dt, -off.day, -off.second, -off.microsecond, None)
 * 
*/
    __pyx_t_1 = (((PyObject *)__pyx_v_off) != Py_None);
    if (__pyx_t_1) {

      /* "utils.pxd":3595
 *         off = tz_utcoffset(dt.tzinfo, dt)
 *         if off is not None:
 *             dt = dt_add(dt, -off.day, -off.second, -off.microsecond, None)             # <<<<<<<<<<<<<<
 * 
 *     # Unit: 's', 'm', 'h', 'D', 'W', 'M', 'Q', 'Y'
*/
      __pyx_t_5.__pyx_n = 4;
      __pyx_t_5.days = (-__pyx_f_7cpython_8datetime_9timedelta_3day_day(__pyx_v_off));
      __pyx_t_5.seconds = (-__pyx_f_7cpython_8datetime_9timedelta_6second_second(__pyx_v_off));
      __pyx_t_5.microseconds = (-__pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(__pyx_v_off));
      __pyx_t_5.dtclass = Py_None;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_add(__pyx_v_dt, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":3594
 *     if utc:
 *         off = tz_utcoffset(dt.tzinfo, dt)
 *         if off is not None:             # <<<<<<<<<<<<<<
 *             dt = dt_add(dt, -off.day, -off.second, -off.microsecond, None)
 * 
*/
    }

    /* "utils.pxd":3592
 * 
 *     # Optional UTC adjustment
 *     if utc:             # <<<<<<<<<<<<<<
 *         off = tz_utcoffset(dt.tzinfo, dt)
 *         if off is not None:
*/
  }

  /* "utils.pxd":3598
 * 
 *     # Unit: 's', 'm', 'h', 'D', 'W', 'M', 'Q', 'Y'
 *     if size == 1:             # <<<<<<<<<<<<<<
 *         ch = str_read(as_unit, 0)
 *         # . year
*/
  __pyx_t_1 = (__pyx_v_size == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":3599
 *     # Unit: 's', 'm', 'h', 'D', 'W', 'M', 'Q', 'Y'
 *     if size == 1:
 *         ch = str_read(as_unit, 0)             # <<<<<<<<<<<<<<
 *         # . year
 *         if ch == "Y":
*/
    __pyx_t_6 = PyUnicode_ReadChar(__pyx_v_as_unit, 0); if (unlikely(__pyx_t_6 == ((Py_UCS4)-1))) __PYX_ERR(5, 3599, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_6;

    /* "utils.pxd":3601
 *         ch = str_read(as_unit, 0)
 *         # . year
 *         if ch == "Y":             # <<<<<<<<<<<<<<
 *             return dt.year - EPOCH_YEAR
 *         # . quarter
*/
    __pyx_t_1 = (__pyx_v_ch == 89);
    if (__pyx_t_1) {

      /* "utils.pxd":3602
 *         # . year
 *         if ch == "Y":
 *             return dt.year - EPOCH_YEAR             # <<<<<<<<<<<<<<
 *         # . quarter
 *         if ch == "Q":
*/
      __pyx_r = (__pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt) - __pyx_v_7cytimes_5utils_EPOCH_YEAR);
      goto __pyx_L0;

      /* "utils.pxd":3601
 *         ch = str_read(as_unit, 0)
 *         # . year
 *         if ch == "Y":             # <<<<<<<<<<<<<<
 *             return dt.year - EPOCH_YEAR
 *         # . quarter
*/
    }

    /* "utils.pxd":3604
 *             return dt.year - EPOCH_YEAR
 *         # . quarter
 *         if ch == "Q":             # <<<<<<<<<<<<<<
 *             return (dt.year - EPOCH_YEAR) * 4 + quarter_of_month(dt.month) - 1
 *         # . month
*/
    __pyx_t_1 = (__pyx_v_ch == 81);
    if (__pyx_t_1) {

      /* "utils.pxd":3605
 *         # . quarter
 *         if ch == "Q":
 *             return (dt.year - EPOCH_YEAR) * 4 + quarter_of_month(dt.month) - 1             # <<<<<<<<<<<<<<
 *         # . month
 *         if ch == "M":
*/
      __pyx_r = ((((__pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt) - __pyx_v_7cytimes_5utils_EPOCH_YEAR) * 4) + __pyx_f_7cytimes_5utils_quarter_of_month(__pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt))) - 1);
      goto __pyx_L0;

      /* "utils.pxd":3604
 *             return dt.year - EPOCH_YEAR
 *         # . quarter
 *         if ch == "Q":             # <<<<<<<<<<<<<<
 *             return (dt.year - EPOCH_YEAR) * 4 + quarter_of_month(dt.month) - 1
 *         # . month
*/
    }

    /* "utils.pxd":3607
 *             return (dt.year - EPOCH_YEAR) * 4 + quarter_of_month(dt.month) - 1
 *         # . month
 *         if ch == "M":             # <<<<<<<<<<<<<<
 *             return (dt.year - EPOCH_YEAR) * 12 + dt.month - 1
 *         # . week
*/
    __pyx_t_1 = (__pyx_v_ch == 77);
    if (__pyx_t_1) {

      /* "utils.pxd":3608
 *         # . month
 *         if ch == "M":
 *             return (dt.year - EPOCH_YEAR) * 12 + dt.month - 1             # <<<<<<<<<<<<<<
 *         # . week
 *         n = dt_to_ord(dt, False) - EPOCH_DAY
*/
      __pyx_r = ((((__pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt) - __pyx_v_7cytimes_5utils_EPOCH_YEAR) * 12) + __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt)) - 1);
      goto __pyx_L0;

      /* "utils.pxd":3607
 *             return (dt.year - EPOCH_YEAR) * 4 + quarter_of_month(dt.month) - 1
 *         # . month
 *         if ch == "M":             # <<<<<<<<<<<<<<
 *             return (dt.year - EPOCH_YEAR) * 12 + dt.month - 1
 *         # . week
*/
    }

    /* "utils.pxd":3610
 *             return (dt.year - EPOCH_YEAR) * 12 + dt.month - 1
 *         # . week
 *         n = dt_to_ord(dt, False) - EPOCH_DAY             # <<<<<<<<<<<<<<
 *         if ch == "W":
 *             with cython.cdivision(True):
*/
    __pyx_t_8.__pyx_n = 1;
    __pyx_t_8.utc = 0;
    __pyx_t_7 = __pyx_f_7cytimes_5utils_dt_to_ord(__pyx_v_dt, &__pyx_t_8); if (unlikely(__pyx_t_7 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(5, 3610, __pyx_L1_error)
    __pyx_v_n = (__pyx_t_7 - __pyx_v_7cytimes_5utils_EPOCH_DAY);

    /* "utils.pxd":3611
 *         # . week
 *         n = dt_to_ord(dt, False) - EPOCH_DAY
 *         if ch == "W":             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = n / 7; r = n % 7
*/
    __pyx_t_1 = (__pyx_v_ch == 87);
    if (__pyx_t_1) {

      /* "utils.pxd":3613
 *         if ch == "W":
 *             with cython.cdivision(True):
 *                 q = n / 7; r = n % 7             # <<<<<<<<<<<<<<
 *                 if r < 0:
 *                     q -= 1
*/
      __pyx_v_q = (__pyx_v_n / 7);
      __pyx_v_r = (__pyx_v_n % 7);

      /* "utils.pxd":3614
 *             with cython.cdivision(True):
 *                 q = n / 7; r = n % 7
 *                 if r < 0:             # <<<<<<<<<<<<<<
 *                     q -= 1
 *             return q
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {

        /* "utils.pxd":3615
 *                 q = n / 7; r = n % 7
 *                 if r < 0:
 *                     q -= 1             # <<<<<<<<<<<<<<
 *             return q
 *         # . day
*/
        __pyx_v_q = (__pyx_v_q - 1);

        /* "utils.pxd":3614
 *             with cython.cdivision(True):
 *                 q = n / 7; r = n % 7
 *                 if r < 0:             # <<<<<<<<<<<<<<
 *                     q -= 1
 *             return q
*/
      }

      /* "utils.pxd":3616
 *                 if r < 0:
 *                     q -= 1
 *             return q             # <<<<<<<<<<<<<<
 *         # . day
 *         if ch == "D":
*/
      __pyx_r = __pyx_v_q;
      goto __pyx_L0;

      /* "utils.pxd":3611
 *         # . week
 *         n = dt_to_ord(dt, False) - EPOCH_DAY
 *         if ch == "W":             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = n / 7; r = n % 7
*/
    }

    /* "utils.pxd":3618
 *             return q
 *         # . day
 *         if ch == "D":             # <<<<<<<<<<<<<<
 *             return n
 *         # . hour
*/
    __pyx_t_1 = (__pyx_v_ch == 68);
    if (__pyx_t_1) {

      /* "utils.pxd":3619
 *         # . day
 *         if ch == "D":
 *             return n             # <<<<<<<<<<<<<<
 *         # . hour
 *         hh = dt.hour
*/
      __pyx_r = __pyx_v_n;
      goto __pyx_L0;

      /* "utils.pxd":3618
 *             return q
 *         # . day
 *         if ch == "D":             # <<<<<<<<<<<<<<
 *             return n
 *         # . hour
*/
    }

    /* "utils.pxd":3621
 *             return n
 *         # . hour
 *         hh = dt.hour             # <<<<<<<<<<<<<<
 *         if ch == "h":
 *             return n * 24 + hh
*/
    __pyx_v_hh = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);

    /* "utils.pxd":3622
 *         # . hour
 *         hh = dt.hour
 *         if ch == "h":             # <<<<<<<<<<<<<<
 *             return n * 24 + hh
 *         # . minute
*/
    __pyx_t_1 = (__pyx_v_ch == 0x68);
    if (__pyx_t_1) {

      /* "utils.pxd":3623
 *         hh = dt.hour
 *         if ch == "h":
 *             return n * 24 + hh             # <<<<<<<<<<<<<<
 *         # . minute
 *         mi = dt.minute
*/
      __pyx_r = ((__pyx_v_n * 24) + __pyx_v_hh);
      goto __pyx_L0;

      /* "utils.pxd":3622
 *         # . hour
 *         hh = dt.hour
 *         if ch == "h":             # <<<<<<<<<<<<<<
 *             return n * 24 + hh
 *         # . minute
*/
    }

    /* "utils.pxd":3625
 *             return n * 24 + hh
 *         # . minute
 *         mi = dt.minute             # <<<<<<<<<<<<<<
 *         if ch == "m":
 *             return n * 1_440 + hh * 60 + mi
*/
    __pyx_v_mi = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);

    /* "utils.pxd":3626
 *         # . minute
 *         mi = dt.minute
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return n * 1_440 + hh * 60 + mi
 *         # . second
*/
    __pyx_t_1 = (__pyx_v_ch == 0x6D);
    if (__pyx_t_1) {

      /* "utils.pxd":3627
 *         mi = dt.minute
 *         if ch == "m":
 *             return n * 1_440 + hh * 60 + mi             # <<<<<<<<<<<<<<
 *         # . second
 *         ss = dt.second
*/
      __pyx_r = (((__pyx_v_n * 0x5A0) + (__pyx_v_hh * 60)) + __pyx_v_mi);
      goto __pyx_L0;

      /* "utils.pxd":3626
 *         # . minute
 *         mi = dt.minute
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return n * 1_440 + hh * 60 + mi
 *         # . second
*/
    }

    /* "utils.pxd":3629
 *             return n * 1_440 + hh * 60 + mi
 *         # . second
 *         ss = dt.second             # <<<<<<<<<<<<<<
 *         if ch == "s":
 *             return n * SS_DAY + hh * SS_HOUR + mi * SS_MINUTE + ss
*/
    __pyx_v_ss = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);

    /* "utils.pxd":3630
 *         # . second
 *         ss = dt.second
 *         if ch == "s":             # <<<<<<<<<<<<<<
 *             return n * SS_DAY + hh * SS_HOUR + mi * SS_MINUTE + ss
 * 
*/
    __pyx_t_1 = (__pyx_v_ch == 0x73);
    if (__pyx_t_1) {

      /* "utils.pxd":3631
 *         ss = dt.second
 *         if ch == "s":
 *             return n * SS_DAY + hh * SS_HOUR + mi * SS_MINUTE + ss             # <<<<<<<<<<<<<<
 * 
 *     # Unit: 'ns', 'us', 'ms'
*/
      __pyx_r = ((((__pyx_v_n * __pyx_v_7cytimes_5utils_SS_DAY) + (__pyx_v_hh * __pyx_v_7cytimes_5utils_SS_HOUR)) + (__pyx_v_mi * __pyx_v_7cytimes_5utils_SS_MINUTE)) + __pyx_v_ss);
      goto __pyx_L0;

      /* "utils.pxd":3630
 *         # . second
 *         ss = dt.second
 *         if ch == "s":             # <<<<<<<<<<<<<<
 *             return n * SS_DAY + hh * SS_HOUR + mi * SS_MINUTE + ss
 * 
*/
    }

    /* "utils.pxd":3598
 * 
 *     # Unit: 's', 'm', 'h', 'D', 'W', 'M', 'Q', 'Y'
 *     if size == 1:             # <<<<<<<<<<<<<<
 *         ch = str_read(as_unit, 0)
 *         # . year
*/
    goto __pyx_L6;
  }

  /* "utils.pxd":3634
 * 
 *     # Unit: 'ns', 'us', 'ms'
 *     elif size == 2 and str_read(as_unit, 1) == "s":             # <<<<<<<<<<<<<<
 *         ch = str_read(as_unit, 0)
 *         # . millisecond
*/
  __pyx_t_9 = (__pyx_v_size == 2);
  if (__pyx_t_9) {
  } else {
    __pyx_t_1 = __pyx_t_9;
    goto __pyx_L16_bool_binop_done;
  }
  __pyx_t_6 = PyUnicode_ReadChar(__pyx_v_as_unit, 1); if (unlikely(__pyx_t_6 == ((Py_UCS4)-1))) __PYX_ERR(5, 3634, __pyx_L1_error)
  __pyx_t_9 = (__pyx_t_6 == 0x73);
  __pyx_t_1 = __pyx_t_9;
  __pyx_L16_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":3635
 *     # Unit: 'ns', 'us', 'ms'
 *     elif size == 2 and str_read(as_unit, 1) == "s":
 *         ch = str_read(as_unit, 0)             # <<<<<<<<<<<<<<
 *         # . millisecond
 *         n = dt_to_ord(dt, False) - EPOCH_DAY
*/
    __pyx_t_6 = PyUnicode_ReadChar(__pyx_v_as_unit, 0); if (unlikely(__pyx_t_6 == ((Py_UCS4)-1))) __PYX_ERR(5, 3635, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_6;

    /* "utils.pxd":3637
 *         ch = str_read(as_unit, 0)
 *         # . millisecond
 *         n = dt_to_ord(dt, False) - EPOCH_DAY             # <<<<<<<<<<<<<<
 *         hh, mi, ss, us = dt.hour, dt.minute, dt.second, dt.microsecond
 *         if ch == "m":
*/
    __pyx_t_8.__pyx_n = 1;
    __pyx_t_8.utc = 0;
    __pyx_t_7 = __pyx_f_7cytimes_5utils_dt_to_ord(__pyx_v_dt, &__pyx_t_8); if (unlikely(__pyx_t_7 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(5, 3637, __pyx_L1_error)
    __pyx_v_n = (__pyx_t_7 - __pyx_v_7cytimes_5utils_EPOCH_DAY);

    /* "utils.pxd":3638
 *         # . millisecond
 *         n = dt_to_ord(dt, False) - EPOCH_DAY
 *         hh, mi, ss, us = dt.hour, dt.minute, dt.second, dt.microsecond             # <<<<<<<<<<<<<<
 *         if ch == "m":
 *             with cython.cdivision(True):
*/
    __pyx_t_10 = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);
    __pyx_t_11 = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);
    __pyx_t_12 = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);
    __pyx_t_13 = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt);
    __pyx_v_hh = __pyx_t_10;
    __pyx_v_mi = __pyx_t_11;
    __pyx_v_ss = __pyx_t_12;
    __pyx_v_us = __pyx_t_13;

    /* "utils.pxd":3639
 *         n = dt_to_ord(dt, False) - EPOCH_DAY
 *         hh, mi, ss, us = dt.hour, dt.minute, dt.second, dt.microsecond
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 us = us / 1_000
*/
    __pyx_t_1 = (__pyx_v_ch == 0x6D);
    if (__pyx_t_1) {

      /* "utils.pxd":3641
 *         if ch == "m":
 *             with cython.cdivision(True):
 *                 us = us / 1_000             # <<<<<<<<<<<<<<
 *             return n * MS_DAY + hh * MS_HOUR + mi * MS_MINUTE + ss * MS_SECOND + us
 *         # . microsecond
*/
      __pyx_v_us = (__pyx_v_us / 0x3E8);

      /* "utils.pxd":3642
 *             with cython.cdivision(True):
 *                 us = us / 1_000
 *             return n * MS_DAY + hh * MS_HOUR + mi * MS_MINUTE + ss * MS_SECOND + us             # <<<<<<<<<<<<<<
 *         # . microsecond
 *         if ch == "u":
*/
      __pyx_r = (((((__pyx_v_n * __pyx_v_7cytimes_5utils_MS_DAY) + (__pyx_v_hh * __pyx_v_7cytimes_5utils_MS_HOUR)) + (__pyx_v_mi * __pyx_v_7cytimes_5utils_MS_MINUTE)) + (__pyx_v_ss * __pyx_v_7cytimes_5utils_MS_SECOND)) + __pyx_v_us);
      goto __pyx_L0;

      /* "utils.pxd":3639
 *         n = dt_to_ord(dt, False) - EPOCH_DAY
 *         hh, mi, ss, us = dt.hour, dt.minute, dt.second, dt.microsecond
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 us = us / 1_000
*/
    }

    /* "utils.pxd":3644
 *             return n * MS_DAY + hh * MS_HOUR + mi * MS_MINUTE + ss * MS_SECOND + us
 *         # . microsecond
 *         if ch == "u":             # <<<<<<<<<<<<<<
 *             return n * US_DAY + hh * US_HOUR + mi * US_MINUTE + ss * US_SECOND + us
 * 
*/
    __pyx_t_1 = (__pyx_v_ch == 0x75);
    if (__pyx_t_1) {

      /* "utils.pxd":3645
 *         # . microsecond
 *         if ch == "u":
 *             return n * US_DAY + hh * US_HOUR + mi * US_MINUTE + ss * US_SECOND + us             # <<<<<<<<<<<<<<
 * 
 *     # Unit: 'min' for pandas compatibility
*/
      __pyx_r = (((((__pyx_v_n * __pyx_v_7cytimes_5utils_US_DAY) + (__pyx_v_hh * __pyx_v_7cytimes_5utils_US_HOUR)) + (__pyx_v_mi * __pyx_v_7cytimes_5utils_US_MINUTE)) + (__pyx_v_ss * __pyx_v_7cytimes_5utils_US_SECOND)) + __pyx_v_us);
      goto __pyx_L0;

      /* "utils.pxd":3644
 *             return n * MS_DAY + hh * MS_HOUR + mi * MS_MINUTE + ss * MS_SECOND + us
 *         # . microsecond
 *         if ch == "u":             # <<<<<<<<<<<<<<
 *             return n * US_DAY + hh * US_HOUR + mi * US_MINUTE + ss * US_SECOND + us
 * 
*/
    }

    /* "utils.pxd":3634
 * 
 *     # Unit: 'ns', 'us', 'ms'
 *     elif size == 2 and str_read(as_unit, 1) == "s":             # <<<<<<<<<<<<<<
 *         ch = str_read(as_unit, 0)
 *         # . millisecond
*/
    goto __pyx_L6;
  }

  /* "utils.pxd":3648
 * 
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and as_unit == "min":             # <<<<<<<<<<<<<<
 *         n = dt_to_ord(dt, False) - EPOCH_DAY
 *         hh, mi = dt.hour, dt.minute
*/
  __pyx_t_9 = (__pyx_v_size == 3);
  if (__pyx_t_9) {
  } else {
    __pyx_t_1 = __pyx_t_9;
    goto __pyx_L20_bool_binop_done;
  }
  __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_v_as_unit, __pyx_mstate_global->__pyx_n_u_min, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(5, 3648, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_9;
  __pyx_L20_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":3649
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and as_unit == "min":
 *         n = dt_to_ord(dt, False) - EPOCH_DAY             # <<<<<<<<<<<<<<
 *         hh, mi = dt.hour, dt.minute
 *         return n * 1_440 + hh * 60 + mi
*/
    __pyx_t_8.__pyx_n = 1;
    __pyx_t_8.utc = 0;
    __pyx_t_7 = __pyx_f_7cytimes_5utils_dt_to_ord(__pyx_v_dt, &__pyx_t_8); if (unlikely(__pyx_t_7 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(5, 3649, __pyx_L1_error)
    __pyx_v_n = (__pyx_t_7 - __pyx_v_7cytimes_5utils_EPOCH_DAY);

    /* "utils.pxd":3650
 *     elif size == 3 and as_unit == "min":
 *         n = dt_to_ord(dt, False) - EPOCH_DAY
 *         hh, mi = dt.hour, dt.minute             # <<<<<<<<<<<<<<
 *         return n * 1_440 + hh * 60 + mi
 * 
*/
    __pyx_t_13 = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);
    __pyx_t_12 = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);
    __pyx_v_hh = __pyx_t_13;
    __pyx_v_mi = __pyx_t_12;

    /* "utils.pxd":3651
 *         n = dt_to_ord(dt, False) - EPOCH_DAY
 *         hh, mi = dt.hour, dt.minute
 *         return n * 1_440 + hh * 60 + mi             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported unit
*/
    __pyx_r = (((__pyx_v_n * 0x5A0) + (__pyx_v_hh * 60)) + __pyx_v_mi);
    goto __pyx_L0;

    /* "utils.pxd":3648
 * 
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and as_unit == "min":             # <<<<<<<<<<<<<<
 *         n = dt_to_ord(dt, False) - EPOCH_DAY
 *         hh, mi = dt.hour, dt.minute
*/
  }
  __pyx_L6:;

  /* "utils.pxd":3654
 * 
 *     # Unsupported unit
 *     _raise_invalid_nptime_str_unit_error(as_unit)             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long dt_as_epoch_W_iso(datetime.datetime dt, int weekday, bint utc=False) except *:
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(__pyx_v_as_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 3654, __pyx_L1_error)

  /* "utils.pxd":3548
 *     return t + (<double> dt.microsecond) * 1e-6
 * 
 * cdef inline long long dt_as_epoch(datetime.datetime dt, str as_unit, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to an integer count since the Unix epoch `<'int'>`,
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt_as_epoch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_off);
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3656
 *     _raise_invalid_nptime_str_unit_error(as_unit)
 * 
 * cdef inline long long dt_as_epoch_W_iso(datetime.datetime dt, int weekday, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to an integer count of whole
 *     weeks since the Unix epoch, where weeks are aligned to a chosen
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_dt_as_epoch_W_iso(PyDateTime_DateTime *__pyx_v_dt, int __pyx_v_weekday, struct __pyx_opt_args_7cytimes_5utils_dt_as_epoch_W_iso *__pyx_optional_args) {
  int __pyx_v_utc = ((int)0);
  PY_LONG_LONG __pyx_v_adj;
  PY_LONG_LONG __pyx_v_n;
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_r;
  long __pyx_t_1;
  long __pyx_t_2;
  int __pyx_t_3;
  long __pyx_t_4;
  int __pyx_t_5;
  PY_LONG_LONG __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_ord __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_utc = __pyx_optional_args->utc;
    }
  }

  /* "utils.pxd":3678
 *     - Uses mathematical floor division so dates before the epoch are handled correctly.
 *     """
 *     cdef long long adj = 4 - min(max(weekday, 1), 7)             # <<<<<<<<<<<<<<
 *     cdef long long n = dt_to_ord(dt, utc) - EPOCH_DAY + adj
 *     cdef long long q, r
*/
  __pyx_t_1 = 7;
  __pyx_t_2 = 1;
  __pyx_t_3 = __pyx_v_weekday;
  __pyx_t_5 = (__pyx_t_2 > __pyx_t_3);
  if (__pyx_t_5) {
    __pyx_t_4 = __pyx_t_2;
  } else {
    __pyx_t_4 = __pyx_t_3;
  }
  __pyx_t_2 = __pyx_t_4;
  __pyx_t_5 = (__pyx_t_1 < __pyx_t_2);
  if (__pyx_t_5) {
    __pyx_t_4 = __pyx_t_1;
  } else {
    __pyx_t_4 = __pyx_t_2;
  }
  __pyx_v_adj = (4 - __pyx_t_4);

  /* "utils.pxd":3679
 *     """
 *     cdef long long adj = 4 - min(max(weekday, 1), 7)
 *     cdef long long n = dt_to_ord(dt, utc) - EPOCH_DAY + adj             # <<<<<<<<<<<<<<
 *     cdef long long q, r
 *     with cython.cdivision(True):
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.utc = __pyx_v_utc;
  __pyx_t_6 = __pyx_f_7cytimes_5utils_dt_to_ord(__pyx_v_dt, &__pyx_t_7); if (unlikely(__pyx_t_6 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(5, 3679, __pyx_L1_error)
  __pyx_v_n = ((__pyx_t_6 - __pyx_v_7cytimes_5utils_EPOCH_DAY) + __pyx_v_adj);

  /* "utils.pxd":3682
 *     cdef long long q, r
 *     with cython.cdivision(True):
 *         q = n / 7; r = n % 7             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1
*/
  __pyx_v_q = (__pyx_v_n / 7);
  __pyx_v_r = (__pyx_v_n % 7);

  /* "utils.pxd":3683
 *     with cython.cdivision(True):
 *         q = n / 7; r = n % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *     return q
*/
  __pyx_t_5 = (__pyx_v_r < 0);
  if (__pyx_t_5) {

    /* "utils.pxd":3684
 *         q = n / 7; r = n % 7
 *         if r < 0:
 *             q -= 1             # <<<<<<<<<<<<<<
 *     return q
 * 
*/
    __pyx_v_q = (__pyx_v_q - 1);

    /* "utils.pxd":3683
 *     with cython.cdivision(True):
 *         q = n / 7; r = n % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *     return q
*/
  }

  /* "utils.pxd":3685
 *         if r < 0:
 *             q -= 1
 *     return q             # <<<<<<<<<<<<<<
 * 
 * # . conversion: from
*/
  __pyx_r = __pyx_v_q;
  goto __pyx_L0;

  /* "utils.pxd":3656
 *     _raise_invalid_nptime_str_unit_error(as_unit)
 * 
 * cdef inline long long dt_as_epoch_W_iso(datetime.datetime dt, int weekday, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to an integer count of whole
 *     weeks since the Unix epoch, where weeks are aligned to a chosen
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.dt_as_epoch_W_iso", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":3688
 * 
 * # . conversion: from
 * cdef inline datetime.datetime dt_fr_us(long long value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from microseconds since the Unix epoch `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_us(PY_LONG_LONG __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_dt_fr_us *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  __pyx_t_7cytimes_5utils_dtm __pyx_v__dtm;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_fr_us", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_dtclass = __pyx_optional_args->dtclass;
      }
    }
  }

  /* "utils.pxd":3697
 *     :returns `<'datetime.datetime'>`: The resulting datetime (or subclass if `dtclass` is specified).
 *     """
 *     cdef dtm _dtm = dtm_fr_us(value)             # <<<<<<<<<<<<<<
 *     return dt_new(
 *         _dtm.year, _dtm.month, _dtm.day, _dtm.hour, _dtm.minute,
*/
  __pyx_v__dtm = __pyx_f_7cytimes_5utils_dtm_fr_us(__pyx_v_value);

  /* "utils.pxd":3698
 *     """
 *     cdef dtm _dtm = dtm_fr_us(value)
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         _dtm.year, _dtm.month, _dtm.day, _dtm.hour, _dtm.minute,
 *         _dtm.second, _dtm.microsecond, tzinfo, 0, dtclass,
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "utils.pxd":3700
 *     return dt_new(
 *         _dtm.year, _dtm.month, _dtm.day, _dtm.hour, _dtm.minute,
 *         _dtm.second, _dtm.microsecond, tzinfo, 0, dtclass,             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_2.__pyx_n = 10;
  __pyx_t_2.year = __pyx_v__dtm.year;
  __pyx_t_2.month = __pyx_v__dtm.month;
  __pyx_t_2.day = __pyx_v__dtm.day;
  __pyx_t_2.hour = __pyx_v__dtm.hour;
  __pyx_t_2.minute = __pyx_v__dtm.minute;
  __pyx_t_2.second = __pyx_v__dtm.second;
  __pyx_t_2.microsecond = __pyx_v__dtm.microsecond;
  __pyx_t_2.tzinfo = __pyx_v_tzinfo;
  __pyx_t_2.fold = 0;
  __pyx_t_2.dtclass = __pyx_v_dtclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3688
 * 
 * # . conversion: from
 * cdef inline datetime.datetime dt_fr_us(long long value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from microseconds since the Unix epoch `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt_fr_us", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3703
 *     )
 * 
 * cdef inline datetime.datetime dt_fr_sec(double value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from seconds since the Unix epoch `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_sec(double __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_dt_fr_sec *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PY_LONG_LONG __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_us __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_fr_sec", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_dtclass = __pyx_optional_args->dtclass;
      }
    }
  }

  /* "utils.pxd":3712
 *     :returns `<'datetime.datetime'>`: The resulting datetime (or subclass if `dtclass` is specified).
 *     """
 *     return dt_fr_us(sec_to_us(value), tzinfo, dtclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.datetime dt_fr_ord(int value, object tzinfo=None, object dtclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_5utils_sec_to_us(__pyx_v_value); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 3712, __pyx_L1_error)
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.tzinfo = __pyx_v_tzinfo;
  __pyx_t_3.dtclass = __pyx_v_dtclass;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_us(__pyx_t_1, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3703
 *     )
 * 
 * cdef inline datetime.datetime dt_fr_sec(double value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from seconds since the Unix epoch `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.dt_fr_sec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3714
 *     return dt_fr_us(sec_to_us(value), tzinfo, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_ord(int value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from a Gregorian ordinal (0001-01-01 = 1) `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_ord(int __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_dt_fr_ord *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_fr_ord", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_dtclass = __pyx_optional_args->dtclass;
      }
    }
  }

  /* "utils.pxd":3723
 *     :returns `<'datetime.datetime'>`: The resulting datetime (or subclass if `dtclass` is specified).
 *     """
 *     cdef ymd _ymd = ymd_fr_ord(value)             # <<<<<<<<<<<<<<
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
*/
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord(__pyx_v_value);

  /* "utils.pxd":3724
 *     """
 *     cdef ymd _ymd = ymd_fr_ord(value)
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.datetime dt_fr_iso(int year, int week, int weekday, object tzinfo=None, object dtclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 10;
  __pyx_t_2.year = __pyx_v__ymd.year;
  __pyx_t_2.month = __pyx_v__ymd.month;
  __pyx_t_2.day = __pyx_v__ymd.day;
  __pyx_t_2.hour = 0;
  __pyx_t_2.minute = 0;
  __pyx_t_2.second = 0;
  __pyx_t_2.microsecond = 0;
  __pyx_t_2.tzinfo = __pyx_v_tzinfo;
  __pyx_t_2.fold = 0;
  __pyx_t_2.dtclass = __pyx_v_dtclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3714
 *     return dt_fr_us(sec_to_us(value), tzinfo, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_ord(int value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from a Gregorian ordinal (0001-01-01 = 1) `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt_fr_ord", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3726
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_iso(int year, int week, int weekday, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from ISO calendar values (year, week, weekday) `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_iso(int __pyx_v_year, int __pyx_v_week, int __pyx_v_weekday, struct __pyx_opt_args_7cytimes_5utils_dt_fr_iso *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_fr_iso", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_dtclass = __pyx_optional_args->dtclass;
      }
    }
  }

  /* "utils.pxd":3739
 *     :returns `<'datetime.datetime'>`: The resulting datetime (or subclass if `dtclass` is specified).
 *     """
 *     cdef ymd _ymd = ymd_fr_iso(year, week, weekday)             # <<<<<<<<<<<<<<
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
*/
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_iso(__pyx_v_year, __pyx_v_week, __pyx_v_weekday);

  /* "utils.pxd":3740
 *     """
 *     cdef ymd _ymd = ymd_fr_iso(year, week, weekday)
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.datetime dt_fr_doy(int year, int doy, object tzinfo=None, object dtclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 10;
  __pyx_t_2.year = __pyx_v__ymd.year;
  __pyx_t_2.month = __pyx_v__ymd.month;
  __pyx_t_2.day = __pyx_v__ymd.day;
  __pyx_t_2.hour = 0;
  __pyx_t_2.minute = 0;
  __pyx_t_2.second = 0;
  __pyx_t_2.microsecond = 0;
  __pyx_t_2.tzinfo = __pyx_v_tzinfo;
  __pyx_t_2.fold = 0;
  __pyx_t_2.dtclass = __pyx_v_dtclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3726
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_iso(int year, int week, int weekday, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from ISO calendar values (year, week, weekday) `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt_fr_iso", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3742
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_doy(int year, int doy, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from Gregorian year and day-of-year `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_doy(int __pyx_v_year, int __pyx_v_doy, struct __pyx_opt_args_7cytimes_5utils_dt_fr_doy *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_fr_doy", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_dtclass = __pyx_optional_args->dtclass;
      }
    }
  }

  /* "utils.pxd":3753
 *     :returns `<'datetime.datetime'>`: The resulting datetime (or subclass if `dtclass` is specified).
 *     """
 *     cdef ymd _ymd = ymd_fr_doy(year, doy)             # <<<<<<<<<<<<<<
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
*/
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_doy(__pyx_v_year, __pyx_v_doy);

  /* "utils.pxd":3754
 *     """
 *     cdef ymd _ymd = ymd_fr_doy(year, doy)
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.datetime dt_fr_ts(double value, object tzinfo=None, object dtclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 10;
  __pyx_t_2.year = __pyx_v__ymd.year;
  __pyx_t_2.month = __pyx_v__ymd.month;
  __pyx_t_2.day = __pyx_v__ymd.day;
  __pyx_t_2.hour = 0;
  __pyx_t_2.minute = 0;
  __pyx_t_2.second = 0;
  __pyx_t_2.microsecond = 0;
  __pyx_t_2.tzinfo = __pyx_v_tzinfo;
  __pyx_t_2.fold = 0;
  __pyx_t_2.dtclass = __pyx_v_dtclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3742
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_doy(int year, int doy, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from Gregorian year and day-of-year `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt_fr_doy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3756
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_ts(double value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from a POSIX timestamp with optional timezone `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_ts(double __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_dt_fr_ts *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyDateTime_DateTime *__pyx_v_dt = 0;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp __pyx_t_3;
  int __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_fr_ts", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_dtclass = __pyx_optional_args->dtclass;
      }
    }
  }

  /* "utils.pxd":3772
 *     >>> datetime.datetime.fromtimestamp(value, tzinfo)
 *     """
 *     cdef datetime.datetime dt = datetime.datetime_from_timestamp(value, tzinfo)             # <<<<<<<<<<<<<<
 *     return dt if dtclass is None else dt_fr_dt(dt, dtclass)
 * 
*/
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.tz = __pyx_v_tzinfo;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_datetime_from_timestamp(__pyx_t_1, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":3773
 *     """
 *     cdef datetime.datetime dt = datetime.datetime_from_timestamp(value, tzinfo)
 *     return dt if dtclass is None else dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.datetime dt_fr_date(datetime.date date, object tzinfo=None, object dtclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_4 = (__pyx_v_dtclass == Py_None);
  if (__pyx_t_4) {
    __Pyx_INCREF((PyObject *)__pyx_v_dt);
    __pyx_t_2 = ((PyObject *)__pyx_v_dt);
  } else {
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.dtclass = __pyx_v_dtclass;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3756
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_ts(double value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from a POSIX timestamp with optional timezone `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.dt_fr_ts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3775
 *     return dt if dtclass is None else dt_fr_dt(dt, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_date(datetime.date date, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from date (include subclass) `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_date(PyDateTime_Date *__pyx_v_date, struct __pyx_opt_args_7cytimes_5utils_dt_fr_date *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_fr_date", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_dtclass = __pyx_optional_args->dtclass;
      }
    }
  }

  /* "utils.pxd":3785
 *         with the same date fields (time fields are set to 0).
 *     """
 *     return dt_new(date.year, date.month, date.day, 0, 0, 0, 0, tzinfo, 0, dtclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.datetime dt_fr_dt(datetime.datetime dt, object dtclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 10;
  __pyx_t_2.year = __pyx_f_7cpython_8datetime_4date_4year_year(__pyx_v_date);
  __pyx_t_2.month = __pyx_f_7cpython_8datetime_4date_5month_month(__pyx_v_date);
  __pyx_t_2.day = __pyx_f_7cpython_8datetime_4date_3day_day(__pyx_v_date);
  __pyx_t_2.hour = 0;
  __pyx_t_2.minute = 0;
  __pyx_t_2.second = 0;
  __pyx_t_2.microsecond = 0;
  __pyx_t_2.tzinfo = __pyx_v_tzinfo;
  __pyx_t_2.fold = 0;
  __pyx_t_2.dtclass = __pyx_v_dtclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3775
 *     return dt if dtclass is None else dt_fr_dt(dt, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_date(datetime.date date, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from date (include subclass) `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt_fr_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3787
 *     return dt_new(date.year, date.month, date.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_dt(datetime.datetime dt, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from another datetime (include subclass) `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_dt(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt *__pyx_optional_args) {
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_fr_dt", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dtclass = __pyx_optional_args->dtclass;
    }
  }
  __Pyx_INCREF(__pyx_v_dtclass);

  /* "utils.pxd":3797
 *         with the same fields and tzinfo.
 *     """
 *     if dtclass is None:             # <<<<<<<<<<<<<<
 *         dtclass = datetime.datetime
 *     if dtclass is type(dt):
*/
  __pyx_t_1 = (__pyx_v_dtclass == Py_None);
  if (__pyx_t_1) {

    /* "utils.pxd":3798
 *     """
 *     if dtclass is None:
 *         dtclass = datetime.datetime             # <<<<<<<<<<<<<<
 *     if dtclass is type(dt):
 *         return dt
*/
    __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime);
    __Pyx_DECREF_SET(__pyx_v_dtclass, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime));

    /* "utils.pxd":3797
 *         with the same fields and tzinfo.
 *     """
 *     if dtclass is None:             # <<<<<<<<<<<<<<
 *         dtclass = datetime.datetime
 *     if dtclass is type(dt):
*/
  }

  /* "utils.pxd":3799
 *     if dtclass is None:
 *         dtclass = datetime.datetime
 *     if dtclass is type(dt):             # <<<<<<<<<<<<<<
 *         return dt
 *     return dt_new(
*/
  __pyx_t_1 = (__pyx_v_dtclass == ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_dt))));
  if (__pyx_t_1) {

    /* "utils.pxd":3800
 *         dtclass = datetime.datetime
 *     if dtclass is type(dt):
 *         return dt             # <<<<<<<<<<<<<<
 *     return dt_new(
 *         dt.year, dt.month, dt.day, dt.hour, dt.minute,
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_dt);
    __pyx_r = __pyx_v_dt;
    goto __pyx_L0;

    /* "utils.pxd":3799
 *     if dtclass is None:
 *         dtclass = datetime.datetime
 *     if dtclass is type(dt):             # <<<<<<<<<<<<<<
 *         return dt
 *     return dt_new(
*/
  }

  /* "utils.pxd":3801
 *     if dtclass is type(dt):
 *         return dt
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         dt.year, dt.month, dt.day, dt.hour, dt.minute,
 *         dt.second, dt.microsecond, dt.tzinfo, dt.fold, dtclass,
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "utils.pxd":3803
 *     return dt_new(
 *         dt.year, dt.month, dt.day, dt.hour, dt.minute,
 *         dt.second, dt.microsecond, dt.tzinfo, dt.fold, dtclass,             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_2 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "utils.pxd":3801
 *     if dtclass is type(dt):
 *         return dt
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         dt.year, dt.month, dt.day, dt.hour, dt.minute,
 *         dt.second, dt.microsecond, dt.tzinfo, dt.fold, dtclass,
*/
  __pyx_t_4.__pyx_n = 10;
  __pyx_t_4.year = __pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt);
  __pyx_t_4.month = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);
  __pyx_t_4.day = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt);
  __pyx_t_4.hour = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);
  __pyx_t_4.minute = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);
  __pyx_t_4.second = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);
  __pyx_t_4.microsecond = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt);
  __pyx_t_4.tzinfo = __pyx_t_2;
  __pyx_t_4.fold = __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt);
  __pyx_t_4.dtclass = __pyx_v_dtclass;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3787
 *     return dt_new(date.year, date.month, date.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_dt(datetime.datetime dt, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from another datetime (include subclass) `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt_fr_dt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dtclass);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3806
 *     )
 * 
 * cdef inline datetime.datetime dt_fr_time(datetime.time time, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from time (include subclass) `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_time(PyDateTime_Time *__pyx_v_time, struct __pyx_opt_args_7cytimes_5utils_dt_fr_time *__pyx_optional_args) {
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_fr_time", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dtclass = __pyx_optional_args->dtclass;
    }
  }

  /* "utils.pxd":3815
 *         with the same time fields and tzinfo (date fields are set to 1970-01-01).
 *     """
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         1970, 1, 1, time.hour, time.minute, time.second,
 *         time.microsecond, time.tzinfo, time.fold, dtclass,
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "utils.pxd":3817
 *     return dt_new(
 *         1970, 1, 1, time.hour, time.minute, time.second,
 *         time.microsecond, time.tzinfo, time.fold, dtclass,             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(__pyx_v_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "utils.pxd":3815
 *         with the same time fields and tzinfo (date fields are set to 1970-01-01).
 *     """
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         1970, 1, 1, time.hour, time.minute, time.second,
 *         time.microsecond, time.tzinfo, time.fold, dtclass,
*/
  __pyx_t_3.__pyx_n = 10;
  __pyx_t_3.year = 0x7B2;
  __pyx_t_3.month = 1;
  __pyx_t_3.day = 1;
  __pyx_t_3.hour = __pyx_f_7cpython_8datetime_4time_4hour_hour(__pyx_v_time);
  __pyx_t_3.minute = __pyx_f_7cpython_8datetime_4time_6minute_minute(__pyx_v_time);
  __pyx_t_3.second = __pyx_f_7cpython_8datetime_4time_6second_second(__pyx_v_time);
  __pyx_t_3.microsecond = __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(__pyx_v_time);
  __pyx_t_3.tzinfo = __pyx_t_1;
  __pyx_t_3.fold = __pyx_f_7cpython_8datetime_4time_4fold_fold(__pyx_v_time);
  __pyx_t_3.dtclass = __pyx_v_dtclass;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3806
 *     )
 * 
 * cdef inline datetime.datetime dt_fr_time(datetime.time time, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from time (include subclass) `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.dt_fr_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3820
 *     )
 * 
 * cdef inline datetime.datetime dt_combine(datetime.date date=None, datetime.time time=None, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a `datetime.datetime` by combining a date and a time `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_combine(struct __pyx_opt_args_7cytimes_5utils_dt_combine *__pyx_optional_args) {
  PyDateTime_Date *__pyx_v_date = ((PyDateTime_Date *)Py_None);
  PyDateTime_Time *__pyx_v_time = ((PyDateTime_Time *)Py_None);
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  int __pyx_v_yy;
  int __pyx_v_mm;
  int __pyx_v_dd;
  int __pyx_v_hh;
  int __pyx_v_mi;
  int __pyx_v_ss;
  int __pyx_v_us;
  int __pyx_v_fold;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_date_now __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_combine", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_date = __pyx_optional_args->date;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_time = __pyx_optional_args->time;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_dtclass = __pyx_optional_args->dtclass;
          }
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_date);
  __Pyx_INCREF(__pyx_v_tzinfo);

  /* "utils.pxd":3835
 *     cdef int yy, mm, dd, hh, mi, ss, us, fold
 *     # Date
 *     if date is None:             # <<<<<<<<<<<<<<
 *         date = date_now(None, None)
 *     yy, mm, dd = date.year, date.month, date.day
*/
  __pyx_t_1 = (((PyObject *)__pyx_v_date) == Py_None);
  if (__pyx_t_1) {

    /* "utils.pxd":3836
 *     # Date
 *     if date is None:
 *         date = date_now(None, None)             # <<<<<<<<<<<<<<
 *     yy, mm, dd = date.year, date.month, date.day
 * 
*/
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.tzinfo = Py_None;
    __pyx_t_3.dclass = Py_None;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_date_now(&__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3836, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_date, ((PyDateTime_Date *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "utils.pxd":3835
 *     cdef int yy, mm, dd, hh, mi, ss, us, fold
 *     # Date
 *     if date is None:             # <<<<<<<<<<<<<<
 *         date = date_now(None, None)
 *     yy, mm, dd = date.year, date.month, date.day
*/
  }

  /* "utils.pxd":3837
 *     if date is None:
 *         date = date_now(None, None)
 *     yy, mm, dd = date.year, date.month, date.day             # <<<<<<<<<<<<<<
 * 
 *     # Time
*/
  __pyx_t_4 = __pyx_f_7cpython_8datetime_4date_4year_year(__pyx_v_date);
  __pyx_t_5 = __pyx_f_7cpython_8datetime_4date_5month_month(__pyx_v_date);
  __pyx_t_6 = __pyx_f_7cpython_8datetime_4date_3day_day(__pyx_v_date);
  __pyx_v_yy = __pyx_t_4;
  __pyx_v_mm = __pyx_t_5;
  __pyx_v_dd = __pyx_t_6;

  /* "utils.pxd":3840
 * 
 *     # Time
 *     if time is None:             # <<<<<<<<<<<<<<
 *         hh = mi = ss = us = fold = 0
 *     else:
*/
  __pyx_t_1 = (((PyObject *)__pyx_v_time) == Py_None);
  if (__pyx_t_1) {

    /* "utils.pxd":3841
 *     # Time
 *     if time is None:
 *         hh = mi = ss = us = fold = 0             # <<<<<<<<<<<<<<
 *     else:
 *         hh, mi, ss = time.hour, time.minute, time.second
*/
    __pyx_v_hh = 0;
    __pyx_v_mi = 0;
    __pyx_v_ss = 0;
    __pyx_v_us = 0;
    __pyx_v_fold = 0;

    /* "utils.pxd":3840
 * 
 *     # Time
 *     if time is None:             # <<<<<<<<<<<<<<
 *         hh = mi = ss = us = fold = 0
 *     else:
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":3843
 *         hh = mi = ss = us = fold = 0
 *     else:
 *         hh, mi, ss = time.hour, time.minute, time.second             # <<<<<<<<<<<<<<
 *         us, fold   = time.microsecond, time.fold
 *         if tzinfo is None:
*/
  /*else*/ {
    __pyx_t_6 = __pyx_f_7cpython_8datetime_4time_4hour_hour(__pyx_v_time);
    __pyx_t_5 = __pyx_f_7cpython_8datetime_4time_6minute_minute(__pyx_v_time);
    __pyx_t_4 = __pyx_f_7cpython_8datetime_4time_6second_second(__pyx_v_time);
    __pyx_v_hh = __pyx_t_6;
    __pyx_v_mi = __pyx_t_5;
    __pyx_v_ss = __pyx_t_4;

    /* "utils.pxd":3844
 *     else:
 *         hh, mi, ss = time.hour, time.minute, time.second
 *         us, fold   = time.microsecond, time.fold             # <<<<<<<<<<<<<<
 *         if tzinfo is None:
 *             tzinfo = time.tzinfo
*/
    __pyx_t_4 = __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(__pyx_v_time);
    __pyx_t_5 = __pyx_f_7cpython_8datetime_4time_4fold_fold(__pyx_v_time);
    __pyx_v_us = __pyx_t_4;
    __pyx_v_fold = __pyx_t_5;

    /* "utils.pxd":3845
 *         hh, mi, ss = time.hour, time.minute, time.second
 *         us, fold   = time.microsecond, time.fold
 *         if tzinfo is None:             # <<<<<<<<<<<<<<
 *             tzinfo = time.tzinfo
 * 
*/
    __pyx_t_1 = (__pyx_v_tzinfo == Py_None);
    if (__pyx_t_1) {

      /* "utils.pxd":3846
 *         us, fold   = time.microsecond, time.fold
 *         if tzinfo is None:
 *             tzinfo = time.tzinfo             # <<<<<<<<<<<<<<
 * 
 *     # New datetime
*/
      __pyx_t_2 = __pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(__pyx_v_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3846, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_tzinfo, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "utils.pxd":3845
 *         hh, mi, ss = time.hour, time.minute, time.second
 *         us, fold   = time.microsecond, time.fold
 *         if tzinfo is None:             # <<<<<<<<<<<<<<
 *             tzinfo = time.tzinfo
 * 
*/
    }
  }
  __pyx_L4:;

  /* "utils.pxd":3849
 * 
 *     # New datetime
 *     return dt_new(yy, mm, dd, hh, mi, ss, us, tzinfo, fold, dtclass)             # <<<<<<<<<<<<<<
 * 
 * # . manipulation
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_7.__pyx_n = 10;
  __pyx_t_7.year = __pyx_v_yy;
  __pyx_t_7.month = __pyx_v_mm;
  __pyx_t_7.day = __pyx_v_dd;
  __pyx_t_7.hour = __pyx_v_hh;
  __pyx_t_7.minute = __pyx_v_mi;
  __pyx_t_7.second = __pyx_v_ss;
  __pyx_t_7.microsecond = __pyx_v_us;
  __pyx_t_7.tzinfo = __pyx_v_tzinfo;
  __pyx_t_7.fold = __pyx_v_fold;
  __pyx_t_7.dtclass = __pyx_v_dtclass;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3820
 *     )
 * 
 * cdef inline datetime.datetime dt_combine(datetime.date date=None, datetime.time time=None, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a `datetime.datetime` by combining a date and a time `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.dt_combine", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_date);
  __Pyx_XDECREF(__pyx_v_tzinfo);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3852
 * 
 * # . manipulation
 * cdef inline datetime.datetime dt_add(datetime.datetime dt, int days=0, int seconds=0, int microseconds=0, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Add a day/second/microsecond delta to a `datetime.datetime` `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_add(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_dt_add *__pyx_optional_args) {
  int __pyx_v_days = ((int)0);
  int __pyx_v_seconds = ((int)0);
  int __pyx_v_microseconds = ((int)0);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PY_LONG_LONG __pyx_v_us;
  __pyx_t_7cytimes_5utils_dtm __pyx_v__dtm;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_4;
  PY_LONG_LONG __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_ord __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_us __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_add", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_days = __pyx_optional_args->days;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_seconds = __pyx_optional_args->seconds;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_microseconds = __pyx_optional_args->microseconds;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_dtclass = __pyx_optional_args->dtclass;
          }
        }
      }
    }
  }

  /* "utils.pxd":3873
 *     # Fast-path: days only  preserve time fields and bump ordinal
 *     cdef ymd _ymd
 *     if seconds == 0 and microseconds == 0:             # <<<<<<<<<<<<<<
 *         # Early exit
 *         if days == 0:
*/
  __pyx_t_2 = (__pyx_v_seconds == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_microseconds == 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":3875
 *     if seconds == 0 and microseconds == 0:
 *         # Early exit
 *         if days == 0:             # <<<<<<<<<<<<<<
 *             return dt_fr_dt(dt, dtclass)
 * 
*/
    __pyx_t_1 = (__pyx_v_days == 0);
    if (__pyx_t_1) {

      /* "utils.pxd":3876
 *         # Early exit
 *         if days == 0:
 *             return dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 * 
 *         # Compute new ordinal, then back to Y/M/D
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_4.__pyx_n = 1;
      __pyx_t_4.dtclass = __pyx_v_dtclass;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3876, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyDateTime_DateTime *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":3875
 *     if seconds == 0 and microseconds == 0:
 *         # Early exit
 *         if days == 0:             # <<<<<<<<<<<<<<
 *             return dt_fr_dt(dt, dtclass)
 * 
*/
    }

    /* "utils.pxd":3879
 * 
 *         # Compute new ordinal, then back to Y/M/D
 *         _ymd = ymd_fr_ord(dt_to_ord(dt, False) + days)             # <<<<<<<<<<<<<<
 * 
 *         # New datetime
*/
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.utc = 0;
    __pyx_t_5 = __pyx_f_7cytimes_5utils_dt_to_ord(__pyx_v_dt, &__pyx_t_6); if (unlikely(__pyx_t_5 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(5, 3879, __pyx_L1_error)
    __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_t_5 + __pyx_v_days));

    /* "utils.pxd":3882
 * 
 *         # New datetime
 *         return dt_new(             # <<<<<<<<<<<<<<
 *             _ymd.year, _ymd.month, _ymd.day, dt.hour, dt.minute,
 *             dt.second, dt.microsecond, dt.tzinfo, dt.fold, dtclass,
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);

    /* "utils.pxd":3884
 *         return dt_new(
 *             _ymd.year, _ymd.month, _ymd.day, dt.hour, dt.minute,
 *             dt.second, dt.microsecond, dt.tzinfo, dt.fold, dtclass,             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_3 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "utils.pxd":3882
 * 
 *         # New datetime
 *         return dt_new(             # <<<<<<<<<<<<<<
 *             _ymd.year, _ymd.month, _ymd.day, dt.hour, dt.minute,
 *             dt.second, dt.microsecond, dt.tzinfo, dt.fold, dtclass,
*/
    __pyx_t_8.__pyx_n = 10;
    __pyx_t_8.year = __pyx_v__ymd.year;
    __pyx_t_8.month = __pyx_v__ymd.month;
    __pyx_t_8.day = __pyx_v__ymd.day;
    __pyx_t_8.hour = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);
    __pyx_t_8.minute = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);
    __pyx_t_8.second = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);
    __pyx_t_8.microsecond = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt);
    __pyx_t_8.tzinfo = __pyx_t_3;
    __pyx_t_8.fold = __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt);
    __pyx_t_8.dtclass = __pyx_v_dtclass;
    __pyx_t_7 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_8)); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 3882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_7);
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "utils.pxd":3873
 *     # Fast-path: days only  preserve time fields and bump ordinal
 *     cdef ymd _ymd
 *     if seconds == 0 and microseconds == 0:             # <<<<<<<<<<<<<<
 *         # Early exit
 *         if days == 0:
*/
  }

  /* "utils.pxd":3888
 * 
 *     # General path: add delta in microseconds
 *     cdef long long us = dt_to_us(dt, False)             # <<<<<<<<<<<<<<
 *     us += (
 *         (<long long> days)          * US_DAY +
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.utc = 0;
  __pyx_t_5 = __pyx_f_7cytimes_5utils_dt_to_us(__pyx_v_dt, &__pyx_t_9); if (unlikely(__pyx_t_5 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 3888, __pyx_L1_error)
  __pyx_v_us = __pyx_t_5;

  /* "utils.pxd":3889
 *     # General path: add delta in microseconds
 *     cdef long long us = dt_to_us(dt, False)
 *     us += (             # <<<<<<<<<<<<<<
 *         (<long long> days)          * US_DAY +
 *         (<long long> seconds)       * US_SECOND +
*/
  __pyx_v_us = (__pyx_v_us + (((((PY_LONG_LONG)__pyx_v_days) * __pyx_v_7cytimes_5utils_US_DAY) + (((PY_LONG_LONG)__pyx_v_seconds) * __pyx_v_7cytimes_5utils_US_SECOND)) + ((PY_LONG_LONG)__pyx_v_microseconds)));

  /* "utils.pxd":3896
 * 
 *     # Compute new date & time
 *     cdef dtm _dtm = dtm_fr_us(us)             # <<<<<<<<<<<<<<
 * 
 *     # New datetime
*/
  __pyx_v__dtm = __pyx_f_7cytimes_5utils_dtm_fr_us(__pyx_v_us);

  /* "utils.pxd":3899
 * 
 *     # New datetime
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         _dtm.year, _dtm.month, _dtm.day, _dtm.hour, _dtm.minute,
 *         _dtm.second, _dtm.microsecond, dt.tzinfo, dt.fold, dtclass,
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "utils.pxd":3901
 *     return dt_new(
 *         _dtm.year, _dtm.month, _dtm.day, _dtm.hour, _dtm.minute,
 *         _dtm.second, _dtm.microsecond, dt.tzinfo, dt.fold, dtclass,             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_7 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 3901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "utils.pxd":3899
 * 
 *     # New datetime
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         _dtm.year, _dtm.month, _dtm.day, _dtm.hour, _dtm.minute,
 *         _dtm.second, _dtm.microsecond, dt.tzinfo, dt.fold, dtclass,
*/
  __pyx_t_8.__pyx_n = 10;
  __pyx_t_8.year = __pyx_v__dtm.year;
  __pyx_t_8.month = __pyx_v__dtm.month;
  __pyx_t_8.day = __pyx_v__dtm.day;
  __pyx_t_8.hour = __pyx_v__dtm.hour;
  __pyx_t_8.minute = __pyx_v__dtm.minute;
  __pyx_t_8.second = __pyx_v__dtm.second;
  __pyx_t_8.microsecond = __pyx_v__dtm.microsecond;
  __pyx_t_8.tzinfo = __pyx_t_7;
  __pyx_t_8.fold = __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt);
  __pyx_t_8.dtclass = __pyx_v_dtclass;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3852
 * 
 * # . manipulation
 * cdef inline datetime.datetime dt_add(datetime.datetime dt, int days=0, int seconds=0, int microseconds=0, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Add a day/second/microsecond delta to a `datetime.datetime` `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.utils.dt_add", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3904
 *     )
 * 
 * cdef inline datetime.datetime dt_add_delta(datetime.datetime dt,             # <<<<<<<<<<<<<<
 *     int years=0, int quarters=0, int months=0, int weeks=0, long long days=0, long long hours=0,
 *     long long minutes=0, long long seconds=0, long long milliseconds=0, long long microseconds=0,
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_add_delta(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_dt_add_delta *__pyx_optional_args) {
  int __pyx_v_years = ((int)0);
  int __pyx_v_quarters = ((int)0);
  int __pyx_v_months = ((int)0);
  int __pyx_v_weeks = ((int)0);
  PY_LONG_LONG __pyx_v_days = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_hours = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_minutes = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_seconds = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_milliseconds = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_microseconds = ((PY_LONG_LONG)0);
  int __pyx_v_year = ((int)-1);
  int __pyx_v_month = ((int)-1);
  int __pyx_v_day = ((int)-1);
  int __pyx_v_weekday = ((int)-1);
  int __pyx_v_hour = ((int)-1);
  int __pyx_v_minute = ((int)-1);
  int __pyx_v_second = ((int)-1);
  int __pyx_v_millisecond = ((int)-1);
  int __pyx_v_microsecond = ((int)-1);

  /* "utils.pxd":3908
 *     long long minutes=0, long long seconds=0, long long milliseconds=0, long long microseconds=0,
 *     int year=-1, int month=-1, int day=-1, int weekday=-1, int hour=-1, int minute=-1,
 *     int second=-1, int millisecond=-1, int microsecond=-1, object dtclass=None             # <<<<<<<<<<<<<<
 * ):
 *     """Add relative and absolute deltas to datetime `<'datetime.datetime'>`.
*/
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  int __pyx_v_o_yy;
  int __pyx_v_yy;
  int __pyx_v_o_mm;
  int __pyx_v_mm;
  int __pyx_v_o_dd;
  int __pyx_v_dd;
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_v_rel_days;
  PY_LONG_LONG __pyx_v_o_hh;
  PY_LONG_LONG __pyx_v_hh;
  PY_LONG_LONG __pyx_v_o_mi;
  PY_LONG_LONG __pyx_v_mi;
  PY_LONG_LONG __pyx_v_o_ss;
  PY_LONG_LONG __pyx_v_ss;
  PY_LONG_LONG __pyx_v_o_us;
  PY_LONG_LONG __pyx_v_us;
  PY_LONG_LONG __pyx_v_old_ord;
  PY_LONG_LONG __pyx_v_new_ord;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PY_LONG_LONG __pyx_t_4;
  long __pyx_t_5;
  long __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_add_delta", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_years = __pyx_optional_args->years;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_quarters = __pyx_optional_args->quarters;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_months = __pyx_optional_args->months;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_weeks = __pyx_optional_args->weeks;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_days = __pyx_optional_args->days;
              if (__pyx_optional_args->__pyx_n > 5) {
                __pyx_v_hours = __pyx_optional_args->hours;
                if (__pyx_optional_args->__pyx_n > 6) {
                  __pyx_v_minutes = __pyx_optional_args->minutes;
                  if (__pyx_optional_args->__pyx_n > 7) {
                    __pyx_v_seconds = __pyx_optional_args->seconds;
                    if (__pyx_optional_args->__pyx_n > 8) {
                      __pyx_v_milliseconds = __pyx_optional_args->milliseconds;
                      if (__pyx_optional_args->__pyx_n > 9) {
                        __pyx_v_microseconds = __pyx_optional_args->microseconds;
                        if (__pyx_optional_args->__pyx_n > 10) {
                          __pyx_v_year = __pyx_optional_args->year;
                          if (__pyx_optional_args->__pyx_n > 11) {
                            __pyx_v_month = __pyx_optional_args->month;
                            if (__pyx_optional_args->__pyx_n > 12) {
                              __pyx_v_day = __pyx_optional_args->day;
                              if (__pyx_optional_args->__pyx_n > 13) {
                                __pyx_v_weekday = __pyx_optional_args->weekday;
                                if (__pyx_optional_args->__pyx_n > 14) {
                                  __pyx_v_hour = __pyx_optional_args->hour;
                                  if (__pyx_optional_args->__pyx_n > 15) {
                                    __pyx_v_minute = __pyx_optional_args->minute;
                                    if (__pyx_optional_args->__pyx_n > 16) {
                                      __pyx_v_second = __pyx_optional_args->second;
                                      if (__pyx_optional_args->__pyx_n > 17) {
                                        __pyx_v_millisecond = __pyx_optional_args->millisecond;
                                        if (__pyx_optional_args->__pyx_n > 18) {
                                          __pyx_v_microsecond = __pyx_optional_args->microsecond;
                                          if (__pyx_optional_args->__pyx_n > 19) {
                                            __pyx_v_dtclass = __pyx_optional_args->dtclass;
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }

  /* "utils.pxd":3949
 *     # ----------------------------------------------------
 *     cdef:
 *         int o_yy = dt.year             # <<<<<<<<<<<<<<
 *         int yy = (year if year > 0 else o_yy) + years
 *         int o_mm = dt.month
*/
  __pyx_v_o_yy = __pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt);

  /* "utils.pxd":3950
 *     cdef:
 *         int o_yy = dt.year
 *         int yy = (year if year > 0 else o_yy) + years             # <<<<<<<<<<<<<<
 *         int o_mm = dt.month
 *         int mm = (month if month > 0 else o_mm) + months + (quarters * 3)
*/
  __pyx_t_2 = (__pyx_v_year > 0);
  if (__pyx_t_2) {
    __pyx_t_1 = __pyx_v_year;
  } else {
    __pyx_t_1 = __pyx_v_o_yy;
  }
  __pyx_v_yy = (__pyx_t_1 + __pyx_v_years);

  /* "utils.pxd":3951
 *         int o_yy = dt.year
 *         int yy = (year if year > 0 else o_yy) + years
 *         int o_mm = dt.month             # <<<<<<<<<<<<<<
 *         int mm = (month if month > 0 else o_mm) + months + (quarters * 3)
 *         int o_dd = dt.day
*/
  __pyx_v_o_mm = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);

  /* "utils.pxd":3952
 *         int yy = (year if year > 0 else o_yy) + years
 *         int o_mm = dt.month
 *         int mm = (month if month > 0 else o_mm) + months + (quarters * 3)             # <<<<<<<<<<<<<<
 *         int o_dd = dt.day
 *         int dd = (day if day > 0 else o_dd)
*/
  __pyx_t_2 = (__pyx_v_month > 0);
  if (__pyx_t_2) {
    __pyx_t_1 = __pyx_v_month;
  } else {
    __pyx_t_1 = __pyx_v_o_mm;
  }
  __pyx_v_mm = ((__pyx_t_1 + __pyx_v_months) + (__pyx_v_quarters * 3));

  /* "utils.pxd":3953
 *         int o_mm = dt.month
 *         int mm = (month if month > 0 else o_mm) + months + (quarters * 3)
 *         int o_dd = dt.day             # <<<<<<<<<<<<<<
 *         int dd = (day if day > 0 else o_dd)
 *         long long q, r
*/
  __pyx_v_o_dd = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt);

  /* "utils.pxd":3954
 *         int mm = (month if month > 0 else o_mm) + months + (quarters * 3)
 *         int o_dd = dt.day
 *         int dd = (day if day > 0 else o_dd)             # <<<<<<<<<<<<<<
 *         long long q, r
 *     # . normalize month
*/
  __pyx_t_2 = (__pyx_v_day > 0);
  if (__pyx_t_2) {
    __pyx_t_1 = __pyx_v_day;
  } else {
    __pyx_t_1 = __pyx_v_o_dd;
  }
  __pyx_v_dd = __pyx_t_1;

  /* "utils.pxd":3957
 *         long long q, r
 *     # . normalize month
 *     if not 0 < mm <= 12:             # <<<<<<<<<<<<<<
 *         mm -= 1
 *         with cython.cdivision(True):
*/
  __pyx_t_2 = (0 < __pyx_v_mm);
  if (__pyx_t_2) {
    __pyx_t_2 = (__pyx_v_mm <= 12);
  }
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "utils.pxd":3958
 *     # . normalize month
 *     if not 0 < mm <= 12:
 *         mm -= 1             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = mm / 12; r = mm % 12
*/
    __pyx_v_mm = (__pyx_v_mm - 1);

    /* "utils.pxd":3960
 *         mm -= 1
 *         with cython.cdivision(True):
 *             q = mm / 12; r = mm % 12             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1; r += 12
*/
    __pyx_v_q = (((long)__pyx_v_mm) / 12);
    __pyx_v_r = (__pyx_v_mm % 12);

    /* "utils.pxd":3961
 *         with cython.cdivision(True):
 *             q = mm / 12; r = mm % 12
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += 12
 *         yy += q; mm = r + 1
*/
    __pyx_t_3 = (__pyx_v_r < 0);
    if (__pyx_t_3) {

      /* "utils.pxd":3962
 *             q = mm / 12; r = mm % 12
 *         if r < 0:
 *             q -= 1; r += 12             # <<<<<<<<<<<<<<
 *         yy += q; mm = r + 1
 *     # . relative days
*/
      __pyx_v_q = (__pyx_v_q - 1);
      __pyx_v_r = (__pyx_v_r + 12);

      /* "utils.pxd":3961
 *         with cython.cdivision(True):
 *             q = mm / 12; r = mm % 12
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += 12
 *         yy += q; mm = r + 1
*/
    }

    /* "utils.pxd":3963
 *         if r < 0:
 *             q -= 1; r += 12
 *         yy += q; mm = r + 1             # <<<<<<<<<<<<<<
 *     # . relative days
 *     cdef long long rel_days = days + (weeks * 7)
*/
    __pyx_v_yy = (__pyx_v_yy + __pyx_v_q);
    __pyx_v_mm = (__pyx_v_r + 1);

    /* "utils.pxd":3957
 *         long long q, r
 *     # . normalize month
 *     if not 0 < mm <= 12:             # <<<<<<<<<<<<<<
 *         mm -= 1
 *         with cython.cdivision(True):
*/
  }

  /* "utils.pxd":3965
 *         yy += q; mm = r + 1
 *     # . relative days
 *     cdef long long rel_days = days + (weeks * 7)             # <<<<<<<<<<<<<<
 * 
 *     # Time fields
*/
  __pyx_v_rel_days = (__pyx_v_days + (__pyx_v_weeks * 7));

  /* "utils.pxd":3970
 *     # ----------------------------------------------------
 *     cdef:
 *         long long o_hh = dt.hour             # <<<<<<<<<<<<<<
 *         long long hh = (hour if hour >= 0 else o_hh) + hours
 *         long long o_mi = dt.minute
*/
  __pyx_v_o_hh = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);

  /* "utils.pxd":3971
 *     cdef:
 *         long long o_hh = dt.hour
 *         long long hh = (hour if hour >= 0 else o_hh) + hours             # <<<<<<<<<<<<<<
 *         long long o_mi = dt.minute
 *         long long mi = (minute if minute >= 0 else o_mi) + minutes
*/
  __pyx_t_3 = (__pyx_v_hour >= 0);
  if (__pyx_t_3) {
    __pyx_t_4 = __pyx_v_hour;
  } else {
    __pyx_t_4 = __pyx_v_o_hh;
  }
  __pyx_v_hh = (__pyx_t_4 + __pyx_v_hours);

  /* "utils.pxd":3972
 *         long long o_hh = dt.hour
 *         long long hh = (hour if hour >= 0 else o_hh) + hours
 *         long long o_mi = dt.minute             # <<<<<<<<<<<<<<
 *         long long mi = (minute if minute >= 0 else o_mi) + minutes
 *         long long o_ss = dt.second
*/
  __pyx_v_o_mi = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);

  /* "utils.pxd":3973
 *         long long hh = (hour if hour >= 0 else o_hh) + hours
 *         long long o_mi = dt.minute
 *         long long mi = (minute if minute >= 0 else o_mi) + minutes             # <<<<<<<<<<<<<<
 *         long long o_ss = dt.second
 *         long long ss = (second if second >= 0 else o_ss) + seconds
*/
  __pyx_t_3 = (__pyx_v_minute >= 0);
  if (__pyx_t_3) {
    __pyx_t_4 = __pyx_v_minute;
  } else {
    __pyx_t_4 = __pyx_v_o_mi;
  }
  __pyx_v_mi = (__pyx_t_4 + __pyx_v_minutes);

  /* "utils.pxd":3974
 *         long long o_mi = dt.minute
 *         long long mi = (minute if minute >= 0 else o_mi) + minutes
 *         long long o_ss = dt.second             # <<<<<<<<<<<<<<
 *         long long ss = (second if second >= 0 else o_ss) + seconds
 *         long long o_us = dt.microsecond
*/
  __pyx_v_o_ss = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);

  /* "utils.pxd":3975
 *         long long mi = (minute if minute >= 0 else o_mi) + minutes
 *         long long o_ss = dt.second
 *         long long ss = (second if second >= 0 else o_ss) + seconds             # <<<<<<<<<<<<<<
 *         long long o_us = dt.microsecond
 *         long long us = combine_absolute_ms_us(millisecond, microsecond)
*/
  __pyx_t_3 = (__pyx_v_second >= 0);
  if (__pyx_t_3) {
    __pyx_t_4 = __pyx_v_second;
  } else {
    __pyx_t_4 = __pyx_v_o_ss;
  }
  __pyx_v_ss = (__pyx_t_4 + __pyx_v_seconds);

  /* "utils.pxd":3976
 *         long long o_ss = dt.second
 *         long long ss = (second if second >= 0 else o_ss) + seconds
 *         long long o_us = dt.microsecond             # <<<<<<<<<<<<<<
 *         long long us = combine_absolute_ms_us(millisecond, microsecond)
 *     us = (us if us >= 0 else o_us) + milliseconds * US_MILLISECOND + microseconds
*/
  __pyx_v_o_us = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt);

  /* "utils.pxd":3977
 *         long long ss = (second if second >= 0 else o_ss) + seconds
 *         long long o_us = dt.microsecond
 *         long long us = combine_absolute_ms_us(millisecond, microsecond)             # <<<<<<<<<<<<<<
 *     us = (us if us >= 0 else o_us) + milliseconds * US_MILLISECOND + microseconds
 *     # . normalize microseconds
*/
  __pyx_v_us = __pyx_f_7cytimes_5utils_combine_absolute_ms_us(__pyx_v_millisecond, __pyx_v_microsecond);

  /* "utils.pxd":3978
 *         long long o_us = dt.microsecond
 *         long long us = combine_absolute_ms_us(millisecond, microsecond)
 *     us = (us if us >= 0 else o_us) + milliseconds * US_MILLISECOND + microseconds             # <<<<<<<<<<<<<<
 *     # . normalize microseconds
 *     if not 0 <= us < US_SECOND:
*/
  __pyx_t_3 = (__pyx_v_us >= 0);
  if (__pyx_t_3) {
    __pyx_t_4 = __pyx_v_us;
  } else {
    __pyx_t_4 = __pyx_v_o_us;
  }
  __pyx_v_us = ((__pyx_t_4 + (__pyx_v_milliseconds * __pyx_v_7cytimes_5utils_US_MILLISECOND)) + __pyx_v_microseconds);

  /* "utils.pxd":3980
 *     us = (us if us >= 0 else o_us) + milliseconds * US_MILLISECOND + microseconds
 *     # . normalize microseconds
 *     if not 0 <= us < US_SECOND:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = us / US_SECOND; r = us % US_SECOND
*/
  __pyx_t_3 = (0 <= __pyx_v_us);
  if (__pyx_t_3) {
    __pyx_t_3 = (__pyx_v_us < __pyx_v_7cytimes_5utils_US_SECOND);
  }
  __pyx_t_2 = (!__pyx_t_3);
  if (__pyx_t_2) {

    /* "utils.pxd":3982
 *     if not 0 <= us < US_SECOND:
 *         with cython.cdivision(True):
 *             q = us / US_SECOND; r = us % US_SECOND             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1; r += US_SECOND
*/
    __pyx_v_q = (__pyx_v_us / __pyx_v_7cytimes_5utils_US_SECOND);
    __pyx_v_r = (__pyx_v_us % __pyx_v_7cytimes_5utils_US_SECOND);

    /* "utils.pxd":3983
 *         with cython.cdivision(True):
 *             q = us / US_SECOND; r = us % US_SECOND
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += US_SECOND
 *         ss += q; us = r
*/
    __pyx_t_2 = (__pyx_v_r < 0);
    if (__pyx_t_2) {

      /* "utils.pxd":3984
 *             q = us / US_SECOND; r = us % US_SECOND
 *         if r < 0:
 *             q -= 1; r += US_SECOND             # <<<<<<<<<<<<<<
 *         ss += q; us = r
 *     # . normalize seconds
*/
      __pyx_v_q = (__pyx_v_q - 1);
      __pyx_v_r = (__pyx_v_r + __pyx_v_7cytimes_5utils_US_SECOND);

      /* "utils.pxd":3983
 *         with cython.cdivision(True):
 *             q = us / US_SECOND; r = us % US_SECOND
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += US_SECOND
 *         ss += q; us = r
*/
    }

    /* "utils.pxd":3985
 *         if r < 0:
 *             q -= 1; r += US_SECOND
 *         ss += q; us = r             # <<<<<<<<<<<<<<
 *     # . normalize seconds
 *     if not 0 <= ss < 60:
*/
    __pyx_v_ss = (__pyx_v_ss + __pyx_v_q);
    __pyx_v_us = __pyx_v_r;

    /* "utils.pxd":3980
 *     us = (us if us >= 0 else o_us) + milliseconds * US_MILLISECOND + microseconds
 *     # . normalize microseconds
 *     if not 0 <= us < US_SECOND:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = us / US_SECOND; r = us % US_SECOND
*/
  }

  /* "utils.pxd":3987
 *         ss += q; us = r
 *     # . normalize seconds
 *     if not 0 <= ss < 60:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = ss / 60; r = ss % 60
*/
  __pyx_t_2 = (0 <= __pyx_v_ss);
  if (__pyx_t_2) {
    __pyx_t_2 = (__pyx_v_ss < 60);
  }
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "utils.pxd":3989
 *     if not 0 <= ss < 60:
 *         with cython.cdivision(True):
 *             q = ss / 60; r = ss % 60             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1; r += 60
*/
    __pyx_v_q = (__pyx_v_ss / 60);
    __pyx_v_r = (__pyx_v_ss % 60);

    /* "utils.pxd":3990
 *         with cython.cdivision(True):
 *             q = ss / 60; r = ss % 60
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += 60
 *         mi += q; ss = r
*/
    __pyx_t_3 = (__pyx_v_r < 0);
    if (__pyx_t_3) {

      /* "utils.pxd":3991
 *             q = ss / 60; r = ss % 60
 *         if r < 0:
 *             q -= 1; r += 60             # <<<<<<<<<<<<<<
 *         mi += q; ss = r
 *     # . normalize minutes
*/
      __pyx_v_q = (__pyx_v_q - 1);
      __pyx_v_r = (__pyx_v_r + 60);

      /* "utils.pxd":3990
 *         with cython.cdivision(True):
 *             q = ss / 60; r = ss % 60
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += 60
 *         mi += q; ss = r
*/
    }

    /* "utils.pxd":3992
 *         if r < 0:
 *             q -= 1; r += 60
 *         mi += q; ss = r             # <<<<<<<<<<<<<<
 *     # . normalize minutes
 *     if not 0 <= mi < 60:
*/
    __pyx_v_mi = (__pyx_v_mi + __pyx_v_q);
    __pyx_v_ss = __pyx_v_r;

    /* "utils.pxd":3987
 *         ss += q; us = r
 *     # . normalize seconds
 *     if not 0 <= ss < 60:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = ss / 60; r = ss % 60
*/
  }

  /* "utils.pxd":3994
 *         mi += q; ss = r
 *     # . normalize minutes
 *     if not 0 <= mi < 60:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = mi / 60; r = mi % 60
*/
  __pyx_t_3 = (0 <= __pyx_v_mi);
  if (__pyx_t_3) {
    __pyx_t_3 = (__pyx_v_mi < 60);
  }
  __pyx_t_2 = (!__pyx_t_3);
  if (__pyx_t_2) {

    /* "utils.pxd":3996
 *     if not 0 <= mi < 60:
 *         with cython.cdivision(True):
 *             q = mi / 60; r = mi % 60             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1; r += 60
*/
    __pyx_v_q = (__pyx_v_mi / 60);
    __pyx_v_r = (__pyx_v_mi % 60);

    /* "utils.pxd":3997
 *         with cython.cdivision(True):
 *             q = mi / 60; r = mi % 60
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += 60
 *         hh += q; mi = r
*/
    __pyx_t_2 = (__pyx_v_r < 0);
    if (__pyx_t_2) {

      /* "utils.pxd":3998
 *             q = mi / 60; r = mi % 60
 *         if r < 0:
 *             q -= 1; r += 60             # <<<<<<<<<<<<<<
 *         hh += q; mi = r
 *     # . normalize hours to days
*/
      __pyx_v_q = (__pyx_v_q - 1);
      __pyx_v_r = (__pyx_v_r + 60);

      /* "utils.pxd":3997
 *         with cython.cdivision(True):
 *             q = mi / 60; r = mi % 60
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += 60
 *         hh += q; mi = r
*/
    }

    /* "utils.pxd":3999
 *         if r < 0:
 *             q -= 1; r += 60
 *         hh += q; mi = r             # <<<<<<<<<<<<<<
 *     # . normalize hours to days
 *     if not 0 <= hh < 24:
*/
    __pyx_v_hh = (__pyx_v_hh + __pyx_v_q);
    __pyx_v_mi = __pyx_v_r;

    /* "utils.pxd":3994
 *         mi += q; ss = r
 *     # . normalize minutes
 *     if not 0 <= mi < 60:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = mi / 60; r = mi % 60
*/
  }

  /* "utils.pxd":4001
 *         hh += q; mi = r
 *     # . normalize hours to days
 *     if not 0 <= hh < 24:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = hh / 24; r = hh % 24
*/
  __pyx_t_2 = (0 <= __pyx_v_hh);
  if (__pyx_t_2) {
    __pyx_t_2 = (__pyx_v_hh < 24);
  }
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "utils.pxd":4003
 *     if not 0 <= hh < 24:
 *         with cython.cdivision(True):
 *             q = hh / 24; r = hh % 24             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1; r += 24
*/
    __pyx_v_q = (__pyx_v_hh / 24);
    __pyx_v_r = (__pyx_v_hh % 24);

    /* "utils.pxd":4004
 *         with cython.cdivision(True):
 *             q = hh / 24; r = hh % 24
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += 24
 *         rel_days += q; hh = r
*/
    __pyx_t_3 = (__pyx_v_r < 0);
    if (__pyx_t_3) {

      /* "utils.pxd":4005
 *             q = hh / 24; r = hh % 24
 *         if r < 0:
 *             q -= 1; r += 24             # <<<<<<<<<<<<<<
 *         rel_days += q; hh = r
 * 
*/
      __pyx_v_q = (__pyx_v_q - 1);
      __pyx_v_r = (__pyx_v_r + 24);

      /* "utils.pxd":4004
 *         with cython.cdivision(True):
 *             q = hh / 24; r = hh % 24
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += 24
 *         rel_days += q; hh = r
*/
    }

    /* "utils.pxd":4006
 *         if r < 0:
 *             q -= 1; r += 24
 *         rel_days += q; hh = r             # <<<<<<<<<<<<<<
 * 
 *     # Handle day delta
*/
    __pyx_v_rel_days = (__pyx_v_rel_days + __pyx_v_q);
    __pyx_v_hh = __pyx_v_r;

    /* "utils.pxd":4001
 *         hh += q; mi = r
 *     # . normalize hours to days
 *     if not 0 <= hh < 24:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = hh / 24; r = hh % 24
*/
  }

  /* "utils.pxd":4012
 *     cdef long long old_ord, new_ord
 *     cdef ymd _ymd
 *     if rel_days != 0 or weekday >= 0:             # <<<<<<<<<<<<<<
 *         old_ord = ymd_to_ord(yy, mm, dd)
 *         new_ord = old_ord + rel_days
*/
  __pyx_t_2 = (__pyx_v_rel_days != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L14_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_weekday >= 0);
  __pyx_t_3 = __pyx_t_2;
  __pyx_L14_bool_binop_done:;
  if (__pyx_t_3) {

    /* "utils.pxd":4013
 *     cdef ymd _ymd
 *     if rel_days != 0 or weekday >= 0:
 *         old_ord = ymd_to_ord(yy, mm, dd)             # <<<<<<<<<<<<<<
 *         new_ord = old_ord + rel_days
 *         # . adjust to weekday if needed
*/
    __pyx_v_old_ord = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v_yy, __pyx_v_mm, __pyx_v_dd);

    /* "utils.pxd":4014
 *     if rel_days != 0 or weekday >= 0:
 *         old_ord = ymd_to_ord(yy, mm, dd)
 *         new_ord = old_ord + rel_days             # <<<<<<<<<<<<<<
 *         # . adjust to weekday if needed
 *         if weekday >= 0:
*/
    __pyx_v_new_ord = (__pyx_v_old_ord + __pyx_v_rel_days);

    /* "utils.pxd":4016
 *         new_ord = old_ord + rel_days
 *         # . adjust to weekday if needed
 *         if weekday >= 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 r = (new_ord + 6) % 7
*/
    __pyx_t_3 = (__pyx_v_weekday >= 0);
    if (__pyx_t_3) {

      /* "utils.pxd":4018
 *         if weekday >= 0:
 *             with cython.cdivision(True):
 *                 r = (new_ord + 6) % 7             # <<<<<<<<<<<<<<
 *                 if r < 0:
 *                     r += 7
*/
      __pyx_v_r = ((__pyx_v_new_ord + 6) % 7);

      /* "utils.pxd":4019
 *             with cython.cdivision(True):
 *                 r = (new_ord + 6) % 7
 *                 if r < 0:             # <<<<<<<<<<<<<<
 *                     r += 7
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
*/
      __pyx_t_3 = (__pyx_v_r < 0);
      if (__pyx_t_3) {

        /* "utils.pxd":4020
 *                 r = (new_ord + 6) % 7
 *                 if r < 0:
 *                     r += 7             # <<<<<<<<<<<<<<
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
 *         if old_ord != new_ord:
*/
        __pyx_v_r = (__pyx_v_r + 7);

        /* "utils.pxd":4019
 *             with cython.cdivision(True):
 *                 r = (new_ord + 6) % 7
 *                 if r < 0:             # <<<<<<<<<<<<<<
 *                     r += 7
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
*/
      }

      /* "utils.pxd":4021
 *                 if r < 0:
 *                     r += 7
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6             # <<<<<<<<<<<<<<
 *         if old_ord != new_ord:
 *             _ymd = ymd_fr_ord(new_ord)
*/
      __pyx_t_5 = 6;
      __pyx_t_1 = __pyx_v_weekday;
      __pyx_t_3 = (__pyx_t_5 < __pyx_t_1);
      if (__pyx_t_3) {
        __pyx_t_6 = __pyx_t_5;
      } else {
        __pyx_t_6 = __pyx_t_1;
      }
      __pyx_v_new_ord = (__pyx_v_new_ord + (__pyx_t_6 - __pyx_v_r));

      /* "utils.pxd":4016
 *         new_ord = old_ord + rel_days
 *         # . adjust to weekday if needed
 *         if weekday >= 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 r = (new_ord + 6) % 7
*/
    }

    /* "utils.pxd":4022
 *                     r += 7
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
 *         if old_ord != new_ord:             # <<<<<<<<<<<<<<
 *             _ymd = ymd_fr_ord(new_ord)
 *             yy, mm, dd = _ymd.year, _ymd.month, _ymd.day
*/
    __pyx_t_3 = (__pyx_v_old_ord != __pyx_v_new_ord);
    if (__pyx_t_3) {

      /* "utils.pxd":4023
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
 *         if old_ord != new_ord:
 *             _ymd = ymd_fr_ord(new_ord)             # <<<<<<<<<<<<<<
 *             yy, mm, dd = _ymd.year, _ymd.month, _ymd.day
 * 
*/
      __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord(__pyx_v_new_ord);

      /* "utils.pxd":4024
 *         if old_ord != new_ord:
 *             _ymd = ymd_fr_ord(new_ord)
 *             yy, mm, dd = _ymd.year, _ymd.month, _ymd.day             # <<<<<<<<<<<<<<
 * 
 *     # Compare new date/time
*/
      __pyx_t_1 = __pyx_v__ymd.year;
      __pyx_t_7 = __pyx_v__ymd.month;
      __pyx_t_8 = __pyx_v__ymd.day;
      __pyx_v_yy = __pyx_t_1;
      __pyx_v_mm = __pyx_t_7;
      __pyx_v_dd = __pyx_t_8;

      /* "utils.pxd":4022
 *                     r += 7
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
 *         if old_ord != new_ord:             # <<<<<<<<<<<<<<
 *             _ymd = ymd_fr_ord(new_ord)
 *             yy, mm, dd = _ymd.year, _ymd.month, _ymd.day
*/
    }

    /* "utils.pxd":4012
 *     cdef long long old_ord, new_ord
 *     cdef ymd _ymd
 *     if rel_days != 0 or weekday >= 0:             # <<<<<<<<<<<<<<
 *         old_ord = ymd_to_ord(yy, mm, dd)
 *         new_ord = old_ord + rel_days
*/
  }

  /* "utils.pxd":4027
 * 
 *     # Compare new date/time
 *     if (yy == o_yy and mm == o_mm and dd == o_dd and             # <<<<<<<<<<<<<<
 *         hh == o_hh and mi == o_mi and ss == o_ss and us == o_us):
 *         return dt_fr_dt(dt, dtclass)
*/
  __pyx_t_2 = (__pyx_v_yy == __pyx_v_o_yy);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L20_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_mm == __pyx_v_o_mm);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L20_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_dd == __pyx_v_o_dd);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L20_bool_binop_done;
  }

  /* "utils.pxd":4028
 *     # Compare new date/time
 *     if (yy == o_yy and mm == o_mm and dd == o_dd and
 *         hh == o_hh and mi == o_mi and ss == o_ss and us == o_us):             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  __pyx_t_2 = (__pyx_v_hh == __pyx_v_o_hh);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L20_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_mi == __pyx_v_o_mi);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L20_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_ss == __pyx_v_o_ss);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L20_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_us == __pyx_v_o_us);
  __pyx_t_3 = __pyx_t_2;
  __pyx_L20_bool_binop_done:;

  /* "utils.pxd":4027
 * 
 *     # Compare new date/time
 *     if (yy == o_yy and mm == o_mm and dd == o_dd and             # <<<<<<<<<<<<<<
 *         hh == o_hh and mi == o_mi and ss == o_ss and us == o_us):
 *         return dt_fr_dt(dt, dtclass)
*/
  if (__pyx_t_3) {

    /* "utils.pxd":4029
 *     if (yy == o_yy and mm == o_mm and dd == o_dd and
 *         hh == o_hh and mi == o_mi and ss == o_ss and us == o_us):
 *         return dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 * 
 *     # Clamp day to valid days in month
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_10.__pyx_n = 1;
    __pyx_t_10.dtclass = __pyx_v_dtclass;
    __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_10)); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 4029, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_9);
    __pyx_t_9 = 0;
    goto __pyx_L0;

    /* "utils.pxd":4027
 * 
 *     # Compare new date/time
 *     if (yy == o_yy and mm == o_mm and dd == o_dd and             # <<<<<<<<<<<<<<
 *         hh == o_hh and mi == o_mi and ss == o_ss and us == o_us):
 *         return dt_fr_dt(dt, dtclass)
*/
  }

  /* "utils.pxd":4032
 * 
 *     # Clamp day to valid days in month
 *     if dd > 28:             # <<<<<<<<<<<<<<
 *         dd = min(dd, days_in_month(yy, mm))
 * 
*/
  __pyx_t_3 = (__pyx_v_dd > 28);
  if (__pyx_t_3) {

    /* "utils.pxd":4033
 *     # Clamp day to valid days in month
 *     if dd > 28:
 *         dd = min(dd, days_in_month(yy, mm))             # <<<<<<<<<<<<<<
 * 
 *     # New datetime
*/
    __pyx_t_8 = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v_yy, __pyx_v_mm);
    __pyx_t_7 = __pyx_v_dd;
    __pyx_t_3 = (__pyx_t_8 < __pyx_t_7);
    if (__pyx_t_3) {
      __pyx_t_1 = __pyx_t_8;
    } else {
      __pyx_t_1 = __pyx_t_7;
    }
    __pyx_v_dd = __pyx_t_1;

    /* "utils.pxd":4032
 * 
 *     # Clamp day to valid days in month
 *     if dd > 28:             # <<<<<<<<<<<<<<
 *         dd = min(dd, days_in_month(yy, mm))
 * 
*/
  }

  /* "utils.pxd":4036
 * 
 *     # New datetime
 *     return dt_new(yy, mm, dd, hh, mi, ss, us, dt.tzinfo, dt.fold, dtclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.datetime dt_replace(datetime.datetime dt,
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_9 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 4036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_12.__pyx_n = 10;
  __pyx_t_12.year = __pyx_v_yy;
  __pyx_t_12.month = __pyx_v_mm;
  __pyx_t_12.day = __pyx_v_dd;
  __pyx_t_12.hour = __pyx_v_hh;
  __pyx_t_12.minute = __pyx_v_mi;
  __pyx_t_12.second = __pyx_v_ss;
  __pyx_t_12.microsecond = __pyx_v_us;
  __pyx_t_12.tzinfo = __pyx_t_9;
  __pyx_t_12.fold = __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt);
  __pyx_t_12.dtclass = __pyx_v_dtclass;
  __pyx_t_11 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_12)); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 4036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_11);
  __pyx_t_11 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3904
 *     )
 * 
 * cdef inline datetime.datetime dt_add_delta(datetime.datetime dt,             # <<<<<<<<<<<<<<
 *     int years=0, int quarters=0, int months=0, int weeks=0, long long days=0, long long hours=0,
 *     long long minutes=0, long long seconds=0, long long milliseconds=0, long long microseconds=0,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("cytimes.utils.dt_add_delta", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4038
 *     return dt_new(yy, mm, dd, hh, mi, ss, us, dt.tzinfo, dt.fold, dtclass)
 * 
 * cdef inline datetime.datetime dt_replace(datetime.datetime dt,             # <<<<<<<<<<<<<<
 *     int year=-1, int month=-1, int day=-1, int hour=-1, int minute=-1,
 *     int second=-1, int microsecond=-1, object tzinfo=-1, int fold=-1,
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_replace(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_dt_replace *__pyx_optional_args) {
  int __pyx_v_year = ((int)-1);
  int __pyx_v_month = ((int)-1);
  int __pyx_v_day = ((int)-1);
  int __pyx_v_hour = ((int)-1);
  int __pyx_v_minute = ((int)-1);
  int __pyx_v_second = ((int)-1);
  int __pyx_v_microsecond = ((int)-1);
  PyObject *__pyx_v_tzinfo = ((PyObject *)__pyx_mstate_global->__pyx_int_neg_1);
  int __pyx_v_fold = ((int)-1);

  /* "utils.pxd":4041
 *     int year=-1, int month=-1, int day=-1, int hour=-1, int minute=-1,
 *     int second=-1, int microsecond=-1, object tzinfo=-1, int fold=-1,
 *     object dtclass=None,             # <<<<<<<<<<<<<<
 * ):
 *     """Replace specified fields of a datetime `<'datetime.datetime'>`.
*/
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  int __pyx_v_yy;
  int __pyx_v_mm;
  int __pyx_v_dd;
  int __pyx_v_hh;
  int __pyx_v_mi;
  int __pyx_v_ss;
  int __pyx_v_us;
  int __pyx_v_fd;
  PyObject *__pyx_v_tz = 0;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  long __pyx_t_5;
  int __pyx_t_6;
  long __pyx_t_7;
  long __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_replace", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_year = __pyx_optional_args->year;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_month = __pyx_optional_args->month;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_day = __pyx_optional_args->day;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_hour = __pyx_optional_args->hour;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_minute = __pyx_optional_args->minute;
              if (__pyx_optional_args->__pyx_n > 5) {
                __pyx_v_second = __pyx_optional_args->second;
                if (__pyx_optional_args->__pyx_n > 6) {
                  __pyx_v_microsecond = __pyx_optional_args->microsecond;
                  if (__pyx_optional_args->__pyx_n > 7) {
                    __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
                    if (__pyx_optional_args->__pyx_n > 8) {
                      __pyx_v_fold = __pyx_optional_args->fold;
                      if (__pyx_optional_args->__pyx_n > 9) {
                        __pyx_v_dtclass = __pyx_optional_args->dtclass;
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_tzinfo);

  /* "utils.pxd":4071
 *     # Get old fields
 *     cdef int yy, mm, dd, hh, mi, ss, us, fd
 *     yy, mm, dd = dt.year, dt.month, dt.day             # <<<<<<<<<<<<<<
 *     hh, mi, ss = dt.hour, dt.minute, dt.second
 *     us, fd     = dt.microsecond, dt.fold
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt);
  __pyx_t_2 = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);
  __pyx_t_3 = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt);
  __pyx_v_yy = __pyx_t_1;
  __pyx_v_mm = __pyx_t_2;
  __pyx_v_dd = __pyx_t_3;

  /* "utils.pxd":4072
 *     cdef int yy, mm, dd, hh, mi, ss, us, fd
 *     yy, mm, dd = dt.year, dt.month, dt.day
 *     hh, mi, ss = dt.hour, dt.minute, dt.second             # <<<<<<<<<<<<<<
 *     us, fd     = dt.microsecond, dt.fold
 *     cdef object tz = dt.tzinfo
*/
  __pyx_t_3 = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);
  __pyx_t_2 = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);
  __pyx_v_hh = __pyx_t_3;
  __pyx_v_mi = __pyx_t_2;
  __pyx_v_ss = __pyx_t_1;

  /* "utils.pxd":4073
 *     yy, mm, dd = dt.year, dt.month, dt.day
 *     hh, mi, ss = dt.hour, dt.minute, dt.second
 *     us, fd     = dt.microsecond, dt.fold             # <<<<<<<<<<<<<<
 *     cdef object tz = dt.tzinfo
 * 
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt);
  __pyx_t_2 = __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt);
  __pyx_v_us = __pyx_t_1;
  __pyx_v_fd = __pyx_t_2;

  /* "utils.pxd":4074
 *     hh, mi, ss = dt.hour, dt.minute, dt.second
 *     us, fd     = dt.microsecond, dt.fold
 *     cdef object tz = dt.tzinfo             # <<<<<<<<<<<<<<
 * 
 *     # Gen new fields
*/
  __pyx_t_4 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 4074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_tz = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "utils.pxd":4077
 * 
 *     # Gen new fields
 *     year   = yy if year < 1 else min(year, 9999)             # <<<<<<<<<<<<<<
 *     month  = mm if month < 1 else min(month, 12)
 *     if day < 1:
*/
  __pyx_t_6 = (__pyx_v_year < 1);
  if (__pyx_t_6) {
    __pyx_t_5 = __pyx_v_yy;
  } else {
    __pyx_t_7 = 0x270F;
    __pyx_t_2 = __pyx_v_year;
    __pyx_t_9 = (__pyx_t_7 < __pyx_t_2);
    if (__pyx_t_9) {
      __pyx_t_8 = __pyx_t_7;
    } else {
      __pyx_t_8 = __pyx_t_2;
    }
    __pyx_t_5 = __pyx_t_8;
  }
  __pyx_v_year = __pyx_t_5;

  /* "utils.pxd":4078
 *     # Gen new fields
 *     year   = yy if year < 1 else min(year, 9999)
 *     month  = mm if month < 1 else min(month, 12)             # <<<<<<<<<<<<<<
 *     if day < 1:
 *         day = dd
*/
  __pyx_t_6 = (__pyx_v_month < 1);
  if (__pyx_t_6) {
    __pyx_t_5 = __pyx_v_mm;
  } else {
    __pyx_t_8 = 12;
    __pyx_t_2 = __pyx_v_month;
    __pyx_t_9 = (__pyx_t_8 < __pyx_t_2);
    if (__pyx_t_9) {
      __pyx_t_7 = __pyx_t_8;
    } else {
      __pyx_t_7 = __pyx_t_2;
    }
    __pyx_t_5 = __pyx_t_7;
  }
  __pyx_v_month = __pyx_t_5;

  /* "utils.pxd":4079
 *     year   = yy if year < 1 else min(year, 9999)
 *     month  = mm if month < 1 else min(month, 12)
 *     if day < 1:             # <<<<<<<<<<<<<<
 *         day = dd
 *     elif day > 28:
*/
  __pyx_t_6 = (__pyx_v_day < 1);
  if (__pyx_t_6) {

    /* "utils.pxd":4080
 *     month  = mm if month < 1 else min(month, 12)
 *     if day < 1:
 *         day = dd             # <<<<<<<<<<<<<<
 *     elif day > 28:
 *         day = min(day, days_in_month(year, month))
*/
    __pyx_v_day = __pyx_v_dd;

    /* "utils.pxd":4079
 *     year   = yy if year < 1 else min(year, 9999)
 *     month  = mm if month < 1 else min(month, 12)
 *     if day < 1:             # <<<<<<<<<<<<<<
 *         day = dd
 *     elif day > 28:
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":4081
 *     if day < 1:
 *         day = dd
 *     elif day > 28:             # <<<<<<<<<<<<<<
 *         day = min(day, days_in_month(year, month))
 *     hour   = hh if hour < 0 else min(hour, 23)
*/
  __pyx_t_6 = (__pyx_v_day > 28);
  if (__pyx_t_6) {

    /* "utils.pxd":4082
 *         day = dd
 *     elif day > 28:
 *         day = min(day, days_in_month(year, month))             # <<<<<<<<<<<<<<
 *     hour   = hh if hour < 0 else min(hour, 23)
 *     minute = mi if minute < 0 else min(minute, 59)
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v_year, __pyx_v_month);
    __pyx_t_1 = __pyx_v_day;
    __pyx_t_6 = (__pyx_t_2 < __pyx_t_1);
    if (__pyx_t_6) {
      __pyx_t_3 = __pyx_t_2;
    } else {
      __pyx_t_3 = __pyx_t_1;
    }
    __pyx_v_day = __pyx_t_3;

    /* "utils.pxd":4081
 *     if day < 1:
 *         day = dd
 *     elif day > 28:             # <<<<<<<<<<<<<<
 *         day = min(day, days_in_month(year, month))
 *     hour   = hh if hour < 0 else min(hour, 23)
*/
  }
  __pyx_L3:;

  /* "utils.pxd":4083
 *     elif day > 28:
 *         day = min(day, days_in_month(year, month))
 *     hour   = hh if hour < 0 else min(hour, 23)             # <<<<<<<<<<<<<<
 *     minute = mi if minute < 0 else min(minute, 59)
 *     second = ss if second < 0 else min(second, 59)
*/
  __pyx_t_6 = (__pyx_v_hour < 0);
  if (__pyx_t_6) {
    __pyx_t_5 = __pyx_v_hh;
  } else {
    __pyx_t_7 = 23;
    __pyx_t_3 = __pyx_v_hour;
    __pyx_t_9 = (__pyx_t_7 < __pyx_t_3);
    if (__pyx_t_9) {
      __pyx_t_8 = __pyx_t_7;
    } else {
      __pyx_t_8 = __pyx_t_3;
    }
    __pyx_t_5 = __pyx_t_8;
  }
  __pyx_v_hour = __pyx_t_5;

  /* "utils.pxd":4084
 *         day = min(day, days_in_month(year, month))
 *     hour   = hh if hour < 0 else min(hour, 23)
 *     minute = mi if minute < 0 else min(minute, 59)             # <<<<<<<<<<<<<<
 *     second = ss if second < 0 else min(second, 59)
 *     microsecond = us if microsecond < 0 else min(microsecond, 999999)
*/
  __pyx_t_6 = (__pyx_v_minute < 0);
  if (__pyx_t_6) {
    __pyx_t_5 = __pyx_v_mi;
  } else {
    __pyx_t_8 = 59;
    __pyx_t_3 = __pyx_v_minute;
    __pyx_t_9 = (__pyx_t_8 < __pyx_t_3);
    if (__pyx_t_9) {
      __pyx_t_7 = __pyx_t_8;
    } else {
      __pyx_t_7 = __pyx_t_3;
    }
    __pyx_t_5 = __pyx_t_7;
  }
  __pyx_v_minute = __pyx_t_5;

  /* "utils.pxd":4085
 *     hour   = hh if hour < 0 else min(hour, 23)
 *     minute = mi if minute < 0 else min(minute, 59)
 *     second = ss if second < 0 else min(second, 59)             # <<<<<<<<<<<<<<
 *     microsecond = us if microsecond < 0 else min(microsecond, 999999)
 *     tzinfo = tz if (tzinfo is not None and not is_tz(tzinfo)) else tzinfo
*/
  __pyx_t_6 = (__pyx_v_second < 0);
  if (__pyx_t_6) {
    __pyx_t_5 = __pyx_v_ss;
  } else {
    __pyx_t_7 = 59;
    __pyx_t_3 = __pyx_v_second;
    __pyx_t_9 = (__pyx_t_7 < __pyx_t_3);
    if (__pyx_t_9) {
      __pyx_t_8 = __pyx_t_7;
    } else {
      __pyx_t_8 = __pyx_t_3;
    }
    __pyx_t_5 = __pyx_t_8;
  }
  __pyx_v_second = __pyx_t_5;

  /* "utils.pxd":4086
 *     minute = mi if minute < 0 else min(minute, 59)
 *     second = ss if second < 0 else min(second, 59)
 *     microsecond = us if microsecond < 0 else min(microsecond, 999999)             # <<<<<<<<<<<<<<
 *     tzinfo = tz if (tzinfo is not None and not is_tz(tzinfo)) else tzinfo
 *     fold   = fd if fold not in (0, 1) else fold
*/
  __pyx_t_6 = (__pyx_v_microsecond < 0);
  if (__pyx_t_6) {
    __pyx_t_5 = __pyx_v_us;
  } else {
    __pyx_t_8 = 0xF423F;
    __pyx_t_3 = __pyx_v_microsecond;
    __pyx_t_9 = (__pyx_t_8 < __pyx_t_3);
    if (__pyx_t_9) {
      __pyx_t_7 = __pyx_t_8;
    } else {
      __pyx_t_7 = __pyx_t_3;
    }
    __pyx_t_5 = __pyx_t_7;
  }
  __pyx_v_microsecond = __pyx_t_5;

  /* "utils.pxd":4087
 *     second = ss if second < 0 else min(second, 59)
 *     microsecond = us if microsecond < 0 else min(microsecond, 999999)
 *     tzinfo = tz if (tzinfo is not None and not is_tz(tzinfo)) else tzinfo             # <<<<<<<<<<<<<<
 *     fold   = fd if fold not in (0, 1) else fold
 * 
*/
  __pyx_t_9 = (__pyx_v_tzinfo != Py_None);
  if (__pyx_t_9) {
  } else {
    __pyx_t_6 = __pyx_t_9;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_9 = __pyx_f_7cytimes_5utils_is_tz(__pyx_v_tzinfo); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 4087, __pyx_L1_error)
  __pyx_t_10 = (!__pyx_t_9);
  __pyx_t_6 = __pyx_t_10;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_6) {
    __Pyx_INCREF(__pyx_v_tz);
    __pyx_t_4 = __pyx_v_tz;
  } else {
    __Pyx_INCREF(__pyx_v_tzinfo);
    __pyx_t_4 = __pyx_v_tzinfo;
  }
  __Pyx_DECREF_SET(__pyx_v_tzinfo, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "utils.pxd":4088
 *     microsecond = us if microsecond < 0 else min(microsecond, 999999)
 *     tzinfo = tz if (tzinfo is not None and not is_tz(tzinfo)) else tzinfo
 *     fold   = fd if fold not in (0, 1) else fold             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path: same fields
*/
  switch (__pyx_v_fold) {
    case 0:
    case 1:
    __pyx_t_3 = __pyx_v_fold;
    break;
    default:
    __pyx_t_3 = __pyx_v_fd;
    break;
  }
  __pyx_v_fold = __pyx_t_3;

  /* "utils.pxd":4091
 * 
 *     # Fast-path: same fields
 *     if (year == yy and month == mm and day == dd             # <<<<<<<<<<<<<<
 *         and hour == hh and minute == mi and second == ss
 *         and microsecond == us and tzinfo is tz and fold == fd
*/
  __pyx_t_10 = (__pyx_v_year == __pyx_v_yy);
  if (__pyx_t_10) {
  } else {
    __pyx_t_6 = __pyx_t_10;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_10 = (__pyx_v_month == __pyx_v_mm);
  if (__pyx_t_10) {
  } else {
    __pyx_t_6 = __pyx_t_10;
    goto __pyx_L7_bool_binop_done;
  }

  /* "utils.pxd":4092
 *     # Fast-path: same fields
 *     if (year == yy and month == mm and day == dd
 *         and hour == hh and minute == mi and second == ss             # <<<<<<<<<<<<<<
 *         and microsecond == us and tzinfo is tz and fold == fd
 *     ):
*/
  __pyx_t_10 = (__pyx_v_day == __pyx_v_dd);
  if (__pyx_t_10) {
  } else {
    __pyx_t_6 = __pyx_t_10;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_10 = (__pyx_v_hour == __pyx_v_hh);
  if (__pyx_t_10) {
  } else {
    __pyx_t_6 = __pyx_t_10;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_10 = (__pyx_v_minute == __pyx_v_mi);
  if (__pyx_t_10) {
  } else {
    __pyx_t_6 = __pyx_t_10;
    goto __pyx_L7_bool_binop_done;
  }

  /* "utils.pxd":4093
 *     if (year == yy and month == mm and day == dd
 *         and hour == hh and minute == mi and second == ss
 *         and microsecond == us and tzinfo is tz and fold == fd             # <<<<<<<<<<<<<<
 *     ):
 *         return dt_fr_dt(dt, dtclass)
*/
  __pyx_t_10 = (__pyx_v_second == __pyx_v_ss);
  if (__pyx_t_10) {
  } else {
    __pyx_t_6 = __pyx_t_10;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_10 = (__pyx_v_microsecond == __pyx_v_us);
  if (__pyx_t_10) {
  } else {
    __pyx_t_6 = __pyx_t_10;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_10 = (__pyx_v_tzinfo == __pyx_v_tz);
  if (__pyx_t_10) {
  } else {
    __pyx_t_6 = __pyx_t_10;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_10 = (__pyx_v_fold == __pyx_v_fd);
  __pyx_t_6 = __pyx_t_10;
  __pyx_L7_bool_binop_done:;

  /* "utils.pxd":4091
 * 
 *     # Fast-path: same fields
 *     if (year == yy and month == mm and day == dd             # <<<<<<<<<<<<<<
 *         and hour == hh and minute == mi and second == ss
 *         and microsecond == us and tzinfo is tz and fold == fd
*/
  if (__pyx_t_6) {

    /* "utils.pxd":4095
 *         and microsecond == us and tzinfo is tz and fold == fd
 *     ):
 *         return dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 * 
 *     # New datetime
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_11.__pyx_n = 1;
    __pyx_t_11.dtclass = __pyx_v_dtclass;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_11)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 4095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_4);
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "utils.pxd":4091
 * 
 *     # Fast-path: same fields
 *     if (year == yy and month == mm and day == dd             # <<<<<<<<<<<<<<
 *         and hour == hh and minute == mi and second == ss
 *         and microsecond == us and tzinfo is tz and fold == fd
*/
  }

  /* "utils.pxd":4098
 * 
 *     # New datetime
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         year, month, day, hour, minute,
 *         second, microsecond, tzinfo, fold, dtclass,
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "utils.pxd":4100
 *     return dt_new(
 *         year, month, day, hour, minute,
 *         second, microsecond, tzinfo, fold, dtclass,             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_12.__pyx_n = 10;
  __pyx_t_12.year = __pyx_v_year;
  __pyx_t_12.month = __pyx_v_month;
  __pyx_t_12.day = __pyx_v_day;
  __pyx_t_12.hour = __pyx_v_hour;
  __pyx_t_12.minute = __pyx_v_minute;
  __pyx_t_12.second = __pyx_v_second;
  __pyx_t_12.microsecond = __pyx_v_microsecond;
  __pyx_t_12.tzinfo = __pyx_v_tzinfo;
  __pyx_t_12.fold = __pyx_v_fold;
  __pyx_t_12.dtclass = __pyx_v_dtclass;
  __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_12)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 4098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4038
 *     return dt_new(yy, mm, dd, hh, mi, ss, us, dt.tzinfo, dt.fold, dtclass)
 * 
 * cdef inline datetime.datetime dt_replace(datetime.datetime dt,             # <<<<<<<<<<<<<<
 *     int year=-1, int month=-1, int day=-1, int hour=-1, int minute=-1,
 *     int second=-1, int microsecond=-1, object tzinfo=-1, int fold=-1,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.utils.dt_replace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XDECREF(__pyx_v_tzinfo);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4103
 *     )
 * 
 * cdef inline datetime.datetime dt_replace_tz_fold(datetime.datetime dt, object tzinfo, int fold, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a copy of `dt` with `tzinfo` and `fold` replaced `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_replace_tz_fold(PyDateTime_DateTime *__pyx_v_dt, PyObject *__pyx_v_tzinfo, int __pyx_v_fold, struct __pyx_opt_args_7cytimes_5utils_dt_replace_tz_fold *__pyx_optional_args) {
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyDateTime_DateTime *__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;
  size_t __pyx_t_6;
  int __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_replace_tz_fold", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dtclass = __pyx_optional_args->dtclass;
    }
  }

  /* "utils.pxd":4118
 *     """
 *     # Validate
 *     if fold != 0 and fold != 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("fold must be either 0 or 1, got %d" % (fold))
 * 
*/
  switch (__pyx_v_fold) {
    case 0:
    case 1:
    __pyx_t_1 = 0;
    break;
    default:
    __pyx_t_1 = 1;
    break;
  }
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":4119
 *     # Validate
 *     if fold != 0 and fold != 1:
 *         raise ValueError("fold must be either 0 or 1, got %d" % (fold))             # <<<<<<<<<<<<<<
 * 
 *     # Same tzinfo and fold
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_fold); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 4119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_fold_must_be_either_0_or_1_got_d, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 4119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4119, __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_ERR(5, 4119, __pyx_L1_error)

    /* "utils.pxd":4118
 *     """
 *     # Validate
 *     if fold != 0 and fold != 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("fold must be either 0 or 1, got %d" % (fold))
 * 
*/
  }

  /* "utils.pxd":4122
 * 
 *     # Same tzinfo and fold
 *     if tzinfo is dt.tzinfo and fold == dt.fold:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  __pyx_t_2 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = (__pyx_v_tzinfo == __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_7) {
  } else {
    __pyx_t_1 = __pyx_t_7;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_fold == __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt));
  __pyx_t_1 = __pyx_t_7;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":4123
 *     # Same tzinfo and fold
 *     if tzinfo is dt.tzinfo and fold == dt.fold:
 *         return dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 * 
 *     # New datetime
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_8.__pyx_n = 1;
    __pyx_t_8.dtclass = __pyx_v_dtclass;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":4122
 * 
 *     # Same tzinfo and fold
 *     if tzinfo is dt.tzinfo and fold == dt.fold:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  }

  /* "utils.pxd":4126
 * 
 *     # New datetime
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         dt.year, dt.month, dt.day, dt.hour, dt.minute,
 *         dt.second, dt.microsecond, tzinfo, fold, dtclass,
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "utils.pxd":4128
 *     return dt_new(
 *         dt.year, dt.month, dt.day, dt.hour, dt.minute,
 *         dt.second, dt.microsecond, tzinfo, fold, dtclass,             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_9.__pyx_n = 10;
  __pyx_t_9.year = __pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt);
  __pyx_t_9.month = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);
  __pyx_t_9.day = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt);
  __pyx_t_9.hour = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);
  __pyx_t_9.minute = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);
  __pyx_t_9.second = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);
  __pyx_t_9.microsecond = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt);
  __pyx_t_9.tzinfo = __pyx_v_tzinfo;
  __pyx_t_9.fold = __pyx_v_fold;
  __pyx_t_9.dtclass = __pyx_v_dtclass;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4103
 *     )
 * 
 * cdef inline datetime.datetime dt_replace_tz_fold(datetime.datetime dt, object tzinfo, int fold, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a copy of `dt` with `tzinfo` and `fold` replaced `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils.dt_replace_tz_fold", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4131
 *     )
 * 
 * cdef inline datetime.datetime dt_replace_tz(datetime.datetime dt, object tzinfo, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a copy of `dt` with `tzinfo` replaced `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_replace_tz(PyDateTime_DateTime *__pyx_v_dt, PyObject *__pyx_v_tzinfo, struct __pyx_opt_args_7cytimes_5utils_dt_replace_tz *__pyx_optional_args) {
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_replace_tz", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dtclass = __pyx_optional_args->dtclass;
    }
  }

  /* "utils.pxd":4145
 *     """
 *     # Same tzinfo
 *     if tzinfo is dt.tzinfo:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_v_tzinfo == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "utils.pxd":4146
 *     # Same tzinfo
 *     if tzinfo is dt.tzinfo:
 *         return dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 * 
 *     # New datetime
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 1;
    __pyx_t_3.dtclass = __pyx_v_dtclass;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "utils.pxd":4145
 *     """
 *     # Same tzinfo
 *     if tzinfo is dt.tzinfo:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  }

  /* "utils.pxd":4149
 * 
 *     # New datetime
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         dt.year, dt.month, dt.day, dt.hour, dt.minute,
 *         dt.second, dt.microsecond, tzinfo, dt.fold, dtclass,
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "utils.pxd":4151
 *     return dt_new(
 *         dt.year, dt.month, dt.day, dt.hour, dt.minute,
 *         dt.second, dt.microsecond, tzinfo, dt.fold, dtclass,             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_4.__pyx_n = 10;
  __pyx_t_4.year = __pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt);
  __pyx_t_4.month = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);
  __pyx_t_4.day = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt);
  __pyx_t_4.hour = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);
  __pyx_t_4.minute = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);
  __pyx_t_4.second = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);
  __pyx_t_4.microsecond = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt);
  __pyx_t_4.tzinfo = __pyx_v_tzinfo;
  __pyx_t_4.fold = __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt);
  __pyx_t_4.dtclass = __pyx_v_dtclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4131
 *     )
 * 
 * cdef inline datetime.datetime dt_replace_tz(datetime.datetime dt, object tzinfo, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a copy of `dt` with `tzinfo` replaced `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt_replace_tz", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4154
 *     )
 * 
 * cdef inline datetime.datetime dt_replace_fold(datetime.datetime dt, int fold, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a copy of `dt` with `fold` set to 0 or 1 `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_replace_fold(PyDateTime_DateTime *__pyx_v_dt, int __pyx_v_fold, struct __pyx_opt_args_7cytimes_5utils_dt_replace_fold *__pyx_optional_args) {
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyDateTime_DateTime *__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;
  size_t __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_replace_fold", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dtclass = __pyx_optional_args->dtclass;
    }
  }

  /* "utils.pxd":4168
 *     """
 *     # Validate
 *     if fold != 0 and fold != 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("fold must be either 0 or 1, got %d" % (fold))
 * 
*/
  switch (__pyx_v_fold) {
    case 0:
    case 1:
    __pyx_t_1 = 0;
    break;
    default:
    __pyx_t_1 = 1;
    break;
  }
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":4169
 *     # Validate
 *     if fold != 0 and fold != 1:
 *         raise ValueError("fold must be either 0 or 1, got %d" % (fold))             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path: same fold
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_fold); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 4169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_fold_must_be_either_0_or_1_got_d, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 4169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4169, __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_ERR(5, 4169, __pyx_L1_error)

    /* "utils.pxd":4168
 *     """
 *     # Validate
 *     if fold != 0 and fold != 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("fold must be either 0 or 1, got %d" % (fold))
 * 
*/
  }

  /* "utils.pxd":4172
 * 
 *     # Fast-path: same fold
 *     if fold == dt.fold:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  __pyx_t_1 = (__pyx_v_fold == __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt));
  if (__pyx_t_1) {

    /* "utils.pxd":4173
 *     # Fast-path: same fold
 *     if fold == dt.fold:
 *         return dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 * 
 *     # New datetime
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 1;
    __pyx_t_7.dtclass = __pyx_v_dtclass;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":4172
 * 
 *     # Fast-path: same fold
 *     if fold == dt.fold:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  }

  /* "utils.pxd":4176
 * 
 *     # New datetime
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         dt.year, dt.month, dt.day, dt.hour, dt.minute,
 *         dt.second, dt.microsecond, dt.tzinfo, fold, dtclass,
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "utils.pxd":4178
 *     return dt_new(
 *         dt.year, dt.month, dt.day, dt.hour, dt.minute,
 *         dt.second, dt.microsecond, dt.tzinfo, fold, dtclass,             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_2 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "utils.pxd":4176
 * 
 *     # New datetime
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         dt.year, dt.month, dt.day, dt.hour, dt.minute,
 *         dt.second, dt.microsecond, dt.tzinfo, fold, dtclass,
*/
  __pyx_t_8.__pyx_n = 10;
  __pyx_t_8.year = __pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt);
  __pyx_t_8.month = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);
  __pyx_t_8.day = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt);
  __pyx_t_8.hour = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);
  __pyx_t_8.minute = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);
  __pyx_t_8.second = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);
  __pyx_t_8.microsecond = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt);
  __pyx_t_8.tzinfo = __pyx_t_2;
  __pyx_t_8.fold = __pyx_v_fold;
  __pyx_t_8.dtclass = __pyx_v_dtclass;
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_8)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 4176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_5);
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4154
 *     )
 * 
 * cdef inline datetime.datetime dt_replace_fold(datetime.datetime dt, int fold, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a copy of `dt` with `fold` set to 0 or 1 `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils.dt_replace_fold", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4182
 * 
 * # . check
 * cdef inline int dt_compare(datetime.datetime dt1, datetime.datetime dt2, bint allow_mixed = False) except -2:             # <<<<<<<<<<<<<<
 *     """Three-way comparison between two datetimes on a common microsecond timeline `<'int'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_compare(PyDateTime_DateTime *__pyx_v_dt1, PyDateTime_DateTime *__pyx_v_dt2, struct __pyx_opt_args_7cytimes_5utils_dt_compare *__pyx_optional_args) {
  int __pyx_v_allow_mixed = ((int)0);
  PyObject *__pyx_v_dt1_tz = 0;
  PyObject *__pyx_v_dt2_tz = 0;
  int __pyx_v_dt1_aware;
  int __pyx_v_dt2_aware;
  PY_LONG_LONG __pyx_v_dt1_us;
  PY_LONG_LONG __pyx_v_dt2_us;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8[8];
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  PY_LONG_LONG __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_us __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_compare", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_allow_mixed = __pyx_optional_args->allow_mixed;
    }
  }

  /* "utils.pxd":4208
 *     # Check tzinfo compatibility (Exactly one is naive  mixed)
 *     cdef:
 *         object dt1_tz = dt1.tzinfo             # <<<<<<<<<<<<<<
 *         object dt2_tz = dt2.tzinfo
 *         bint dt1_aware = dt1_tz is not None
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_dt1_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "utils.pxd":4209
 *     cdef:
 *         object dt1_tz = dt1.tzinfo
 *         object dt2_tz = dt2.tzinfo             # <<<<<<<<<<<<<<
 *         bint dt1_aware = dt1_tz is not None
 *         bint dt2_aware = dt2_tz is not None
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt2); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_dt2_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "utils.pxd":4210
 *         object dt1_tz = dt1.tzinfo
 *         object dt2_tz = dt2.tzinfo
 *         bint dt1_aware = dt1_tz is not None             # <<<<<<<<<<<<<<
 *         bint dt2_aware = dt2_tz is not None
 *     if dt1_aware != dt2_aware:
*/
  __pyx_t_2 = (__pyx_v_dt1_tz != Py_None);
  __pyx_v_dt1_aware = __pyx_t_2;

  /* "utils.pxd":4211
 *         object dt2_tz = dt2.tzinfo
 *         bint dt1_aware = dt1_tz is not None
 *         bint dt2_aware = dt2_tz is not None             # <<<<<<<<<<<<<<
 *     if dt1_aware != dt2_aware:
 *         if allow_mixed:
*/
  __pyx_t_2 = (__pyx_v_dt2_tz != Py_None);
  __pyx_v_dt2_aware = __pyx_t_2;

  /* "utils.pxd":4212
 *         bint dt1_aware = dt1_tz is not None
 *         bint dt2_aware = dt2_tz is not None
 *     if dt1_aware != dt2_aware:             # <<<<<<<<<<<<<<
 *         if allow_mixed:
 *             return 2
*/
  __pyx_t_2 = (__pyx_v_dt1_aware != __pyx_v_dt2_aware);
  if (__pyx_t_2) {

    /* "utils.pxd":4213
 *         bint dt2_aware = dt2_tz is not None
 *     if dt1_aware != dt2_aware:
 *         if allow_mixed:             # <<<<<<<<<<<<<<
 *             return 2
 *         raise TypeError(
*/
    if (__pyx_v_allow_mixed) {

      /* "utils.pxd":4214
 *     if dt1_aware != dt2_aware:
 *         if allow_mixed:
 *             return 2             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Cannot compare naive and aware datetimes:\n"
*/
      __pyx_r = 2;
      goto __pyx_L0;

      /* "utils.pxd":4213
 *         bint dt2_aware = dt2_tz is not None
 *     if dt1_aware != dt2_aware:
 *         if allow_mixed:             # <<<<<<<<<<<<<<
 *             return 2
 *         raise TypeError(
*/
    }

    /* "utils.pxd":4215
 *         if allow_mixed:
 *             return 2
 *         raise TypeError(             # <<<<<<<<<<<<<<
 *             "Cannot compare naive and aware datetimes:\n"
 *             "  - datetime1: '%s' %s\n"
*/
    __pyx_t_3 = NULL;

    /* "utils.pxd":4218
 *             "Cannot compare naive and aware datetimes:\n"
 *             "  - datetime1: '%s' %s\n"
 *             "  - datetime2: '%s' %s" % (dt1, type(dt1), dt2, type(dt2))             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)__pyx_v_dt1)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 4218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_dt1)))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 4218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)__pyx_v_dt2)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 4218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_dt2)))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 4218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_compare_naive_and_aware_d;
    __pyx_t_8[1] = __pyx_t_4;
    __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u__9;
    __pyx_t_8[3] = __pyx_t_5;
    __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u_datetime2;
    __pyx_t_8[5] = __pyx_t_6;
    __pyx_t_8[6] = __pyx_mstate_global->__pyx_kp_u__9;
    __pyx_t_8[7] = __pyx_t_7;

    /* "utils.pxd":4216
 *             return 2
 *         raise TypeError(
 *             "Cannot compare naive and aware datetimes:\n"             # <<<<<<<<<<<<<<
 *             "  - datetime1: '%s' %s\n"
 *             "  - datetime2: '%s' %s" % (dt1, type(dt1), dt2, type(dt2))
*/
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 8, 58 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 2 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
    if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 4216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __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;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_10 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4215, __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_ERR(5, 4215, __pyx_L1_error)

    /* "utils.pxd":4212
 *         bint dt1_aware = dt1_tz is not None
 *         bint dt2_aware = dt2_tz is not None
 *     if dt1_aware != dt2_aware:             # <<<<<<<<<<<<<<
 *         if allow_mixed:
 *             return 2
*/
  }

  /* "utils.pxd":4222
 * 
 *     # Compare in microseconds
 *     cdef long long dt1_us = dt_to_us(dt1, dt1_aware)             # <<<<<<<<<<<<<<
 *     cdef long long dt2_us = dt_to_us(dt2, dt2_aware)
 *     if dt1_us > dt2_us:
*/
  __pyx_t_12.__pyx_n = 1;
  __pyx_t_12.utc = __pyx_v_dt1_aware;
  __pyx_t_11 = __pyx_f_7cytimes_5utils_dt_to_us(__pyx_v_dt1, &__pyx_t_12); if (unlikely(__pyx_t_11 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 4222, __pyx_L1_error)
  __pyx_v_dt1_us = __pyx_t_11;

  /* "utils.pxd":4223
 *     # Compare in microseconds
 *     cdef long long dt1_us = dt_to_us(dt1, dt1_aware)
 *     cdef long long dt2_us = dt_to_us(dt2, dt2_aware)             # <<<<<<<<<<<<<<
 *     if dt1_us > dt2_us:
 *         return 1
*/
  __pyx_t_12.__pyx_n = 1;
  __pyx_t_12.utc = __pyx_v_dt2_aware;
  __pyx_t_11 = __pyx_f_7cytimes_5utils_dt_to_us(__pyx_v_dt2, &__pyx_t_12); if (unlikely(__pyx_t_11 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 4223, __pyx_L1_error)
  __pyx_v_dt2_us = __pyx_t_11;

  /* "utils.pxd":4224
 *     cdef long long dt1_us = dt_to_us(dt1, dt1_aware)
 *     cdef long long dt2_us = dt_to_us(dt2, dt2_aware)
 *     if dt1_us > dt2_us:             # <<<<<<<<<<<<<<
 *         return 1
 *     elif dt1_us < dt2_us:
*/
  __pyx_t_2 = (__pyx_v_dt1_us > __pyx_v_dt2_us);
  if (__pyx_t_2) {

    /* "utils.pxd":4225
 *     cdef long long dt2_us = dt_to_us(dt2, dt2_aware)
 *     if dt1_us > dt2_us:
 *         return 1             # <<<<<<<<<<<<<<
 *     elif dt1_us < dt2_us:
 *         return -1
*/
    __pyx_r = 1;
    goto __pyx_L0;

    /* "utils.pxd":4224
 *     cdef long long dt1_us = dt_to_us(dt1, dt1_aware)
 *     cdef long long dt2_us = dt_to_us(dt2, dt2_aware)
 *     if dt1_us > dt2_us:             # <<<<<<<<<<<<<<
 *         return 1
 *     elif dt1_us < dt2_us:
*/
  }

  /* "utils.pxd":4226
 *     if dt1_us > dt2_us:
 *         return 1
 *     elif dt1_us < dt2_us:             # <<<<<<<<<<<<<<
 *         return -1
 *     else:
*/
  __pyx_t_2 = (__pyx_v_dt1_us < __pyx_v_dt2_us);
  if (__pyx_t_2) {

    /* "utils.pxd":4227
 *         return 1
 *     elif dt1_us < dt2_us:
 *         return -1             # <<<<<<<<<<<<<<
 *     else:
 *         return 0
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":4226
 *     if dt1_us > dt2_us:
 *         return 1
 *     elif dt1_us < dt2_us:             # <<<<<<<<<<<<<<
 *         return -1
 *     else:
*/
  }

  /* "utils.pxd":4229
 *         return -1
 *     else:
 *         return 0             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint dt_is_first_doy(datetime.datetime dt) noexcept:
*/
  /*else*/ {
    __pyx_r = 0;
    goto __pyx_L0;
  }

  /* "utils.pxd":4182
 * 
 * # . check
 * cdef inline int dt_compare(datetime.datetime dt1, datetime.datetime dt2, bint allow_mixed = False) except -2:             # <<<<<<<<<<<<<<
 *     """Three-way comparison between two datetimes on a common microsecond timeline `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytimes.utils.dt_compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -2;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dt1_tz);
  __Pyx_XDECREF(__pyx_v_dt2_tz);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4231
 *         return 0
 * 
 * cdef inline bint dt_is_first_doy(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the first day of its year `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_first_doy(PyDateTime_DateTime *__pyx_v_dt) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":4239
 *     :returns `<'bool'>`: True if the datetime is January 1 of its year; Otherwiase False.
 *     """
 *     return dt.month == 1 and dt.day == 1             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint dt_is_last_doy(datetime.datetime dt) noexcept:
*/
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt) == 1);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt) == 1);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":4231
 *         return 0
 * 
 * cdef inline bint dt_is_first_doy(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the first day of its year `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4241
 *     return dt.month == 1 and dt.day == 1
 * 
 * cdef inline bint dt_is_last_doy(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the last day of its year `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_last_doy(PyDateTime_DateTime *__pyx_v_dt) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":4249
 *     :returns `<'bool'>`: True if the datetime is December 31 of its year; Otherwiase False.
 *     """
 *     return dt.month == 12 and dt.day == 31             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint dt_is_first_doq(datetime.datetime dt) noexcept:
*/
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt) == 12);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt) == 31);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":4241
 *     return dt.month == 1 and dt.day == 1
 * 
 * cdef inline bint dt_is_last_doy(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the last day of its year `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4251
 *     return dt.month == 12 and dt.day == 31
 * 
 * cdef inline bint dt_is_first_doq(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the first day of its quarter `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_first_doq(PyDateTime_DateTime *__pyx_v_dt) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;

  /* "utils.pxd":4259
 *     :returns `<'bool'>`: True if the datetime is the first day of its quarter; Otherwiase False.
 *     """
 *     return dt.day == 1 and dt.month in (1, 4, 7, 10)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint dt_is_last_doq(datetime.datetime dt) noexcept:
*/
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt) == 1);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_3 = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);
  __pyx_t_4 = (__pyx_t_3 == 1);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_4 = (__pyx_t_3 == 4);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_4 = (__pyx_t_3 == 7);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_4 = (__pyx_t_3 == 10);
  __pyx_t_2 = __pyx_t_4;
  __pyx_L5_bool_binop_done:;
  __pyx_t_4 = __pyx_t_2;
  __pyx_t_1 = __pyx_t_4;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":4251
 *     return dt.month == 12 and dt.day == 31
 * 
 * cdef inline bint dt_is_first_doq(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the first day of its quarter `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4261
 *     return dt.day == 1 and dt.month in (1, 4, 7, 10)
 * 
 * cdef inline bint dt_is_last_doq(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the last day of its quarter `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_last_doq(PyDateTime_DateTime *__pyx_v_dt) {
  int __pyx_v_dd;
  int __pyx_v_mm;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":4269
 *     :returns `<'bool'>`: True if the datetime is the last day of its quarter; Otherwiase False.
 *     """
 *     cdef int dd = dt.day             # <<<<<<<<<<<<<<
 *     if dd < 30:
 *         return False
*/
  __pyx_v_dd = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt);

  /* "utils.pxd":4270
 *     """
 *     cdef int dd = dt.day
 *     if dd < 30:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef int mm = dt.month
*/
  __pyx_t_1 = (__pyx_v_dd < 30);
  if (__pyx_t_1) {

    /* "utils.pxd":4271
 *     cdef int dd = dt.day
 *     if dd < 30:
 *         return False             # <<<<<<<<<<<<<<
 *     cdef int mm = dt.month
 *     if mm not in (3, 6, 9, 12):
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":4270
 *     """
 *     cdef int dd = dt.day
 *     if dd < 30:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef int mm = dt.month
*/
  }

  /* "utils.pxd":4272
 *     if dd < 30:
 *         return False
 *     cdef int mm = dt.month             # <<<<<<<<<<<<<<
 *     if mm not in (3, 6, 9, 12):
 *         return False
*/
  __pyx_v_mm = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);

  /* "utils.pxd":4273
 *         return False
 *     cdef int mm = dt.month
 *     if mm not in (3, 6, 9, 12):             # <<<<<<<<<<<<<<
 *         return False
 *     return dd == days_in_month(dt.year, mm)
*/
  switch (__pyx_v_mm) {
    case 3:
    case 6:
    case 9:
    case 12:
    __pyx_t_1 = 0;
    break;
    default:
    __pyx_t_1 = 1;
    break;
  }
  __pyx_t_2 = __pyx_t_1;
  if (__pyx_t_2) {

    /* "utils.pxd":4274
 *     cdef int mm = dt.month
 *     if mm not in (3, 6, 9, 12):
 *         return False             # <<<<<<<<<<<<<<
 *     return dd == days_in_month(dt.year, mm)
 * 
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":4273
 *         return False
 *     cdef int mm = dt.month
 *     if mm not in (3, 6, 9, 12):             # <<<<<<<<<<<<<<
 *         return False
 *     return dd == days_in_month(dt.year, mm)
*/
  }

  /* "utils.pxd":4275
 *     if mm not in (3, 6, 9, 12):
 *         return False
 *     return dd == days_in_month(dt.year, mm)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint dt_is_first_dom(datetime.datetime dt) noexcept:
*/
  __pyx_r = (__pyx_v_dd == __pyx_f_7cytimes_5utils_days_in_month(__pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt), __pyx_v_mm));
  goto __pyx_L0;

  /* "utils.pxd":4261
 *     return dt.day == 1 and dt.month in (1, 4, 7, 10)
 * 
 * cdef inline bint dt_is_last_doq(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the last day of its quarter `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4277
 *     return dd == days_in_month(dt.year, mm)
 * 
 * cdef inline bint dt_is_first_dom(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the first day of its month `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_first_dom(PyDateTime_DateTime *__pyx_v_dt) {
  int __pyx_r;

  /* "utils.pxd":4285
 *     :returns `<'bool'>`: True if the datetime is the first day of its month; Otherwiase False.
 *     """
 *     return dt.day == 1             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint dt_is_last_dom(datetime.datetime dt) noexcept:
*/
  __pyx_r = (__pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt) == 1);
  goto __pyx_L0;

  /* "utils.pxd":4277
 *     return dd == days_in_month(dt.year, mm)
 * 
 * cdef inline bint dt_is_first_dom(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the first day of its month `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4287
 *     return dt.day == 1
 * 
 * cdef inline bint dt_is_last_dom(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the last day of its month `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_last_dom(PyDateTime_DateTime *__pyx_v_dt) {
  int __pyx_r;

  /* "utils.pxd":4295
 *     :returns `<'bool'>`: True if the datetime is the last day of its month; Otherwiase False.
 *     """
 *     return dt.day == days_in_month(dt.year, dt.month)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint dt_is_start_of_time(datetime.datetime dt) noexcept:
*/
  __pyx_r = (__pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt) == __pyx_f_7cytimes_5utils_days_in_month(__pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt), __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt)));
  goto __pyx_L0;

  /* "utils.pxd":4287
 *     return dt.day == 1
 * 
 * cdef inline bint dt_is_last_dom(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the last day of its month `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4297
 *     return dt.day == days_in_month(dt.year, dt.month)
 * 
 * cdef inline bint dt_is_start_of_time(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is at the start of time `<'bool'>`:
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_start_of_time(PyDateTime_DateTime *__pyx_v_dt) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":4305
 *     :returns `<'bool'>`: True if datetime is at the start of time; Otherwise False.
 *     """
 *     return dt.hour == 0 and dt.minute == 0 and dt.second == 0 and dt.microsecond == 0             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint dt_is_end_of_time(datetime.datetime dt) noexcept:
*/
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt) == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt) == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt) == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt) == 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":4297
 *     return dt.day == days_in_month(dt.year, dt.month)
 * 
 * cdef inline bint dt_is_start_of_time(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is at the start of time `<'bool'>`:
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4307
 *     return dt.hour == 0 and dt.minute == 0 and dt.second == 0 and dt.microsecond == 0
 * 
 * cdef inline bint dt_is_end_of_time(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is at the end of time `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_end_of_time(PyDateTime_DateTime *__pyx_v_dt) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":4315
 *     :returns `<'bool'>`: True if datetime is at the end of time; Otherwise False.
 *     """
 *     return dt.hour == 23 and dt.minute == 59 and dt.second == 59 and dt.microsecond == 999_999             # <<<<<<<<<<<<<<
 * 
 * # . tzinfo
*/
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt) == 23);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt) == 59);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt) == 59);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt) == 0xF423F);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":4307
 *     return dt.hour == 0 and dt.minute == 0 and dt.second == 0 and dt.microsecond == 0
 * 
 * cdef inline bint dt_is_end_of_time(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is at the end of time `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4318
 * 
 * # . tzinfo
 * cdef inline str dt_tzname(datetime.datetime dt):             # <<<<<<<<<<<<<<
 *     """Return the display name of a datetime's timezone `<'str/None'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_dt_tzname(PyDateTime_DateTime *__pyx_v_dt) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_tz_name __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_tzname", 0);

  /* "utils.pxd":4328
 *     >>> dt.tzname()
 *     """
 *     return tz_name(dt.tzinfo, dt)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.timedelta dt_dst(datetime.datetime dt):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.dt = __pyx_v_dt;
  __pyx_t_2 = __pyx_f_7cytimes_5utils_tz_name(__pyx_t_1, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4318
 * 
 * # . tzinfo
 * cdef inline str dt_tzname(datetime.datetime dt):             # <<<<<<<<<<<<<<
 *     """Return the display name of a datetime's timezone `<'str/None'>`.
 * 
*/

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

/* "utils.pxd":4330
 *     return tz_name(dt.tzinfo, dt)
 * 
 * cdef inline datetime.timedelta dt_dst(datetime.datetime dt):             # <<<<<<<<<<<<<<
 *     """Return the DST offset of a datetime's timezone `<'timedelta/None'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_dt_dst(PyDateTime_DateTime *__pyx_v_dt) {
  PyDateTime_Delta *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_tz_dst __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_dst", 0);

  /* "utils.pxd":4340
 *     >>> dt.dst()
 *     """
 *     return tz_dst(dt.tzinfo, dt)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.timedelta dt_utcoffset(datetime.datetime dt):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.dt = __pyx_v_dt;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_dst(__pyx_t_1, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyDateTime_Delta *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4330
 *     return tz_name(dt.tzinfo, dt)
 * 
 * cdef inline datetime.timedelta dt_dst(datetime.datetime dt):             # <<<<<<<<<<<<<<
 *     """Return the DST offset of a datetime's timezone `<'timedelta/None'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.dt_dst", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4342
 *     return tz_dst(dt.tzinfo, dt)
 * 
 * cdef inline datetime.timedelta dt_utcoffset(datetime.datetime dt):             # <<<<<<<<<<<<<<
 *     """Return the UTC offset of a datetime's timezone `<'timedelta/None'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_dt_utcoffset(PyDateTime_DateTime *__pyx_v_dt) {
  PyDateTime_Delta *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_utcoffset", 0);

  /* "utils.pxd":4352
 *     >>> dt.utcoffset()
 *     """
 *     return tz_utcoffset(dt.tzinfo, dt)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.datetime dt_astimezone(datetime.datetime dt, object tzinfo=None, object dtclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.dt = __pyx_v_dt;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_utcoffset(__pyx_t_1, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyDateTime_Delta *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4342
 *     return tz_dst(dt.tzinfo, dt)
 * 
 * cdef inline datetime.timedelta dt_utcoffset(datetime.datetime dt):             # <<<<<<<<<<<<<<
 *     """Return the UTC offset of a datetime's timezone `<'timedelta/None'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.dt_utcoffset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4354
 *     return tz_utcoffset(dt.tzinfo, dt)
 * 
 * cdef inline datetime.datetime dt_astimezone(datetime.datetime dt, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to another timezone `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_astimezone(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_dt_astimezone *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyObject *__pyx_v_my_tz = 0;
  PyObject *__pyx_v_to_tz = 0;
  PyDateTime_Delta *__pyx_v_my_off = 0;
  PY_LONG_LONG __pyx_v_us;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_dt_replace_tz __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[5];
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset __pyx_t_12;
  PY_LONG_LONG __pyx_t_13;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_us __pyx_t_14;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_us __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_astimezone", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_dtclass = __pyx_optional_args->dtclass;
      }
    }
  }

  /* "utils.pxd":4386
 *     """
 *     cdef:
 *         object my_tz = datetime.datetime_tzinfo(dt)             # <<<<<<<<<<<<<<
 *         object to_tz = tzinfo
 *         datetime.timedelta my_off
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_datetime_tzinfo(((PyObject *)__pyx_v_dt)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_my_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "utils.pxd":4387
 *     cdef:
 *         object my_tz = datetime.datetime_tzinfo(dt)
 *         object to_tz = tzinfo             # <<<<<<<<<<<<<<
 *         datetime.timedelta my_off
 * 
*/
  __Pyx_INCREF(__pyx_v_tzinfo);
  __pyx_v_to_tz = __pyx_v_tzinfo;

  /* "utils.pxd":4391
 * 
 *     # Resolve target tzinfo
 *     if to_tz is None:             # <<<<<<<<<<<<<<
 *         to_tz = tz_local()
 *         # Fast-exit: naive + local -> localize
*/
  __pyx_t_2 = (__pyx_v_to_tz == Py_None);
  if (__pyx_t_2) {

    /* "utils.pxd":4392
 *     # Resolve target tzinfo
 *     if to_tz is None:
 *         to_tz = tz_local()             # <<<<<<<<<<<<<<
 *         # Fast-exit: naive + local -> localize
 *         if my_tz is None:
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_local(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4392, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_to_tz, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "utils.pxd":4394
 *         to_tz = tz_local()
 *         # Fast-exit: naive + local -> localize
 *         if my_tz is None:             # <<<<<<<<<<<<<<
 *             return dt_replace_tz(dt, to_tz, dtclass)
 *     elif not is_tz(to_tz):
*/
    __pyx_t_2 = (__pyx_v_my_tz == Py_None);
    if (__pyx_t_2) {

      /* "utils.pxd":4395
 *         # Fast-exit: naive + local -> localize
 *         if my_tz is None:
 *             return dt_replace_tz(dt, to_tz, dtclass)             # <<<<<<<<<<<<<<
 *     elif not is_tz(to_tz):
 *         raise TypeError(
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_3.__pyx_n = 1;
      __pyx_t_3.dtclass = __pyx_v_dtclass;
      __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace_tz(__pyx_v_dt, __pyx_v_to_tz, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4395, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "utils.pxd":4394
 *         to_tz = tz_local()
 *         # Fast-exit: naive + local -> localize
 *         if my_tz is None:             # <<<<<<<<<<<<<<
 *             return dt_replace_tz(dt, to_tz, dtclass)
 *     elif not is_tz(to_tz):
*/
    }

    /* "utils.pxd":4391
 * 
 *     # Resolve target tzinfo
 *     if to_tz is None:             # <<<<<<<<<<<<<<
 *         to_tz = tz_local()
 *         # Fast-exit: naive + local -> localize
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":4396
 *         if my_tz is None:
 *             return dt_replace_tz(dt, to_tz, dtclass)
 *     elif not is_tz(to_tz):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Expects an instance of 'datetime.tzinfo', "
*/
  __pyx_t_2 = __pyx_f_7cytimes_5utils_is_tz(__pyx_v_to_tz); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 4396, __pyx_L1_error)
  __pyx_t_4 = (!__pyx_t_2);
  if (unlikely(__pyx_t_4)) {

    /* "utils.pxd":4397
 *             return dt_replace_tz(dt, to_tz, dtclass)
 *     elif not is_tz(to_tz):
 *         raise TypeError(             # <<<<<<<<<<<<<<
 *             "Expects an instance of 'datetime.tzinfo', "
 *             "instead got '%s' %s." % (to_tz, type(to_tz))
*/
    __pyx_t_5 = NULL;

    /* "utils.pxd":4399
 *         raise TypeError(
 *             "Expects an instance of 'datetime.tzinfo', "
 *             "instead got '%s' %s." % (to_tz, type(to_tz))             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_to_tz), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 4399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_to_tz))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 4399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Expects_an_instance_of_datetime;
    __pyx_t_8[1] = __pyx_t_6;
    __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u__9;
    __pyx_t_8[3] = __pyx_t_7;
    __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u__2;

    /* "utils.pxd":4398
 *     elif not is_tz(to_tz):
 *         raise TypeError(
 *             "Expects an instance of 'datetime.tzinfo', "             # <<<<<<<<<<<<<<
 *             "instead got '%s' %s." % (to_tz, type(to_tz))
 *         )
*/
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, 55 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
    if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 4398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_10 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_9};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4397, __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_ERR(5, 4397, __pyx_L1_error)

    /* "utils.pxd":4396
 *         if my_tz is None:
 *             return dt_replace_tz(dt, to_tz, dtclass)
 *     elif not is_tz(to_tz):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Expects an instance of 'datetime.tzinfo', "
*/
  }
  __pyx_L3:;

  /* "utils.pxd":4403
 * 
 *     # Fast-exit: exact same tzinfo
 *     if my_tz is to_tz:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  __pyx_t_4 = (__pyx_v_my_tz == __pyx_v_to_tz);
  if (__pyx_t_4) {

    /* "utils.pxd":4404
 *     # Fast-exit: exact same tzinfo
 *     if my_tz is to_tz:
 *         return dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 * 
 *     # Naive datetime cases
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_11.__pyx_n = 1;
    __pyx_t_11.dtclass = __pyx_v_dtclass;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4404, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "utils.pxd":4403
 * 
 *     # Fast-exit: exact same tzinfo
 *     if my_tz is to_tz:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  }

  /* "utils.pxd":4407
 * 
 *     # Naive datetime cases
 *     if my_tz is None:             # <<<<<<<<<<<<<<
 *         my_tz = tz_local()
 *         # Fast-exit: naive + local -> localize
*/
  __pyx_t_4 = (__pyx_v_my_tz == Py_None);
  if (__pyx_t_4) {

    /* "utils.pxd":4408
 *     # Naive datetime cases
 *     if my_tz is None:
 *         my_tz = tz_local()             # <<<<<<<<<<<<<<
 *         # Fast-exit: naive + local -> localize
 *         if my_tz is to_tz:
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_local(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4408, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_my_tz, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "utils.pxd":4410
 *         my_tz = tz_local()
 *         # Fast-exit: naive + local -> localize
 *         if my_tz is to_tz:             # <<<<<<<<<<<<<<
 *             return dt_replace_tz(dt, to_tz, dtclass)
 *         # Access local UTC offset (my_off is local)
*/
    __pyx_t_4 = (__pyx_v_my_tz == __pyx_v_to_tz);
    if (__pyx_t_4) {

      /* "utils.pxd":4411
 *         # Fast-exit: naive + local -> localize
 *         if my_tz is to_tz:
 *             return dt_replace_tz(dt, to_tz, dtclass)             # <<<<<<<<<<<<<<
 *         # Access local UTC offset (my_off is local)
 *         my_off = tz_utcoffset(my_tz, dt)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_3.__pyx_n = 1;
      __pyx_t_3.dtclass = __pyx_v_dtclass;
      __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace_tz(__pyx_v_dt, __pyx_v_to_tz, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4411, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "utils.pxd":4410
 *         my_tz = tz_local()
 *         # Fast-exit: naive + local -> localize
 *         if my_tz is to_tz:             # <<<<<<<<<<<<<<
 *             return dt_replace_tz(dt, to_tz, dtclass)
 *         # Access local UTC offset (my_off is local)
*/
    }

    /* "utils.pxd":4413
 *             return dt_replace_tz(dt, to_tz, dtclass)
 *         # Access local UTC offset (my_off is local)
 *         my_off = tz_utcoffset(my_tz, dt)             # <<<<<<<<<<<<<<
 * 
 *     # Aware datetime case: handle no-offset tzinfo
*/
    __pyx_t_12.__pyx_n = 1;
    __pyx_t_12.dt = __pyx_v_dt;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_utcoffset(__pyx_v_my_tz, &__pyx_t_12)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_my_off = ((PyDateTime_Delta *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "utils.pxd":4407
 * 
 *     # Naive datetime cases
 *     if my_tz is None:             # <<<<<<<<<<<<<<
 *         my_tz = tz_local()
 *         # Fast-exit: naive + local -> localize
*/
    goto __pyx_L6;
  }

  /* "utils.pxd":4418
 *     # by using local tzinfo fallback (CPython pattern)
 *     else:
 *         my_off = tz_utcoffset(my_tz, dt)             # <<<<<<<<<<<<<<
 *         if my_off is None:
 *             my_tz = tz_local()
*/
  /*else*/ {
    __pyx_t_12.__pyx_n = 1;
    __pyx_t_12.dt = __pyx_v_dt;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_utcoffset(__pyx_v_my_tz, &__pyx_t_12)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_my_off = ((PyDateTime_Delta *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "utils.pxd":4419
 *     else:
 *         my_off = tz_utcoffset(my_tz, dt)
 *         if my_off is None:             # <<<<<<<<<<<<<<
 *             my_tz = tz_local()
 *             # Fast-exit: exact same tzinfo
*/
    __pyx_t_4 = (((PyObject *)__pyx_v_my_off) == Py_None);
    if (__pyx_t_4) {

      /* "utils.pxd":4420
 *         my_off = tz_utcoffset(my_tz, dt)
 *         if my_off is None:
 *             my_tz = tz_local()             # <<<<<<<<<<<<<<
 *             # Fast-exit: exact same tzinfo
 *             if my_tz is to_tz:
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_local(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4420, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_my_tz, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "utils.pxd":4422
 *             my_tz = tz_local()
 *             # Fast-exit: exact same tzinfo
 *             if my_tz is to_tz:             # <<<<<<<<<<<<<<
 *                 return dt_fr_dt(dt, dtclass)
 *             # Access local UTC offset (my_off is local)
*/
      __pyx_t_4 = (__pyx_v_my_tz == __pyx_v_to_tz);
      if (__pyx_t_4) {

        /* "utils.pxd":4423
 *             # Fast-exit: exact same tzinfo
 *             if my_tz is to_tz:
 *                 return dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 *             # Access local UTC offset (my_off is local)
 *             my_off = tz_utcoffset(my_tz, dt)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_11.__pyx_n = 1;
        __pyx_t_11.dtclass = __pyx_v_dtclass;
        __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4423, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
        __pyx_t_1 = 0;
        goto __pyx_L0;

        /* "utils.pxd":4422
 *             my_tz = tz_local()
 *             # Fast-exit: exact same tzinfo
 *             if my_tz is to_tz:             # <<<<<<<<<<<<<<
 *                 return dt_fr_dt(dt, dtclass)
 *             # Access local UTC offset (my_off is local)
*/
      }

      /* "utils.pxd":4425
 *                 return dt_fr_dt(dt, dtclass)
 *             # Access local UTC offset (my_off is local)
 *             my_off = tz_utcoffset(my_tz, dt)             # <<<<<<<<<<<<<<
 * 
 *     # Convert to UTC microseconds, then attach tzinfo and normalize via fromutc
*/
      __pyx_t_12.__pyx_n = 1;
      __pyx_t_12.dt = __pyx_v_dt;
      __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_utcoffset(__pyx_v_my_tz, &__pyx_t_12)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4425, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_my_off, ((PyDateTime_Delta *)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "utils.pxd":4419
 *     else:
 *         my_off = tz_utcoffset(my_tz, dt)
 *         if my_off is None:             # <<<<<<<<<<<<<<
 *             my_tz = tz_local()
 *             # Fast-exit: exact same tzinfo
*/
    }
  }
  __pyx_L6:;

  /* "utils.pxd":4428
 * 
 *     # Convert to UTC microseconds, then attach tzinfo and normalize via fromutc
 *     cdef long long us = dt_to_us(dt, False) - td_to_us(my_off)             # <<<<<<<<<<<<<<
 *     return to_tz.fromutc(dt_fr_us(us, to_tz, dtclass))
 * 
*/
  __pyx_t_14.__pyx_n = 1;
  __pyx_t_14.utc = 0;
  __pyx_t_13 = __pyx_f_7cytimes_5utils_dt_to_us(__pyx_v_dt, &__pyx_t_14); if (unlikely(__pyx_t_13 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 4428, __pyx_L1_error)
  __pyx_v_us = (__pyx_t_13 - __pyx_f_7cytimes_5utils_td_to_us(__pyx_v_my_off));

  /* "utils.pxd":4429
 *     # Convert to UTC microseconds, then attach tzinfo and normalize via fromutc
 *     cdef long long us = dt_to_us(dt, False) - td_to_us(my_off)
 *     return to_tz.fromutc(dt_fr_us(us, to_tz, dtclass))             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.datetime dt_normalize_tz(datetime.datetime dt, object dtclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_9 = __pyx_v_to_tz;
  __Pyx_INCREF(__pyx_t_9);
  __pyx_t_15.__pyx_n = 2;
  __pyx_t_15.tzinfo = __pyx_v_to_tz;
  __pyx_t_15.dtclass = __pyx_v_dtclass;
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_us(__pyx_v_us, &__pyx_t_15)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 4429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_10 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_fromutc, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(5, 4429, __pyx_L1_error)
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4354
 *     return tz_utcoffset(dt.tzinfo, dt)
 * 
 * cdef inline datetime.datetime dt_astimezone(datetime.datetime dt, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to another timezone `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytimes.utils.dt_astimezone", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_my_tz);
  __Pyx_XDECREF(__pyx_v_to_tz);
  __Pyx_XDECREF((PyObject *)__pyx_v_my_off);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4431
 *     return to_tz.fromutc(dt_fr_us(us, to_tz, dtclass))
 * 
 * cdef inline datetime.datetime dt_normalize_tz(datetime.datetime dt, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Normalize an aware datetime against its own tzinfo `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_normalize_tz(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_dt_normalize_tz *__pyx_optional_args) {
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyObject *__pyx_v_tzinfo = 0;
  int __pyx_v_fold;
  PY_LONG_LONG __pyx_v_off_f0;
  PY_LONG_LONG __pyx_v_off_f1;
  PY_LONG_LONG __pyx_v_delta;
  PY_LONG_LONG __pyx_v_us;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_dt_replace_fold __pyx_t_4;
  int __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset_sec __pyx_t_6;
  int __pyx_t_7;
  PY_LONG_LONG __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_us __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_us __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_normalize_tz", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dtclass = __pyx_optional_args->dtclass;
    }
  }

  /* "utils.pxd":4453
 *     """
 *     # Timezone-naive: no-op
 *     cdef object tzinfo = dt.tzinfo             # <<<<<<<<<<<<<<
 *     if tzinfo is None:
 *         return dt_fr_dt(dt, dtclass)
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_tzinfo = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "utils.pxd":4454
 *     # Timezone-naive: no-op
 *     cdef object tzinfo = dt.tzinfo
 *     if tzinfo is None:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  __pyx_t_2 = (__pyx_v_tzinfo == Py_None);
  if (__pyx_t_2) {

    /* "utils.pxd":4455
 *     cdef object tzinfo = dt.tzinfo
 *     if tzinfo is None:
 *         return dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 * 
 *     # Probe offsets at both folds around the same wall time
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 1;
    __pyx_t_3.dtclass = __pyx_v_dtclass;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "utils.pxd":4454
 *     # Timezone-naive: no-op
 *     cdef object tzinfo = dt.tzinfo
 *     if tzinfo is None:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  }

  /* "utils.pxd":4458
 * 
 *     # Probe offsets at both folds around the same wall time
 *     cdef int fold = dt.fold             # <<<<<<<<<<<<<<
 *     cdef long long off_f0, off_f1
 *     if fold == 1:
*/
  __pyx_v_fold = __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt);

  /* "utils.pxd":4460
 *     cdef int fold = dt.fold
 *     cdef long long off_f0, off_f1
 *     if fold == 1:             # <<<<<<<<<<<<<<
 *         off_f0 = tz_utcoffset_sec(tzinfo, dt_replace_fold(dt, 0, None))
 *         off_f1 = tz_utcoffset_sec(tzinfo, dt)
*/
  __pyx_t_2 = (__pyx_v_fold == 1);
  if (__pyx_t_2) {

    /* "utils.pxd":4461
 *     cdef long long off_f0, off_f1
 *     if fold == 1:
 *         off_f0 = tz_utcoffset_sec(tzinfo, dt_replace_fold(dt, 0, None))             # <<<<<<<<<<<<<<
 *         off_f1 = tz_utcoffset_sec(tzinfo, dt)
 *     else:
*/
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.dtclass = Py_None;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace_fold(__pyx_v_dt, 0, &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.dt = ((PyDateTime_DateTime *)__pyx_t_1);
    __pyx_t_5 = __pyx_f_7cytimes_5utils_tz_utcoffset_sec(__pyx_v_tzinfo, &__pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-200000))) __PYX_ERR(5, 4461, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_off_f0 = __pyx_t_5;

    /* "utils.pxd":4462
 *     if fold == 1:
 *         off_f0 = tz_utcoffset_sec(tzinfo, dt_replace_fold(dt, 0, None))
 *         off_f1 = tz_utcoffset_sec(tzinfo, dt)             # <<<<<<<<<<<<<<
 *     else:
 *         off_f0 = tz_utcoffset_sec(tzinfo, dt)
*/
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.dt = __pyx_v_dt;
    __pyx_t_5 = __pyx_f_7cytimes_5utils_tz_utcoffset_sec(__pyx_v_tzinfo, &__pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-200000))) __PYX_ERR(5, 4462, __pyx_L1_error)
    __pyx_v_off_f1 = __pyx_t_5;

    /* "utils.pxd":4460
 *     cdef int fold = dt.fold
 *     cdef long long off_f0, off_f1
 *     if fold == 1:             # <<<<<<<<<<<<<<
 *         off_f0 = tz_utcoffset_sec(tzinfo, dt_replace_fold(dt, 0, None))
 *         off_f1 = tz_utcoffset_sec(tzinfo, dt)
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":4464
 *         off_f1 = tz_utcoffset_sec(tzinfo, dt)
 *     else:
 *         off_f0 = tz_utcoffset_sec(tzinfo, dt)             # <<<<<<<<<<<<<<
 *         off_f1 = tz_utcoffset_sec(tzinfo, dt_replace_fold(dt, 1, None))
 * 
*/
  /*else*/ {
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.dt = __pyx_v_dt;
    __pyx_t_5 = __pyx_f_7cytimes_5utils_tz_utcoffset_sec(__pyx_v_tzinfo, &__pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-200000))) __PYX_ERR(5, 4464, __pyx_L1_error)
    __pyx_v_off_f0 = __pyx_t_5;

    /* "utils.pxd":4465
 *     else:
 *         off_f0 = tz_utcoffset_sec(tzinfo, dt)
 *         off_f1 = tz_utcoffset_sec(tzinfo, dt_replace_fold(dt, 1, None))             # <<<<<<<<<<<<<<
 * 
 *     # There is no positive delta or either offset is
*/
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.dtclass = Py_None;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace_fold(__pyx_v_dt, 1, &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.dt = ((PyDateTime_DateTime *)__pyx_t_1);
    __pyx_t_5 = __pyx_f_7cytimes_5utils_tz_utcoffset_sec(__pyx_v_tzinfo, &__pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-200000))) __PYX_ERR(5, 4465, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_off_f1 = __pyx_t_5;
  }
  __pyx_L4:;

  /* "utils.pxd":4469
 *     # There is no positive delta or either offset is
 *     # unknown (sentinel = -100,000); return as-is.
 *     cdef long long delta = off_f1 - off_f0             # <<<<<<<<<<<<<<
 *     if delta <= 0 or off_f0 == NULL_TZOFFSET or off_f1 == NULL_TZOFFSET:
 *         return dt_fr_dt(dt, dtclass)
*/
  __pyx_v_delta = (__pyx_v_off_f1 - __pyx_v_off_f0);

  /* "utils.pxd":4470
 *     # unknown (sentinel = -100,000); return as-is.
 *     cdef long long delta = off_f1 - off_f0
 *     if delta <= 0 or off_f0 == NULL_TZOFFSET or off_f1 == NULL_TZOFFSET:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  __pyx_t_7 = (__pyx_v_delta <= 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_2 = __pyx_t_7;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_off_f0 == __pyx_v_7cytimes_5utils_NULL_TZOFFSET);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_2 = __pyx_t_7;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_off_f1 == __pyx_v_7cytimes_5utils_NULL_TZOFFSET);
  __pyx_t_2 = __pyx_t_7;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_2) {

    /* "utils.pxd":4471
 *     cdef long long delta = off_f1 - off_f0
 *     if delta <= 0 or off_f0 == NULL_TZOFFSET or off_f1 == NULL_TZOFFSET:
 *         return dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 * 
 *     # Gap: apply  depending on which side of the gap
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 1;
    __pyx_t_3.dtclass = __pyx_v_dtclass;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4471, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "utils.pxd":4470
 *     # unknown (sentinel = -100,000); return as-is.
 *     cdef long long delta = off_f1 - off_f0
 *     if delta <= 0 or off_f0 == NULL_TZOFFSET or off_f1 == NULL_TZOFFSET:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  }

  /* "utils.pxd":4475
 *     # Gap: apply  depending on which side of the gap
 *     # the input fold denotes
 *     cdef long long us = dt_to_us(dt, False)             # <<<<<<<<<<<<<<
 *     if fold == 1:
 *         us += delta * US_SECOND
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.utc = 0;
  __pyx_t_8 = __pyx_f_7cytimes_5utils_dt_to_us(__pyx_v_dt, &__pyx_t_9); if (unlikely(__pyx_t_8 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 4475, __pyx_L1_error)
  __pyx_v_us = __pyx_t_8;

  /* "utils.pxd":4476
 *     # the input fold denotes
 *     cdef long long us = dt_to_us(dt, False)
 *     if fold == 1:             # <<<<<<<<<<<<<<
 *         us += delta * US_SECOND
 *     else:
*/
  __pyx_t_2 = (__pyx_v_fold == 1);
  if (__pyx_t_2) {

    /* "utils.pxd":4477
 *     cdef long long us = dt_to_us(dt, False)
 *     if fold == 1:
 *         us += delta * US_SECOND             # <<<<<<<<<<<<<<
 *     else:
 *         us -= delta * US_SECOND
*/
    __pyx_v_us = (__pyx_v_us + (__pyx_v_delta * __pyx_v_7cytimes_5utils_US_SECOND));

    /* "utils.pxd":4476
 *     # the input fold denotes
 *     cdef long long us = dt_to_us(dt, False)
 *     if fold == 1:             # <<<<<<<<<<<<<<
 *         us += delta * US_SECOND
 *     else:
*/
    goto __pyx_L9;
  }

  /* "utils.pxd":4479
 *         us += delta * US_SECOND
 *     else:
 *         us -= delta * US_SECOND             # <<<<<<<<<<<<<<
 *     return dt_fr_us(us, tzinfo, dtclass)
 * 
*/
  /*else*/ {
    __pyx_v_us = (__pyx_v_us - (__pyx_v_delta * __pyx_v_7cytimes_5utils_US_SECOND));
  }
  __pyx_L9:;

  /* "utils.pxd":4480
 *     else:
 *         us -= delta * US_SECOND
 *     return dt_fr_us(us, tzinfo, dtclass)             # <<<<<<<<<<<<<<
 * 
 * # datetime.time ----------------------------------------------------------------------------------------
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_10.__pyx_n = 2;
  __pyx_t_10.tzinfo = __pyx_v_tzinfo;
  __pyx_t_10.dtclass = __pyx_v_dtclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_us(__pyx_v_us, &__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4431
 *     return to_tz.fromutc(dt_fr_us(us, to_tz, dtclass))
 * 
 * cdef inline datetime.datetime dt_normalize_tz(datetime.datetime dt, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Normalize an aware datetime against its own tzinfo `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt_normalize_tz", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tzinfo);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4484
 * # datetime.time ----------------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.time time_new(             # <<<<<<<<<<<<<<
 *     int hour=0, int minute=0, int second=0, int microsecond=0,
 *     object tzinfo=None, int fold=0, object tclass=None,
*/

static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cytimes_5utils_time_new(struct __pyx_opt_args_7cytimes_5utils_time_new *__pyx_optional_args) {
  int __pyx_v_hour = ((int)0);
  int __pyx_v_minute = ((int)0);
  int __pyx_v_second = ((int)0);
  int __pyx_v_microsecond = ((int)0);

  /* "utils.pxd":4486
 * cdef inline datetime.time time_new(
 *     int hour=0, int minute=0, int second=0, int microsecond=0,
 *     object tzinfo=None, int fold=0, object tclass=None,             # <<<<<<<<<<<<<<
 * ):
 *     """Create a new time `<'datetime.time'>`.
*/
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  int __pyx_v_fold = ((int)0);
  PyObject *__pyx_v_tclass = ((PyObject *)Py_None);
  PyObject *__pyx_v_err = NULL;
  PyDateTime_Time *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  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;
  size_t __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  PyObject *__pyx_t_17[4];
  int __pyx_t_18;
  char const *__pyx_t_19;
  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;
  struct __pyx_opt_args_7cpython_8datetime_time_new __pyx_t_26;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time_new", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_hour = __pyx_optional_args->hour;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_minute = __pyx_optional_args->minute;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_second = __pyx_optional_args->second;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_microsecond = __pyx_optional_args->microsecond;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
              if (__pyx_optional_args->__pyx_n > 5) {
                __pyx_v_fold = __pyx_optional_args->fold;
                if (__pyx_optional_args->__pyx_n > 6) {
                  __pyx_v_tclass = __pyx_optional_args->tclass;
                }
              }
            }
          }
        }
      }
    }
  }

  /* "utils.pxd":4502
 *     """
 *     # Construct time
 *     fold = fold == 1             # <<<<<<<<<<<<<<
 *     if tclass is not None and tclass is not datetime.time:
 *         try:
*/
  __pyx_v_fold = (__pyx_v_fold == 1);

  /* "utils.pxd":4503
 *     # Construct time
 *     fold = fold == 1
 *     if tclass is not None and tclass is not datetime.time:             # <<<<<<<<<<<<<<
 *         try:
 *             return tclass(
*/
  __pyx_t_2 = (__pyx_v_tclass != Py_None);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_tclass != ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time));
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":4504
 *     fold = fold == 1
 *     if tclass is not None and tclass is not datetime.time:
 *         try:             # <<<<<<<<<<<<<<
 *             return tclass(
 *                 hour=hour,
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __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:*/ {

        /* "utils.pxd":4505
 *     if tclass is not None and tclass is not datetime.time:
 *         try:
 *             return tclass(             # <<<<<<<<<<<<<<
 *                 hour=hour,
 *                 minute=minute,
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = NULL;
        __Pyx_INCREF(__pyx_v_tclass);
        __pyx_t_8 = __pyx_v_tclass; 

        /* "utils.pxd":4506
 *         try:
 *             return tclass(
 *                 hour=hour,             # <<<<<<<<<<<<<<
 *                 minute=minute,
 *                 second=second,
*/
        __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_hour); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 4506, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_9);

        /* "utils.pxd":4507
 *             return tclass(
 *                 hour=hour,
 *                 minute=minute,             # <<<<<<<<<<<<<<
 *                 second=second,
 *                 microsecond=microsecond,
*/
        __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_minute); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 4507, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_10);

        /* "utils.pxd":4508
 *                 hour=hour,
 *                 minute=minute,
 *                 second=second,             # <<<<<<<<<<<<<<
 *                 microsecond=microsecond,
 *                 tzinfo=tzinfo,
*/
        __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_second); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 4508, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_11);

        /* "utils.pxd":4509
 *                 minute=minute,
 *                 second=second,
 *                 microsecond=microsecond,             # <<<<<<<<<<<<<<
 *                 tzinfo=tzinfo,
 *                 fold=fold,
*/
        __pyx_t_12 = __Pyx_PyLong_From_int(__pyx_v_microsecond); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 4509, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_12);

        /* "utils.pxd":4511
 *                 microsecond=microsecond,
 *                 tzinfo=tzinfo,
 *                 fold=fold,             # <<<<<<<<<<<<<<
 *             )
 *         except Exception as err:
*/
        __pyx_t_13 = __Pyx_PyLong_From_int(__pyx_v_fold); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 4511, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_14 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
          assert(__pyx_t_7);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
          __pyx_t_14 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 6 : 0)] = {__pyx_t_7, NULL};
          __pyx_t_15 = __Pyx_MakeVectorcallBuilderKwds(6); if (unlikely(!__pyx_t_15)) __PYX_ERR(5, 4505, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_15);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hour, __pyx_t_9, __pyx_t_15, __pyx_callargs+1, 0) < (0)) __PYX_ERR(5, 4505, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minute, __pyx_t_10, __pyx_t_15, __pyx_callargs+1, 1) < (0)) __PYX_ERR(5, 4505, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_second, __pyx_t_11, __pyx_t_15, __pyx_callargs+1, 2) < (0)) __PYX_ERR(5, 4505, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_microsecond, __pyx_t_12, __pyx_t_15, __pyx_callargs+1, 3) < (0)) __PYX_ERR(5, 4505, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_v_tzinfo, __pyx_t_15, __pyx_callargs+1, 4) < (0)) __PYX_ERR(5, 4505, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_fold, __pyx_t_13, __pyx_t_15, __pyx_callargs+1, 5) < (0)) __PYX_ERR(5, 4505, __pyx_L6_error)
          __pyx_t_6 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_14, (1-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_15);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 4505, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
        }

        /* "utils.pxd":4505
 *     if tclass is not None and tclass is not datetime.time:
 *         try:
 *             return tclass(             # <<<<<<<<<<<<<<
 *                 hour=hour,
 *                 minute=minute,
*/
        if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(5, 4505, __pyx_L6_error)
        __pyx_r = ((PyDateTime_Time *)__pyx_t_6);
        __pyx_t_6 = 0;
        goto __pyx_L10_try_return;

        /* "utils.pxd":4504
 *     fold = fold == 1
 *     if tclass is not None and tclass is not datetime.time:
 *         try:             # <<<<<<<<<<<<<<
 *             return tclass(
 *                 hour=hour,
*/
      }
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 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;
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "utils.pxd":4513
 *                 fold=fold,
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot create time using custom 'tclass' %s, %s" % (tclass, err)) from err
 *     return datetime.time_new(hour, minute, second, microsecond, tzinfo, fold)
*/
      __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_16) {
        __Pyx_AddTraceback("cytimes.utils.time_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_15) < 0) __PYX_ERR(5, 4513, __pyx_L8_except_error)
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_15);
        __Pyx_INCREF(__pyx_t_8);
        __pyx_v_err = __pyx_t_8;
        /*try:*/ {

          /* "utils.pxd":4514
 *             )
 *         except Exception as err:
 *             raise ValueError("Cannot create time using custom 'tclass' %s, %s" % (tclass, err)) from err             # <<<<<<<<<<<<<<
 *     return datetime.time_new(hour, minute, second, microsecond, tzinfo, fold)
 * 
*/
          __pyx_t_12 = NULL;
          __pyx_t_11 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_tclass), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 4514, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_10 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_err), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 4514, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_17[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_create_time_using_custom;
          __pyx_t_17[1] = __pyx_t_11;
          __pyx_t_17[2] = __pyx_mstate_global->__pyx_kp_u__3;
          __pyx_t_17[3] = __pyx_t_10;
          __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_17, 4, 41 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10));
          if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 4514, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_14 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_9};
            __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 4514, __pyx_L17_error)
            __Pyx_GOTREF(__pyx_t_13);
          }
          __Pyx_Raise(__pyx_t_13, 0, 0, __pyx_v_err);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __PYX_ERR(5, 4514, __pyx_L17_error)
        }

        /* "utils.pxd":4513
 *                 fold=fold,
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot create time using custom 'tclass' %s, %s" % (tclass, err)) from err
 *     return datetime.time_new(hour, minute, second, microsecond, tzinfo, fold)
*/
        /*finally:*/ {
          __pyx_L17_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 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;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25);
            if ( unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_23);
            __Pyx_XGOTREF(__pyx_t_24);
            __Pyx_XGOTREF(__pyx_t_25);
            __pyx_t_16 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_19 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            }
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_XGIVEREF(__pyx_t_25);
            __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_ErrRestore(__pyx_t_20, __pyx_t_21, __pyx_t_22);
            __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
            __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_19;
            goto __pyx_L8_except_error;
          }
        }
      }
      goto __pyx_L8_except_error;

      /* "utils.pxd":4504
 *     fold = fold == 1
 *     if tclass is not None and tclass is not datetime.time:
 *         try:             # <<<<<<<<<<<<<<
 *             return tclass(
 *                 hour=hour,
*/
      __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_L10_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;
    }

    /* "utils.pxd":4503
 *     # Construct time
 *     fold = fold == 1
 *     if tclass is not None and tclass is not datetime.time:             # <<<<<<<<<<<<<<
 *         try:
 *             return tclass(
*/
  }

  /* "utils.pxd":4515
 *         except Exception as err:
 *             raise ValueError("Cannot create time using custom 'tclass' %s, %s" % (tclass, err)) from err
 *     return datetime.time_new(hour, minute, second, microsecond, tzinfo, fold)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.time time_now(object tzinfo=None, object tclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_26.__pyx_n = 1;
  __pyx_t_26.fold = __pyx_v_fold;
  __pyx_t_15 = ((PyObject *)__pyx_f_7cpython_8datetime_time_new(__pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tzinfo, &__pyx_t_26)); if (unlikely(!__pyx_t_15)) __PYX_ERR(5, 4515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_r = ((PyDateTime_Time *)__pyx_t_15);
  __pyx_t_15 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4484
 * # datetime.time ----------------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.time time_new(             # <<<<<<<<<<<<<<
 *     int hour=0, int minute=0, int second=0, int microsecond=0,
 *     object tzinfo=None, int fold=0, object tclass=None,
*/

  /* function exit code */
  __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_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("cytimes.utils.time_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4517
 *     return datetime.time_new(hour, minute, second, microsecond, tzinfo, fold)
 * 
 * cdef inline datetime.time time_now(object tzinfo=None, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Get the current time `<'datetime.time'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cytimes_5utils_time_now(struct __pyx_opt_args_7cytimes_5utils_time_now *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_tclass = ((PyObject *)Py_None);
  PyDateTime_Time *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_now __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_time_fr_dt __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time_now", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_tclass = __pyx_optional_args->tclass;
      }
    }
  }

  /* "utils.pxd":4533
 *     >>> datetime.datetime.now(tzinfo).time()
 *     """
 *     return time_fr_dt(dt_now(tzinfo, None), tclass)             # <<<<<<<<<<<<<<
 * 
 * # . type check
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.tzinfo = __pyx_v_tzinfo;
  __pyx_t_2.dtclass = Py_None;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_now(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.tclass = __pyx_v_tclass;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_dt(((PyDateTime_DateTime *)__pyx_t_1), &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyDateTime_Time *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4517
 *     return datetime.time_new(hour, minute, second, microsecond, tzinfo, fold)
 * 
 * cdef inline datetime.time time_now(object tzinfo=None, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Get the current time `<'datetime.time'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.time_now", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4536
 * 
 * # . type check
 * cdef inline bint is_time(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or sublcass of `datetime.time` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_time(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":4545
 *     >>> isinstance(obj, datetime.time)
 *     """
 *     return datetime.PyTime_Check(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_time_exact(object obj) except -1:
*/
  __pyx_r = PyTime_Check(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":4536
 * 
 * # . type check
 * cdef inline bint is_time(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or sublcass of `datetime.time` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4547
 *     return datetime.PyTime_Check(obj)
 * 
 * cdef inline bint is_time_exact(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an exact `datetime.time` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_time_exact(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":4556
 *     >>> type(obj) is datetime.time
 *     """
 *     return datetime.PyTime_CheckExact(obj)             # <<<<<<<<<<<<<<
 * 
 * # . conversion: to
*/
  __pyx_r = PyTime_CheckExact(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":4547
 *     return datetime.PyTime_Check(obj)
 * 
 * cdef inline bint is_time_exact(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an exact `datetime.time` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4559
 * 
 * # . conversion: to
 * cdef inline str time_isoformat(datetime.time time, bint utc=False):             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.time` to ISO string `<'str'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_time_isoformat(PyDateTime_Time *__pyx_v_time, struct __pyx_opt_args_7cytimes_5utils_time_isoformat *__pyx_optional_args) {
  int __pyx_v_utc = ((int)0);
  int __pyx_v_us;
  PyObject *__pyx_v_s_utc = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_tz_utcformat __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6[5];
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8[6];
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10[7];
  PyObject *__pyx_t_11[8];
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time_isoformat", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_utc = __pyx_optional_args->utc;
    }
  }

  /* "utils.pxd":4571
 *     """
 *     cdef:
 *         int us = time.microsecond             # <<<<<<<<<<<<<<
 *         str s_utc = tz_utcformat(time.tzinfo, None) if utc else None
 * 
*/
  __pyx_v_us = __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(__pyx_v_time);

  /* "utils.pxd":4572
 *     cdef:
 *         int us = time.microsecond
 *         str s_utc = tz_utcformat(time.tzinfo, None) if utc else None             # <<<<<<<<<<<<<<
 * 
 *     if us == 0:
*/
  if (__pyx_v_utc) {
    __pyx_t_2 = __pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(__pyx_v_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.dt = ((PyDateTime_DateTime *)Py_None);
    __pyx_t_3 = __pyx_f_7cytimes_5utils_tz_utcformat(__pyx_t_2, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(5, 4572, __pyx_L1_error)
  __pyx_v_s_utc = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":4574
 *         str s_utc = tz_utcformat(time.tzinfo, None) if utc else None
 * 
 *     if us == 0:             # <<<<<<<<<<<<<<
 *         if s_utc is None:
 *             return "%02d:%02d:%02d" % (time.hour, time.minute, time.second)
*/
  __pyx_t_5 = (__pyx_v_us == 0);
  if (__pyx_t_5) {

    /* "utils.pxd":4575
 * 
 *     if us == 0:
 *         if s_utc is None:             # <<<<<<<<<<<<<<
 *             return "%02d:%02d:%02d" % (time.hour, time.minute, time.second)
 *         return "%02d:%02d:%02d%s" % (time.hour, time.minute, time.second, s_utc)
*/
    __pyx_t_5 = (__pyx_v_s_utc == ((PyObject*)Py_None));
    if (__pyx_t_5) {

      /* "utils.pxd":4576
 *     if us == 0:
 *         if s_utc is None:
 *             return "%02d:%02d:%02d" % (time.hour, time.minute, time.second)             # <<<<<<<<<<<<<<
 *         return "%02d:%02d:%02d%s" % (time.hour, time.minute, time.second, s_utc)
 *     else:
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_4hour_hour(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4576, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_6minute_minute(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4576, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_6second_second(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4576, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6[0] = __pyx_t_1;
      __pyx_t_6[1] = __pyx_mstate_global->__pyx_kp_u__7;
      __pyx_t_6[2] = __pyx_t_3;
      __pyx_t_6[3] = __pyx_mstate_global->__pyx_kp_u__7;
      __pyx_t_6[4] = __pyx_t_2;
      __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127);
      if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 4576, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = ((PyObject*)__pyx_t_7);
      __pyx_t_7 = 0;
      goto __pyx_L0;

      /* "utils.pxd":4575
 * 
 *     if us == 0:
 *         if s_utc is None:             # <<<<<<<<<<<<<<
 *             return "%02d:%02d:%02d" % (time.hour, time.minute, time.second)
 *         return "%02d:%02d:%02d%s" % (time.hour, time.minute, time.second, s_utc)
*/
    }

    /* "utils.pxd":4577
 *         if s_utc is None:
 *             return "%02d:%02d:%02d" % (time.hour, time.minute, time.second)
 *         return "%02d:%02d:%02d%s" % (time.hour, time.minute, time.second, s_utc)             # <<<<<<<<<<<<<<
 *     else:
 *         if s_utc is None:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_4hour_hour(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 4577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_6minute_minute(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_6second_second(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyUnicode_Unicode(__pyx_v_s_utc); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8[0] = __pyx_t_7;
    __pyx_t_8[1] = __pyx_mstate_global->__pyx_kp_u__7;
    __pyx_t_8[2] = __pyx_t_2;
    __pyx_t_8[3] = __pyx_mstate_global->__pyx_kp_u__7;
    __pyx_t_8[4] = __pyx_t_3;
    __pyx_t_8[5] = __pyx_t_1;
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 6, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1));
    if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 4577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __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;
    __pyx_r = ((PyObject*)__pyx_t_9);
    __pyx_t_9 = 0;
    goto __pyx_L0;

    /* "utils.pxd":4574
 *         str s_utc = tz_utcformat(time.tzinfo, None) if utc else None
 * 
 *     if us == 0:             # <<<<<<<<<<<<<<
 *         if s_utc is None:
 *             return "%02d:%02d:%02d" % (time.hour, time.minute, time.second)
*/
  }

  /* "utils.pxd":4579
 *         return "%02d:%02d:%02d%s" % (time.hour, time.minute, time.second, s_utc)
 *     else:
 *         if s_utc is None:             # <<<<<<<<<<<<<<
 *             return "%02d:%02d:%02d.%06d" % (time.hour, time.minute, time.second, us)
 *         return "%02d:%02d:%02d.%06d%s" % (time.hour, time.minute, time.second, us, s_utc)
*/
  /*else*/ {
    __pyx_t_5 = (__pyx_v_s_utc == ((PyObject*)Py_None));
    if (__pyx_t_5) {

      /* "utils.pxd":4580
 *     else:
 *         if s_utc is None:
 *             return "%02d:%02d:%02d.%06d" % (time.hour, time.minute, time.second, us)             # <<<<<<<<<<<<<<
 *         return "%02d:%02d:%02d.%06d%s" % (time.hour, time.minute, time.second, us, s_utc)
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_4hour_hour(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 4580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_6minute_minute(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_6second_second(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyUnicode_From_int(__pyx_v_us, 6, '0', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_10[0] = __pyx_t_9;
      __pyx_t_10[1] = __pyx_mstate_global->__pyx_kp_u__7;
      __pyx_t_10[2] = __pyx_t_1;
      __pyx_t_10[3] = __pyx_mstate_global->__pyx_kp_u__7;
      __pyx_t_10[4] = __pyx_t_3;
      __pyx_t_10[5] = __pyx_mstate_global->__pyx_kp_u__2;
      __pyx_t_10[6] = __pyx_t_2;
      __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_10, 7, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 1 * 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127);
      if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 4580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = ((PyObject*)__pyx_t_7);
      __pyx_t_7 = 0;
      goto __pyx_L0;

      /* "utils.pxd":4579
 *         return "%02d:%02d:%02d%s" % (time.hour, time.minute, time.second, s_utc)
 *     else:
 *         if s_utc is None:             # <<<<<<<<<<<<<<
 *             return "%02d:%02d:%02d.%06d" % (time.hour, time.minute, time.second, us)
 *         return "%02d:%02d:%02d.%06d%s" % (time.hour, time.minute, time.second, us, s_utc)
*/
    }

    /* "utils.pxd":4581
 *         if s_utc is None:
 *             return "%02d:%02d:%02d.%06d" % (time.hour, time.minute, time.second, us)
 *         return "%02d:%02d:%02d.%06d%s" % (time.hour, time.minute, time.second, us, s_utc)             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long time_to_us(datetime.time time) noexcept:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_4hour_hour(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 4581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_6minute_minute(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_6second_second(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_us, 6, '0', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __Pyx_PyUnicode_Unicode(__pyx_v_s_utc); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 4581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_11[0] = __pyx_t_7;
    __pyx_t_11[1] = __pyx_mstate_global->__pyx_kp_u__7;
    __pyx_t_11[2] = __pyx_t_2;
    __pyx_t_11[3] = __pyx_mstate_global->__pyx_kp_u__7;
    __pyx_t_11[4] = __pyx_t_3;
    __pyx_t_11[5] = __pyx_mstate_global->__pyx_kp_u__2;
    __pyx_t_11[6] = __pyx_t_1;
    __pyx_t_11[7] = __pyx_t_9;
    __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_11, 8, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1 * 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9));
    if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 4581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __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;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_r = ((PyObject*)__pyx_t_12);
    __pyx_t_12 = 0;
    goto __pyx_L0;
  }

  /* "utils.pxd":4559
 * 
 * # . conversion: to
 * cdef inline str time_isoformat(datetime.time time, bint utc=False):             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.time` to ISO string `<'str'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cytimes.utils.time_isoformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s_utc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4583
 *         return "%02d:%02d:%02d.%06d%s" % (time.hour, time.minute, time.second, us, s_utc)
 * 
 * cdef inline long long time_to_us(datetime.time time) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.time` to total microseconds `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_time_to_us(PyDateTime_Time *__pyx_v_time) {
  PY_LONG_LONG __pyx_r;

  /* "utils.pxd":4592
 *         (<long long> time.hour)       * US_HOUR +
 *         (<long long> time.minute)     * US_MINUTE +
 *         (<long long> time.second)     * US_SECOND +             # <<<<<<<<<<<<<<
 *         (<long long> time.microsecond)
 *     )
*/
  __pyx_r = ((((((PY_LONG_LONG)__pyx_f_7cpython_8datetime_4time_4hour_hour(__pyx_v_time)) * __pyx_v_7cytimes_5utils_US_HOUR) + (((PY_LONG_LONG)__pyx_f_7cpython_8datetime_4time_6minute_minute(__pyx_v_time)) * __pyx_v_7cytimes_5utils_US_MINUTE)) + (((PY_LONG_LONG)__pyx_f_7cpython_8datetime_4time_6second_second(__pyx_v_time)) * __pyx_v_7cytimes_5utils_US_SECOND)) + ((PY_LONG_LONG)__pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(__pyx_v_time)));
  goto __pyx_L0;

  /* "utils.pxd":4583
 *         return "%02d:%02d:%02d.%06d%s" % (time.hour, time.minute, time.second, us, s_utc)
 * 
 * cdef inline long long time_to_us(datetime.time time) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.time` to total microseconds `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4596
 *     )
 * 
 * cdef inline double time_to_sec(datetime.time time) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.time` to total seconds `<'float'>`.
 * 
*/

static CYTHON_INLINE double __pyx_f_7cytimes_5utils_time_to_sec(PyDateTime_Time *__pyx_v_time) {
  PY_LONG_LONG __pyx_v_us;
  double __pyx_r;

  /* "utils.pxd":4602
 *     :returns `<'float'>`: Seconds since midnight in [0.0, 86400.0).
 *     """
 *     cdef long long us = time_to_us(time)             # <<<<<<<<<<<<<<
 *     return <double> us * 1e-6
 * 
*/
  __pyx_v_us = __pyx_f_7cytimes_5utils_time_to_us(__pyx_v_time);

  /* "utils.pxd":4603
 *     """
 *     cdef long long us = time_to_us(time)
 *     return <double> us * 1e-6             # <<<<<<<<<<<<<<
 * 
 * # . conversion: from
*/
  __pyx_r = (((double)__pyx_v_us) * 1e-6);
  goto __pyx_L0;

  /* "utils.pxd":4596
 *     )
 * 
 * cdef inline double time_to_sec(datetime.time time) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.time` to total seconds `<'float'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4606
 * 
 * # . conversion: from
 * cdef inline datetime.time time_fr_us(long long value, object tzinfo=None, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from microseconds since the Unix epoch `<'datetime.time'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cytimes_5utils_time_fr_us(PY_LONG_LONG __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_time_fr_us *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_tclass = ((PyObject *)Py_None);
  __pyx_t_7cytimes_5utils_hmsf __pyx_v__hmsf;
  PyDateTime_Time *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_time_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time_fr_us", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_tclass = __pyx_optional_args->tclass;
      }
    }
  }

  /* "utils.pxd":4615
 *     :returns `<'datetime.time'>`: The resulting time (or subclass if `tclass` is specified).
 *     """
 *     cdef hmsf _hmsf = hmsf_fr_us(value)             # <<<<<<<<<<<<<<
 *     return time_new(
 *         _hmsf.hour, _hmsf.minute, _hmsf.second,
*/
  __pyx_v__hmsf = __pyx_f_7cytimes_5utils_hmsf_fr_us(__pyx_v_value);

  /* "utils.pxd":4616
 *     """
 *     cdef hmsf _hmsf = hmsf_fr_us(value)
 *     return time_new(             # <<<<<<<<<<<<<<
 *         _hmsf.hour, _hmsf.minute, _hmsf.second,
 *         _hmsf.microsecond, tzinfo, 0, tclass
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "utils.pxd":4618
 *     return time_new(
 *         _hmsf.hour, _hmsf.minute, _hmsf.second,
 *         _hmsf.microsecond, tzinfo, 0, tclass             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_2.__pyx_n = 7;
  __pyx_t_2.hour = __pyx_v__hmsf.hour;
  __pyx_t_2.minute = __pyx_v__hmsf.minute;
  __pyx_t_2.second = __pyx_v__hmsf.second;
  __pyx_t_2.microsecond = __pyx_v__hmsf.microsecond;
  __pyx_t_2.tzinfo = __pyx_v_tzinfo;
  __pyx_t_2.fold = 0;
  __pyx_t_2.tclass = __pyx_v_tclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_time_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Time *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4606
 * 
 * # . conversion: from
 * cdef inline datetime.time time_fr_us(long long value, object tzinfo=None, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from microseconds since the Unix epoch `<'datetime.time'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.time_fr_us", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4621
 *     )
 * 
 * cdef inline datetime.time time_fr_sec(double value, object tzinfo=None, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from seconds since the Unix epoch `<'datetime.time'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cytimes_5utils_time_fr_sec(double __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_time_fr_sec *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_tclass = ((PyObject *)Py_None);
  PyDateTime_Time *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PY_LONG_LONG __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_time_fr_us __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time_fr_sec", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_tclass = __pyx_optional_args->tclass;
      }
    }
  }

  /* "utils.pxd":4630
 *     :returns `<'datetime.time'>`: The resulting time (or subclass if `tclass` is specified).
 *     """
 *     return time_fr_us(sec_to_us(value), tzinfo, tclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.time time_fr_time(datetime.time time, object tclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_5utils_sec_to_us(__pyx_v_value); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 4630, __pyx_L1_error)
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.tzinfo = __pyx_v_tzinfo;
  __pyx_t_3.tclass = __pyx_v_tclass;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_us(__pyx_t_1, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((PyDateTime_Time *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4621
 *     )
 * 
 * cdef inline datetime.time time_fr_sec(double value, object tzinfo=None, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from seconds since the Unix epoch `<'datetime.time'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.time_fr_sec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4632
 *     return time_fr_us(sec_to_us(value), tzinfo, tclass)
 * 
 * cdef inline datetime.time time_fr_time(datetime.time time, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from another time (include subclass) `<'datetime.time'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cytimes_5utils_time_fr_time(PyDateTime_Time *__pyx_v_time, struct __pyx_opt_args_7cytimes_5utils_time_fr_time *__pyx_optional_args) {
  PyObject *__pyx_v_tclass = ((PyObject *)Py_None);
  PyDateTime_Time *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_time_new __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time_fr_time", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tclass = __pyx_optional_args->tclass;
    }
  }
  __Pyx_INCREF(__pyx_v_tclass);

  /* "utils.pxd":4642
 *         with the same time fields and tzinfo.
 *     """
 *     if tclass is None:             # <<<<<<<<<<<<<<
 *         tclass = datetime.time
 *     if tclass is type(time):
*/
  __pyx_t_1 = (__pyx_v_tclass == Py_None);
  if (__pyx_t_1) {

    /* "utils.pxd":4643
 *     """
 *     if tclass is None:
 *         tclass = datetime.time             # <<<<<<<<<<<<<<
 *     if tclass is type(time):
 *         return time
*/
    __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time);
    __Pyx_DECREF_SET(__pyx_v_tclass, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time));

    /* "utils.pxd":4642
 *         with the same time fields and tzinfo.
 *     """
 *     if tclass is None:             # <<<<<<<<<<<<<<
 *         tclass = datetime.time
 *     if tclass is type(time):
*/
  }

  /* "utils.pxd":4644
 *     if tclass is None:
 *         tclass = datetime.time
 *     if tclass is type(time):             # <<<<<<<<<<<<<<
 *         return time
 *     return time_new(
*/
  __pyx_t_1 = (__pyx_v_tclass == ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_time))));
  if (__pyx_t_1) {

    /* "utils.pxd":4645
 *         tclass = datetime.time
 *     if tclass is type(time):
 *         return time             # <<<<<<<<<<<<<<
 *     return time_new(
 *         time.hour, time.minute, time.second,
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_time);
    __pyx_r = __pyx_v_time;
    goto __pyx_L0;

    /* "utils.pxd":4644
 *     if tclass is None:
 *         tclass = datetime.time
 *     if tclass is type(time):             # <<<<<<<<<<<<<<
 *         return time
 *     return time_new(
*/
  }

  /* "utils.pxd":4646
 *     if tclass is type(time):
 *         return time
 *     return time_new(             # <<<<<<<<<<<<<<
 *         time.hour, time.minute, time.second,
 *         time.microsecond, time.tzinfo, time.fold, tclass
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "utils.pxd":4648
 *     return time_new(
 *         time.hour, time.minute, time.second,
 *         time.microsecond, time.tzinfo, time.fold, tclass             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_2 = __pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(__pyx_v_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "utils.pxd":4646
 *     if tclass is type(time):
 *         return time
 *     return time_new(             # <<<<<<<<<<<<<<
 *         time.hour, time.minute, time.second,
 *         time.microsecond, time.tzinfo, time.fold, tclass
*/
  __pyx_t_4.__pyx_n = 7;
  __pyx_t_4.hour = __pyx_f_7cpython_8datetime_4time_4hour_hour(__pyx_v_time);
  __pyx_t_4.minute = __pyx_f_7cpython_8datetime_4time_6minute_minute(__pyx_v_time);
  __pyx_t_4.second = __pyx_f_7cpython_8datetime_4time_6second_second(__pyx_v_time);
  __pyx_t_4.microsecond = __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(__pyx_v_time);
  __pyx_t_4.tzinfo = __pyx_t_2;
  __pyx_t_4.fold = __pyx_f_7cpython_8datetime_4time_4fold_fold(__pyx_v_time);
  __pyx_t_4.tclass = __pyx_v_tclass;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_time_new(&__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = ((PyDateTime_Time *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4632
 *     return time_fr_us(sec_to_us(value), tzinfo, tclass)
 * 
 * cdef inline datetime.time time_fr_time(datetime.time time, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from another time (include subclass) `<'datetime.time'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.time_fr_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tclass);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4651
 *     )
 * 
 * cdef inline datetime.time time_fr_dt(datetime.datetime dt, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from datetime (include subclass) `<'datetime.time'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cytimes_5utils_time_fr_dt(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_time_fr_dt *__pyx_optional_args) {
  PyObject *__pyx_v_tclass = ((PyObject *)Py_None);
  PyDateTime_Time *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_time_new __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time_fr_dt", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tclass = __pyx_optional_args->tclass;
    }
  }

  /* "utils.pxd":4660
 *         with the same time fields and tzinfo.
 *     """
 *     return time_new(             # <<<<<<<<<<<<<<
 *         dt.hour, dt.minute, dt.second,
 *         dt.microsecond, dt.tzinfo, dt.fold, tclass
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "utils.pxd":4662
 *     return time_new(
 *         dt.hour, dt.minute, dt.second,
 *         dt.microsecond, dt.tzinfo, dt.fold, tclass             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "utils.pxd":4660
 *         with the same time fields and tzinfo.
 *     """
 *     return time_new(             # <<<<<<<<<<<<<<
 *         dt.hour, dt.minute, dt.second,
 *         dt.microsecond, dt.tzinfo, dt.fold, tclass
*/
  __pyx_t_3.__pyx_n = 7;
  __pyx_t_3.hour = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);
  __pyx_t_3.minute = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);
  __pyx_t_3.second = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);
  __pyx_t_3.microsecond = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt);
  __pyx_t_3.tzinfo = __pyx_t_1;
  __pyx_t_3.fold = __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt);
  __pyx_t_3.tclass = __pyx_v_tclass;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_time_new(&__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyDateTime_Time *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4651
 *     )
 * 
 * cdef inline datetime.time time_fr_dt(datetime.datetime dt, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from datetime (include subclass) `<'datetime.time'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.time_fr_dt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4667
 * # datetime.timedelta -----------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.timedelta td_new(int days=0, int seconds=0, int microseconds=0, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create a new timedelta `<'datetime.timedelta'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_td_new(struct __pyx_opt_args_7cytimes_5utils_td_new *__pyx_optional_args) {
  int __pyx_v_days = ((int)0);
  int __pyx_v_seconds = ((int)0);
  int __pyx_v_microseconds = ((int)0);
  PyObject *__pyx_v_tdclass = ((PyObject *)Py_None);
  PyObject *__pyx_v_err = NULL;
  PyDateTime_Delta *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  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;
  size_t __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  PyObject *__pyx_t_15[4];
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  char const *__pyx_t_18;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("td_new", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_days = __pyx_optional_args->days;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_seconds = __pyx_optional_args->seconds;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_microseconds = __pyx_optional_args->microseconds;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_tdclass = __pyx_optional_args->tdclass;
          }
        }
      }
    }
  }

  /* "utils.pxd":4681
 *     """
 *     # Construct timedelta
 *     if tdclass is not None and tdclass is not datetime.timedelta:             # <<<<<<<<<<<<<<
 *         try:
 *             return tdclass(days=days, seconds=seconds, microseconds=microseconds)
*/
  __pyx_t_2 = (__pyx_v_tdclass != Py_None);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_tdclass != ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta));
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":4682
 *     # Construct timedelta
 *     if tdclass is not None and tdclass is not datetime.timedelta:
 *         try:             # <<<<<<<<<<<<<<
 *             return tdclass(days=days, seconds=seconds, microseconds=microseconds)
 *         except Exception as err:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __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:*/ {

        /* "utils.pxd":4683
 *     if tdclass is not None and tdclass is not datetime.timedelta:
 *         try:
 *             return tdclass(days=days, seconds=seconds, microseconds=microseconds)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             raise ValueError("Cannot create timedelta using custom 'tdclass' %s, %s" % (tdclass, err)) from err
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = NULL;
        __Pyx_INCREF(__pyx_v_tdclass);
        __pyx_t_8 = __pyx_v_tdclass; 
        __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_days); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 4683, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_seconds); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 4683, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_microseconds); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 4683, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
          assert(__pyx_t_7);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
          __pyx_t_12 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_7, NULL};
          __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 4683, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_13);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_days, __pyx_t_9, __pyx_t_13, __pyx_callargs+1, 0) < (0)) __PYX_ERR(5, 4683, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_seconds, __pyx_t_10, __pyx_t_13, __pyx_callargs+1, 1) < (0)) __PYX_ERR(5, 4683, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_microseconds, __pyx_t_11, __pyx_t_13, __pyx_callargs+1, 2) < (0)) __PYX_ERR(5, 4683, __pyx_L6_error)
          __pyx_t_6 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 4683, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
        }
        if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(5, 4683, __pyx_L6_error)
        __pyx_r = ((PyDateTime_Delta *)__pyx_t_6);
        __pyx_t_6 = 0;
        goto __pyx_L10_try_return;

        /* "utils.pxd":4682
 *     # Construct timedelta
 *     if tdclass is not None and tdclass is not datetime.timedelta:
 *         try:             # <<<<<<<<<<<<<<
 *             return tdclass(days=days, seconds=seconds, microseconds=microseconds)
 *         except Exception as err:
*/
      }
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "utils.pxd":4684
 *         try:
 *             return tdclass(days=days, seconds=seconds, microseconds=microseconds)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot create timedelta using custom 'tdclass' %s, %s" % (tdclass, err)) from err
 *     return datetime.timedelta_new(days, seconds, microseconds)
*/
      __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_14) {
        __Pyx_AddTraceback("cytimes.utils.td_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_13) < 0) __PYX_ERR(5, 4684, __pyx_L8_except_error)
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_13);
        __Pyx_INCREF(__pyx_t_8);
        __pyx_v_err = __pyx_t_8;
        /*try:*/ {

          /* "utils.pxd":4685
 *             return tdclass(days=days, seconds=seconds, microseconds=microseconds)
 *         except Exception as err:
 *             raise ValueError("Cannot create timedelta using custom 'tdclass' %s, %s" % (tdclass, err)) from err             # <<<<<<<<<<<<<<
 *     return datetime.timedelta_new(days, seconds, microseconds)
 * 
*/
          __pyx_t_10 = NULL;
          __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_tdclass), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 4685, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_err), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 4685, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_15[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_create_timedelta_using_cu;
          __pyx_t_15[1] = __pyx_t_9;
          __pyx_t_15[2] = __pyx_mstate_global->__pyx_kp_u__3;
          __pyx_t_15[3] = __pyx_t_7;
          __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_15, 4, 47 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
          if (unlikely(!__pyx_t_16)) __PYX_ERR(5, 4685, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_12 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_16};
            __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 4685, __pyx_L17_error)
            __Pyx_GOTREF(__pyx_t_11);
          }
          __Pyx_Raise(__pyx_t_11, 0, 0, __pyx_v_err);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __PYX_ERR(5, 4685, __pyx_L17_error)
        }

        /* "utils.pxd":4684
 *         try:
 *             return tdclass(days=days, seconds=seconds, microseconds=microseconds)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot create timedelta using custom 'tdclass' %s, %s" % (tdclass, err)) from err
 *     return datetime.timedelta_new(days, seconds, microseconds)
*/
        /*finally:*/ {
          __pyx_L17_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
            if ( unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_23);
            __Pyx_XGOTREF(__pyx_t_24);
            __pyx_t_14 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            }
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
            __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
            __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
            goto __pyx_L8_except_error;
          }
        }
      }
      goto __pyx_L8_except_error;

      /* "utils.pxd":4682
 *     # Construct timedelta
 *     if tdclass is not None and tdclass is not datetime.timedelta:
 *         try:             # <<<<<<<<<<<<<<
 *             return tdclass(days=days, seconds=seconds, microseconds=microseconds)
 *         except Exception as err:
*/
      __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_L10_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;
    }

    /* "utils.pxd":4681
 *     """
 *     # Construct timedelta
 *     if tdclass is not None and tdclass is not datetime.timedelta:             # <<<<<<<<<<<<<<
 *         try:
 *             return tdclass(days=days, seconds=seconds, microseconds=microseconds)
*/
  }

  /* "utils.pxd":4686
 *         except Exception as err:
 *             raise ValueError("Cannot create timedelta using custom 'tdclass' %s, %s" % (tdclass, err)) from err
 *     return datetime.timedelta_new(days, seconds, microseconds)             # <<<<<<<<<<<<<<
 * 
 * # . type check
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_13 = ((PyObject *)__pyx_f_7cpython_8datetime_timedelta_new(__pyx_v_days, __pyx_v_seconds, __pyx_v_microseconds)); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 4686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_r = ((PyDateTime_Delta *)__pyx_t_13);
  __pyx_t_13 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4667
 * # datetime.timedelta -----------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.timedelta td_new(int days=0, int seconds=0, int microseconds=0, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create a new timedelta `<'datetime.timedelta'>`.
 * 
*/

  /* function exit code */
  __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_13);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("cytimes.utils.td_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4689
 * 
 * # . type check
 * cdef inline bint is_td(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `datetime.timedelta` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_td(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":4698
 *     >>> isinstance(obj, datetime.timedelta)
 *     """
 *     return datetime.PyDelta_Check(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_td_exact(object obj) except -1:
*/
  __pyx_r = PyDelta_Check(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":4689
 * 
 * # . type check
 * cdef inline bint is_td(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `datetime.timedelta` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4700
 *     return datetime.PyDelta_Check(obj)
 * 
 * cdef inline bint is_td_exact(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an exact `datetime.timedelta` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_td_exact(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":4709
 *     >>> type(obj) is datetime.timedelta
 *     """
 *     return datetime.PyDelta_CheckExact(obj)             # <<<<<<<<<<<<<<
 * 
 * # . conversion: to
*/
  __pyx_r = PyDelta_CheckExact(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":4700
 *     return datetime.PyDelta_Check(obj)
 * 
 * cdef inline bint is_td_exact(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an exact `datetime.timedelta` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4712
 * 
 * # . conversion: to
 * cdef inline str td_isoformat(datetime.timedelta td):             # <<<<<<<<<<<<<<
 *     """Convert timedelta to string in ISO-like string (HH:MM:SS[.f]) `<'str'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_td_isoformat(PyDateTime_Delta *__pyx_v_td) {
  PY_LONG_LONG __pyx_v_days;
  PY_LONG_LONG __pyx_v_sec;
  PY_LONG_LONG __pyx_v_us;
  PY_LONG_LONG __pyx_v_hh;
  PY_LONG_LONG __pyx_v_mi;
  int __pyx_v_neg;
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("td_isoformat", 0);

  /* "utils.pxd":4719
 *     """
 *     cdef:
 *         long long days = td.day             # <<<<<<<<<<<<<<
 *         long long sec  = td.second
 *         long long us   = td.microsecond
*/
  __pyx_v_days = __pyx_f_7cpython_8datetime_9timedelta_3day_day(__pyx_v_td);

  /* "utils.pxd":4720
 *     cdef:
 *         long long days = td.day
 *         long long sec  = td.second             # <<<<<<<<<<<<<<
 *         long long us   = td.microsecond
 *         long long hh, mi
*/
  __pyx_v_sec = __pyx_f_7cpython_8datetime_9timedelta_6second_second(__pyx_v_td);

  /* "utils.pxd":4721
 *         long long days = td.day
 *         long long sec  = td.second
 *         long long us   = td.microsecond             # <<<<<<<<<<<<<<
 *         long long hh, mi
 *         bint neg
*/
  __pyx_v_us = __pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(__pyx_v_td);

  /* "utils.pxd":4724
 *         long long hh, mi
 *         bint neg
 *     sec = days * SS_DAY + sec             # <<<<<<<<<<<<<<
 * 
 *     # Determine sign and normalize to absolute value without multiplying by 1e6.
*/
  __pyx_v_sec = ((__pyx_v_days * __pyx_v_7cytimes_5utils_SS_DAY) + __pyx_v_sec);

  /* "utils.pxd":4727
 * 
 *     # Determine sign and normalize to absolute value without multiplying by 1e6.
 *     if sec < 0:             # <<<<<<<<<<<<<<
 *         neg = True
 *         sec = -sec
*/
  __pyx_t_1 = (__pyx_v_sec < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":4728
 *     # Determine sign and normalize to absolute value without multiplying by 1e6.
 *     if sec < 0:
 *         neg = True             # <<<<<<<<<<<<<<
 *         sec = -sec
 *         # Borrow 1 second so that we can complement microseconds.
*/
    __pyx_v_neg = 1;

    /* "utils.pxd":4729
 *     if sec < 0:
 *         neg = True
 *         sec = -sec             # <<<<<<<<<<<<<<
 *         # Borrow 1 second so that we can complement microseconds.
 *         if us != 0:
*/
    __pyx_v_sec = (-__pyx_v_sec);

    /* "utils.pxd":4731
 *         sec = -sec
 *         # Borrow 1 second so that we can complement microseconds.
 *         if us != 0:             # <<<<<<<<<<<<<<
 *             sec -= 1                # |-X sec, +us|
 *             us = 1_000_000 - us     # (|X|-1) seconds => (1_000_000 - us)
*/
    __pyx_t_1 = (__pyx_v_us != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":4732
 *         # Borrow 1 second so that we can complement microseconds.
 *         if us != 0:
 *             sec -= 1                # |-X sec, +us|             # <<<<<<<<<<<<<<
 *             us = 1_000_000 - us     # (|X|-1) seconds => (1_000_000 - us)
 *     else:
*/
      __pyx_v_sec = (__pyx_v_sec - 1);

      /* "utils.pxd":4733
 *         if us != 0:
 *             sec -= 1                # |-X sec, +us|
 *             us = 1_000_000 - us     # (|X|-1) seconds => (1_000_000 - us)             # <<<<<<<<<<<<<<
 *     else:
 *         neg = False
*/
      __pyx_v_us = (0xF4240 - __pyx_v_us);

      /* "utils.pxd":4731
 *         sec = -sec
 *         # Borrow 1 second so that we can complement microseconds.
 *         if us != 0:             # <<<<<<<<<<<<<<
 *             sec -= 1                # |-X sec, +us|
 *             us = 1_000_000 - us     # (|X|-1) seconds => (1_000_000 - us)
*/
    }

    /* "utils.pxd":4727
 * 
 *     # Determine sign and normalize to absolute value without multiplying by 1e6.
 *     if sec < 0:             # <<<<<<<<<<<<<<
 *         neg = True
 *         sec = -sec
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":4735
 *             us = 1_000_000 - us     # (|X|-1) seconds => (1_000_000 - us)
 *     else:
 *         neg = False             # <<<<<<<<<<<<<<
 * 
 *     # Split absolute seconds into H:M:S
*/
  /*else*/ {
    __pyx_v_neg = 0;
  }
  __pyx_L3:;

  /* "utils.pxd":4739
 *     # Split absolute seconds into H:M:S
 *     with cython.cdivision(True):
 *         hh = sec / SS_HOUR;     sec %= SS_HOUR             # <<<<<<<<<<<<<<
 *         mi = sec / SS_MINUTE;   sec %= SS_MINUTE
 * 
*/
  __pyx_v_hh = (__pyx_v_sec / __pyx_v_7cytimes_5utils_SS_HOUR);
  if (unlikely(__pyx_v_7cytimes_5utils_SS_HOUR == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __PYX_ERR(5, 4739, __pyx_L1_error)
  }
  __pyx_v_sec = __Pyx_mod_PY_LONG_LONG(__pyx_v_sec, __pyx_v_7cytimes_5utils_SS_HOUR, 0);

  /* "utils.pxd":4740
 *     with cython.cdivision(True):
 *         hh = sec / SS_HOUR;     sec %= SS_HOUR
 *         mi = sec / SS_MINUTE;   sec %= SS_MINUTE             # <<<<<<<<<<<<<<
 * 
 *     # Emit
*/
  __pyx_v_mi = (__pyx_v_sec / __pyx_v_7cytimes_5utils_SS_MINUTE);
  if (unlikely(__pyx_v_7cytimes_5utils_SS_MINUTE == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __PYX_ERR(5, 4740, __pyx_L1_error)
  }
  __pyx_v_sec = __Pyx_mod_PY_LONG_LONG(__pyx_v_sec, __pyx_v_7cytimes_5utils_SS_MINUTE, 0);

  /* "utils.pxd":4743
 * 
 *     # Emit
 *     if us == 0:             # <<<<<<<<<<<<<<
 *         return ("-%02d:%02d:%02d" if neg else "%02d:%02d:%02d") % (hh, mi, sec)
 *     else:
*/
  __pyx_t_1 = (__pyx_v_us == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":4744
 *     # Emit
 *     if us == 0:
 *         return ("-%02d:%02d:%02d" if neg else "%02d:%02d:%02d") % (hh, mi, sec)             # <<<<<<<<<<<<<<
 *     else:
 *         return ("-%02d:%02d:%02d.%06d" if neg else "%02d:%02d:%02d.%06d") % (hh, mi, sec, us)
*/
    __Pyx_XDECREF(__pyx_r);
    if (__pyx_v_neg) {
      __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_02d_02d_02d);
      __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u_02d_02d_02d;
    } else {
      __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_02d_02d_02d_2);
      __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u_02d_02d_02d_2;
    }
    __pyx_t_3 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_hh); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_mi); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 4744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_sec); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 4744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 4744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3) != (0)) __PYX_ERR(5, 4744, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4) != (0)) __PYX_ERR(5, 4744, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5) != (0)) __PYX_ERR(5, 4744, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 4744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = ((PyObject*)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":4743
 * 
 *     # Emit
 *     if us == 0:             # <<<<<<<<<<<<<<
 *         return ("-%02d:%02d:%02d" if neg else "%02d:%02d:%02d") % (hh, mi, sec)
 *     else:
*/
  }

  /* "utils.pxd":4746
 *         return ("-%02d:%02d:%02d" if neg else "%02d:%02d:%02d") % (hh, mi, sec)
 *     else:
 *         return ("-%02d:%02d:%02d.%06d" if neg else "%02d:%02d:%02d.%06d") % (hh, mi, sec, us)             # <<<<<<<<<<<<<<
 * 
 * cdef inline str td_utcformat(datetime.timedelta td):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    if (__pyx_v_neg) {
      __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_02d_02d_02d_06d);
      __pyx_t_5 = __pyx_mstate_global->__pyx_kp_u_02d_02d_02d_06d;
    } else {
      __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_02d_02d_02d_06d_2);
      __pyx_t_5 = __pyx_mstate_global->__pyx_kp_u_02d_02d_02d_06d_2;
    }
    __pyx_t_6 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_hh); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 4746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_mi); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_sec); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 4746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_us); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 4746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_6);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6) != (0)) __PYX_ERR(5, 4746, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2) != (0)) __PYX_ERR(5, 4746, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_4) != (0)) __PYX_ERR(5, 4746, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_3) != (0)) __PYX_ERR(5, 4746, __pyx_L1_error);
    __pyx_t_6 = 0;
    __pyx_t_2 = 0;
    __pyx_t_4 = 0;
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_r = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "utils.pxd":4712
 * 
 * # . conversion: to
 * cdef inline str td_isoformat(datetime.timedelta td):             # <<<<<<<<<<<<<<
 *     """Convert timedelta to string in ISO-like string (HH:MM:SS[.f]) `<'str'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.utils.td_isoformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4748
 *         return ("-%02d:%02d:%02d.%06d" if neg else "%02d:%02d:%02d.%06d") % (hh, mi, sec, us)
 * 
 * cdef inline str td_utcformat(datetime.timedelta td):             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.timedelta` to a UTC offset string (HHMM) `<'str'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_td_utcformat(PyDateTime_Delta *__pyx_v_td) {
  PY_LONG_LONG __pyx_v_days;
  PY_LONG_LONG __pyx_v_sec;
  PY_LONG_LONG __pyx_v_hh;
  PY_LONG_LONG __pyx_v_mi;
  int __pyx_v_neg;
  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("td_utcformat", 0);

  /* "utils.pxd":4755
 *     """
 *     cdef:
 *         long long days = td.day             # <<<<<<<<<<<<<<
 *         long long sec  = td.second
 *         long long hh, mi
*/
  __pyx_v_days = __pyx_f_7cpython_8datetime_9timedelta_3day_day(__pyx_v_td);

  /* "utils.pxd":4756
 *     cdef:
 *         long long days = td.day
 *         long long sec  = td.second             # <<<<<<<<<<<<<<
 *         long long hh, mi
 *         bint neg
*/
  __pyx_v_sec = __pyx_f_7cpython_8datetime_9timedelta_6second_second(__pyx_v_td);

  /* "utils.pxd":4759
 *         long long hh, mi
 *         bint neg
 *     sec = days * SS_DAY + sec             # <<<<<<<<<<<<<<
 * 
 *     # Check sign
*/
  __pyx_v_sec = ((__pyx_v_days * __pyx_v_7cytimes_5utils_SS_DAY) + __pyx_v_sec);

  /* "utils.pxd":4762
 * 
 *     # Check sign
 *     if sec < 0:             # <<<<<<<<<<<<<<
 *         sec = -sec
 *         neg = True
*/
  __pyx_t_1 = (__pyx_v_sec < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":4763
 *     # Check sign
 *     if sec < 0:
 *         sec = -sec             # <<<<<<<<<<<<<<
 *         neg = True
 *     else:
*/
    __pyx_v_sec = (-__pyx_v_sec);

    /* "utils.pxd":4764
 *     if sec < 0:
 *         sec = -sec
 *         neg = True             # <<<<<<<<<<<<<<
 *     else:
 *         neg = False
*/
    __pyx_v_neg = 1;

    /* "utils.pxd":4762
 * 
 *     # Check sign
 *     if sec < 0:             # <<<<<<<<<<<<<<
 *         sec = -sec
 *         neg = True
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":4766
 *         neg = True
 *     else:
 *         neg = False             # <<<<<<<<<<<<<<
 * 
 *     # Split absolute seconds into H:M
*/
  /*else*/ {
    __pyx_v_neg = 0;
  }
  __pyx_L3:;

  /* "utils.pxd":4770
 *     # Split absolute seconds into H:M
 *     with cython.cdivision(True):
 *         sec %= SS_DAY             # <<<<<<<<<<<<<<
 *         hh = sec / SS_HOUR;     sec %= SS_HOUR
 *         mi = sec / SS_MINUTE
*/
  if (unlikely(__pyx_v_7cytimes_5utils_SS_DAY == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __PYX_ERR(5, 4770, __pyx_L1_error)
  }
  __pyx_v_sec = __Pyx_mod_PY_LONG_LONG(__pyx_v_sec, __pyx_v_7cytimes_5utils_SS_DAY, 0);

  /* "utils.pxd":4771
 *     with cython.cdivision(True):
 *         sec %= SS_DAY
 *         hh = sec / SS_HOUR;     sec %= SS_HOUR             # <<<<<<<<<<<<<<
 *         mi = sec / SS_MINUTE
 * 
*/
  __pyx_v_hh = (__pyx_v_sec / __pyx_v_7cytimes_5utils_SS_HOUR);
  if (unlikely(__pyx_v_7cytimes_5utils_SS_HOUR == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __PYX_ERR(5, 4771, __pyx_L1_error)
  }
  __pyx_v_sec = __Pyx_mod_PY_LONG_LONG(__pyx_v_sec, __pyx_v_7cytimes_5utils_SS_HOUR, 0);

  /* "utils.pxd":4772
 *         sec %= SS_DAY
 *         hh = sec / SS_HOUR;     sec %= SS_HOUR
 *         mi = sec / SS_MINUTE             # <<<<<<<<<<<<<<
 * 
 *     # Format to string
*/
  __pyx_v_mi = (__pyx_v_sec / __pyx_v_7cytimes_5utils_SS_MINUTE);

  /* "utils.pxd":4775
 * 
 *     # Format to string
 *     return ("-%02d%02d" if neg else "+%02d%02d") % (hh, mi)             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long td_to_us(datetime.timedelta td) noexcept:
*/
  __Pyx_XDECREF(__pyx_r);
  if (__pyx_v_neg) {
    __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_02d_02d);
    __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u_02d_02d;
  } else {
    __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_02d_02d_2);
    __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u_02d_02d_2;
  }
  __pyx_t_3 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_hh); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_mi); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 4775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 4775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3) != (0)) __PYX_ERR(5, 4775, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4) != (0)) __PYX_ERR(5, 4775, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 4775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4748
 *         return ("-%02d:%02d:%02d.%06d" if neg else "%02d:%02d:%02d.%06d") % (hh, mi, sec, us)
 * 
 * cdef inline str td_utcformat(datetime.timedelta td):             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.timedelta` to a UTC offset string (HHMM) `<'str'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils.td_utcformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4777
 *     return ("-%02d%02d" if neg else "+%02d%02d") % (hh, mi)
 * 
 * cdef inline long long td_to_us(datetime.timedelta td) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.timedelta` to total microseconds `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_td_to_us(PyDateTime_Delta *__pyx_v_td) {
  PY_LONG_LONG __pyx_r;

  /* "utils.pxd":4785
 *     return (
 *         (<long long> td.day)        * US_DAY +
 *         (<long long> td.second)     * US_SECOND +             # <<<<<<<<<<<<<<
 *         (<long long> td.microsecond)
 *     )
*/
  __pyx_r = (((((PY_LONG_LONG)__pyx_f_7cpython_8datetime_9timedelta_3day_day(__pyx_v_td)) * __pyx_v_7cytimes_5utils_US_DAY) + (((PY_LONG_LONG)__pyx_f_7cpython_8datetime_9timedelta_6second_second(__pyx_v_td)) * __pyx_v_7cytimes_5utils_US_SECOND)) + ((PY_LONG_LONG)__pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(__pyx_v_td)));
  goto __pyx_L0;

  /* "utils.pxd":4777
 *     return ("-%02d%02d" if neg else "+%02d%02d") % (hh, mi)
 * 
 * cdef inline long long td_to_us(datetime.timedelta td) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.timedelta` to total microseconds `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4789
 *     )
 * 
 * cdef inline double td_to_sec(datetime.timedelta td) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.timedelta` to total seconds `<'float'>`.
 * 
*/

static CYTHON_INLINE double __pyx_f_7cytimes_5utils_td_to_sec(PyDateTime_Delta *__pyx_v_td) {
  PY_LONG_LONG __pyx_v_days;
  PY_LONG_LONG __pyx_v_sec;
  double __pyx_v_fsec;
  double __pyx_v_frac;
  double __pyx_r;

  /* "utils.pxd":4796
 *     """
 *     cdef:
 *         long long days = td.day             # <<<<<<<<<<<<<<
 *         long long sec = td.second
 *         double fsec = <double> (days * SS_DAY + sec)
*/
  __pyx_v_days = __pyx_f_7cpython_8datetime_9timedelta_3day_day(__pyx_v_td);

  /* "utils.pxd":4797
 *     cdef:
 *         long long days = td.day
 *         long long sec = td.second             # <<<<<<<<<<<<<<
 *         double fsec = <double> (days * SS_DAY + sec)
 *         double frac = (<double> td.microsecond) * 1e-6
*/
  __pyx_v_sec = __pyx_f_7cpython_8datetime_9timedelta_6second_second(__pyx_v_td);

  /* "utils.pxd":4798
 *         long long days = td.day
 *         long long sec = td.second
 *         double fsec = <double> (days * SS_DAY + sec)             # <<<<<<<<<<<<<<
 *         double frac = (<double> td.microsecond) * 1e-6
 *     return fsec + frac
*/
  __pyx_v_fsec = ((double)((__pyx_v_days * __pyx_v_7cytimes_5utils_SS_DAY) + __pyx_v_sec));

  /* "utils.pxd":4799
 *         long long sec = td.second
 *         double fsec = <double> (days * SS_DAY + sec)
 *         double frac = (<double> td.microsecond) * 1e-6             # <<<<<<<<<<<<<<
 *     return fsec + frac
 * 
*/
  __pyx_v_frac = (((double)__pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(__pyx_v_td)) * 1e-6);

  /* "utils.pxd":4800
 *         double fsec = <double> (days * SS_DAY + sec)
 *         double frac = (<double> td.microsecond) * 1e-6
 *     return fsec + frac             # <<<<<<<<<<<<<<
 * 
 * # . conversion: from
*/
  __pyx_r = (__pyx_v_fsec + __pyx_v_frac);
  goto __pyx_L0;

  /* "utils.pxd":4789
 *     )
 * 
 * cdef inline double td_to_sec(datetime.timedelta td) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.timedelta` to total seconds `<'float'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4803
 * 
 * # . conversion: from
 * cdef inline datetime.timedelta td_fr_us(long long value, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create timedelta from microseconds `<'datetime.timedelta'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_td_fr_us(PY_LONG_LONG __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_td_fr_us *__pyx_optional_args) {
  PyObject *__pyx_v_tdclass = ((PyObject *)Py_None);
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  int __pyx_v_dd;
  int __pyx_v_ss;
  int __pyx_v_us;
  PyDateTime_Delta *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_td_new __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("td_fr_us", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tdclass = __pyx_optional_args->tdclass;
    }
  }

  /* "utils.pxd":4814
 *     cdef int dd, ss, us
 *     with cython.cdivision(True):
 *         q = value / US_DAY; r = value % US_DAY             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1; r += US_DAY
*/
  __pyx_v_q = (__pyx_v_value / __pyx_v_7cytimes_5utils_US_DAY);
  __pyx_v_r = (__pyx_v_value % __pyx_v_7cytimes_5utils_US_DAY);

  /* "utils.pxd":4815
 *     with cython.cdivision(True):
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += US_DAY
 *         dd = <int> q
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":4816
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:
 *             q -= 1; r += US_DAY             # <<<<<<<<<<<<<<
 *         dd = <int> q
 *         ss = <int> (r / US_SECOND)
*/
    __pyx_v_q = (__pyx_v_q - 1);
    __pyx_v_r = (__pyx_v_r + __pyx_v_7cytimes_5utils_US_DAY);

    /* "utils.pxd":4815
 *     with cython.cdivision(True):
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += US_DAY
 *         dd = <int> q
*/
  }

  /* "utils.pxd":4817
 *         if r < 0:
 *             q -= 1; r += US_DAY
 *         dd = <int> q             # <<<<<<<<<<<<<<
 *         ss = <int> (r / US_SECOND)
 *         us = <int> (r % US_SECOND)
*/
  __pyx_v_dd = ((int)__pyx_v_q);

  /* "utils.pxd":4818
 *             q -= 1; r += US_DAY
 *         dd = <int> q
 *         ss = <int> (r / US_SECOND)             # <<<<<<<<<<<<<<
 *         us = <int> (r % US_SECOND)
 *     return td_new(dd, ss, us, tdclass)
*/
  __pyx_v_ss = ((int)(__pyx_v_r / __pyx_v_7cytimes_5utils_US_SECOND));

  /* "utils.pxd":4819
 *         dd = <int> q
 *         ss = <int> (r / US_SECOND)
 *         us = <int> (r % US_SECOND)             # <<<<<<<<<<<<<<
 *     return td_new(dd, ss, us, tdclass)
 * 
*/
  __pyx_v_us = ((int)(__pyx_v_r % __pyx_v_7cytimes_5utils_US_SECOND));

  /* "utils.pxd":4820
 *         ss = <int> (r / US_SECOND)
 *         us = <int> (r % US_SECOND)
 *     return td_new(dd, ss, us, tdclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.timedelta td_fr_sec(double value, object tdclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3.__pyx_n = 4;
  __pyx_t_3.days = __pyx_v_dd;
  __pyx_t_3.seconds = __pyx_v_ss;
  __pyx_t_3.microseconds = __pyx_v_us;
  __pyx_t_3.tdclass = __pyx_v_tdclass;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_td_new(&__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((PyDateTime_Delta *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4803
 * 
 * # . conversion: from
 * cdef inline datetime.timedelta td_fr_us(long long value, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create timedelta from microseconds `<'datetime.timedelta'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.td_fr_us", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4822
 *     return td_new(dd, ss, us, tdclass)
 * 
 * cdef inline datetime.timedelta td_fr_sec(double value, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create timedelta from seconds `<'datetime.timedelta'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_td_fr_sec(double __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_td_fr_sec *__pyx_optional_args) {
  PyObject *__pyx_v_tdclass = ((PyObject *)Py_None);
  PyDateTime_Delta *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PY_LONG_LONG __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_td_fr_us __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("td_fr_sec", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tdclass = __pyx_optional_args->tdclass;
    }
  }

  /* "utils.pxd":4830
 *     :returns `<'datetime.timedelta'>`: The resulting timedelta (or subclass if `tdclass` is specified).
 *     """
 *     return td_fr_us(sec_to_us(value), tdclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.timedelta td_fr_td(datetime.timedelta td, object tdclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_5utils_sec_to_us(__pyx_v_value); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 4830, __pyx_L1_error)
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.tdclass = __pyx_v_tdclass;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_td_fr_us(__pyx_t_1, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((PyDateTime_Delta *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4822
 *     return td_new(dd, ss, us, tdclass)
 * 
 * cdef inline datetime.timedelta td_fr_sec(double value, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create timedelta from seconds `<'datetime.timedelta'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.td_fr_sec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4832
 *     return td_fr_us(sec_to_us(value), tdclass)
 * 
 * cdef inline datetime.timedelta td_fr_td(datetime.timedelta td, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create timedelta from another timedelta (or subclass) `<'datetime.timedelta'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_td_fr_td(PyDateTime_Delta *__pyx_v_td, struct __pyx_opt_args_7cytimes_5utils_td_fr_td *__pyx_optional_args) {
  PyObject *__pyx_v_tdclass = ((PyObject *)Py_None);
  PyDateTime_Delta *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_td_new __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("td_fr_td", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tdclass = __pyx_optional_args->tdclass;
    }
  }
  __Pyx_INCREF(__pyx_v_tdclass);

  /* "utils.pxd":4842
 *         with the same days, seconds and microseconds.
 *     """
 *     if tdclass is None:             # <<<<<<<<<<<<<<
 *         tdclass = datetime.timedelta
 *     if tdclass is type(td):
*/
  __pyx_t_1 = (__pyx_v_tdclass == Py_None);
  if (__pyx_t_1) {

    /* "utils.pxd":4843
 *     """
 *     if tdclass is None:
 *         tdclass = datetime.timedelta             # <<<<<<<<<<<<<<
 *     if tdclass is type(td):
 *         return td
*/
    __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta);
    __Pyx_DECREF_SET(__pyx_v_tdclass, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta));

    /* "utils.pxd":4842
 *         with the same days, seconds and microseconds.
 *     """
 *     if tdclass is None:             # <<<<<<<<<<<<<<
 *         tdclass = datetime.timedelta
 *     if tdclass is type(td):
*/
  }

  /* "utils.pxd":4844
 *     if tdclass is None:
 *         tdclass = datetime.timedelta
 *     if tdclass is type(td):             # <<<<<<<<<<<<<<
 *         return td
 *     return td_new(td.day, td.second, td.microsecond, tdclass)
*/
  __pyx_t_1 = (__pyx_v_tdclass == ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_td))));
  if (__pyx_t_1) {

    /* "utils.pxd":4845
 *         tdclass = datetime.timedelta
 *     if tdclass is type(td):
 *         return td             # <<<<<<<<<<<<<<
 *     return td_new(td.day, td.second, td.microsecond, tdclass)
 * 
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_td);
    __pyx_r = __pyx_v_td;
    goto __pyx_L0;

    /* "utils.pxd":4844
 *     if tdclass is None:
 *         tdclass = datetime.timedelta
 *     if tdclass is type(td):             # <<<<<<<<<<<<<<
 *         return td
 *     return td_new(td.day, td.second, td.microsecond, tdclass)
*/
  }

  /* "utils.pxd":4846
 *     if tdclass is type(td):
 *         return td
 *     return td_new(td.day, td.second, td.microsecond, tdclass)             # <<<<<<<<<<<<<<
 * 
 * # datetime.tzinfo --------------------------------------------------------------------------------------
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3.__pyx_n = 4;
  __pyx_t_3.days = __pyx_f_7cpython_8datetime_9timedelta_3day_day(__pyx_v_td);
  __pyx_t_3.seconds = __pyx_f_7cpython_8datetime_9timedelta_6second_second(__pyx_v_td);
  __pyx_t_3.microseconds = __pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(__pyx_v_td);
  __pyx_t_3.tdclass = __pyx_v_tdclass;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_td_new(&__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((PyDateTime_Delta *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4832
 *     return td_fr_us(sec_to_us(value), tdclass)
 * 
 * cdef inline datetime.timedelta td_fr_td(datetime.timedelta td, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create timedelta from another timedelta (or subclass) `<'datetime.timedelta'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.td_fr_td", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tdclass);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4850
 * # datetime.tzinfo --------------------------------------------------------------------------------------
 * # . generate
 * cdef inline object tz_new(int hours=0, int minites=0, int seconds=0):             # <<<<<<<<<<<<<<
 *     """Create a new fixed-offset timezone `<'datetime.timezone'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_tz_new(struct __pyx_opt_args_7cytimes_5utils_tz_new *__pyx_optional_args) {
  int __pyx_v_hours = ((int)0);
  int __pyx_v_minites = ((int)0);
  int __pyx_v_seconds = ((int)0);
  PY_LONG_LONG __pyx_v_sec;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9[9];
  PyObject *__pyx_t_10 = NULL;
  size_t __pyx_t_11;
  struct __pyx_opt_args_7cpython_8datetime_timezone_new __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_new", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_hours = __pyx_optional_args->hours;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_minites = __pyx_optional_args->minites;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_seconds = __pyx_optional_args->seconds;
        }
      }
    }
  }

  /* "utils.pxd":4862
 *     """
 *     # Range: inclusive 24:00 per CPython (datetime.timezone)
 *     cdef long long sec = hours * 3_600 + minites * 60 + seconds             # <<<<<<<<<<<<<<
 *     if not -86400 < sec < 86400:
 *         raise ValueError(
*/
  __pyx_v_sec = (((__pyx_v_hours * 0xE10) + (__pyx_v_minites * 60)) + __pyx_v_seconds);

  /* "utils.pxd":4863
 *     # Range: inclusive 24:00 per CPython (datetime.timezone)
 *     cdef long long sec = hours * 3_600 + minites * 60 + seconds
 *     if not -86400 < sec < 86400:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Timezone offset %d seconds from (hours=%d, minutes=%d, seconds=%d) out of range. "
*/
  __pyx_t_1 = (-86400LL < __pyx_v_sec);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_sec < 0x15180);
  }
  __pyx_t_2 = (!__pyx_t_1);
  if (unlikely(__pyx_t_2)) {

    /* "utils.pxd":4864
 *     cdef long long sec = hours * 3_600 + minites * 60 + seconds
 *     if not -86400 < sec < 86400:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Timezone offset %d seconds from (hours=%d, minutes=%d, seconds=%d) out of range. "
 *             "Must be strictly between [-86400..86400] (exclusive)" % (hours, minites, seconds, sec)
*/
    __pyx_t_4 = NULL;

    /* "utils.pxd":4866
 *         raise ValueError(
 *             "Timezone offset %d seconds from (hours=%d, minutes=%d, seconds=%d) out of range. "
 *             "Must be strictly between [-86400..86400] (exclusive)" % (hours, minites, seconds, sec)             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_hours, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 4866, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_minites, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 4866, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyUnicode_From_int(__pyx_v_seconds, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 4866, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 4866, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_Timezone_offset;
    __pyx_t_9[1] = __pyx_t_5;
    __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u_seconds_from_hours;
    __pyx_t_9[3] = __pyx_t_6;
    __pyx_t_9[4] = __pyx_mstate_global->__pyx_kp_u_minutes;
    __pyx_t_9[5] = __pyx_t_7;
    __pyx_t_9[6] = __pyx_mstate_global->__pyx_kp_u_seconds_2;
    __pyx_t_9[7] = __pyx_t_8;
    __pyx_t_9[8] = __pyx_mstate_global->__pyx_kp_u_out_of_range_Must_be_strictly_b;

    /* "utils.pxd":4865
 *     if not -86400 < sec < 86400:
 *         raise ValueError(
 *             "Timezone offset %d seconds from (hours=%d, minutes=%d, seconds=%d) out of range. "             # <<<<<<<<<<<<<<
 *             "Must be strictly between [-86400..86400] (exclusive)" % (hours, minites, seconds, sec)
 *         )
*/
    __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_9, 9, 16 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 21 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 10 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 68, 127);
    if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 4865, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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;
    __pyx_t_11 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_10};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4864, __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_ERR(5, 4864, __pyx_L1_error)

    /* "utils.pxd":4863
 *     # Range: inclusive 24:00 per CPython (datetime.timezone)
 *     cdef long long sec = hours * 3_600 + minites * 60 + seconds
 *     if not -86400 < sec < 86400:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Timezone offset %d seconds from (hours=%d, minutes=%d, seconds=%d) out of range. "
*/
  }

  /* "utils.pxd":4870
 * 
 *     # New timezone
 *     return datetime.timezone_new(datetime.timedelta_new(0, sec, 0), None)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object tz_local(datetime.datetime dt=None):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = ((PyObject *)__pyx_f_7cpython_8datetime_timedelta_new(0, __pyx_v_sec, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_12.__pyx_n = 1;
  __pyx_t_12.name = Py_None;
  __pyx_t_10 = __pyx_f_7cpython_8datetime_timezone_new(__pyx_t_3, &__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 4870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_10;
  __pyx_t_10 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4850
 * # datetime.tzinfo --------------------------------------------------------------------------------------
 * # . generate
 * cdef inline object tz_new(int hours=0, int minites=0, int seconds=0):             # <<<<<<<<<<<<<<
 *     """Create a new fixed-offset timezone `<'datetime.timezone'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cytimes.utils.tz_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4872
 *     return datetime.timezone_new(datetime.timedelta_new(0, sec, 0), None)
 * 
 * cdef inline object tz_local(datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Get the process-local timezone `<'zoneinfo.ZoneInfo/datetime.timezone'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_tz_local(struct __pyx_opt_args_7cytimes_5utils_tz_local *__pyx_optional_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tz_local", 0);
  if (__pyx_optional_args) {
  }

  /* "utils.pxd":4888
 *       future transitions.
 *     """
 *     return _LOCAL_TIMEZONE             # <<<<<<<<<<<<<<
 * 
 * cdef inline int tz_local_sec(datetime.datetime dt=None) except -200_000:
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_7cytimes_5utils__LOCAL_TIMEZONE);
  __pyx_r = __pyx_v_7cytimes_5utils__LOCAL_TIMEZONE;
  goto __pyx_L0;

  /* "utils.pxd":4872
 *     return datetime.timezone_new(datetime.timedelta_new(0, sec, 0), None)
 * 
 * cdef inline object tz_local(datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Get the process-local timezone `<'zoneinfo.ZoneInfo/datetime.timezone'>`.
 * 
*/

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

/* "utils.pxd":4890
 *     return _LOCAL_TIMEZONE
 * 
 * cdef inline int tz_local_sec(datetime.datetime dt=None) except -200_000:             # <<<<<<<<<<<<<<
 *     """Return the local UTC offset (in whole seconds) at the given instant `<'int'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_tz_local_sec(struct __pyx_opt_args_7cytimes_5utils_tz_local_sec *__pyx_optional_args) {
  PyDateTime_DateTime *__pyx_v_dt = ((PyDateTime_DateTime *)Py_None);
  PY_LONG_LONG __pyx_v_ts1;
  PY_LONG_LONG __pyx_v_ts2;
  double __pyx_v_ts;
  struct tm __pyx_v_loc;
  struct tm __pyx_v_gmt;
  PY_LONG_LONG __pyx_v_ord_loc;
  PY_LONG_LONG __pyx_v_ord_gmt;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PY_LONG_LONG __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_dt_replace_fold __pyx_t_4;
  int __pyx_t_5;
  double __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_sec __pyx_t_7;
  struct tm __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_local_sec", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dt = __pyx_optional_args->dt;
    }
  }

  /* "utils.pxd":4909
 * 
 *     # Decide the timestamp (seconds since epoch)
 *     if dt is None:             # <<<<<<<<<<<<<<
 *         # current time
 *         ts = unix_time()
*/
  __pyx_t_1 = (((PyObject *)__pyx_v_dt) == Py_None);
  if (__pyx_t_1) {

    /* "utils.pxd":4911
 *     if dt is None:
 *         # current time
 *         ts = unix_time()             # <<<<<<<<<<<<<<
 *     else:
 *         # naive: interpret as local wall time
*/
    __pyx_v_ts = __pyx_f_7cpython_4time_time();

    /* "utils.pxd":4909
 * 
 *     # Decide the timestamp (seconds since epoch)
 *     if dt is None:             # <<<<<<<<<<<<<<
 *         # current time
 *         ts = unix_time()
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":4914
 *     else:
 *         # naive: interpret as local wall time
 *         if dt.tzinfo is None:             # <<<<<<<<<<<<<<
 *             ts1 = dt_local_mktime(dt)
 *             # probe the other fold to handle gaps/ambiguous times
*/
  /*else*/ {
    __pyx_t_2 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = (__pyx_t_2 == Py_None);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "utils.pxd":4915
 *         # naive: interpret as local wall time
 *         if dt.tzinfo is None:
 *             ts1 = dt_local_mktime(dt)             # <<<<<<<<<<<<<<
 *             # probe the other fold to handle gaps/ambiguous times
 *             ts2 = dt_local_mktime(dt_replace_fold(dt, 1 - dt.fold, None))
*/
      __pyx_t_3 = __pyx_f_7cytimes_5utils_dt_local_mktime(__pyx_v_dt); if (unlikely(__pyx_t_3 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 4915, __pyx_L1_error)
      __pyx_v_ts1 = __pyx_t_3;

      /* "utils.pxd":4917
 *             ts1 = dt_local_mktime(dt)
 *             # probe the other fold to handle gaps/ambiguous times
 *             ts2 = dt_local_mktime(dt_replace_fold(dt, 1 - dt.fold, None))             # <<<<<<<<<<<<<<
 *             if ts2 != ts1 and ((ts2 > ts1) == dt.fold):
 *                 ts = <double> ts2
*/
      __pyx_t_4.__pyx_n = 1;
      __pyx_t_4.dtclass = Py_None;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace_fold(__pyx_v_dt, (1 - __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt)), &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4917, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_f_7cytimes_5utils_dt_local_mktime(((PyDateTime_DateTime *)__pyx_t_2)); if (unlikely(__pyx_t_3 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 4917, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_ts2 = __pyx_t_3;

      /* "utils.pxd":4918
 *             # probe the other fold to handle gaps/ambiguous times
 *             ts2 = dt_local_mktime(dt_replace_fold(dt, 1 - dt.fold, None))
 *             if ts2 != ts1 and ((ts2 > ts1) == dt.fold):             # <<<<<<<<<<<<<<
 *                 ts = <double> ts2
 *             else:
*/
      __pyx_t_5 = (__pyx_v_ts2 != __pyx_v_ts1);
      if (__pyx_t_5) {
      } else {
        __pyx_t_1 = __pyx_t_5;
        goto __pyx_L6_bool_binop_done;
      }
      __pyx_t_5 = ((__pyx_v_ts2 > __pyx_v_ts1) == __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt));
      __pyx_t_1 = __pyx_t_5;
      __pyx_L6_bool_binop_done:;
      if (__pyx_t_1) {

        /* "utils.pxd":4919
 *             ts2 = dt_local_mktime(dt_replace_fold(dt, 1 - dt.fold, None))
 *             if ts2 != ts1 and ((ts2 > ts1) == dt.fold):
 *                 ts = <double> ts2             # <<<<<<<<<<<<<<
 *             else:
 *                 ts = <double> ts1
*/
        __pyx_v_ts = ((double)__pyx_v_ts2);

        /* "utils.pxd":4918
 *             # probe the other fold to handle gaps/ambiguous times
 *             ts2 = dt_local_mktime(dt_replace_fold(dt, 1 - dt.fold, None))
 *             if ts2 != ts1 and ((ts2 > ts1) == dt.fold):             # <<<<<<<<<<<<<<
 *                 ts = <double> ts2
 *             else:
*/
        goto __pyx_L5;
      }

      /* "utils.pxd":4921
 *                 ts = <double> ts2
 *             else:
 *                 ts = <double> ts1             # <<<<<<<<<<<<<<
 *         # aware: use UTC instant
 *         else:
*/
      /*else*/ {
        __pyx_v_ts = ((double)__pyx_v_ts1);
      }
      __pyx_L5:;

      /* "utils.pxd":4914
 *     else:
 *         # naive: interpret as local wall time
 *         if dt.tzinfo is None:             # <<<<<<<<<<<<<<
 *             ts1 = dt_local_mktime(dt)
 *             # probe the other fold to handle gaps/ambiguous times
*/
      goto __pyx_L4;
    }

    /* "utils.pxd":4924
 *         # aware: use UTC instant
 *         else:
 *             ts = dt_to_sec(dt, True)             # <<<<<<<<<<<<<<
 * 
 *     # Compute offset via ordinals + time-of-day
*/
    /*else*/ {
      __pyx_t_7.__pyx_n = 1;
      __pyx_t_7.utc = 1;
      __pyx_t_6 = __pyx_f_7cytimes_5utils_dt_to_sec(__pyx_v_dt, &__pyx_t_7); if (unlikely(__pyx_t_6 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(5, 4924, __pyx_L1_error)
      __pyx_v_ts = __pyx_t_6;
    }
    __pyx_L4:;
  }
  __pyx_L3:;

  /* "utils.pxd":4927
 * 
 *     # Compute offset via ordinals + time-of-day
 *     loc = tm_localtime(ts)             # <<<<<<<<<<<<<<
 *     ord_loc = ymd_to_ord(loc.tm_year, loc.tm_mon, loc.tm_mday)
 *     gmt = tm_gmtime(ts)
*/
  __pyx_t_8 = __pyx_f_7cytimes_5utils_tm_localtime(__pyx_v_ts); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 4927, __pyx_L1_error)
  __pyx_v_loc = __pyx_t_8;

  /* "utils.pxd":4928
 *     # Compute offset via ordinals + time-of-day
 *     loc = tm_localtime(ts)
 *     ord_loc = ymd_to_ord(loc.tm_year, loc.tm_mon, loc.tm_mday)             # <<<<<<<<<<<<<<
 *     gmt = tm_gmtime(ts)
 *     ord_gmt = ymd_to_ord(gmt.tm_year, gmt.tm_mon, gmt.tm_mday)
*/
  __pyx_v_ord_loc = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v_loc.tm_year, __pyx_v_loc.tm_mon, __pyx_v_loc.tm_mday);

  /* "utils.pxd":4929
 *     loc = tm_localtime(ts)
 *     ord_loc = ymd_to_ord(loc.tm_year, loc.tm_mon, loc.tm_mday)
 *     gmt = tm_gmtime(ts)             # <<<<<<<<<<<<<<
 *     ord_gmt = ymd_to_ord(gmt.tm_year, gmt.tm_mon, gmt.tm_mday)
 *     return (
*/
  __pyx_t_8 = __pyx_f_7cytimes_5utils_tm_gmtime(__pyx_v_ts); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 4929, __pyx_L1_error)
  __pyx_v_gmt = __pyx_t_8;

  /* "utils.pxd":4930
 *     ord_loc = ymd_to_ord(loc.tm_year, loc.tm_mon, loc.tm_mday)
 *     gmt = tm_gmtime(ts)
 *     ord_gmt = ymd_to_ord(gmt.tm_year, gmt.tm_mon, gmt.tm_mday)             # <<<<<<<<<<<<<<
 *     return (
 *         (ord_loc - ord_gmt)         * SS_DAY    +
*/
  __pyx_v_ord_gmt = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v_gmt.tm_year, __pyx_v_gmt.tm_mon, __pyx_v_gmt.tm_mday);

  /* "utils.pxd":4934
 *         (ord_loc - ord_gmt)         * SS_DAY    +
 *         (loc.tm_hour - gmt.tm_hour) * SS_HOUR   +
 *         (loc.tm_min - gmt.tm_min)   * SS_MINUTE +             # <<<<<<<<<<<<<<
 *         (loc.tm_sec - gmt.tm_sec)
 *     )
*/
  __pyx_r = (((((__pyx_v_ord_loc - __pyx_v_ord_gmt) * __pyx_v_7cytimes_5utils_SS_DAY) + ((__pyx_v_loc.tm_hour - __pyx_v_gmt.tm_hour) * __pyx_v_7cytimes_5utils_SS_HOUR)) + ((__pyx_v_loc.tm_min - __pyx_v_gmt.tm_min) * __pyx_v_7cytimes_5utils_SS_MINUTE)) + (__pyx_v_loc.tm_sec - __pyx_v_gmt.tm_sec));
  goto __pyx_L0;

  /* "utils.pxd":4890
 *     return _LOCAL_TIMEZONE
 * 
 * cdef inline int tz_local_sec(datetime.datetime dt=None) except -200_000:             # <<<<<<<<<<<<<<
 *     """Return the local UTC offset (in whole seconds) at the given instant `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.tz_local_sec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -200000;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4941
 * 
 * # . type check
 * cdef inline bint is_tz(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or sublcass of `datetime.tzinfo` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_tz(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":4950
 *     >>> isinstance(obj, datetime.tzinfo)
 *     """
 *     return datetime.PyTZInfo_Check(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_tz_exact(object obj) except -1:
*/
  __pyx_r = PyTZInfo_Check(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":4941
 * 
 * # . type check
 * cdef inline bint is_tz(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or sublcass of `datetime.tzinfo` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4952
 *     return datetime.PyTZInfo_Check(obj)
 * 
 * cdef inline bint is_tz_exact(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an exact `datetime.tzinfo` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_tz_exact(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":4961
 *     >>> type(obj) is datetime.date
 *     """
 *     return datetime.PyTZInfo_CheckExact(obj)             # <<<<<<<<<<<<<<
 * 
 * # . access
*/
  __pyx_r = PyTZInfo_CheckExact(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":4952
 *     return datetime.PyTZInfo_Check(obj)
 * 
 * cdef inline bint is_tz_exact(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an exact `datetime.tzinfo` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4964
 * 
 * # . access
 * cdef inline str tz_name(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the display name from a tzinfo `<'str/None'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_tz_name(PyObject *__pyx_v_tz, struct __pyx_opt_args_7cytimes_5utils_tz_name *__pyx_optional_args) {
  PyDateTime_DateTime *__pyx_v_dt = ((PyDateTime_DateTime *)Py_None);
  PyObject *__pyx_v_err = 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;
  size_t __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __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[5];
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  char const *__pyx_t_18;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_name", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dt = __pyx_optional_args->dt;
    }
  }

  /* "utils.pxd":4975
 *     >>> tz.tzname(dt)
 *     """
 *     if tz is None:             # <<<<<<<<<<<<<<
 *         return None
 *     try:
*/
  __pyx_t_1 = (__pyx_v_tz == Py_None);
  if (__pyx_t_1) {

    /* "utils.pxd":4976
 *     """
 *     if tz is None:
 *         return None             # <<<<<<<<<<<<<<
 *     try:
 *         return tz.tzname(dt)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "utils.pxd":4975
 *     >>> tz.tzname(dt)
 *     """
 *     if tz is None:             # <<<<<<<<<<<<<<
 *         return None
 *     try:
*/
  }

  /* "utils.pxd":4977
 *     if tz is None:
 *         return None
 *     try:             # <<<<<<<<<<<<<<
 *         return tz.tzname(dt)
 *     except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "utils.pxd":4978
 *         return None
 *     try:
 *         return tz.tzname(dt)             # <<<<<<<<<<<<<<
 *     except Exception as err:
 *         if not is_tz(tz):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = __pyx_v_tz;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, ((PyObject *)__pyx_v_dt)};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tzname, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 4978, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(PyUnicode_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_5))) __PYX_ERR(5, 4978, __pyx_L4_error)
      __pyx_r = ((PyObject*)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L8_try_return;

      /* "utils.pxd":4977
 *     if tz is None:
 *         return None
 *     try:             # <<<<<<<<<<<<<<
 *         return tz.tzname(dt)
 *     except Exception as err:
*/
    }
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "utils.pxd":4979
 *     try:
 *         return tz.tzname(dt)
 *     except Exception as err:             # <<<<<<<<<<<<<<
 *         if not is_tz(tz):
 *             raise TypeError(
*/
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_8) {
      __Pyx_AddTraceback("cytimes.utils.tz_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_9) < 0) __PYX_ERR(5, 4979, __pyx_L6_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_err = __pyx_t_6;
      /*try:*/ {

        /* "utils.pxd":4980
 *         return tz.tzname(dt)
 *     except Exception as err:
 *         if not is_tz(tz):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "
*/
        __pyx_t_1 = __pyx_f_7cytimes_5utils_is_tz(__pyx_v_tz); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 4980, __pyx_L15_error)
        __pyx_t_10 = (!__pyx_t_1);
        if (unlikely(__pyx_t_10)) {

          /* "utils.pxd":4981
 *     except Exception as err:
 *         if not is_tz(tz):
 *             raise TypeError(             # <<<<<<<<<<<<<<
 *                 "Expects an instance of 'datetime.tzinfo', "
 *                 "instead got '%s' %s." % (tz, type(tz))
*/
          __pyx_t_12 = NULL;

          /* "utils.pxd":4983
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "
 *                 "instead got '%s' %s." % (tz, type(tz))             # <<<<<<<<<<<<<<
 *             ) from err
 *         raise err
*/
          __pyx_t_13 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_tz), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 4983, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_tz))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 4983, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_15[0] = __pyx_mstate_global->__pyx_kp_u_Expects_an_instance_of_datetime;
          __pyx_t_15[1] = __pyx_t_13;
          __pyx_t_15[2] = __pyx_mstate_global->__pyx_kp_u__9;
          __pyx_t_15[3] = __pyx_t_14;
          __pyx_t_15[4] = __pyx_mstate_global->__pyx_kp_u__2;

          /* "utils.pxd":4982
 *         if not is_tz(tz):
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "             # <<<<<<<<<<<<<<
 *                 "instead got '%s' %s." % (tz, type(tz))
 *             ) from err
*/
          __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_15, 5, 55 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14));
          if (unlikely(!__pyx_t_16)) __PYX_ERR(5, 4982, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_7 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_16};
            __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 4981, __pyx_L15_error)
            __Pyx_GOTREF(__pyx_t_11);
          }

          /* "utils.pxd":4984
 *                 "Expects an instance of 'datetime.tzinfo', "
 *                 "instead got '%s' %s." % (tz, type(tz))
 *             ) from err             # <<<<<<<<<<<<<<
 *         raise err
 * 
*/
          __Pyx_Raise(__pyx_t_11, 0, 0, __pyx_v_err);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __PYX_ERR(5, 4981, __pyx_L15_error)

          /* "utils.pxd":4980
 *         return tz.tzname(dt)
 *     except Exception as err:
 *         if not is_tz(tz):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "
*/
        }

        /* "utils.pxd":4985
 *                 "instead got '%s' %s." % (tz, type(tz))
 *             ) from err
 *         raise err             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.timedelta tz_dst(object tz, datetime.datetime dt=None):
*/
        __Pyx_Raise(__pyx_v_err, 0, 0, 0);
        __PYX_ERR(5, 4985, __pyx_L15_error)
      }

      /* "utils.pxd":4979
 *     try:
 *         return tz.tzname(dt)
 *     except Exception as err:             # <<<<<<<<<<<<<<
 *         if not is_tz(tz):
 *             raise TypeError(
*/
      /*finally:*/ {
        __pyx_L15_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 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;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
          if ( unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __pyx_t_8 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
          goto __pyx_L6_except_error;
        }
      }
    }
    goto __pyx_L6_except_error;

    /* "utils.pxd":4977
 *     if tz is None:
 *         return None
 *     try:             # <<<<<<<<<<<<<<
 *         return tz.tzname(dt)
 *     except Exception as err:
*/
    __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_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;
  }

  /* "utils.pxd":4964
 * 
 * # . access
 * cdef inline str tz_name(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the display name from a tzinfo `<'str/None'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("cytimes.utils.tz_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4987
 *         raise err
 * 
 * cdef inline datetime.timedelta tz_dst(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the DST offset of a tzinfo `<'timedelta/None'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_tz_dst(PyObject *__pyx_v_tz, struct __pyx_opt_args_7cytimes_5utils_tz_dst *__pyx_optional_args) {
  PyDateTime_DateTime *__pyx_v_dt = ((PyDateTime_DateTime *)Py_None);
  PyObject *__pyx_v_err = NULL;
  PyDateTime_Delta *__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;
  size_t __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __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[5];
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  char const *__pyx_t_18;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_dst", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dt = __pyx_optional_args->dt;
    }
  }

  /* "utils.pxd":4998
 *     >>> tz.dst(dt)
 *     """
 *     if tz is None:             # <<<<<<<<<<<<<<
 *         return None
 *     try:
*/
  __pyx_t_1 = (__pyx_v_tz == Py_None);
  if (__pyx_t_1) {

    /* "utils.pxd":4999
 *     """
 *     if tz is None:
 *         return None             # <<<<<<<<<<<<<<
 *     try:
 *         return tz.dst(dt)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_r = ((PyDateTime_Delta *)Py_None); __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "utils.pxd":4998
 *     >>> tz.dst(dt)
 *     """
 *     if tz is None:             # <<<<<<<<<<<<<<
 *         return None
 *     try:
*/
  }

  /* "utils.pxd":5000
 *     if tz is None:
 *         return None
 *     try:             # <<<<<<<<<<<<<<
 *         return tz.dst(dt)
 *     except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "utils.pxd":5001
 *         return None
 *     try:
 *         return tz.dst(dt)             # <<<<<<<<<<<<<<
 *     except Exception as err:
 *         if not is_tz(tz):
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = __pyx_v_tz;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, ((PyObject *)__pyx_v_dt)};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_dst, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 5001, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(5, 5001, __pyx_L4_error)
      __pyx_r = ((PyDateTime_Delta *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L8_try_return;

      /* "utils.pxd":5000
 *     if tz is None:
 *         return None
 *     try:             # <<<<<<<<<<<<<<
 *         return tz.dst(dt)
 *     except Exception as err:
*/
    }
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "utils.pxd":5002
 *     try:
 *         return tz.dst(dt)
 *     except Exception as err:             # <<<<<<<<<<<<<<
 *         if not is_tz(tz):
 *             raise TypeError(
*/
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_8) {
      __Pyx_AddTraceback("cytimes.utils.tz_dst", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_9) < 0) __PYX_ERR(5, 5002, __pyx_L6_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_err = __pyx_t_6;
      /*try:*/ {

        /* "utils.pxd":5003
 *         return tz.dst(dt)
 *     except Exception as err:
 *         if not is_tz(tz):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "
*/
        __pyx_t_1 = __pyx_f_7cytimes_5utils_is_tz(__pyx_v_tz); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5003, __pyx_L15_error)
        __pyx_t_10 = (!__pyx_t_1);
        if (unlikely(__pyx_t_10)) {

          /* "utils.pxd":5004
 *     except Exception as err:
 *         if not is_tz(tz):
 *             raise TypeError(             # <<<<<<<<<<<<<<
 *                 "Expects an instance of 'datetime.tzinfo', "
 *                 "instead got '%s' %s." % (tz, type(tz))
*/
          __pyx_t_12 = NULL;

          /* "utils.pxd":5006
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "
 *                 "instead got '%s' %s." % (tz, type(tz))             # <<<<<<<<<<<<<<
 *             ) from err
 *         raise err
*/
          __pyx_t_13 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_tz), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 5006, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_tz))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 5006, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_15[0] = __pyx_mstate_global->__pyx_kp_u_Expects_an_instance_of_datetime;
          __pyx_t_15[1] = __pyx_t_13;
          __pyx_t_15[2] = __pyx_mstate_global->__pyx_kp_u__9;
          __pyx_t_15[3] = __pyx_t_14;
          __pyx_t_15[4] = __pyx_mstate_global->__pyx_kp_u__2;

          /* "utils.pxd":5005
 *         if not is_tz(tz):
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "             # <<<<<<<<<<<<<<
 *                 "instead got '%s' %s." % (tz, type(tz))
 *             ) from err
*/
          __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_15, 5, 55 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14));
          if (unlikely(!__pyx_t_16)) __PYX_ERR(5, 5005, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_7 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_16};
            __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 5004, __pyx_L15_error)
            __Pyx_GOTREF(__pyx_t_11);
          }

          /* "utils.pxd":5007
 *                 "Expects an instance of 'datetime.tzinfo', "
 *                 "instead got '%s' %s." % (tz, type(tz))
 *             ) from err             # <<<<<<<<<<<<<<
 *         raise err
 * 
*/
          __Pyx_Raise(__pyx_t_11, 0, 0, __pyx_v_err);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __PYX_ERR(5, 5004, __pyx_L15_error)

          /* "utils.pxd":5003
 *         return tz.dst(dt)
 *     except Exception as err:
 *         if not is_tz(tz):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "
*/
        }

        /* "utils.pxd":5008
 *                 "instead got '%s' %s." % (tz, type(tz))
 *             ) from err
 *         raise err             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.timedelta tz_utcoffset(object tz, datetime.datetime dt=None):
*/
        __Pyx_Raise(__pyx_v_err, 0, 0, 0);
        __PYX_ERR(5, 5008, __pyx_L15_error)
      }

      /* "utils.pxd":5002
 *     try:
 *         return tz.dst(dt)
 *     except Exception as err:             # <<<<<<<<<<<<<<
 *         if not is_tz(tz):
 *             raise TypeError(
*/
      /*finally:*/ {
        __pyx_L15_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 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;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
          if ( unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __pyx_t_8 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
          goto __pyx_L6_except_error;
        }
      }
    }
    goto __pyx_L6_except_error;

    /* "utils.pxd":5000
 *     if tz is None:
 *         return None
 *     try:             # <<<<<<<<<<<<<<
 *         return tz.dst(dt)
 *     except Exception as err:
*/
    __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_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;
  }

  /* "utils.pxd":4987
 *         raise err
 * 
 * cdef inline datetime.timedelta tz_dst(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the DST offset of a tzinfo `<'timedelta/None'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("cytimes.utils.tz_dst", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5010
 *         raise err
 * 
 * cdef inline datetime.timedelta tz_utcoffset(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the UTC offset from a tzinfo `<'timedelta/None'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_tz_utcoffset(PyObject *__pyx_v_tz, struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset *__pyx_optional_args) {
  PyDateTime_DateTime *__pyx_v_dt = ((PyDateTime_DateTime *)Py_None);
  PyObject *__pyx_v_err = NULL;
  PyDateTime_Delta *__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;
  size_t __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __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[5];
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  char const *__pyx_t_18;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_utcoffset", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dt = __pyx_optional_args->dt;
    }
  }

  /* "utils.pxd":5021
 *     >>> tz.utcoffset(dt)
 *     """
 *     if tz is None:             # <<<<<<<<<<<<<<
 *         return None
 *     try:
*/
  __pyx_t_1 = (__pyx_v_tz == Py_None);
  if (__pyx_t_1) {

    /* "utils.pxd":5022
 *     """
 *     if tz is None:
 *         return None             # <<<<<<<<<<<<<<
 *     try:
 *         return tz.utcoffset(dt)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_r = ((PyDateTime_Delta *)Py_None); __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "utils.pxd":5021
 *     >>> tz.utcoffset(dt)
 *     """
 *     if tz is None:             # <<<<<<<<<<<<<<
 *         return None
 *     try:
*/
  }

  /* "utils.pxd":5023
 *     if tz is None:
 *         return None
 *     try:             # <<<<<<<<<<<<<<
 *         return tz.utcoffset(dt)
 *     except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "utils.pxd":5024
 *         return None
 *     try:
 *         return tz.utcoffset(dt)             # <<<<<<<<<<<<<<
 *     except Exception as err:
 *         if not is_tz(tz):
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = __pyx_v_tz;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, ((PyObject *)__pyx_v_dt)};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_utcoffset, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 5024, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(5, 5024, __pyx_L4_error)
      __pyx_r = ((PyDateTime_Delta *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L8_try_return;

      /* "utils.pxd":5023
 *     if tz is None:
 *         return None
 *     try:             # <<<<<<<<<<<<<<
 *         return tz.utcoffset(dt)
 *     except Exception as err:
*/
    }
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "utils.pxd":5025
 *     try:
 *         return tz.utcoffset(dt)
 *     except Exception as err:             # <<<<<<<<<<<<<<
 *         if not is_tz(tz):
 *             raise TypeError(
*/
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_8) {
      __Pyx_AddTraceback("cytimes.utils.tz_utcoffset", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_9) < 0) __PYX_ERR(5, 5025, __pyx_L6_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_err = __pyx_t_6;
      /*try:*/ {

        /* "utils.pxd":5026
 *         return tz.utcoffset(dt)
 *     except Exception as err:
 *         if not is_tz(tz):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "
*/
        __pyx_t_1 = __pyx_f_7cytimes_5utils_is_tz(__pyx_v_tz); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5026, __pyx_L15_error)
        __pyx_t_10 = (!__pyx_t_1);
        if (unlikely(__pyx_t_10)) {

          /* "utils.pxd":5027
 *     except Exception as err:
 *         if not is_tz(tz):
 *             raise TypeError(             # <<<<<<<<<<<<<<
 *                 "Expects an instance of 'datetime.tzinfo', "
 *                 "instead got '%s' %s." % (tz, type(tz))
*/
          __pyx_t_12 = NULL;

          /* "utils.pxd":5029
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "
 *                 "instead got '%s' %s." % (tz, type(tz))             # <<<<<<<<<<<<<<
 *             ) from err
 *         raise err
*/
          __pyx_t_13 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_tz), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 5029, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_tz))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 5029, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_15[0] = __pyx_mstate_global->__pyx_kp_u_Expects_an_instance_of_datetime;
          __pyx_t_15[1] = __pyx_t_13;
          __pyx_t_15[2] = __pyx_mstate_global->__pyx_kp_u__9;
          __pyx_t_15[3] = __pyx_t_14;
          __pyx_t_15[4] = __pyx_mstate_global->__pyx_kp_u__2;

          /* "utils.pxd":5028
 *         if not is_tz(tz):
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "             # <<<<<<<<<<<<<<
 *                 "instead got '%s' %s." % (tz, type(tz))
 *             ) from err
*/
          __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_15, 5, 55 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14));
          if (unlikely(!__pyx_t_16)) __PYX_ERR(5, 5028, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_7 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_16};
            __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 5027, __pyx_L15_error)
            __Pyx_GOTREF(__pyx_t_11);
          }

          /* "utils.pxd":5030
 *                 "Expects an instance of 'datetime.tzinfo', "
 *                 "instead got '%s' %s." % (tz, type(tz))
 *             ) from err             # <<<<<<<<<<<<<<
 *         raise err
 * 
*/
          __Pyx_Raise(__pyx_t_11, 0, 0, __pyx_v_err);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __PYX_ERR(5, 5027, __pyx_L15_error)

          /* "utils.pxd":5026
 *         return tz.utcoffset(dt)
 *     except Exception as err:
 *         if not is_tz(tz):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "
*/
        }

        /* "utils.pxd":5031
 *                 "instead got '%s' %s." % (tz, type(tz))
 *             ) from err
 *         raise err             # <<<<<<<<<<<<<<
 * 
 * cdef inline int tz_utcoffset_sec(object tz, datetime.datetime dt=None) except -200_000:
*/
        __Pyx_Raise(__pyx_v_err, 0, 0, 0);
        __PYX_ERR(5, 5031, __pyx_L15_error)
      }

      /* "utils.pxd":5025
 *     try:
 *         return tz.utcoffset(dt)
 *     except Exception as err:             # <<<<<<<<<<<<<<
 *         if not is_tz(tz):
 *             raise TypeError(
*/
      /*finally:*/ {
        __pyx_L15_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 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;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
          if ( unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __pyx_t_8 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
          goto __pyx_L6_except_error;
        }
      }
    }
    goto __pyx_L6_except_error;

    /* "utils.pxd":5023
 *     if tz is None:
 *         return None
 *     try:             # <<<<<<<<<<<<<<
 *         return tz.utcoffset(dt)
 *     except Exception as err:
*/
    __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_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;
  }

  /* "utils.pxd":5010
 *         raise err
 * 
 * cdef inline datetime.timedelta tz_utcoffset(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the UTC offset from a tzinfo `<'timedelta/None'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("cytimes.utils.tz_utcoffset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5033
 *         raise err
 * 
 * cdef inline int tz_utcoffset_sec(object tz, datetime.datetime dt=None) except -200_000:             # <<<<<<<<<<<<<<
 *     """Return the UTC offset in total seconds from a tzinfo `<'int'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_tz_utcoffset_sec(PyObject *__pyx_v_tz, struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset_sec *__pyx_optional_args) {
  PyDateTime_DateTime *__pyx_v_dt = ((PyDateTime_DateTime *)Py_None);
  PyDateTime_Delta *__pyx_v_off = 0;
  int __pyx_v_sec;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9[7];
  PyObject *__pyx_t_10 = NULL;
  size_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_utcoffset_sec", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dt = __pyx_optional_args->dt;
    }
  }

  /* "utils.pxd":5042
 *         or sentinel (-100,000) when the offset is unavailable.
 *     """
 *     cdef datetime.timedelta off = tz_utcoffset(tz, dt)             # <<<<<<<<<<<<<<
 *     if off is None:
 *         return NULL_TZOFFSET
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.dt = __pyx_v_dt;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_utcoffset(__pyx_v_tz, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 5042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_off = ((PyDateTime_Delta *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":5043
 *     """
 *     cdef datetime.timedelta off = tz_utcoffset(tz, dt)
 *     if off is None:             # <<<<<<<<<<<<<<
 *         return NULL_TZOFFSET
 * 
*/
  __pyx_t_3 = (((PyObject *)__pyx_v_off) == Py_None);
  if (__pyx_t_3) {

    /* "utils.pxd":5044
 *     cdef datetime.timedelta off = tz_utcoffset(tz, dt)
 *     if off is None:
 *         return NULL_TZOFFSET             # <<<<<<<<<<<<<<
 * 
 *     cdef int sec = (off.day * (<int> SS_DAY) + off.second)
*/
    __pyx_r = __pyx_v_7cytimes_5utils_NULL_TZOFFSET;
    goto __pyx_L0;

    /* "utils.pxd":5043
 *     """
 *     cdef datetime.timedelta off = tz_utcoffset(tz, dt)
 *     if off is None:             # <<<<<<<<<<<<<<
 *         return NULL_TZOFFSET
 * 
*/
  }

  /* "utils.pxd":5046
 *         return NULL_TZOFFSET
 * 
 *     cdef int sec = (off.day * (<int> SS_DAY) + off.second)             # <<<<<<<<<<<<<<
 *     if not -86400 < sec < 86400:
 *         raise ValueError(
*/
  __pyx_v_sec = ((__pyx_f_7cpython_8datetime_9timedelta_3day_day(__pyx_v_off) * ((int)__pyx_v_7cytimes_5utils_SS_DAY)) + __pyx_f_7cpython_8datetime_9timedelta_6second_second(__pyx_v_off));

  /* "utils.pxd":5047
 * 
 *     cdef int sec = (off.day * (<int> SS_DAY) + off.second)
 *     if not -86400 < sec < 86400:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Timezone offset %d seconds from (%s, %s) out of range. "
*/
  __pyx_t_3 = (-86400L < __pyx_v_sec);
  if (__pyx_t_3) {
    __pyx_t_3 = (__pyx_v_sec < 0x15180);
  }
  __pyx_t_4 = (!__pyx_t_3);
  if (unlikely(__pyx_t_4)) {

    /* "utils.pxd":5048
 *     cdef int sec = (off.day * (<int> SS_DAY) + off.second)
 *     if not -86400 < sec < 86400:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Timezone offset %d seconds from (%s, %s) out of range. "
 *             "Must be strictly between [-86400..86400] (exclusive)." % (sec, tz, type(tz))
*/
    __pyx_t_5 = NULL;

    /* "utils.pxd":5050
 *         raise ValueError(
 *             "Timezone offset %d seconds from (%s, %s) out of range. "
 *             "Must be strictly between [-86400..86400] (exclusive)." % (sec, tz, type(tz))             # <<<<<<<<<<<<<<
 *         )
 *     return sec
*/
    __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 5050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_tz), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 5050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_tz))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 5050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_Timezone_offset;
    __pyx_t_9[1] = __pyx_t_6;
    __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u_seconds_from;
    __pyx_t_9[3] = __pyx_t_7;
    __pyx_t_9[4] = __pyx_mstate_global->__pyx_kp_u__3;
    __pyx_t_9[5] = __pyx_t_8;
    __pyx_t_9[6] = __pyx_mstate_global->__pyx_kp_u_out_of_range_Must_be_strictly_b_2;

    /* "utils.pxd":5049
 *     if not -86400 < sec < 86400:
 *         raise ValueError(
 *             "Timezone offset %d seconds from (%s, %s) out of range. "             # <<<<<<<<<<<<<<
 *             "Must be strictly between [-86400..86400] (exclusive)." % (sec, tz, type(tz))
 *         )
*/
    __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_9, 7, 16 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 69, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8));
    if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 5049, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __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;
    __pyx_t_11 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_10};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 5048, __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_ERR(5, 5048, __pyx_L1_error)

    /* "utils.pxd":5047
 * 
 *     cdef int sec = (off.day * (<int> SS_DAY) + off.second)
 *     if not -86400 < sec < 86400:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Timezone offset %d seconds from (%s, %s) out of range. "
*/
  }

  /* "utils.pxd":5052
 *             "Must be strictly between [-86400..86400] (exclusive)." % (sec, tz, type(tz))
 *         )
 *     return sec             # <<<<<<<<<<<<<<
 * 
 * cdef inline str tz_utcformat(object tz, datetime.datetime dt=None):
*/
  __pyx_r = __pyx_v_sec;
  goto __pyx_L0;

  /* "utils.pxd":5033
 *         raise err
 * 
 * cdef inline int tz_utcoffset_sec(object tz, datetime.datetime dt=None) except -200_000:             # <<<<<<<<<<<<<<
 *     """Return the UTC offset in total seconds from a tzinfo `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cytimes.utils.tz_utcoffset_sec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -200000;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_off);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5054
 *     return sec
 * 
 * cdef inline str tz_utcformat(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the UTC offset in ISO format string (HHMM) from a tzinfo `<'str/None'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_tz_utcformat(PyObject *__pyx_v_tz, struct __pyx_opt_args_7cytimes_5utils_tz_utcformat *__pyx_optional_args) {
  PyDateTime_DateTime *__pyx_v_dt = ((PyDateTime_DateTime *)Py_None);
  PyDateTime_Delta *__pyx_v_off = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_utcformat", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dt = __pyx_optional_args->dt;
    }
  }

  /* "utils.pxd":5063
 *         or `None` when the offset is unavailable.
 *     """
 *     cdef datetime.timedelta off = tz_utcoffset(tz, dt)             # <<<<<<<<<<<<<<
 *     return None if off is None else td_utcformat(off)
 * 
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.dt = __pyx_v_dt;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_utcoffset(__pyx_v_tz, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 5063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_off = ((PyDateTime_Delta *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":5064
 *     """
 *     cdef datetime.timedelta off = tz_utcoffset(tz, dt)
 *     return None if off is None else td_utcformat(off)             # <<<<<<<<<<<<<<
 * 
 * # NumPy: time unit -------------------------------------------------------------------------------------
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = (((PyObject *)__pyx_v_off) == Py_None);
  if (__pyx_t_3) {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  } else {
    __pyx_t_4 = __pyx_f_7cytimes_5utils_td_utcformat(__pyx_v_off); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 5064, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(5, 5064, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":5054
 *     return sec
 * 
 * cdef inline str tz_utcformat(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the UTC offset in ISO format string (HHMM) from a tzinfo `<'str/None'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.utils.tz_utcformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_off);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5067
 * 
 * # NumPy: time unit -------------------------------------------------------------------------------------
 * cdef inline str nptime_unit_int2str(int unit):             # <<<<<<<<<<<<<<
 *     """Map numpy time unit to its corresponding string form `<'str'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_nptime_unit_int2str(int __pyx_v_unit) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("nptime_unit_int2str", 0);

  /* "utils.pxd":5075
 *     """
 *     # Common units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         return "ns"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":5076
 *     # Common units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         return "ns"             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         return "us"
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_ns);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_ns;
    goto __pyx_L0;

    /* "utils.pxd":5075
 *     """
 *     # Common units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         return "ns"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
  }

  /* "utils.pxd":5077
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         return "ns"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         return "us"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":5078
 *         return "ns"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         return "us"             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         return "ms"
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_us);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_us;
    goto __pyx_L0;

    /* "utils.pxd":5077
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         return "ns"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         return "us"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
  }

  /* "utils.pxd":5079
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         return "us"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         return "ms"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":5080
 *         return "us"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         return "ms"             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         return "s"
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_ms);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_ms;
    goto __pyx_L0;

    /* "utils.pxd":5079
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         return "us"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         return "ms"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
  }

  /* "utils.pxd":5081
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         return "ms"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         return "s"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":5082
 *         return "ms"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         return "s"             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         return "m"
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_s);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_s;
    goto __pyx_L0;

    /* "utils.pxd":5081
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         return "ms"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         return "s"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
*/
  }

  /* "utils.pxd":5083
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         return "s"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *         return "m"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":5084
 *         return "s"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         return "m"             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         return "h"
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_m);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_m;
    goto __pyx_L0;

    /* "utils.pxd":5083
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         return "s"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *         return "m"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
*/
  }

  /* "utils.pxd":5085
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         return "m"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *         return "h"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":5086
 *         return "m"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         return "h"             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         return "D"
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_h);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_h;
    goto __pyx_L0;

    /* "utils.pxd":5085
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         return "m"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *         return "h"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:
*/
  }

  /* "utils.pxd":5087
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         return "h"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:             # <<<<<<<<<<<<<<
 *         return "D"
 * 
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":5088
 *         return "h"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         return "D"             # <<<<<<<<<<<<<<
 * 
 *     # Uncommon units
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_D);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_D;
    goto __pyx_L0;

    /* "utils.pxd":5087
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         return "h"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:             # <<<<<<<<<<<<<<
 *         return "D"
 * 
*/
  }

  /* "utils.pxd":5091
 * 
 *     # Uncommon units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:             # <<<<<<<<<<<<<<
 *         return "Y"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":5092
 *     # Uncommon units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         return "Y"             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         return "M"
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Y);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_Y;
    goto __pyx_L0;

    /* "utils.pxd":5091
 * 
 *     # Uncommon units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:             # <<<<<<<<<<<<<<
 *         return "Y"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
*/
  }

  /* "utils.pxd":5093
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         return "Y"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:             # <<<<<<<<<<<<<<
 *         return "M"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":5094
 *         return "Y"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         return "M"             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
 *         return "W"
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_M);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_M;
    goto __pyx_L0;

    /* "utils.pxd":5093
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         return "Y"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:             # <<<<<<<<<<<<<<
 *         return "M"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
*/
  }

  /* "utils.pxd":5095
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         return "M"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:             # <<<<<<<<<<<<<<
 *         return "W"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":5096
 *         return "M"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
 *         return "W"             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
 *         return "ps"
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_W);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_W;
    goto __pyx_L0;

    /* "utils.pxd":5095
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         return "M"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:             # <<<<<<<<<<<<<<
 *         return "W"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
*/
  }

  /* "utils.pxd":5097
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
 *         return "W"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:             # <<<<<<<<<<<<<<
 *         return "ps"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_ps);
  if (__pyx_t_1) {

    /* "utils.pxd":5098
 *         return "W"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
 *         return "ps"             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
 *         return "fs"
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_ps);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_ps;
    goto __pyx_L0;

    /* "utils.pxd":5097
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
 *         return "W"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:             # <<<<<<<<<<<<<<
 *         return "ps"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
*/
  }

  /* "utils.pxd":5099
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
 *         return "ps"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:             # <<<<<<<<<<<<<<
 *         return "fs"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_fs);
  if (__pyx_t_1) {

    /* "utils.pxd":5100
 *         return "ps"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
 *         return "fs"             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:
 *         return "as"
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_fs);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_fs;
    goto __pyx_L0;

    /* "utils.pxd":5099
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
 *         return "ps"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:             # <<<<<<<<<<<<<<
 *         return "fs"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:
*/
  }

  /* "utils.pxd":5101
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
 *         return "fs"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:             # <<<<<<<<<<<<<<
 *         return "as"
 * 
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_as);
  if (__pyx_t_1) {

    /* "utils.pxd":5102
 *         return "fs"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:
 *         return "as"             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported unit
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_as);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_as;
    goto __pyx_L0;

    /* "utils.pxd":5101
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
 *         return "fs"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:             # <<<<<<<<<<<<<<
 *         return "as"
 * 
*/
  }

  /* "utils.pxd":5105
 * 
 *     # Unsupported unit
 *     _raise_invalid_nptime_int_unit_error(unit)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object nptime_unit_int2dt64(int unit):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_int_unit_error(__pyx_v_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5105, __pyx_L1_error)

  /* "utils.pxd":5067
 * 
 * # NumPy: time unit -------------------------------------------------------------------------------------
 * cdef inline str nptime_unit_int2str(int unit):             # <<<<<<<<<<<<<<
 *     """Map numpy time unit to its corresponding string form `<'str'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.nptime_unit_int2str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5107
 *     _raise_invalid_nptime_int_unit_error(unit)
 * 
 * cdef inline object nptime_unit_int2dt64(int unit):             # <<<<<<<<<<<<<<
 *     """Maps numpy time unit to its corresponding datetime dtype `<'np.dtype'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_nptime_unit_int2dt64(int __pyx_v_unit) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("nptime_unit_int2dt64", 0);

  /* "utils.pxd":5115
 *     """
 *     # Common units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_NS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":5116
 *     # Common units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         return DT64_DTYPE_NS             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         return DT64_DTYPE_US
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_NS);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_NS;
    goto __pyx_L0;

    /* "utils.pxd":5115
 *     """
 *     # Common units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_NS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
  }

  /* "utils.pxd":5117
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         return DT64_DTYPE_NS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_US
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":5118
 *         return DT64_DTYPE_NS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         return DT64_DTYPE_US             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         return DT64_DTYPE_MS
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_US;
    goto __pyx_L0;

    /* "utils.pxd":5117
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         return DT64_DTYPE_NS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_US
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
  }

  /* "utils.pxd":5119
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         return DT64_DTYPE_US
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_MS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":5120
 *         return DT64_DTYPE_US
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         return DT64_DTYPE_MS             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         return DT64_DTYPE_SS
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_MS);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_MS;
    goto __pyx_L0;

    /* "utils.pxd":5119
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         return DT64_DTYPE_US
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_MS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
  }

  /* "utils.pxd":5121
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         return DT64_DTYPE_MS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_SS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":5122
 *         return DT64_DTYPE_MS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         return DT64_DTYPE_SS             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         return DT64_DTYPE_MI
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_SS);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_SS;
    goto __pyx_L0;

    /* "utils.pxd":5121
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         return DT64_DTYPE_MS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_SS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
*/
  }

  /* "utils.pxd":5123
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         return DT64_DTYPE_SS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_MI
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":5124
 *         return DT64_DTYPE_SS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         return DT64_DTYPE_MI             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         return DT64_DTYPE_HH
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_MI);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_MI;
    goto __pyx_L0;

    /* "utils.pxd":5123
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         return DT64_DTYPE_SS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_MI
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
*/
  }

  /* "utils.pxd":5125
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         return DT64_DTYPE_MI
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_HH
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":5126
 *         return DT64_DTYPE_MI
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         return DT64_DTYPE_HH             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         return DT64_DTYPE_DD
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_HH);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_HH;
    goto __pyx_L0;

    /* "utils.pxd":5125
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         return DT64_DTYPE_MI
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_HH
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:
*/
  }

  /* "utils.pxd":5127
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         return DT64_DTYPE_HH
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_DD
 * 
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":5128
 *         return DT64_DTYPE_HH
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         return DT64_DTYPE_DD             # <<<<<<<<<<<<<<
 * 
 *     # Uncommon units
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_DD);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_DD;
    goto __pyx_L0;

    /* "utils.pxd":5127
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         return DT64_DTYPE_HH
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_DD
 * 
*/
  }

  /* "utils.pxd":5131
 * 
 *     # Uncommon units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_YY
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":5132
 *     # Uncommon units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         return DT64_DTYPE_YY             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         return DT64_DTYPE_MM
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_YY);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_YY;
    goto __pyx_L0;

    /* "utils.pxd":5131
 * 
 *     # Uncommon units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_YY
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
*/
  }

  /* "utils.pxd":5133
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         return DT64_DTYPE_YY
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_MM
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":5134
 *         return DT64_DTYPE_YY
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         return DT64_DTYPE_MM             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
 *         return DT64_DTYPE_WW
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_MM);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_MM;
    goto __pyx_L0;

    /* "utils.pxd":5133
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         return DT64_DTYPE_YY
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_MM
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
*/
  }

  /* "utils.pxd":5135
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         return DT64_DTYPE_MM
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_WW
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":5136
 *         return DT64_DTYPE_MM
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
 *         return DT64_DTYPE_WW             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
 *         return DT64_DTYPE_PS
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_WW);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_WW;
    goto __pyx_L0;

    /* "utils.pxd":5135
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         return DT64_DTYPE_MM
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_WW
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
*/
  }

  /* "utils.pxd":5137
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
 *         return DT64_DTYPE_WW
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_PS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_ps);
  if (__pyx_t_1) {

    /* "utils.pxd":5138
 *         return DT64_DTYPE_WW
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
 *         return DT64_DTYPE_PS             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
 *         return DT64_DTYPE_FS
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_PS);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_PS;
    goto __pyx_L0;

    /* "utils.pxd":5137
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
 *         return DT64_DTYPE_WW
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_PS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
*/
  }

  /* "utils.pxd":5139
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
 *         return DT64_DTYPE_PS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_FS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_fs);
  if (__pyx_t_1) {

    /* "utils.pxd":5140
 *         return DT64_DTYPE_PS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
 *         return DT64_DTYPE_FS             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:
 *         return DT64_DTYPE_AS
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_FS);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_FS;
    goto __pyx_L0;

    /* "utils.pxd":5139
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
 *         return DT64_DTYPE_PS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_FS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:
*/
  }

  /* "utils.pxd":5141
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
 *         return DT64_DTYPE_FS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_AS
 * 
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_as);
  if (__pyx_t_1) {

    /* "utils.pxd":5142
 *         return DT64_DTYPE_FS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:
 *         return DT64_DTYPE_AS             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported unit
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_AS);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_AS;
    goto __pyx_L0;

    /* "utils.pxd":5141
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
 *         return DT64_DTYPE_FS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_AS
 * 
*/
  }

  /* "utils.pxd":5145
 * 
 *     # Unsupported unit
 *     _raise_invalid_nptime_int_unit_error(unit)             # <<<<<<<<<<<<<<
 * 
 * cdef inline int nptime_unit_str2int(str unit) except -1:
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_int_unit_error(__pyx_v_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5145, __pyx_L1_error)

  /* "utils.pxd":5107
 *     _raise_invalid_nptime_int_unit_error(unit)
 * 
 * cdef inline object nptime_unit_int2dt64(int unit):             # <<<<<<<<<<<<<<
 *     """Maps numpy time unit to its corresponding datetime dtype `<'np.dtype'>`.
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.nptime_unit_int2dt64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5147
 *     _raise_invalid_nptime_int_unit_error(unit)
 * 
 * cdef inline int nptime_unit_str2int(str unit) except -1:             # <<<<<<<<<<<<<<
 *     """Maps numpy time unit string form to its corresponding
 *     NPY_DATETIMEUNIT enum value `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_nptime_unit_str2int(PyObject *__pyx_v_unit) {
  Py_ssize_t __pyx_v_size;
  Py_UCS4 __pyx_v_ch;
  int __pyx_r;
  int __pyx_t_1;
  Py_UCS4 __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "utils.pxd":5155
 *     :returns `<'int'>`: The corresponding NPY_DATETIMEUNIT enum value.
 *     """
 *     if unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(unit)
 *     cdef:
*/
  __pyx_t_1 = (__pyx_v_unit == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":5156
 *     """
 *     if unit is None:
 *         _raise_invalid_nptime_str_unit_error(unit)             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t size = str_len(unit)
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(__pyx_v_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5156, __pyx_L1_error)

    /* "utils.pxd":5155
 *     :returns `<'int'>`: The corresponding NPY_DATETIMEUNIT enum value.
 *     """
 *     if unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(unit)
 *     cdef:
*/
  }

  /* "utils.pxd":5158
 *         _raise_invalid_nptime_str_unit_error(unit)
 *     cdef:
 *         Py_ssize_t size = str_len(unit)             # <<<<<<<<<<<<<<
 *         Py_UCS4 ch
 * 
*/
  __pyx_v_size = PyUnicode_GET_LENGTH(__pyx_v_unit);

  /* "utils.pxd":5162
 * 
 *     # Unit: 's', 'm', 'h', 'D', 'Y', 'M', 'W', 'B'
 *     if size == 1:             # <<<<<<<<<<<<<<
 *         # Common units
 *         ch = str_read(unit, 0)
*/
  __pyx_t_1 = (__pyx_v_size == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":5164
 *     if size == 1:
 *         # Common units
 *         ch = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *         if ch == "s":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_s
*/
    __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_unit, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 5164, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_2;

    /* "utils.pxd":5165
 *         # Common units
 *         ch = str_read(unit, 0)
 *         if ch == "s":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_s
 *         if ch == "m":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x73);
    if (__pyx_t_1) {

      /* "utils.pxd":5166
 *         ch = str_read(unit, 0)
 *         if ch == "s":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_s             # <<<<<<<<<<<<<<
 *         if ch == "m":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_m
*/
      __pyx_r = NPY_FR_s;
      goto __pyx_L0;

      /* "utils.pxd":5165
 *         # Common units
 *         ch = str_read(unit, 0)
 *         if ch == "s":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_s
 *         if ch == "m":
*/
    }

    /* "utils.pxd":5167
 *         if ch == "s":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_s
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_m
 *         if ch == "h":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x6D);
    if (__pyx_t_1) {

      /* "utils.pxd":5168
 *             return np.NPY_DATETIMEUNIT.NPY_FR_s
 *         if ch == "m":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_m             # <<<<<<<<<<<<<<
 *         if ch == "h":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_h
*/
      __pyx_r = NPY_FR_m;
      goto __pyx_L0;

      /* "utils.pxd":5167
 *         if ch == "s":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_s
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_m
 *         if ch == "h":
*/
    }

    /* "utils.pxd":5169
 *         if ch == "m":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_m
 *         if ch == "h":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_h
 *         if ch == "D":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x68);
    if (__pyx_t_1) {

      /* "utils.pxd":5170
 *             return np.NPY_DATETIMEUNIT.NPY_FR_m
 *         if ch == "h":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_h             # <<<<<<<<<<<<<<
 *         if ch == "D":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_D
*/
      __pyx_r = NPY_FR_h;
      goto __pyx_L0;

      /* "utils.pxd":5169
 *         if ch == "m":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_m
 *         if ch == "h":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_h
 *         if ch == "D":
*/
    }

    /* "utils.pxd":5171
 *         if ch == "h":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_h
 *         if ch == "D":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_D
 *         # Uncommon units
*/
    __pyx_t_1 = (__pyx_v_ch == 68);
    if (__pyx_t_1) {

      /* "utils.pxd":5172
 *             return np.NPY_DATETIMEUNIT.NPY_FR_h
 *         if ch == "D":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_D             # <<<<<<<<<<<<<<
 *         # Uncommon units
 *         if ch == "Y":
*/
      __pyx_r = NPY_FR_D;
      goto __pyx_L0;

      /* "utils.pxd":5171
 *         if ch == "h":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_h
 *         if ch == "D":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_D
 *         # Uncommon units
*/
    }

    /* "utils.pxd":5174
 *             return np.NPY_DATETIMEUNIT.NPY_FR_D
 *         # Uncommon units
 *         if ch == "Y":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_Y
 *         if ch == "M":
*/
    __pyx_t_1 = (__pyx_v_ch == 89);
    if (__pyx_t_1) {

      /* "utils.pxd":5175
 *         # Uncommon units
 *         if ch == "Y":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_Y             # <<<<<<<<<<<<<<
 *         if ch == "M":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_M
*/
      __pyx_r = NPY_FR_Y;
      goto __pyx_L0;

      /* "utils.pxd":5174
 *             return np.NPY_DATETIMEUNIT.NPY_FR_D
 *         # Uncommon units
 *         if ch == "Y":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_Y
 *         if ch == "M":
*/
    }

    /* "utils.pxd":5176
 *         if ch == "Y":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_Y
 *         if ch == "M":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_M
 *         if ch == "W":
*/
    __pyx_t_1 = (__pyx_v_ch == 77);
    if (__pyx_t_1) {

      /* "utils.pxd":5177
 *             return np.NPY_DATETIMEUNIT.NPY_FR_Y
 *         if ch == "M":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_M             # <<<<<<<<<<<<<<
 *         if ch == "W":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_W
*/
      __pyx_r = NPY_FR_M;
      goto __pyx_L0;

      /* "utils.pxd":5176
 *         if ch == "Y":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_Y
 *         if ch == "M":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_M
 *         if ch == "W":
*/
    }

    /* "utils.pxd":5178
 *         if ch == "M":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_M
 *         if ch == "W":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_W
 *         # if ch == "B":
*/
    __pyx_t_1 = (__pyx_v_ch == 87);
    if (__pyx_t_1) {

      /* "utils.pxd":5179
 *             return np.NPY_DATETIMEUNIT.NPY_FR_M
 *         if ch == "W":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_W             # <<<<<<<<<<<<<<
 *         # if ch == "B":
 *         #     return np.NPY_DATETIMEUNIT.NPY_FR_B
*/
      __pyx_r = NPY_FR_W;
      goto __pyx_L0;

      /* "utils.pxd":5178
 *         if ch == "M":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_M
 *         if ch == "W":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_W
 *         # if ch == "B":
*/
    }

    /* "utils.pxd":5162
 * 
 *     # Unit: 's', 'm', 'h', 'D', 'Y', 'M', 'W', 'B'
 *     if size == 1:             # <<<<<<<<<<<<<<
 *         # Common units
 *         ch = str_read(unit, 0)
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":5184
 * 
 *     # Unit: 'ns', 'us', 'ms', 'ps', 'fs', 'as'
 *     elif size == 2 and str_read(unit, 1) == "s":             # <<<<<<<<<<<<<<
 *         # Common units
 *         ch = str_read(unit, 0)
*/
  __pyx_t_3 = (__pyx_v_size == 2);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L12_bool_binop_done;
  }
  __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_unit, 1); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 5184, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_2 == 0x73);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L12_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":5186
 *     elif size == 2 and str_read(unit, 1) == "s":
 *         # Common units
 *         ch = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *         if ch == "n":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ns
*/
    __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_unit, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 5186, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_2;

    /* "utils.pxd":5187
 *         # Common units
 *         ch = str_read(unit, 0)
 *         if ch == "n":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ns
 *         if ch == "u":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x6E);
    if (__pyx_t_1) {

      /* "utils.pxd":5188
 *         ch = str_read(unit, 0)
 *         if ch == "n":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ns             # <<<<<<<<<<<<<<
 *         if ch == "u":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_us
*/
      __pyx_r = NPY_FR_ns;
      goto __pyx_L0;

      /* "utils.pxd":5187
 *         # Common units
 *         ch = str_read(unit, 0)
 *         if ch == "n":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ns
 *         if ch == "u":
*/
    }

    /* "utils.pxd":5189
 *         if ch == "n":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ns
 *         if ch == "u":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_us
 *         if ch == "m":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x75);
    if (__pyx_t_1) {

      /* "utils.pxd":5190
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ns
 *         if ch == "u":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_us             # <<<<<<<<<<<<<<
 *         if ch == "m":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ms
*/
      __pyx_r = NPY_FR_us;
      goto __pyx_L0;

      /* "utils.pxd":5189
 *         if ch == "n":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ns
 *         if ch == "u":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_us
 *         if ch == "m":
*/
    }

    /* "utils.pxd":5191
 *         if ch == "u":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_us
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ms
 *         # Uncommon units
*/
    __pyx_t_1 = (__pyx_v_ch == 0x6D);
    if (__pyx_t_1) {

      /* "utils.pxd":5192
 *             return np.NPY_DATETIMEUNIT.NPY_FR_us
 *         if ch == "m":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ms             # <<<<<<<<<<<<<<
 *         # Uncommon units
 *         if ch == "p":
*/
      __pyx_r = NPY_FR_ms;
      goto __pyx_L0;

      /* "utils.pxd":5191
 *         if ch == "u":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_us
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ms
 *         # Uncommon units
*/
    }

    /* "utils.pxd":5194
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ms
 *         # Uncommon units
 *         if ch == "p":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ps
 *         if ch == "f":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x70);
    if (__pyx_t_1) {

      /* "utils.pxd":5195
 *         # Uncommon units
 *         if ch == "p":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ps             # <<<<<<<<<<<<<<
 *         if ch == "f":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_fs
*/
      __pyx_r = NPY_FR_ps;
      goto __pyx_L0;

      /* "utils.pxd":5194
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ms
 *         # Uncommon units
 *         if ch == "p":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ps
 *         if ch == "f":
*/
    }

    /* "utils.pxd":5196
 *         if ch == "p":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ps
 *         if ch == "f":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_fs
 *         if ch == "a":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x66);
    if (__pyx_t_1) {

      /* "utils.pxd":5197
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ps
 *         if ch == "f":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_fs             # <<<<<<<<<<<<<<
 *         if ch == "a":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_as
*/
      __pyx_r = NPY_FR_fs;
      goto __pyx_L0;

      /* "utils.pxd":5196
 *         if ch == "p":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ps
 *         if ch == "f":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_fs
 *         if ch == "a":
*/
    }

    /* "utils.pxd":5198
 *         if ch == "f":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_fs
 *         if ch == "a":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_as
 * 
*/
    __pyx_t_1 = (__pyx_v_ch == 97);
    if (__pyx_t_1) {

      /* "utils.pxd":5199
 *             return np.NPY_DATETIMEUNIT.NPY_FR_fs
 *         if ch == "a":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_as             # <<<<<<<<<<<<<<
 * 
 *     # Unit: 'min' for pandas compatibility
*/
      __pyx_r = NPY_FR_as;
      goto __pyx_L0;

      /* "utils.pxd":5198
 *         if ch == "f":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_fs
 *         if ch == "a":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_as
 * 
*/
    }

    /* "utils.pxd":5184
 * 
 *     # Unit: 'ns', 'us', 'ms', 'ps', 'fs', 'as'
 *     elif size == 2 and str_read(unit, 1) == "s":             # <<<<<<<<<<<<<<
 *         # Common units
 *         ch = str_read(unit, 0)
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":5202
 * 
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and unit == "min":             # <<<<<<<<<<<<<<
 *         return np.NPY_DATETIMEUNIT.NPY_FR_m
 * 
*/
  __pyx_t_3 = (__pyx_v_size == 3);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L20_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_unit, __pyx_mstate_global->__pyx_n_u_min, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(5, 5202, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_3;
  __pyx_L20_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":5203
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and unit == "min":
 *         return np.NPY_DATETIMEUNIT.NPY_FR_m             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported unit
*/
    __pyx_r = NPY_FR_m;
    goto __pyx_L0;

    /* "utils.pxd":5202
 * 
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and unit == "min":             # <<<<<<<<<<<<<<
 *         return np.NPY_DATETIMEUNIT.NPY_FR_m
 * 
*/
  }
  __pyx_L4:;

  /* "utils.pxd":5206
 * 
 *     # Unsupported unit
 *     _raise_invalid_nptime_str_unit_error(unit)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object nptime_unit_str2dt64(str unit):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(__pyx_v_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5206, __pyx_L1_error)

  /* "utils.pxd":5147
 *     _raise_invalid_nptime_int_unit_error(unit)
 * 
 * cdef inline int nptime_unit_str2int(str unit) except -1:             # <<<<<<<<<<<<<<
 *     """Maps numpy time unit string form to its corresponding
 *     NPY_DATETIMEUNIT enum value `<'int'>`.
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.nptime_unit_str2int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":5208
 *     _raise_invalid_nptime_str_unit_error(unit)
 * 
 * cdef inline object nptime_unit_str2dt64(str unit):             # <<<<<<<<<<<<<<
 *     """Maps numpy time unit string form to its corresponding
 *     datetime dtype `<'np.dtype'>`.
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_nptime_unit_str2dt64(PyObject *__pyx_v_unit) {
  Py_ssize_t __pyx_v_size;
  Py_UCS4 __pyx_v_ch;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_UCS4 __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("nptime_unit_str2dt64", 0);

  /* "utils.pxd":5217
 *         np.dtype('datetime64[ns]'), np.dtype('datetime64[Y]'), etc.
 *     """
 *     if unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(unit)
 *     cdef:
*/
  __pyx_t_1 = (__pyx_v_unit == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":5218
 *     """
 *     if unit is None:
 *         _raise_invalid_nptime_str_unit_error(unit)             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t size = str_len(unit)
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(__pyx_v_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5218, __pyx_L1_error)

    /* "utils.pxd":5217
 *         np.dtype('datetime64[ns]'), np.dtype('datetime64[Y]'), etc.
 *     """
 *     if unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(unit)
 *     cdef:
*/
  }

  /* "utils.pxd":5220
 *         _raise_invalid_nptime_str_unit_error(unit)
 *     cdef:
 *         Py_ssize_t size = str_len(unit)             # <<<<<<<<<<<<<<
 *         Py_UCS4 ch
 * 
*/
  __pyx_v_size = PyUnicode_GET_LENGTH(__pyx_v_unit);

  /* "utils.pxd":5224
 * 
 *     # Unit: 's', 'm', 'h', 'D', 'Y', 'M', 'W', 'B'
 *     if size == 1:             # <<<<<<<<<<<<<<
 *         # Common units
 *         ch = str_read(unit, 0)
*/
  __pyx_t_1 = (__pyx_v_size == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":5226
 *     if size == 1:
 *         # Common units
 *         ch = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *         if ch == "s":
 *             return DT64_DTYPE_SS
*/
    __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_unit, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 5226, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_2;

    /* "utils.pxd":5227
 *         # Common units
 *         ch = str_read(unit, 0)
 *         if ch == "s":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_SS
 *         if ch == "m":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x73);
    if (__pyx_t_1) {

      /* "utils.pxd":5228
 *         ch = str_read(unit, 0)
 *         if ch == "s":
 *             return DT64_DTYPE_SS             # <<<<<<<<<<<<<<
 *         if ch == "m":
 *             return DT64_DTYPE_MI
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_SS);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_SS;
      goto __pyx_L0;

      /* "utils.pxd":5227
 *         # Common units
 *         ch = str_read(unit, 0)
 *         if ch == "s":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_SS
 *         if ch == "m":
*/
    }

    /* "utils.pxd":5229
 *         if ch == "s":
 *             return DT64_DTYPE_SS
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_MI
 *         if ch == "h":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x6D);
    if (__pyx_t_1) {

      /* "utils.pxd":5230
 *             return DT64_DTYPE_SS
 *         if ch == "m":
 *             return DT64_DTYPE_MI             # <<<<<<<<<<<<<<
 *         if ch == "h":
 *             return DT64_DTYPE_HH
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_MI);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_MI;
      goto __pyx_L0;

      /* "utils.pxd":5229
 *         if ch == "s":
 *             return DT64_DTYPE_SS
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_MI
 *         if ch == "h":
*/
    }

    /* "utils.pxd":5231
 *         if ch == "m":
 *             return DT64_DTYPE_MI
 *         if ch == "h":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_HH
 *         if ch == "D":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x68);
    if (__pyx_t_1) {

      /* "utils.pxd":5232
 *             return DT64_DTYPE_MI
 *         if ch == "h":
 *             return DT64_DTYPE_HH             # <<<<<<<<<<<<<<
 *         if ch == "D":
 *             return DT64_DTYPE_DD
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_HH);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_HH;
      goto __pyx_L0;

      /* "utils.pxd":5231
 *         if ch == "m":
 *             return DT64_DTYPE_MI
 *         if ch == "h":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_HH
 *         if ch == "D":
*/
    }

    /* "utils.pxd":5233
 *         if ch == "h":
 *             return DT64_DTYPE_HH
 *         if ch == "D":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_DD
 *         # Uncommon units
*/
    __pyx_t_1 = (__pyx_v_ch == 68);
    if (__pyx_t_1) {

      /* "utils.pxd":5234
 *             return DT64_DTYPE_HH
 *         if ch == "D":
 *             return DT64_DTYPE_DD             # <<<<<<<<<<<<<<
 *         # Uncommon units
 *         if ch == "Y":
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_DD);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_DD;
      goto __pyx_L0;

      /* "utils.pxd":5233
 *         if ch == "h":
 *             return DT64_DTYPE_HH
 *         if ch == "D":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_DD
 *         # Uncommon units
*/
    }

    /* "utils.pxd":5236
 *             return DT64_DTYPE_DD
 *         # Uncommon units
 *         if ch == "Y":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_YY
 *         if ch == "M":
*/
    __pyx_t_1 = (__pyx_v_ch == 89);
    if (__pyx_t_1) {

      /* "utils.pxd":5237
 *         # Uncommon units
 *         if ch == "Y":
 *             return DT64_DTYPE_YY             # <<<<<<<<<<<<<<
 *         if ch == "M":
 *             return DT64_DTYPE_MM
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_YY);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_YY;
      goto __pyx_L0;

      /* "utils.pxd":5236
 *             return DT64_DTYPE_DD
 *         # Uncommon units
 *         if ch == "Y":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_YY
 *         if ch == "M":
*/
    }

    /* "utils.pxd":5238
 *         if ch == "Y":
 *             return DT64_DTYPE_YY
 *         if ch == "M":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_MM
 *         if ch == "W":
*/
    __pyx_t_1 = (__pyx_v_ch == 77);
    if (__pyx_t_1) {

      /* "utils.pxd":5239
 *             return DT64_DTYPE_YY
 *         if ch == "M":
 *             return DT64_DTYPE_MM             # <<<<<<<<<<<<<<
 *         if ch == "W":
 *             return DT64_DTYPE_WW
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_MM);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_MM;
      goto __pyx_L0;

      /* "utils.pxd":5238
 *         if ch == "Y":
 *             return DT64_DTYPE_YY
 *         if ch == "M":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_MM
 *         if ch == "W":
*/
    }

    /* "utils.pxd":5240
 *         if ch == "M":
 *             return DT64_DTYPE_MM
 *         if ch == "W":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_WW
 * 
*/
    __pyx_t_1 = (__pyx_v_ch == 87);
    if (__pyx_t_1) {

      /* "utils.pxd":5241
 *             return DT64_DTYPE_MM
 *         if ch == "W":
 *             return DT64_DTYPE_WW             # <<<<<<<<<<<<<<
 * 
 *     # Unit: 'ns', 'us', 'ms', 'ps', 'fs', 'as'
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_WW);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_WW;
      goto __pyx_L0;

      /* "utils.pxd":5240
 *         if ch == "M":
 *             return DT64_DTYPE_MM
 *         if ch == "W":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_WW
 * 
*/
    }

    /* "utils.pxd":5224
 * 
 *     # Unit: 's', 'm', 'h', 'D', 'Y', 'M', 'W', 'B'
 *     if size == 1:             # <<<<<<<<<<<<<<
 *         # Common units
 *         ch = str_read(unit, 0)
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":5244
 * 
 *     # Unit: 'ns', 'us', 'ms', 'ps', 'fs', 'as'
 *     elif size == 2 and str_read(unit, 1) == "s":             # <<<<<<<<<<<<<<
 *         # Common units
 *         ch = str_read(unit, 0)
*/
  __pyx_t_3 = (__pyx_v_size == 2);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L12_bool_binop_done;
  }
  __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_unit, 1); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 5244, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_2 == 0x73);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L12_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":5246
 *     elif size == 2 and str_read(unit, 1) == "s":
 *         # Common units
 *         ch = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *         if ch == "n":
 *             return DT64_DTYPE_NS
*/
    __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_unit, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 5246, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_2;

    /* "utils.pxd":5247
 *         # Common units
 *         ch = str_read(unit, 0)
 *         if ch == "n":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_NS
 *         if ch == "u":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x6E);
    if (__pyx_t_1) {

      /* "utils.pxd":5248
 *         ch = str_read(unit, 0)
 *         if ch == "n":
 *             return DT64_DTYPE_NS             # <<<<<<<<<<<<<<
 *         if ch == "u":
 *             return DT64_DTYPE_US
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_NS);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_NS;
      goto __pyx_L0;

      /* "utils.pxd":5247
 *         # Common units
 *         ch = str_read(unit, 0)
 *         if ch == "n":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_NS
 *         if ch == "u":
*/
    }

    /* "utils.pxd":5249
 *         if ch == "n":
 *             return DT64_DTYPE_NS
 *         if ch == "u":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_US
 *         if ch == "m":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x75);
    if (__pyx_t_1) {

      /* "utils.pxd":5250
 *             return DT64_DTYPE_NS
 *         if ch == "u":
 *             return DT64_DTYPE_US             # <<<<<<<<<<<<<<
 *         if ch == "m":
 *             return DT64_DTYPE_MS
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_US;
      goto __pyx_L0;

      /* "utils.pxd":5249
 *         if ch == "n":
 *             return DT64_DTYPE_NS
 *         if ch == "u":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_US
 *         if ch == "m":
*/
    }

    /* "utils.pxd":5251
 *         if ch == "u":
 *             return DT64_DTYPE_US
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_MS
 *         # Uncommon units
*/
    __pyx_t_1 = (__pyx_v_ch == 0x6D);
    if (__pyx_t_1) {

      /* "utils.pxd":5252
 *             return DT64_DTYPE_US
 *         if ch == "m":
 *             return DT64_DTYPE_MS             # <<<<<<<<<<<<<<
 *         # Uncommon units
 *         if ch == "p":
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_MS);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_MS;
      goto __pyx_L0;

      /* "utils.pxd":5251
 *         if ch == "u":
 *             return DT64_DTYPE_US
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_MS
 *         # Uncommon units
*/
    }

    /* "utils.pxd":5254
 *             return DT64_DTYPE_MS
 *         # Uncommon units
 *         if ch == "p":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_PS
 *         if ch == "f":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x70);
    if (__pyx_t_1) {

      /* "utils.pxd":5255
 *         # Uncommon units
 *         if ch == "p":
 *             return DT64_DTYPE_PS             # <<<<<<<<<<<<<<
 *         if ch == "f":
 *             return DT64_DTYPE_FS
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_PS);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_PS;
      goto __pyx_L0;

      /* "utils.pxd":5254
 *             return DT64_DTYPE_MS
 *         # Uncommon units
 *         if ch == "p":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_PS
 *         if ch == "f":
*/
    }

    /* "utils.pxd":5256
 *         if ch == "p":
 *             return DT64_DTYPE_PS
 *         if ch == "f":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_FS
 *         if ch == "a":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x66);
    if (__pyx_t_1) {

      /* "utils.pxd":5257
 *             return DT64_DTYPE_PS
 *         if ch == "f":
 *             return DT64_DTYPE_FS             # <<<<<<<<<<<<<<
 *         if ch == "a":
 *             return DT64_DTYPE_AS
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_FS);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_FS;
      goto __pyx_L0;

      /* "utils.pxd":5256
 *         if ch == "p":
 *             return DT64_DTYPE_PS
 *         if ch == "f":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_FS
 *         if ch == "a":
*/
    }

    /* "utils.pxd":5258
 *         if ch == "f":
 *             return DT64_DTYPE_FS
 *         if ch == "a":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_AS
 * 
*/
    __pyx_t_1 = (__pyx_v_ch == 97);
    if (__pyx_t_1) {

      /* "utils.pxd":5259
 *             return DT64_DTYPE_FS
 *         if ch == "a":
 *             return DT64_DTYPE_AS             # <<<<<<<<<<<<<<
 * 
 *     # Unit: 'min' for pandas compatibility
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_AS);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_AS;
      goto __pyx_L0;

      /* "utils.pxd":5258
 *         if ch == "f":
 *             return DT64_DTYPE_FS
 *         if ch == "a":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_AS
 * 
*/
    }

    /* "utils.pxd":5244
 * 
 *     # Unit: 'ns', 'us', 'ms', 'ps', 'fs', 'as'
 *     elif size == 2 and str_read(unit, 1) == "s":             # <<<<<<<<<<<<<<
 *         # Common units
 *         ch = str_read(unit, 0)
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":5262
 * 
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and unit == "min":             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_MI
 * 
*/
  __pyx_t_3 = (__pyx_v_size == 3);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L20_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_unit, __pyx_mstate_global->__pyx_n_u_min, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(5, 5262, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_3;
  __pyx_L20_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":5263
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and unit == "min":
 *         return DT64_DTYPE_MI             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported unit
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_MI);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_MI;
    goto __pyx_L0;

    /* "utils.pxd":5262
 * 
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and unit == "min":             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_MI
 * 
*/
  }
  __pyx_L4:;

  /* "utils.pxd":5266
 * 
 *     # Unsupported unit
 *     _raise_invalid_nptime_str_unit_error(unit)             # <<<<<<<<<<<<<<
 * 
 * cdef inline int get_arr_nptime_unit(np.ndarray arr) except -1:
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(__pyx_v_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5266, __pyx_L1_error)

  /* "utils.pxd":5208
 *     _raise_invalid_nptime_str_unit_error(unit)
 * 
 * cdef inline object nptime_unit_str2dt64(str unit):             # <<<<<<<<<<<<<<
 *     """Maps numpy time unit string form to its corresponding
 *     datetime dtype `<'np.dtype'>`.
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.nptime_unit_str2dt64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5268
 *     _raise_invalid_nptime_str_unit_error(unit)
 * 
 * cdef inline int get_arr_nptime_unit(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Get the time unit (NPY_DATETIMEUNIT enum) of a datetime-like array `<'int'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_get_arr_nptime_unit(PyArrayObject *__pyx_v_arr) {
  int __pyx_v_dtype;
  npy_int64 __pyx_v_zero;
  PyObject *__pyx_v_scalar = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_arr_nptime_unit", 0);

  /* "utils.pxd":5276
 *     """
 *     cdef:
 *         int dtype = np.PyArray_TYPE(arr)             # <<<<<<<<<<<<<<
 *         np.npy_int64 zero = 0
 *         object scalar
*/
  __pyx_v_dtype = PyArray_TYPE(__pyx_v_arr);

  /* "utils.pxd":5277
 *     cdef:
 *         int dtype = np.PyArray_TYPE(arr)
 *         np.npy_int64 zero = 0             # <<<<<<<<<<<<<<
 *         object scalar
 * 
*/
  __pyx_v_zero = 0;

  /* "utils.pxd":5281
 * 
 *     # datetime-array
 *     if dtype == np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *         scalar = np.PyArray_ToScalar(&zero, arr)
 *         return <int> (<np.PyDatetimeScalarObject*>scalar).obmeta.base
*/
  __pyx_t_1 = (__pyx_v_dtype == NPY_DATETIME);
  if (__pyx_t_1) {

    /* "utils.pxd":5282
 *     # datetime-array
 *     if dtype == np.NPY_TYPES.NPY_DATETIME:
 *         scalar = np.PyArray_ToScalar(&zero, arr)             # <<<<<<<<<<<<<<
 *         return <int> (<np.PyDatetimeScalarObject*>scalar).obmeta.base
 * 
*/
    __pyx_t_2 = PyArray_ToScalar((&__pyx_v_zero), __pyx_v_arr); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_scalar = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "utils.pxd":5283
 *     if dtype == np.NPY_TYPES.NPY_DATETIME:
 *         scalar = np.PyArray_ToScalar(&zero, arr)
 *         return <int> (<np.PyDatetimeScalarObject*>scalar).obmeta.base             # <<<<<<<<<<<<<<
 * 
 *     # timedelta-array
*/
    __pyx_r = ((int)((PyDatetimeScalarObject *)__pyx_v_scalar)->obmeta.base);
    goto __pyx_L0;

    /* "utils.pxd":5281
 * 
 *     # datetime-array
 *     if dtype == np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *         scalar = np.PyArray_ToScalar(&zero, arr)
 *         return <int> (<np.PyDatetimeScalarObject*>scalar).obmeta.base
*/
  }

  /* "utils.pxd":5286
 * 
 *     # timedelta-array
 *     if dtype == np.NPY_TYPES.NPY_TIMEDELTA:             # <<<<<<<<<<<<<<
 *         scalar = np.PyArray_ToScalar(&zero, arr)
 *         return <int> (<np.PyTimedeltaScalarObject*>scalar).obmeta.base
*/
  __pyx_t_1 = (__pyx_v_dtype == NPY_TIMEDELTA);
  if (__pyx_t_1) {

    /* "utils.pxd":5287
 *     # timedelta-array
 *     if dtype == np.NPY_TYPES.NPY_TIMEDELTA:
 *         scalar = np.PyArray_ToScalar(&zero, arr)             # <<<<<<<<<<<<<<
 *         return <int> (<np.PyTimedeltaScalarObject*>scalar).obmeta.base
 * 
*/
    __pyx_t_2 = PyArray_ToScalar((&__pyx_v_zero), __pyx_v_arr); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_scalar = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "utils.pxd":5288
 *     if dtype == np.NPY_TYPES.NPY_TIMEDELTA:
 *         scalar = np.PyArray_ToScalar(&zero, arr)
 *         return <int> (<np.PyTimedeltaScalarObject*>scalar).obmeta.base             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported
*/
    __pyx_r = ((int)((PyTimedeltaScalarObject *)__pyx_v_scalar)->obmeta.base);
    goto __pyx_L0;

    /* "utils.pxd":5286
 * 
 *     # timedelta-array
 *     if dtype == np.NPY_TYPES.NPY_TIMEDELTA:             # <<<<<<<<<<<<<<
 *         scalar = np.PyArray_ToScalar(&zero, arr)
 *         return <int> (<np.PyTimedeltaScalarObject*>scalar).obmeta.base
*/
  }

  /* "utils.pxd":5291
 * 
 *     # Unsupported
 *     _raise_invalid_nptime_dtype_error(arr)             # <<<<<<<<<<<<<<
 * 
 * # . errors
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_dtype_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5291, __pyx_L1_error)

  /* "utils.pxd":5268
 *     _raise_invalid_nptime_str_unit_error(unit)
 * 
 * cdef inline int get_arr_nptime_unit(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Get the time unit (NPY_DATETIMEUNIT enum) of a datetime-like array `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.get_arr_nptime_unit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_scalar);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5294
 * 
 * # . errors
 * cdef inline bint _raise_invalid_nptime_int_unit_error(int unit) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for an invalid numpy time unit value."""
 *     raise ValueError(
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_invalid_nptime_int_unit_error(int __pyx_v_unit) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = 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;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14[23];
  PyObject *__pyx_t_15 = NULL;
  size_t __pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_raise_invalid_nptime_int_unit_error", 0);

  /* "utils.pxd":5296
 * cdef inline bint _raise_invalid_nptime_int_unit_error(int unit) except -1:
 *     """(internal) Raise error for an invalid numpy time unit value."""
 *     raise ValueError(             # <<<<<<<<<<<<<<
 *         "Unsupported numpy time unit (NPY_DATETIMEUNIT enum) '%d'.\n"
 *         "Accepts: %d'Y', %d'M', %d'W', %d'D', %d'h', %d'm', "
*/
  __pyx_t_2 = NULL;

  /* "utils.pxd":5300
 *         "Accepts: %d'Y', %d'M', %d'W', %d'D', %d'h', %d'm', "
 *         "%d's', %d'ms', %d'us', %d'ns'" % (
 *             unit,             # <<<<<<<<<<<<<<
 *             DT_NPY_UNIT_YY,
 *             DT_NPY_UNIT_MM,
*/
  __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_v_unit, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 5300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "utils.pxd":5301
 *         "%d's', %d'ms', %d'us', %d'ns'" % (
 *             unit,
 *             DT_NPY_UNIT_YY,             # <<<<<<<<<<<<<<
 *             DT_NPY_UNIT_MM,
 *             DT_NPY_UNIT_WW,
*/
  __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_YY, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 5301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "utils.pxd":5302
 *             unit,
 *             DT_NPY_UNIT_YY,
 *             DT_NPY_UNIT_MM,             # <<<<<<<<<<<<<<
 *             DT_NPY_UNIT_WW,
 *             DT_NPY_UNIT_DD,
*/
  __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 5302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "utils.pxd":5303
 *             DT_NPY_UNIT_YY,
 *             DT_NPY_UNIT_MM,
 *             DT_NPY_UNIT_WW,             # <<<<<<<<<<<<<<
 *             DT_NPY_UNIT_DD,
 *             DT_NPY_UNIT_HH,
*/
  __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_WW, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 5303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "utils.pxd":5304
 *             DT_NPY_UNIT_MM,
 *             DT_NPY_UNIT_WW,
 *             DT_NPY_UNIT_DD,             # <<<<<<<<<<<<<<
 *             DT_NPY_UNIT_HH,
 *             DT_NPY_UNIT_MI,
*/
  __pyx_t_7 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 5304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "utils.pxd":5305
 *             DT_NPY_UNIT_WW,
 *             DT_NPY_UNIT_DD,
 *             DT_NPY_UNIT_HH,             # <<<<<<<<<<<<<<
 *             DT_NPY_UNIT_MI,
 *             DT_NPY_UNIT_SS,
*/
  __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_HH, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 5305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "utils.pxd":5306
 *             DT_NPY_UNIT_DD,
 *             DT_NPY_UNIT_HH,
 *             DT_NPY_UNIT_MI,             # <<<<<<<<<<<<<<
 *             DT_NPY_UNIT_SS,
 *             DT_NPY_UNIT_MS,
*/
  __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_MI, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 5306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "utils.pxd":5307
 *             DT_NPY_UNIT_HH,
 *             DT_NPY_UNIT_MI,
 *             DT_NPY_UNIT_SS,             # <<<<<<<<<<<<<<
 *             DT_NPY_UNIT_MS,
 *             DT_NPY_UNIT_US,
*/
  __pyx_t_10 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_SS, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 5307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);

  /* "utils.pxd":5308
 *             DT_NPY_UNIT_MI,
 *             DT_NPY_UNIT_SS,
 *             DT_NPY_UNIT_MS,             # <<<<<<<<<<<<<<
 *             DT_NPY_UNIT_US,
 *             DT_NPY_UNIT_NS,
*/
  __pyx_t_11 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_MS, 0, ' ', 'd'); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 5308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);

  /* "utils.pxd":5309
 *             DT_NPY_UNIT_SS,
 *             DT_NPY_UNIT_MS,
 *             DT_NPY_UNIT_US,             # <<<<<<<<<<<<<<
 *             DT_NPY_UNIT_NS,
 *         )
*/
  __pyx_t_12 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_US, 0, ' ', 'd'); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 5309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);

  /* "utils.pxd":5310
 *             DT_NPY_UNIT_MS,
 *             DT_NPY_UNIT_US,
 *             DT_NPY_UNIT_NS,             # <<<<<<<<<<<<<<
 *         )
 *     )
*/
  __pyx_t_13 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS, 0, ' ', 'd'); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 5310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_Unsupported_numpy_time_unit_NPY;
  __pyx_t_14[1] = __pyx_t_3;
  __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u_Accepts;
  __pyx_t_14[3] = __pyx_t_4;
  __pyx_t_14[4] = __pyx_mstate_global->__pyx_kp_u_Y_2;
  __pyx_t_14[5] = __pyx_t_5;
  __pyx_t_14[6] = __pyx_mstate_global->__pyx_kp_u_M_2;
  __pyx_t_14[7] = __pyx_t_6;
  __pyx_t_14[8] = __pyx_mstate_global->__pyx_kp_u_W_2;
  __pyx_t_14[9] = __pyx_t_7;
  __pyx_t_14[10] = __pyx_mstate_global->__pyx_kp_u_D_2;
  __pyx_t_14[11] = __pyx_t_8;
  __pyx_t_14[12] = __pyx_mstate_global->__pyx_kp_u_h_2;
  __pyx_t_14[13] = __pyx_t_9;
  __pyx_t_14[14] = __pyx_mstate_global->__pyx_kp_u_m_2;
  __pyx_t_14[15] = __pyx_t_10;
  __pyx_t_14[16] = __pyx_mstate_global->__pyx_kp_u_s_2;
  __pyx_t_14[17] = __pyx_t_11;
  __pyx_t_14[18] = __pyx_mstate_global->__pyx_kp_u_ms_2;
  __pyx_t_14[19] = __pyx_t_12;
  __pyx_t_14[20] = __pyx_mstate_global->__pyx_kp_u_us_2;
  __pyx_t_14[21] = __pyx_t_13;
  __pyx_t_14[22] = __pyx_mstate_global->__pyx_kp_u_ns_2;

  /* "utils.pxd":5297
 *     """(internal) Raise error for an invalid numpy time unit value."""
 *     raise ValueError(
 *         "Unsupported numpy time unit (NPY_DATETIMEUNIT enum) '%d'.\n"             # <<<<<<<<<<<<<<
 *         "Accepts: %d'Y', %d'M', %d'W', %d'D', %d'h', %d'm', "
 *         "%d's', %d'ms', %d'us', %d'ns'" % (
*/
  __pyx_t_15 = __Pyx_PyUnicode_Join(__pyx_t_14, 23, 53 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 6 * 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + 7 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 5, 65535);
  if (unlikely(!__pyx_t_15)) __PYX_ERR(5, 5297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_16 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_15};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 5296, __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_ERR(5, 5296, __pyx_L1_error)

  /* "utils.pxd":5294
 * 
 * # . errors
 * cdef inline bint _raise_invalid_nptime_int_unit_error(int unit) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for an invalid numpy time unit value."""
 *     raise ValueError(
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("cytimes.utils._raise_invalid_nptime_int_unit_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5314
 *     )
 * 
 * cdef inline bint _raise_invalid_nptime_str_unit_error(object unit) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for an invalid numpy time unit string form."""
 *     raise ValueError(
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(PyObject *__pyx_v_unit) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4[3];
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_raise_invalid_nptime_str_unit_error", 0);

  /* "utils.pxd":5316
 * cdef inline bint _raise_invalid_nptime_str_unit_error(object unit) except -1:
 *     """(internal) Raise error for an invalid numpy time unit string form."""
 *     raise ValueError(             # <<<<<<<<<<<<<<
 *         "Unsupported time unit %r.\n"
 *         "Accepts: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'" % (unit,)
*/
  __pyx_t_2 = NULL;

  /* "utils.pxd":5318
 *     raise ValueError(
 *         "Unsupported time unit %r.\n"
 *         "Accepts: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'" % (unit,)             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_unit), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 5318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_Unsupported_time_unit;
  __pyx_t_4[1] = __pyx_t_3;
  __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_Accepts_Y_M_W_D_h_m_s_ms_us_ns;

  /* "utils.pxd":5317
 *     """(internal) Raise error for an invalid numpy time unit string form."""
 *     raise ValueError(
 *         "Unsupported time unit %r.\n"             # <<<<<<<<<<<<<<
 *         "Accepts: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'" % (unit,)
 *     )
*/
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, 22 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 62, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
  if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 5317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 5316, __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_ERR(5, 5316, __pyx_L1_error)

  /* "utils.pxd":5314
 *     )
 * 
 * cdef inline bint _raise_invalid_nptime_str_unit_error(object unit) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for an invalid numpy time unit string form."""
 *     raise ValueError(
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils._raise_invalid_nptime_str_unit_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5321
 *     )
 * 
 * cdef inline bint _raise_invalid_nptime_dtype_error(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for an array that is not dtype `datetime64[*]` or `timedelta64[*]`."""
 *     raise TypeError(
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_invalid_nptime_dtype_error(PyArrayObject *__pyx_v_arr) {
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_raise_invalid_nptime_dtype_error", 0);

  /* "utils.pxd":5323
 * cdef inline bint _raise_invalid_nptime_dtype_error(np.ndarray arr) except -1:
 *     """(internal) Raise error for an array that is not dtype `datetime64[*]` or `timedelta64[*]`."""
 *     raise TypeError(             # <<<<<<<<<<<<<<
 *         "Expects 'ndarray[datetime64[*]]' or 'ndarray[timedelta64[*]]', "
 *         "instead got 'ndarray[%s]'" % arr.dtype
*/
  __pyx_t_2 = NULL;

  /* "utils.pxd":5325
 *     raise TypeError(
 *         "Expects 'ndarray[datetime64[*]]' or 'ndarray[timedelta64[*]]', "
 *         "instead got 'ndarray[%s]'" % arr.dtype             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 5325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Expects_ndarray_datetime64_or_nd, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 5325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 5323, __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_ERR(5, 5323, __pyx_L1_error)

  /* "utils.pxd":5321
 *     )
 * 
 * cdef inline bint _raise_invalid_nptime_dtype_error(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for an array that is not dtype `datetime64[*]` or `timedelta64[*]`."""
 *     raise TypeError(
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.utils._raise_invalid_nptime_dtype_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5330
 * # NumPy: datetime64 ------------------------------------------------------------------------------------
 * # . type check
 * cdef inline bint is_dt64(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `np.datetime64` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_dt64(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":5339
 *     >>> isinstance(obj, np.datetime64)
 *     """
 *     return np.is_datetime64_object(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint assure_dt64(object obj) except -1:
*/
  __pyx_r = __pyx_f_5numpy_is_datetime64_object(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":5330
 * # NumPy: datetime64 ------------------------------------------------------------------------------------
 * # . type check
 * cdef inline bint is_dt64(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `np.datetime64` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":5341
 *     return np.is_datetime64_object(obj)
 * 
 * cdef inline bint assure_dt64(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Assure an object is an instance of np.datetime64."""
 *     if not np.is_datetime64_object(obj):
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_assure_dt64(PyObject *__pyx_v_obj) {
  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;
  PyObject *__pyx_t_6[5];
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("assure_dt64", 0);

  /* "utils.pxd":5343
 * cdef inline bint assure_dt64(object obj) except -1:
 *     """Assure an object is an instance of np.datetime64."""
 *     if not np.is_datetime64_object(obj):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Expects an instance of 'np.datetime64', "
*/
  __pyx_t_1 = (!__pyx_f_5numpy_is_datetime64_object(__pyx_v_obj));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":5344
 *     """Assure an object is an instance of np.datetime64."""
 *     if not np.is_datetime64_object(obj):
 *         raise TypeError(             # <<<<<<<<<<<<<<
 *             "Expects an instance of 'np.datetime64', "
 *             "instead got '%s' %s." % (obj, type(obj))
*/
    __pyx_t_3 = NULL;

    /* "utils.pxd":5346
 *         raise TypeError(
 *             "Expects an instance of 'np.datetime64', "
 *             "instead got '%s' %s." % (obj, type(obj))             # <<<<<<<<<<<<<<
 *         )
 *     return True
*/
    __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_obj), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 5346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_obj))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 5346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Expects_an_instance_of_np_dateti;
    __pyx_t_6[1] = __pyx_t_4;
    __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u__9;
    __pyx_t_6[3] = __pyx_t_5;
    __pyx_t_6[4] = __pyx_mstate_global->__pyx_kp_u__2;

    /* "utils.pxd":5345
 *     if not np.is_datetime64_object(obj):
 *         raise TypeError(
 *             "Expects an instance of 'np.datetime64', "             # <<<<<<<<<<<<<<
 *             "instead got '%s' %s." % (obj, type(obj))
 *         )
*/
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, 53 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 5345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5344, __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_ERR(5, 5344, __pyx_L1_error)

    /* "utils.pxd":5343
 * cdef inline bint assure_dt64(object obj) except -1:
 *     """Assure an object is an instance of np.datetime64."""
 *     if not np.is_datetime64_object(obj):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Expects an instance of 'np.datetime64', "
*/
  }

  /* "utils.pxd":5348
 *             "instead got '%s' %s." % (obj, type(obj))
 *         )
 *     return True             # <<<<<<<<<<<<<<
 * 
 * # . conversion
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "utils.pxd":5341
 *     return np.is_datetime64_object(obj)
 * 
 * cdef inline bint assure_dt64(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Assure an object is an instance of np.datetime64."""
 *     if not np.is_datetime64_object(obj):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.utils.assure_dt64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5351
 * 
 * # . conversion
 * cdef inline np.npy_int64 dt64_as_int64_us(object dt64, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """Convert a np.datetime64 to int64 microsecond ('us') ticks `<'int'>`.
 * 
*/

static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils_dt64_as_int64_us(PyObject *__pyx_v_dt64, struct __pyx_opt_args_7cytimes_5utils_dt64_as_int64_us *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  NPY_DATETIMEUNIT __pyx_v_unit;
  npy_int64 __pyx_v_value;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_r;
  int __pyx_t_1;
  npy_int64 __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils__dt64_M_as_int64_D __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils__dt64_Y_as_int64_D __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
    }
  }

  /* "utils.pxd":5362
 *     """
 *     # Get unit & value
 *     assure_dt64(dt64)             # <<<<<<<<<<<<<<
 *     cdef:
 *         np.NPY_DATETIMEUNIT unit = np.get_datetime64_unit(dt64)
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_assure_dt64(__pyx_v_dt64); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5362, __pyx_L1_error)

  /* "utils.pxd":5364
 *     assure_dt64(dt64)
 *     cdef:
 *         np.NPY_DATETIMEUNIT unit = np.get_datetime64_unit(dt64)             # <<<<<<<<<<<<<<
 *         np.npy_int64 value = np.get_datetime64_value(dt64)
 *         np.npy_int64 q, r
*/
  __pyx_v_unit = __pyx_f_5numpy_get_datetime64_unit(__pyx_v_dt64);

  /* "utils.pxd":5365
 *     cdef:
 *         np.NPY_DATETIMEUNIT unit = np.get_datetime64_unit(dt64)
 *         np.npy_int64 value = np.get_datetime64_value(dt64)             # <<<<<<<<<<<<<<
 *         np.npy_int64 q, r
 * 
*/
  __pyx_v_value = __pyx_f_5numpy_get_datetime64_value(__pyx_v_dt64);

  /* "utils.pxd":5369
 * 
 *     # Conversion
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = value / 1_000; r = value % 1_000
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":5371
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         with cython.cdivision(True):
 *             q = value / 1_000; r = value % 1_000             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 q -= 1
*/
    __pyx_v_q = (__pyx_v_value / 0x3E8);
    __pyx_v_r = (__pyx_v_value % 0x3E8);

    /* "utils.pxd":5372
 *         with cython.cdivision(True):
 *             q = value / 1_000; r = value % 1_000
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    __pyx_t_1 = (__pyx_v_r < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":5373
 *             q = value / 1_000; r = value % 1_000
 *             if r < 0:
 *                 q -= 1             # <<<<<<<<<<<<<<
 *         return q + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":5372
 *         with cython.cdivision(True):
 *             q = value / 1_000; r = value % 1_000
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "utils.pxd":5374
 *             if r < 0:
 *                 q -= 1
 *         return q + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value + offset
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5369
 * 
 *     # Conversion
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = value / 1_000; r = value % 1_000
*/
  }

  /* "utils.pxd":5375
 *                 q -= 1
 *         return q + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return value + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":5376
 *         return q + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * US_MILLISECOND + offset
*/
    __pyx_r = (__pyx_v_value + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5375
 *                 q -= 1
 *         return q + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return value + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":5377
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return value * US_MILLISECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":5378
 *         return value + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * US_MILLISECOND + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return value * US_SECOND + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_US_MILLISECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5377
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return value * US_MILLISECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  }

  /* "utils.pxd":5379
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * US_MILLISECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return value * US_SECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":5380
 *         return value * US_MILLISECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return value * US_SECOND + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return value * US_MINUTE + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_US_SECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5379
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * US_MILLISECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return value * US_SECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  }

  /* "utils.pxd":5381
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return value * US_SECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return value * US_MINUTE + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":5382
 *         return value * US_SECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return value * US_MINUTE + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return value * US_HOUR + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_US_MINUTE) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5381
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return value * US_SECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return value * US_MINUTE + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  }

  /* "utils.pxd":5383
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return value * US_MINUTE + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return value * US_HOUR + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":5384
 *         return value * US_MINUTE + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return value * US_HOUR + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return value * US_DAY + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_US_HOUR) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5383
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return value * US_MINUTE + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return value * US_HOUR + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  }

  /* "utils.pxd":5385
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return value * US_HOUR + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return value * US_DAY + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":5386
 *         return value * US_HOUR + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return value * US_DAY + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return value * US_DAY * 7 + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_US_DAY) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5385
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return value * US_HOUR + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return value * US_DAY + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  }

  /* "utils.pxd":5387
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return value * US_DAY + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return value * US_DAY * 7 + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":5388
 *         return value * US_DAY + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return value * US_DAY * 7 + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64_M_as_int64_D(value, US_DAY, offset)
*/
    __pyx_r = (((__pyx_v_value * __pyx_v_7cytimes_5utils_US_DAY) * 7) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5387
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return value * US_DAY + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return value * US_DAY * 7 + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  }

  /* "utils.pxd":5389
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return value * US_DAY * 7 + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64_M_as_int64_D(value, US_DAY, offset)
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":5390
 *         return value * US_DAY * 7 + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64_M_as_int64_D(value, US_DAY, offset)             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64_Y_as_int64_D(value, US_DAY, offset)
*/
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.factor = __pyx_v_7cytimes_5utils_US_DAY;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_2 = __pyx_f_7cytimes_5utils__dt64_M_as_int64_D(__pyx_v_value, &__pyx_t_3); 
    __pyx_r = __pyx_t_2;
    goto __pyx_L0;

    /* "utils.pxd":5389
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return value * US_DAY * 7 + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64_M_as_int64_D(value, US_DAY, offset)
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  }

  /* "utils.pxd":5391
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64_M_as_int64_D(value, US_DAY, offset)
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64_Y_as_int64_D(value, US_DAY, offset)
 * 
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":5392
 *         return _dt64_M_as_int64_D(value, US_DAY, offset)
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64_Y_as_int64_D(value, US_DAY, offset)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported unit
*/
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.factor = __pyx_v_7cytimes_5utils_US_DAY;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_2 = __pyx_f_7cytimes_5utils__dt64_Y_as_int64_D(__pyx_v_value, &__pyx_t_4); 
    __pyx_r = __pyx_t_2;
    goto __pyx_L0;

    /* "utils.pxd":5391
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64_M_as_int64_D(value, US_DAY, offset)
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64_Y_as_int64_D(value, US_DAY, offset)
 * 
*/
  }

  /* "utils.pxd":5395
 * 
 *     # Unsupported unit
 *     _raise_dt64_to_reso_error(dt64, "us")             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.npy_int64 _dt64_Y_as_int64_D(np.npy_int64 value, np.npy_int64 factor=1, np.npy_int64 offset=0) noexcept nogil:
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_dt64_to_reso_error(__pyx_v_dt64, __pyx_mstate_global->__pyx_n_u_us); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5395, __pyx_L1_error)

  /* "utils.pxd":5351
 * 
 * # . conversion
 * cdef inline np.npy_int64 dt64_as_int64_us(object dt64, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """Convert a np.datetime64 to int64 microsecond ('us') ticks `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.dt64_as_int64_us", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":5397
 *     _raise_dt64_to_reso_error(dt64, "us")
 * 
 * cdef inline np.npy_int64 _dt64_Y_as_int64_D(np.npy_int64 value, np.npy_int64 factor=1, np.npy_int64 offset=0) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.datetime64[Y] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'int'>`.
*/

static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils__dt64_Y_as_int64_D(npy_int64 __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils__dt64_Y_as_int64_D *__pyx_optional_args) {
  npy_int64 __pyx_v_factor = ((npy_int64)1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  npy_int64 __pyx_v_yy;
  npy_int64 __pyx_v_leaps;
  npy_int64 __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_factor = __pyx_optional_args->factor;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
      }
    }
  }

  /* "utils.pxd":5407
 *     """
 *     # Absolute proleptic Gregorian year
 *     cdef np.npy_int64 yy = value + EPOCH_YEAR             # <<<<<<<<<<<<<<
 *     # Leap-years between 1970-01-01 and 31-Dec-(year-1) inclusive
 *     cdef np.npy_int64 leaps = leap_years(yy, False) - EPOCH_CBASE
*/
  __pyx_v_yy = (__pyx_v_value + __pyx_v_7cytimes_5utils_EPOCH_YEAR);

  /* "utils.pxd":5409
 *     cdef np.npy_int64 yy = value + EPOCH_YEAR
 *     # Leap-years between 1970-01-01 and 31-Dec-(year-1) inclusive
 *     cdef np.npy_int64 leaps = leap_years(yy, False) - EPOCH_CBASE             # <<<<<<<<<<<<<<
 *     # Total days since 1970-01-01 at day resolution, then scale+shift
 *     return (value * 365 + leaps) * factor + offset
*/
  __pyx_v_leaps = (__pyx_f_7cytimes_5utils_leap_years(__pyx_v_yy, 0) - __pyx_v_7cytimes_5utils_EPOCH_CBASE);

  /* "utils.pxd":5411
 *     cdef np.npy_int64 leaps = leap_years(yy, False) - EPOCH_CBASE
 *     # Total days since 1970-01-01 at day resolution, then scale+shift
 *     return (value * 365 + leaps) * factor + offset             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.npy_int64 _dt64_M_as_int64_D(np.npy_int64 value, np.npy_int64 factor=1, np.npy_int64 offset=0) noexcept nogil:
*/
  __pyx_r = ((((__pyx_v_value * 0x16D) + __pyx_v_leaps) * __pyx_v_factor) + __pyx_v_offset);
  goto __pyx_L0;

  /* "utils.pxd":5397
 *     _raise_dt64_to_reso_error(dt64, "us")
 * 
 * cdef inline np.npy_int64 _dt64_Y_as_int64_D(np.npy_int64 value, np.npy_int64 factor=1, np.npy_int64 offset=0) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.datetime64[Y] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":5413
 *     return (value * 365 + leaps) * factor + offset
 * 
 * cdef inline np.npy_int64 _dt64_M_as_int64_D(np.npy_int64 value, np.npy_int64 factor=1, np.npy_int64 offset=0) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.datetime64[M] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'int'>`.
*/

static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils__dt64_M_as_int64_D(npy_int64 __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils__dt64_M_as_int64_D *__pyx_optional_args) {
  npy_int64 __pyx_v_factor = ((npy_int64)1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  npy_int64 __pyx_v_yy_ep;
  npy_int64 __pyx_v_yy;
  npy_int64 __pyx_v_mm;
  npy_int64 __pyx_v_leaps;
  npy_int64 __pyx_r;
  int __pyx_t_1;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_factor = __pyx_optional_args->factor;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
      }
    }
  }

  /* "utils.pxd":5425
 *     cdef np.npy_int64 yy_ep, yy, mm, leaps
 *     with cython.cdivision(True):
 *         yy_ep = value / 12; mm = value % 12             # <<<<<<<<<<<<<<
 *     if mm < 0:
 *         yy_ep -= 1; mm += 12
*/
  __pyx_v_yy_ep = (__pyx_v_value / 12);
  __pyx_v_mm = (__pyx_v_value % 12);

  /* "utils.pxd":5426
 *     with cython.cdivision(True):
 *         yy_ep = value / 12; mm = value % 12
 *     if mm < 0:             # <<<<<<<<<<<<<<
 *         yy_ep -= 1; mm += 12
 *     yy = yy_ep + EPOCH_YEAR     # absolute year
*/
  __pyx_t_1 = (__pyx_v_mm < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":5427
 *         yy_ep = value / 12; mm = value % 12
 *     if mm < 0:
 *         yy_ep -= 1; mm += 12             # <<<<<<<<<<<<<<
 *     yy = yy_ep + EPOCH_YEAR     # absolute year
 *     mm += 1                     # 1-based month
*/
    __pyx_v_yy_ep = (__pyx_v_yy_ep - 1);
    __pyx_v_mm = (__pyx_v_mm + 12);

    /* "utils.pxd":5426
 *     with cython.cdivision(True):
 *         yy_ep = value / 12; mm = value % 12
 *     if mm < 0:             # <<<<<<<<<<<<<<
 *         yy_ep -= 1; mm += 12
 *     yy = yy_ep + EPOCH_YEAR     # absolute year
*/
  }

  /* "utils.pxd":5428
 *     if mm < 0:
 *         yy_ep -= 1; mm += 12
 *     yy = yy_ep + EPOCH_YEAR     # absolute year             # <<<<<<<<<<<<<<
 *     mm += 1                     # 1-based month
 *     # Leap-years between 1970-01-01 and 31-Dec-(year-1) inclusive
*/
  __pyx_v_yy = (__pyx_v_yy_ep + __pyx_v_7cytimes_5utils_EPOCH_YEAR);

  /* "utils.pxd":5429
 *         yy_ep -= 1; mm += 12
 *     yy = yy_ep + EPOCH_YEAR     # absolute year
 *     mm += 1                     # 1-based month             # <<<<<<<<<<<<<<
 *     # Leap-years between 1970-01-01 and 31-Dec-(year-1) inclusive
 *     leaps = leap_years(yy, False) - EPOCH_CBASE
*/
  __pyx_v_mm = (__pyx_v_mm + 1);

  /* "utils.pxd":5431
 *     mm += 1                     # 1-based month
 *     # Leap-years between 1970-01-01 and 31-Dec-(year-1) inclusive
 *     leaps = leap_years(yy, False) - EPOCH_CBASE             # <<<<<<<<<<<<<<
 *     # Total days since 1970-01-01 at day resolution, then scale+shift
 *     return (yy_ep * 365 + leaps + days_bf_month(yy, mm)) * factor + offset
*/
  __pyx_v_leaps = (__pyx_f_7cytimes_5utils_leap_years(__pyx_v_yy, 0) - __pyx_v_7cytimes_5utils_EPOCH_CBASE);

  /* "utils.pxd":5433
 *     leaps = leap_years(yy, False) - EPOCH_CBASE
 *     # Total days since 1970-01-01 at day resolution, then scale+shift
 *     return (yy_ep * 365 + leaps + days_bf_month(yy, mm)) * factor + offset             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.datetime dt64_to_dt(object dt64, object tzinfo=None, object dtclass=None):
*/
  __pyx_r = (((((__pyx_v_yy_ep * 0x16D) + __pyx_v_leaps) + __pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_yy, __pyx_v_mm)) * __pyx_v_factor) + __pyx_v_offset);
  goto __pyx_L0;

  /* "utils.pxd":5413
 *     return (value * 365 + leaps) * factor + offset
 * 
 * cdef inline np.npy_int64 _dt64_M_as_int64_D(np.npy_int64 value, np.npy_int64 factor=1, np.npy_int64 offset=0) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.datetime64[M] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":5435
 *     return (yy_ep * 365 + leaps + days_bf_month(yy, mm)) * factor + offset
 * 
 * cdef inline datetime.datetime dt64_to_dt(object dt64, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Convert np.datetime64 to datetime `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt64_to_dt(PyObject *__pyx_v_dt64, struct __pyx_opt_args_7cytimes_5utils_dt64_to_dt *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  npy_int64 __pyx_t_1;
  struct __pyx_opt_args_7cytimes_5utils_dt64_as_int64_us __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_us __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64_to_dt", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_dtclass = __pyx_optional_args->dtclass;
      }
    }
  }

  /* "utils.pxd":5445
 *     :returns `<'datetime.datetime'>`: The resulting datetime (or subclass if `dtclass` is specified).
 *     """
 *     return dt_fr_us(dt64_as_int64_us(dt64, 0), tzinfo, dtclass)             # <<<<<<<<<<<<<<
 * 
 * # . errors
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.offset = 0;
  __pyx_t_1 = __pyx_f_7cytimes_5utils_dt64_as_int64_us(__pyx_v_dt64, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((npy_int64)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 5445, __pyx_L1_error)
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.tzinfo = __pyx_v_tzinfo;
  __pyx_t_4.dtclass = __pyx_v_dtclass;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_us(__pyx_t_1, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 5445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "utils.pxd":5435
 *     return (yy_ep * 365 + leaps + days_bf_month(yy, mm)) * factor + offset
 * 
 * cdef inline datetime.datetime dt64_to_dt(object dt64, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Convert np.datetime64 to datetime `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64_to_dt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5448
 * 
 * # . errors
 * cdef inline bint _raise_dt64_to_reso_error(object dt64, str to_unit) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for unsupported conversion unit for datetime64/timedelta64.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_dt64_to_reso_error(PyObject *__pyx_v_dt64, PyObject *__pyx_v_to_unit) {
  PyObject *__pyx_v_type_str = 0;
  int __pyx_v_dt_reso;
  PyObject *__pyx_v_dt_reso_str = 0;
  PyObject *__pyx_v_err = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8[7];
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __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;
  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[27];
  PyObject *__pyx_t_25 = NULL;
  int __pyx_t_26;
  char const *__pyx_t_27;
  PyObject *__pyx_t_28 = NULL;
  PyObject *__pyx_t_29 = NULL;
  PyObject *__pyx_t_30 = NULL;
  PyObject *__pyx_t_31 = NULL;
  PyObject *__pyx_t_32 = NULL;
  PyObject *__pyx_t_33 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_raise_dt64_to_reso_error", 0);

  /* "utils.pxd":5454
 *     :param to_unit `<'str'>`: The target conversion numpy unit.
 *     """
 *     cdef str type_str = type(dt64)             # <<<<<<<<<<<<<<
 *     cdef int dt_reso = np.get_datetime64_unit(dt64)
 *     cdef str dt_reso_str
*/
  if (!(likely(PyUnicode_CheckExact(((PyObject *)Py_TYPE(__pyx_v_dt64)))) || __Pyx_RaiseUnexpectedTypeError("str", ((PyObject *)Py_TYPE(__pyx_v_dt64))))) __PYX_ERR(5, 5454, __pyx_L1_error)
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_dt64)));
  __pyx_v_type_str = ((PyObject*)((PyObject *)Py_TYPE(__pyx_v_dt64)));

  /* "utils.pxd":5455
 *     """
 *     cdef str type_str = type(dt64)
 *     cdef int dt_reso = np.get_datetime64_unit(dt64)             # <<<<<<<<<<<<<<
 *     cdef str dt_reso_str
 *     try:
*/
  __pyx_v_dt_reso = __pyx_f_5numpy_get_datetime64_unit(__pyx_v_dt64);

  /* "utils.pxd":5457
 *     cdef int dt_reso = np.get_datetime64_unit(dt64)
 *     cdef str dt_reso_str
 *     try:             # <<<<<<<<<<<<<<
 *         dt_reso_str = nptime_unit_int2str(dt_reso)
 *     except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "utils.pxd":5458
 *     cdef str dt_reso_str
 *     try:
 *         dt_reso_str = nptime_unit_int2str(dt_reso)             # <<<<<<<<<<<<<<
 *     except Exception as err:
 *         raise ValueError(
*/
      __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_int2str(__pyx_v_dt_reso); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 5458, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_dt_reso_str = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "utils.pxd":5457
 *     cdef int dt_reso = np.get_datetime64_unit(dt64)
 *     cdef str dt_reso_str
 *     try:             # <<<<<<<<<<<<<<
 *         dt_reso_str = nptime_unit_int2str(dt_reso)
 *     except Exception as err:
*/
    }

    /* "utils.pxd":5480
 *         ) from err
 *     else:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot convert %s from '%s' to int64 '%s' ticks.\n"
 *             "Supported units: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'"
*/
    /*else:*/ {
      __pyx_t_5 = NULL;

      /* "utils.pxd":5483
 *             "Cannot convert %s from '%s' to int64 '%s' ticks.\n"
 *             "Supported units: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'"
 *             % (type_str, dt_reso_str, to_unit)             # <<<<<<<<<<<<<<
 *         )
 * 
*/
      __pyx_t_6 = __Pyx_PyUnicode_Unicode(__pyx_v_dt_reso_str); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 5483, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyUnicode_Unicode(__pyx_v_to_unit); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 5483, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_convert_2;
      __pyx_t_8[1] = __pyx_v_type_str;
      __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_from;
      __pyx_t_8[3] = __pyx_t_6;
      __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u_to_int64;
      __pyx_t_8[5] = __pyx_t_7;
      __pyx_t_8[6] = __pyx_mstate_global->__pyx_kp_u_ticks_Supported_units_Y_M_W_D_h;

      /* "utils.pxd":5481
 *     else:
 *         raise ValueError(
 *             "Cannot convert %s from '%s' to int64 '%s' ticks.\n"             # <<<<<<<<<<<<<<
 *             "Supported units: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'"
 *             % (type_str, dt_reso_str, to_unit)
*/
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 7, 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_v_type_str) + 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 77, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_type_str) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
      if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 5481, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_10 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_9};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 5480, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(5, 5480, __pyx_L5_except_error)
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "utils.pxd":5459
 *     try:
 *         dt_reso_str = nptime_unit_int2str(dt_reso)
 *     except Exception as err:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot convert %s from '%d' unit to int64 '%s' ticks.\n"
*/
    __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_11) {
      __Pyx_AddTraceback("cytimes.utils._raise_dt64_to_reso_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_9, &__pyx_t_5) < 0) __PYX_ERR(5, 5459, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __pyx_v_err = __pyx_t_9;
      /*try:*/ {

        /* "utils.pxd":5460
 *         dt_reso_str = nptime_unit_int2str(dt_reso)
 *     except Exception as err:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot convert %s from '%d' unit to int64 '%s' ticks.\n"
 *             "Supported units: %d'Y', %d'M', %d'W', %d'D', %d'h', %d'm', "
*/
        __pyx_t_6 = NULL;

        /* "utils.pxd":5465
 *             "%d's', %d'ms', %d'us', %d'ns'" % (
 *                 type_str,
 *                 dt_reso,             # <<<<<<<<<<<<<<
 *                 to_unit,
 *                 DT_NPY_UNIT_YY,
*/
        __pyx_t_12 = __Pyx_PyUnicode_From_int(__pyx_v_dt_reso, 0, ' ', 'd'); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 5465, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_12);

        /* "utils.pxd":5466
 *                 type_str,
 *                 dt_reso,
 *                 to_unit,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_YY,
 *                 DT_NPY_UNIT_MM,
*/
        __pyx_t_13 = __Pyx_PyUnicode_Unicode(__pyx_v_to_unit); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 5466, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_13);

        /* "utils.pxd":5467
 *                 dt_reso,
 *                 to_unit,
 *                 DT_NPY_UNIT_YY,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_MM,
 *                 DT_NPY_UNIT_WW,
*/
        __pyx_t_14 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_YY, 0, ' ', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 5467, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_14);

        /* "utils.pxd":5468
 *                 to_unit,
 *                 DT_NPY_UNIT_YY,
 *                 DT_NPY_UNIT_MM,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_WW,
 *                 DT_NPY_UNIT_DD,
*/
        __pyx_t_15 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM, 0, ' ', 'd'); if (unlikely(!__pyx_t_15)) __PYX_ERR(5, 5468, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_15);

        /* "utils.pxd":5469
 *                 DT_NPY_UNIT_YY,
 *                 DT_NPY_UNIT_MM,
 *                 DT_NPY_UNIT_WW,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_DD,
 *                 DT_NPY_UNIT_HH,
*/
        __pyx_t_16 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_WW, 0, ' ', 'd'); if (unlikely(!__pyx_t_16)) __PYX_ERR(5, 5469, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_16);

        /* "utils.pxd":5470
 *                 DT_NPY_UNIT_MM,
 *                 DT_NPY_UNIT_WW,
 *                 DT_NPY_UNIT_DD,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_HH,
 *                 DT_NPY_UNIT_MI,
*/
        __pyx_t_17 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD, 0, ' ', 'd'); if (unlikely(!__pyx_t_17)) __PYX_ERR(5, 5470, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_17);

        /* "utils.pxd":5471
 *                 DT_NPY_UNIT_WW,
 *                 DT_NPY_UNIT_DD,
 *                 DT_NPY_UNIT_HH,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_MI,
 *                 DT_NPY_UNIT_SS,
*/
        __pyx_t_18 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_HH, 0, ' ', 'd'); if (unlikely(!__pyx_t_18)) __PYX_ERR(5, 5471, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_18);

        /* "utils.pxd":5472
 *                 DT_NPY_UNIT_DD,
 *                 DT_NPY_UNIT_HH,
 *                 DT_NPY_UNIT_MI,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_SS,
 *                 DT_NPY_UNIT_MS,
*/
        __pyx_t_19 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_MI, 0, ' ', 'd'); if (unlikely(!__pyx_t_19)) __PYX_ERR(5, 5472, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_19);

        /* "utils.pxd":5473
 *                 DT_NPY_UNIT_HH,
 *                 DT_NPY_UNIT_MI,
 *                 DT_NPY_UNIT_SS,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_MS,
 *                 DT_NPY_UNIT_US,
*/
        __pyx_t_20 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_SS, 0, ' ', 'd'); if (unlikely(!__pyx_t_20)) __PYX_ERR(5, 5473, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_20);

        /* "utils.pxd":5474
 *                 DT_NPY_UNIT_MI,
 *                 DT_NPY_UNIT_SS,
 *                 DT_NPY_UNIT_MS,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_US,
 *                 DT_NPY_UNIT_NS,
*/
        __pyx_t_21 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_MS, 0, ' ', 'd'); if (unlikely(!__pyx_t_21)) __PYX_ERR(5, 5474, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_21);

        /* "utils.pxd":5475
 *                 DT_NPY_UNIT_SS,
 *                 DT_NPY_UNIT_MS,
 *                 DT_NPY_UNIT_US,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_NS,
 *             )
*/
        __pyx_t_22 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_US, 0, ' ', 'd'); if (unlikely(!__pyx_t_22)) __PYX_ERR(5, 5475, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_22);

        /* "utils.pxd":5476
 *                 DT_NPY_UNIT_MS,
 *                 DT_NPY_UNIT_US,
 *                 DT_NPY_UNIT_NS,             # <<<<<<<<<<<<<<
 *             )
 *         ) from err
*/
        __pyx_t_23 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS, 0, ' ', 'd'); if (unlikely(!__pyx_t_23)) __PYX_ERR(5, 5476, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_23);
        __pyx_t_24[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_convert_2;
        __pyx_t_24[1] = __pyx_v_type_str;
        __pyx_t_24[2] = __pyx_mstate_global->__pyx_kp_u_from;
        __pyx_t_24[3] = __pyx_t_12;
        __pyx_t_24[4] = __pyx_mstate_global->__pyx_kp_u_unit_to_int64;
        __pyx_t_24[5] = __pyx_t_13;
        __pyx_t_24[6] = __pyx_mstate_global->__pyx_kp_u_ticks_Supported_units;
        __pyx_t_24[7] = __pyx_t_14;
        __pyx_t_24[8] = __pyx_mstate_global->__pyx_kp_u_Y_2;
        __pyx_t_24[9] = __pyx_t_15;
        __pyx_t_24[10] = __pyx_mstate_global->__pyx_kp_u_M_2;
        __pyx_t_24[11] = __pyx_t_16;
        __pyx_t_24[12] = __pyx_mstate_global->__pyx_kp_u_W_2;
        __pyx_t_24[13] = __pyx_t_17;
        __pyx_t_24[14] = __pyx_mstate_global->__pyx_kp_u_D_2;
        __pyx_t_24[15] = __pyx_t_18;
        __pyx_t_24[16] = __pyx_mstate_global->__pyx_kp_u_h_2;
        __pyx_t_24[17] = __pyx_t_19;
        __pyx_t_24[18] = __pyx_mstate_global->__pyx_kp_u_m_2;
        __pyx_t_24[19] = __pyx_t_20;
        __pyx_t_24[20] = __pyx_mstate_global->__pyx_kp_u_s_2;
        __pyx_t_24[21] = __pyx_t_21;
        __pyx_t_24[22] = __pyx_mstate_global->__pyx_kp_u_ms_2;
        __pyx_t_24[23] = __pyx_t_22;
        __pyx_t_24[24] = __pyx_mstate_global->__pyx_kp_u_us_2;
        __pyx_t_24[25] = __pyx_t_23;
        __pyx_t_24[26] = __pyx_mstate_global->__pyx_kp_u_ns_2;

        /* "utils.pxd":5461
 *     except Exception as err:
 *         raise ValueError(
 *             "Cannot convert %s from '%d' unit to int64 '%s' ticks.\n"             # <<<<<<<<<<<<<<
 *             "Supported units: %d'Y', %d'M', %d'W', %d'D', %d'h', %d'm', "
 *             "%d's', %d'ms', %d'us', %d'ns'" % (
*/
        __pyx_t_25 = __Pyx_PyUnicode_Join(__pyx_t_24, 27, 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_v_type_str) + 7 * 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 26 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 6 * 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_19) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_20) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_21) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_22) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_23) + 5, 65535 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_type_str) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13));
        if (unlikely(!__pyx_t_25)) __PYX_ERR(5, 5461, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_25);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
        __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
        __pyx_t_10 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_25};
          __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 5460, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_7);
        }

        /* "utils.pxd":5478
 *                 DT_NPY_UNIT_NS,
 *             )
 *         ) from err             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError(
*/
        __Pyx_Raise(__pyx_t_7, 0, 0, __pyx_v_err);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __PYX_ERR(5, 5460, __pyx_L14_error)
      }

      /* "utils.pxd":5459
 *     try:
 *         dt_reso_str = nptime_unit_int2str(dt_reso)
 *     except Exception as err:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot convert %s from '%d' unit to int64 '%s' ticks.\n"
*/
      /*finally:*/ {
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_28 = 0; __pyx_t_29 = 0; __pyx_t_30 = 0; __pyx_t_31 = 0; __pyx_t_32 = 0; __pyx_t_33 = 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;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 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;
          __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
          __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_31, &__pyx_t_32, &__pyx_t_33);
          if ( unlikely(__Pyx_GetException(&__pyx_t_28, &__pyx_t_29, &__pyx_t_30) < 0)) __Pyx_ErrFetch(&__pyx_t_28, &__pyx_t_29, &__pyx_t_30);
          __Pyx_XGOTREF(__pyx_t_28);
          __Pyx_XGOTREF(__pyx_t_29);
          __Pyx_XGOTREF(__pyx_t_30);
          __Pyx_XGOTREF(__pyx_t_31);
          __Pyx_XGOTREF(__pyx_t_32);
          __Pyx_XGOTREF(__pyx_t_33);
          __pyx_t_11 = __pyx_lineno; __pyx_t_26 = __pyx_clineno; __pyx_t_27 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_31);
          __Pyx_XGIVEREF(__pyx_t_32);
          __Pyx_XGIVEREF(__pyx_t_33);
          __Pyx_ExceptionReset(__pyx_t_31, __pyx_t_32, __pyx_t_33);
          __Pyx_XGIVEREF(__pyx_t_28);
          __Pyx_XGIVEREF(__pyx_t_29);
          __Pyx_XGIVEREF(__pyx_t_30);
          __Pyx_ErrRestore(__pyx_t_28, __pyx_t_29, __pyx_t_30);
          __pyx_t_28 = 0; __pyx_t_29 = 0; __pyx_t_30 = 0; __pyx_t_31 = 0; __pyx_t_32 = 0; __pyx_t_33 = 0;
          __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_26; __pyx_filename = __pyx_t_27;
          goto __pyx_L5_except_error;
        }
      }
    }
    goto __pyx_L5_except_error;

    /* "utils.pxd":5457
 *     cdef int dt_reso = np.get_datetime64_unit(dt64)
 *     cdef str dt_reso_str
 *     try:             # <<<<<<<<<<<<<<
 *         dt_reso_str = nptime_unit_int2str(dt_reso)
 *     except Exception as err:
*/
    __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;
  }

  /* "utils.pxd":5448
 * 
 * # . errors
 * cdef inline bint _raise_dt64_to_reso_error(object dt64, str to_unit) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for unsupported conversion unit for datetime64/timedelta64.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_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);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_XDECREF(__pyx_t_23);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_AddTraceback("cytimes.utils._raise_dt64_to_reso_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_XDECREF(__pyx_v_type_str);
  __Pyx_XDECREF(__pyx_v_dt_reso_str);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5488
 * # NumPy: timedelta64 -----------------------------------------------------------------------------------
 * # . type check
 * cdef inline bint is_td64(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `np.timedelta64` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_td64(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":5497
 *     >>> isinstance(obj, np.timedelta64)
 *     """
 *     return np.is_timedelta64_object(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint assure_td64(object obj) except -1:
*/
  __pyx_r = __pyx_f_5numpy_is_timedelta64_object(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":5488
 * # NumPy: timedelta64 -----------------------------------------------------------------------------------
 * # . type check
 * cdef inline bint is_td64(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `np.timedelta64` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":5499
 *     return np.is_timedelta64_object(obj)
 * 
 * cdef inline bint assure_td64(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Assure an object is an instance of np.timedelta64."""
 *     if not np.is_timedelta64_object(obj):
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_assure_td64(PyObject *__pyx_v_obj) {
  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;
  PyObject *__pyx_t_6[5];
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("assure_td64", 0);

  /* "utils.pxd":5501
 * cdef inline bint assure_td64(object obj) except -1:
 *     """Assure an object is an instance of np.timedelta64."""
 *     if not np.is_timedelta64_object(obj):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Expects an instance of 'np.timedelta64', "
*/
  __pyx_t_1 = (!__pyx_f_5numpy_is_timedelta64_object(__pyx_v_obj));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":5502
 *     """Assure an object is an instance of np.timedelta64."""
 *     if not np.is_timedelta64_object(obj):
 *         raise TypeError(             # <<<<<<<<<<<<<<
 *             "Expects an instance of 'np.timedelta64', "
 *             "instead got '%s' %s." % (obj, type(obj))
*/
    __pyx_t_3 = NULL;

    /* "utils.pxd":5504
 *         raise TypeError(
 *             "Expects an instance of 'np.timedelta64', "
 *             "instead got '%s' %s." % (obj, type(obj))             # <<<<<<<<<<<<<<
 *         )
 *     return True
*/
    __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_obj), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 5504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_obj))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 5504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Expects_an_instance_of_np_timede;
    __pyx_t_6[1] = __pyx_t_4;
    __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u__9;
    __pyx_t_6[3] = __pyx_t_5;
    __pyx_t_6[4] = __pyx_mstate_global->__pyx_kp_u__2;

    /* "utils.pxd":5503
 *     if not np.is_timedelta64_object(obj):
 *         raise TypeError(
 *             "Expects an instance of 'np.timedelta64', "             # <<<<<<<<<<<<<<
 *             "instead got '%s' %s." % (obj, type(obj))
 *         )
*/
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, 54 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 5503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5502, __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_ERR(5, 5502, __pyx_L1_error)

    /* "utils.pxd":5501
 * cdef inline bint assure_td64(object obj) except -1:
 *     """Assure an object is an instance of np.timedelta64."""
 *     if not np.is_timedelta64_object(obj):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Expects an instance of 'np.timedelta64', "
*/
  }

  /* "utils.pxd":5506
 *             "instead got '%s' %s." % (obj, type(obj))
 *         )
 *     return True             # <<<<<<<<<<<<<<
 * 
 * # . conversion
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "utils.pxd":5499
 *     return np.is_timedelta64_object(obj)
 * 
 * cdef inline bint assure_td64(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Assure an object is an instance of np.timedelta64."""
 *     if not np.is_timedelta64_object(obj):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.utils.assure_td64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5509
 * 
 * # . conversion
 * cdef inline np.npy_int64 td64_as_int64_us(object td64, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """Convert a np.timedelta64 to int64 microsecond ('us') ticks `<'int'>`.
 * 
*/

static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils_td64_as_int64_us(PyObject *__pyx_v_td64, struct __pyx_opt_args_7cytimes_5utils_td64_as_int64_us *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  NPY_DATETIMEUNIT __pyx_v_unit;
  npy_int64 __pyx_v_value;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_r;
  int __pyx_t_1;
  npy_int64 __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils__td64_M_as_int64_D __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils__td64_Y_as_int64_D __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
    }
  }

  /* "utils.pxd":5520
 *     """
 *     # Get unit & value
 *     assure_td64(td64)             # <<<<<<<<<<<<<<
 *     cdef:
 *         np.NPY_DATETIMEUNIT unit = np.get_datetime64_unit(td64)
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_assure_td64(__pyx_v_td64); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5520, __pyx_L1_error)

  /* "utils.pxd":5522
 *     assure_td64(td64)
 *     cdef:
 *         np.NPY_DATETIMEUNIT unit = np.get_datetime64_unit(td64)             # <<<<<<<<<<<<<<
 *         np.npy_int64 value = np.get_timedelta64_value(td64)
 *         np.npy_int64 q, r
*/
  __pyx_v_unit = __pyx_f_5numpy_get_datetime64_unit(__pyx_v_td64);

  /* "utils.pxd":5523
 *     cdef:
 *         np.NPY_DATETIMEUNIT unit = np.get_datetime64_unit(td64)
 *         np.npy_int64 value = np.get_timedelta64_value(td64)             # <<<<<<<<<<<<<<
 *         np.npy_int64 q, r
 * 
*/
  __pyx_v_value = __pyx_f_5numpy_get_timedelta64_value(__pyx_v_td64);

  /* "utils.pxd":5527
 * 
 *     # Conversion
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:   # nanosecond             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = value / 1_000; r = value % 1_000
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":5529
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:   # nanosecond
 *         with cython.cdivision(True):
 *             q = value / 1_000; r = value % 1_000             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 q -= 1
*/
    __pyx_v_q = (__pyx_v_value / 0x3E8);
    __pyx_v_r = (__pyx_v_value % 0x3E8);

    /* "utils.pxd":5530
 *         with cython.cdivision(True):
 *             q = value / 1_000; r = value % 1_000
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    __pyx_t_1 = (__pyx_v_r < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":5531
 *             q = value / 1_000; r = value % 1_000
 *             if r < 0:
 *                 q -= 1             # <<<<<<<<<<<<<<
 *         return q + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":5530
 *         with cython.cdivision(True):
 *             q = value / 1_000; r = value % 1_000
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "utils.pxd":5532
 *             if r < 0:
 *                 q -= 1
 *         return q + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond
 *         return value + offset
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5527
 * 
 *     # Conversion
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:   # nanosecond             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = value / 1_000; r = value % 1_000
*/
  }

  /* "utils.pxd":5533
 *                 q -= 1
 *         return q + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond             # <<<<<<<<<<<<<<
 *         return value + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":5534
 *         return q + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond
 *         return value + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
 *         return value * US_MILLISECOND + offset
*/
    __pyx_r = (__pyx_v_value + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5533
 *                 q -= 1
 *         return q + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond             # <<<<<<<<<<<<<<
 *         return value + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
*/
  }

  /* "utils.pxd":5535
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond
 *         return value + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond             # <<<<<<<<<<<<<<
 *         return value * US_MILLISECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":5536
 *         return value + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
 *         return value * US_MILLISECOND + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
 *         return value * US_SECOND + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_US_MILLISECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5535
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond
 *         return value + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond             # <<<<<<<<<<<<<<
 *         return value * US_MILLISECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
*/
  }

  /* "utils.pxd":5537
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
 *         return value * US_MILLISECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second             # <<<<<<<<<<<<<<
 *         return value * US_SECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":5538
 *         return value * US_MILLISECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
 *         return value * US_SECOND + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
 *         return value * US_MINUTE + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_US_SECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5537
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
 *         return value * US_MILLISECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second             # <<<<<<<<<<<<<<
 *         return value * US_SECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
*/
  }

  /* "utils.pxd":5539
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
 *         return value * US_SECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute             # <<<<<<<<<<<<<<
 *         return value * US_MINUTE + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":5540
 *         return value * US_SECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
 *         return value * US_MINUTE + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
 *         return value * US_HOUR + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_US_MINUTE) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5539
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
 *         return value * US_SECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute             # <<<<<<<<<<<<<<
 *         return value * US_MINUTE + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
*/
  }

  /* "utils.pxd":5541
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
 *         return value * US_MINUTE + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour             # <<<<<<<<<<<<<<
 *         return value * US_HOUR + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":5542
 *         return value * US_MINUTE + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
 *         return value * US_HOUR + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
 *         return value * US_DAY + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_US_HOUR) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5541
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
 *         return value * US_MINUTE + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour             # <<<<<<<<<<<<<<
 *         return value * US_HOUR + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
*/
  }

  /* "utils.pxd":5543
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
 *         return value * US_HOUR + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day             # <<<<<<<<<<<<<<
 *         return value * US_DAY + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":5544
 *         return value * US_HOUR + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
 *         return value * US_DAY + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
 *         return value * US_DAY * 7 + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_US_DAY) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5543
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
 *         return value * US_HOUR + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day             # <<<<<<<<<<<<<<
 *         return value * US_DAY + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
*/
  }

  /* "utils.pxd":5545
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
 *         return value * US_DAY + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week             # <<<<<<<<<<<<<<
 *         return value * US_DAY * 7 + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":5546
 *         return value * US_DAY + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
 *         return value * US_DAY * 7 + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
 *         return _td64_M_as_int64_D(value, np.NPY_DATETIMEUNIT.NPY_FR_us, offset)
*/
    __pyx_r = (((__pyx_v_value * __pyx_v_7cytimes_5utils_US_DAY) * 7) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5545
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
 *         return value * US_DAY + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week             # <<<<<<<<<<<<<<
 *         return value * US_DAY * 7 + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
*/
  }

  /* "utils.pxd":5547
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
 *         return value * US_DAY * 7 + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month             # <<<<<<<<<<<<<<
 *         return _td64_M_as_int64_D(value, np.NPY_DATETIMEUNIT.NPY_FR_us, offset)
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":5548
 *         return value * US_DAY * 7 + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
 *         return _td64_M_as_int64_D(value, np.NPY_DATETIMEUNIT.NPY_FR_us, offset)             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year
 *         return _td64_Y_as_int64_D(value, np.NPY_DATETIMEUNIT.NPY_FR_us, offset)
*/
    __pyx_t_3.__pyx_n = 1;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_2 = __pyx_f_7cytimes_5utils__td64_M_as_int64_D(__pyx_v_value, NPY_FR_us, &__pyx_t_3); if (unlikely(__pyx_t_2 == ((npy_int64)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 5548, __pyx_L1_error)
    __pyx_r = __pyx_t_2;
    goto __pyx_L0;

    /* "utils.pxd":5547
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
 *         return value * US_DAY * 7 + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month             # <<<<<<<<<<<<<<
 *         return _td64_M_as_int64_D(value, np.NPY_DATETIMEUNIT.NPY_FR_us, offset)
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year
*/
  }

  /* "utils.pxd":5549
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
 *         return _td64_M_as_int64_D(value, np.NPY_DATETIMEUNIT.NPY_FR_us, offset)
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year             # <<<<<<<<<<<<<<
 *         return _td64_Y_as_int64_D(value, np.NPY_DATETIMEUNIT.NPY_FR_us, offset)
 * 
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":5550
 *         return _td64_M_as_int64_D(value, np.NPY_DATETIMEUNIT.NPY_FR_us, offset)
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year
 *         return _td64_Y_as_int64_D(value, np.NPY_DATETIMEUNIT.NPY_FR_us, offset)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported unit
*/
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_2 = __pyx_f_7cytimes_5utils__td64_Y_as_int64_D(__pyx_v_value, NPY_FR_us, &__pyx_t_4); if (unlikely(__pyx_t_2 == ((npy_int64)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 5550, __pyx_L1_error)
    __pyx_r = __pyx_t_2;
    goto __pyx_L0;

    /* "utils.pxd":5549
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
 *         return _td64_M_as_int64_D(value, np.NPY_DATETIMEUNIT.NPY_FR_us, offset)
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year             # <<<<<<<<<<<<<<
 *         return _td64_Y_as_int64_D(value, np.NPY_DATETIMEUNIT.NPY_FR_us, offset)
 * 
*/
  }

  /* "utils.pxd":5553
 * 
 *     # Unsupported unit
 *     _raise_dt64_to_reso_error(td64, "us")             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.npy_int64 _td64_Y_as_int64_D(np.npy_int64 value, int to_reso, np.npy_int64 offset=0):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_dt64_to_reso_error(__pyx_v_td64, __pyx_mstate_global->__pyx_n_u_us); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5553, __pyx_L1_error)

  /* "utils.pxd":5509
 * 
 * # . conversion
 * cdef inline np.npy_int64 td64_as_int64_us(object td64, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """Convert a np.timedelta64 to int64 microsecond ('us') ticks `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.td64_as_int64_us", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":5555
 *     _raise_dt64_to_reso_error(td64, "us")
 * 
 * cdef inline np.npy_int64 _td64_Y_as_int64_D(np.npy_int64 value, int to_reso, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.timedelta[Y] to int64 day ticks using an average
 *     year (365.2425 D), then further adjust the resolution by `to_reso` and
*/

static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils__td64_Y_as_int64_D(npy_int64 __pyx_v_value, int __pyx_v_to_reso, struct __pyx_opt_args_7cytimes_5utils__td64_Y_as_int64_D *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  npy_int64 __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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_td64_Y_as_int64_D", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
    }
  }

  /* "utils.pxd":5571
 *     #   525,949.2 m = 1440 * 365.2425   = 2,629,746 / 5
 *     cdef np.npy_int64 q, r
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day             # <<<<<<<<<<<<<<
 *         value *= 146_097
 *         with cython.cdivision(True):
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":5572
 *     cdef np.npy_int64 q, r
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day
 *         value *= 146_097             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = value / 400; r = value % 400
*/
    __pyx_v_value = (__pyx_v_value * 0x23AB1);

    /* "utils.pxd":5574
 *         value *= 146_097
 *         with cython.cdivision(True):
 *             q = value / 400; r = value % 400             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 q -= 1
*/
    __pyx_v_q = (__pyx_v_value / 0x190);
    __pyx_v_r = (__pyx_v_value % 0x190);

    /* "utils.pxd":5575
 *         with cython.cdivision(True):
 *             q = value / 400; r = value % 400
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    __pyx_t_1 = (__pyx_v_r < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":5576
 *             q = value / 400; r = value % 400
 *             if r < 0:
 *                 q -= 1             # <<<<<<<<<<<<<<
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":5575
 *         with cython.cdivision(True):
 *             q = value / 400; r = value % 400
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "utils.pxd":5577
 *             if r < 0:
 *                 q -= 1
 *         return q + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         value *= 438_291
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5571
 *     #   525,949.2 m = 1440 * 365.2425   = 2,629,746 / 5
 *     cdef np.npy_int64 q, r
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day             # <<<<<<<<<<<<<<
 *         value *= 146_097
 *         with cython.cdivision(True):
*/
  }

  /* "utils.pxd":5578
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour             # <<<<<<<<<<<<<<
 *         value *= 438_291
 *         with cython.cdivision(True):
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":5579
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         value *= 438_291             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = value / 50; r = value % 50
*/
    __pyx_v_value = (__pyx_v_value * 0x6B013);

    /* "utils.pxd":5581
 *         value *= 438_291
 *         with cython.cdivision(True):
 *             q = value / 50; r = value % 50             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 q -= 1
*/
    __pyx_v_q = (__pyx_v_value / 50);
    __pyx_v_r = (__pyx_v_value % 50);

    /* "utils.pxd":5582
 *         with cython.cdivision(True):
 *             q = value / 50; r = value % 50
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    __pyx_t_1 = (__pyx_v_r < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":5583
 *             q = value / 50; r = value % 50
 *             if r < 0:
 *                 q -= 1             # <<<<<<<<<<<<<<
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":5582
 *         with cython.cdivision(True):
 *             q = value / 50; r = value % 50
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "utils.pxd":5584
 *             if r < 0:
 *                 q -= 1
 *         return q + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         value *= 2_629_746
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5578
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour             # <<<<<<<<<<<<<<
 *         value *= 438_291
 *         with cython.cdivision(True):
*/
  }

  /* "utils.pxd":5585
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute             # <<<<<<<<<<<<<<
 *         value *= 2_629_746
 *         with cython.cdivision(True):
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":5586
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         value *= 2_629_746             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = value / 5; r = value % 5
*/
    __pyx_v_value = (__pyx_v_value * 0x282072);

    /* "utils.pxd":5588
 *         value *= 2_629_746
 *         with cython.cdivision(True):
 *             q = value / 5; r = value % 5             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 q -= 1
*/
    __pyx_v_q = (__pyx_v_value / 5);
    __pyx_v_r = (__pyx_v_value % 5);

    /* "utils.pxd":5589
 *         with cython.cdivision(True):
 *             q = value / 5; r = value % 5
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    __pyx_t_1 = (__pyx_v_r < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":5590
 *             q = value / 5; r = value % 5
 *             if r < 0:
 *                 q -= 1             # <<<<<<<<<<<<<<
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":5589
 *         with cython.cdivision(True):
 *             q = value / 5; r = value % 5
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "utils.pxd":5591
 *             if r < 0:
 *                 q -= 1
 *         return q + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return value * TD64_YY_SECOND + offset
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5585
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute             # <<<<<<<<<<<<<<
 *         value *= 2_629_746
 *         with cython.cdivision(True):
*/
  }

  /* "utils.pxd":5592
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second             # <<<<<<<<<<<<<<
 *         return value * TD64_YY_SECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":5593
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return value * TD64_YY_SECOND + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * TD64_YY_MILLISECOND + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_TD64_YY_SECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5592
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second             # <<<<<<<<<<<<<<
 *         return value * TD64_YY_SECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":5594
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return value * TD64_YY_SECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return value * TD64_YY_MILLISECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":5595
 *         return value * TD64_YY_SECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * TD64_YY_MILLISECOND + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value * TD64_YY_MICROSECOND + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_TD64_YY_MILLISECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5594
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return value * TD64_YY_SECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return value * TD64_YY_MILLISECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":5596
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * TD64_YY_MILLISECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return value * TD64_YY_MICROSECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":5597
 *         return value * TD64_YY_MILLISECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value * TD64_YY_MICROSECOND + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return value * TD64_YY_NANOSECOND + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_TD64_YY_MICROSECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5596
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * TD64_YY_MILLISECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return value * TD64_YY_MICROSECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
*/
  }

  /* "utils.pxd":5598
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value * TD64_YY_MICROSECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return value * TD64_YY_NANOSECOND + offset
 * 
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":5599
 *         return value * TD64_YY_MICROSECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return value * TD64_YY_NANOSECOND + offset             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported conversion resolution
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_TD64_YY_NANOSECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5598
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value * TD64_YY_MICROSECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return value * TD64_YY_NANOSECOND + offset
 * 
*/
  }

  /* "utils.pxd":5602
 * 
 *     # Unsupported conversion resolution
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64." % to_reso)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.npy_int64 _td64_M_as_int64_D(np.npy_int64 value, int to_reso, np.npy_int64 offset=0):
*/
  __pyx_t_3 = NULL;
  __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_to_reso); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 5602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Unsupported_conversion_unit_d_fo, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 5602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_AssertionError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5602, __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_ERR(5, 5602, __pyx_L1_error)

  /* "utils.pxd":5555
 *     _raise_dt64_to_reso_error(td64, "us")
 * 
 * cdef inline np.npy_int64 _td64_Y_as_int64_D(np.npy_int64 value, int to_reso, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.timedelta[Y] to int64 day ticks using an average
 *     year (365.2425 D), then further adjust the resolution by `to_reso` and
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils._td64_Y_as_int64_D", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5604
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64." % to_reso)
 * 
 * cdef inline np.npy_int64 _td64_M_as_int64_D(np.npy_int64 value, int to_reso, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.timedelta[M] to int64 day ticks using an
 *     average month (365.2425 / 12 = 30.436875 D), then further adjust
*/

static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils__td64_M_as_int64_D(npy_int64 __pyx_v_value, int __pyx_v_to_reso, struct __pyx_opt_args_7cytimes_5utils__td64_M_as_int64_D *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  npy_int64 __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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_td64_M_as_int64_D", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
    }
  }

  /* "utils.pxd":5620
 *     #   43,829.1 m  = 1440 * 30.436875  = 438291 / 10
 *     cdef np.npy_int64 q, r
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day             # <<<<<<<<<<<<<<
 *         value *= 48_699
 *         with cython.cdivision(True):
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":5621
 *     cdef np.npy_int64 q, r
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day
 *         value *= 48_699             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = value / 1_600; r = value % 1_600
*/
    __pyx_v_value = (__pyx_v_value * 0xBE3B);

    /* "utils.pxd":5623
 *         value *= 48_699
 *         with cython.cdivision(True):
 *             q = value / 1_600; r = value % 1_600             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 q -= 1
*/
    __pyx_v_q = (__pyx_v_value / 0x640);
    __pyx_v_r = (__pyx_v_value % 0x640);

    /* "utils.pxd":5624
 *         with cython.cdivision(True):
 *             q = value / 1_600; r = value % 1_600
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    __pyx_t_1 = (__pyx_v_r < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":5625
 *             q = value / 1_600; r = value % 1_600
 *             if r < 0:
 *                 q -= 1             # <<<<<<<<<<<<<<
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":5624
 *         with cython.cdivision(True):
 *             q = value / 1_600; r = value % 1_600
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "utils.pxd":5626
 *             if r < 0:
 *                 q -= 1
 *         return q + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         value *= 146_097
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5620
 *     #   43,829.1 m  = 1440 * 30.436875  = 438291 / 10
 *     cdef np.npy_int64 q, r
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day             # <<<<<<<<<<<<<<
 *         value *= 48_699
 *         with cython.cdivision(True):
*/
  }

  /* "utils.pxd":5627
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour             # <<<<<<<<<<<<<<
 *         value *= 146_097
 *         with cython.cdivision(True):
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":5628
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         value *= 146_097             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = value / 200; r = value % 200
*/
    __pyx_v_value = (__pyx_v_value * 0x23AB1);

    /* "utils.pxd":5630
 *         value *= 146_097
 *         with cython.cdivision(True):
 *             q = value / 200; r = value % 200             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 q -= 1
*/
    __pyx_v_q = (__pyx_v_value / 0xC8);
    __pyx_v_r = (__pyx_v_value % 0xC8);

    /* "utils.pxd":5631
 *         with cython.cdivision(True):
 *             q = value / 200; r = value % 200
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    __pyx_t_1 = (__pyx_v_r < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":5632
 *             q = value / 200; r = value % 200
 *             if r < 0:
 *                 q -= 1             # <<<<<<<<<<<<<<
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":5631
 *         with cython.cdivision(True):
 *             q = value / 200; r = value % 200
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "utils.pxd":5633
 *             if r < 0:
 *                 q -= 1
 *         return q + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         value *= 438_291
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5627
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour             # <<<<<<<<<<<<<<
 *         value *= 146_097
 *         with cython.cdivision(True):
*/
  }

  /* "utils.pxd":5634
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute             # <<<<<<<<<<<<<<
 *         value *= 438_291
 *         with cython.cdivision(True):
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":5635
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         value *= 438_291             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = value / 10; r = value % 10
*/
    __pyx_v_value = (__pyx_v_value * 0x6B013);

    /* "utils.pxd":5637
 *         value *= 438_291
 *         with cython.cdivision(True):
 *             q = value / 10; r = value % 10             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 q -= 1
*/
    __pyx_v_q = (__pyx_v_value / 10);
    __pyx_v_r = (__pyx_v_value % 10);

    /* "utils.pxd":5638
 *         with cython.cdivision(True):
 *             q = value / 10; r = value % 10
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    __pyx_t_1 = (__pyx_v_r < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":5639
 *             q = value / 10; r = value % 10
 *             if r < 0:
 *                 q -= 1             # <<<<<<<<<<<<<<
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":5638
 *         with cython.cdivision(True):
 *             q = value / 10; r = value % 10
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "utils.pxd":5640
 *             if r < 0:
 *                 q -= 1
 *         return q + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return value * TD64_MM_SECOND + offset
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5634
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute             # <<<<<<<<<<<<<<
 *         value *= 438_291
 *         with cython.cdivision(True):
*/
  }

  /* "utils.pxd":5641
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second             # <<<<<<<<<<<<<<
 *         return value * TD64_MM_SECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":5642
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return value * TD64_MM_SECOND + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * TD64_MM_MILLISECOND + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_TD64_MM_SECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5641
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second             # <<<<<<<<<<<<<<
 *         return value * TD64_MM_SECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":5643
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return value * TD64_MM_SECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return value * TD64_MM_MILLISECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":5644
 *         return value * TD64_MM_SECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * TD64_MM_MILLISECOND + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value * TD64_MM_MICROSECOND + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_TD64_MM_MILLISECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5643
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return value * TD64_MM_SECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return value * TD64_MM_MILLISECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":5645
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * TD64_MM_MILLISECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return value * TD64_MM_MICROSECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":5646
 *         return value * TD64_MM_MILLISECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value * TD64_MM_MICROSECOND + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return value * TD64_MM_NANOSECOND + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_TD64_MM_MICROSECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5645
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * TD64_MM_MILLISECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return value * TD64_MM_MICROSECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
*/
  }

  /* "utils.pxd":5647
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value * TD64_MM_MICROSECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return value * TD64_MM_NANOSECOND + offset
 * 
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":5648
 *         return value * TD64_MM_MICROSECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return value * TD64_MM_NANOSECOND + offset             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported conversion resolution
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_TD64_MM_NANOSECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5647
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value * TD64_MM_MICROSECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return value * TD64_MM_NANOSECOND + offset
 * 
*/
  }

  /* "utils.pxd":5651
 * 
 *     # Unsupported conversion resolution
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64." % to_reso)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.timedelta td64_to_td(object td64, object tdclass=None):
*/
  __pyx_t_3 = NULL;
  __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_to_reso); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 5651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Unsupported_conversion_unit_d_fo, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 5651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_AssertionError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5651, __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_ERR(5, 5651, __pyx_L1_error)

  /* "utils.pxd":5604
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64." % to_reso)
 * 
 * cdef inline np.npy_int64 _td64_M_as_int64_D(np.npy_int64 value, int to_reso, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.timedelta[M] to int64 day ticks using an
 *     average month (365.2425 / 12 = 30.436875 D), then further adjust
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils._td64_M_as_int64_D", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5653
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64." % to_reso)
 * 
 * cdef inline datetime.timedelta td64_to_td(object td64, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Convert np.timedelta64 to timedelta `<'datetime.timedelta'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_td64_to_td(PyObject *__pyx_v_td64, struct __pyx_opt_args_7cytimes_5utils_td64_to_td *__pyx_optional_args) {
  PyObject *__pyx_v_tdclass = ((PyObject *)Py_None);
  PyDateTime_Delta *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  npy_int64 __pyx_t_1;
  struct __pyx_opt_args_7cytimes_5utils_td64_as_int64_us __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_td_fr_us __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("td64_to_td", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tdclass = __pyx_optional_args->tdclass;
    }
  }

  /* "utils.pxd":5661
 *     :returns `<'datetime.timedelta'>`: The resulting timedelta (or subclass if `tdclass` is specified).
 *     """
 *     return td_fr_us(td64_as_int64_us(td64, 0), tdclass)             # <<<<<<<<<<<<<<
 * 
 * # NumPy: ndarray ---------------------------------------------------------------------------------------
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.offset = 0;
  __pyx_t_1 = __pyx_f_7cytimes_5utils_td64_as_int64_us(__pyx_v_td64, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((npy_int64)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 5661, __pyx_L1_error)
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.tdclass = __pyx_v_tdclass;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_td_fr_us(__pyx_t_1, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 5661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = ((PyDateTime_Delta *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "utils.pxd":5653
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64." % to_reso)
 * 
 * cdef inline datetime.timedelta td64_to_td(object td64, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Convert np.timedelta64 to timedelta `<'datetime.timedelta'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.td64_to_td", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5665
 * # NumPy: ndarray ---------------------------------------------------------------------------------------
 * # . type check
 * cdef inline bint is_arr(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `np.ndarray` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_arr(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":5674
 *     >>> isinstance(obj, np.ndarray)
 *     """
 *     return np.PyArray_Check(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint assure_1dim_arr(np.ndarray arr) except -1:
*/
  __pyx_r = PyArray_Check(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":5665
 * # NumPy: ndarray ---------------------------------------------------------------------------------------
 * # . type check
 * cdef inline bint is_arr(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `np.ndarray` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":5676
 *     return np.PyArray_Check(obj)
 * 
 * cdef inline bint assure_1dim_arr(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Assure the array is 1-dimensional.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_assure_1dim_arr(PyArrayObject *__pyx_v_arr) {
  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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("assure_1dim_arr", 0);

  /* "utils.pxd":5681
 *     :raises `<'ValueError'>`: If the array is not 1-dimensional.
 *     """
 *     if arr.ndim != 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("Expects 1-D ndarray, instead got %d-dimensional array." % arr.ndim)
 *     return True
*/
  __pyx_t_1 = (__pyx_f_5numpy_7ndarray_4ndim_ndim(__pyx_v_arr) != 1);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":5682
 *     """
 *     if arr.ndim != 1:
 *         raise ValueError("Expects 1-D ndarray, instead got %d-dimensional array." % arr.ndim)             # <<<<<<<<<<<<<<
 *     return True
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_f_5numpy_7ndarray_4ndim_ndim(__pyx_v_arr)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 5682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Expects_1_D_ndarray_instead_got, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 5682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5682, __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_ERR(5, 5682, __pyx_L1_error)

    /* "utils.pxd":5681
 *     :raises `<'ValueError'>`: If the array is not 1-dimensional.
 *     """
 *     if arr.ndim != 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("Expects 1-D ndarray, instead got %d-dimensional array." % arr.ndim)
 *     return True
*/
  }

  /* "utils.pxd":5683
 *     if arr.ndim != 1:
 *         raise ValueError("Expects 1-D ndarray, instead got %d-dimensional array." % arr.ndim)
 *     return True             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray assure_arr_contiguous(np.ndarray arr):
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "utils.pxd":5676
 *     return np.PyArray_Check(obj)
 * 
 * cdef inline bint assure_1dim_arr(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Assure the array is 1-dimensional.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils.assure_1dim_arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5685
 *     return True
 * 
 * cdef inline np.ndarray assure_arr_contiguous(np.ndarray arr):             # <<<<<<<<<<<<<<
 *     """Ensure that an ndarray is C-contiguous in memory `<'np.ndarray'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_assure_arr_contiguous(PyArrayObject *__pyx_v_arr) {
  PyArrayObject *__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("assure_arr_contiguous", 0);

  /* "utils.pxd":5691
 *         otherwise, returns a contiguous copy.
 *     """
 *     if np.PyArray_IS_C_CONTIGUOUS(arr):             # <<<<<<<<<<<<<<
 *         return arr
 *     return np.PyArray_GETCONTIGUOUS(arr)
*/
  __pyx_t_1 = PyArray_IS_C_CONTIGUOUS(__pyx_v_arr);
  if (__pyx_t_1) {

    /* "utils.pxd":5692
 *     """
 *     if np.PyArray_IS_C_CONTIGUOUS(arr):
 *         return arr             # <<<<<<<<<<<<<<
 *     return np.PyArray_GETCONTIGUOUS(arr)
 * 
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_arr);
    __pyx_r = __pyx_v_arr;
    goto __pyx_L0;

    /* "utils.pxd":5691
 *         otherwise, returns a contiguous copy.
 *     """
 *     if np.PyArray_IS_C_CONTIGUOUS(arr):             # <<<<<<<<<<<<<<
 *         return arr
 *     return np.PyArray_GETCONTIGUOUS(arr)
*/
  }

  /* "utils.pxd":5693
 *     if np.PyArray_IS_C_CONTIGUOUS(arr):
 *         return arr
 *     return np.PyArray_GETCONTIGUOUS(arr)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_arr_int(np.ndarray arr) except -1:
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2 = ((PyObject *)PyArray_GETCONTIGUOUS(__pyx_v_arr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":5685
 *     return True
 * 
 * cdef inline np.ndarray assure_arr_contiguous(np.ndarray arr):             # <<<<<<<<<<<<<<
 *     """Ensure that an ndarray is C-contiguous in memory `<'np.ndarray'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.assure_arr_contiguous", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5695
 *     return np.PyArray_GETCONTIGUOUS(arr)
 * 
 * cdef inline bint is_arr_int(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Check if a numpy array is of integer dtype `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_arr_int(PyArrayObject *__pyx_v_arr) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "utils.pxd":5700
 *     - Integer dtype: `int8`, `int16`, `int32` and `int64`.
 *     """
 *     return np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_INT8,
 *         np.NPY_TYPES.NPY_INT16,
*/
  __pyx_t_1 = PyArray_TYPE(__pyx_v_arr);

  /* "utils.pxd":5701
 *     """
 *     return np.PyArray_TYPE(arr) in (
 *         np.NPY_TYPES.NPY_INT8,             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_INT16,
 *         np.NPY_TYPES.NPY_INT32,
*/
  __pyx_t_3 = (__pyx_t_1 == NPY_INT8);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }

  /* "utils.pxd":5700
 *     - Integer dtype: `int8`, `int16`, `int32` and `int64`.
 *     """
 *     return np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_INT8,
 *         np.NPY_TYPES.NPY_INT16,
*/
  __pyx_t_3 = (__pyx_t_1 == NPY_INT16);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }

  /* "utils.pxd":5703
 *         np.NPY_TYPES.NPY_INT8,
 *         np.NPY_TYPES.NPY_INT16,
 *         np.NPY_TYPES.NPY_INT32,             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_INT64,
 *     )
*/
  __pyx_t_3 = (__pyx_t_1 == NPY_INT32);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }

  /* "utils.pxd":5700
 *     - Integer dtype: `int8`, `int16`, `int32` and `int64`.
 *     """
 *     return np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_INT8,
 *         np.NPY_TYPES.NPY_INT16,
*/
  __pyx_t_3 = (__pyx_t_1 == NPY_INT64);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "utils.pxd":5695
 *     return np.PyArray_GETCONTIGUOUS(arr)
 * 
 * cdef inline bint is_arr_int(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Check if a numpy array is of integer dtype `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":5707
 *     )
 * 
 * cdef inline bint is_arr_uint(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Check if a numpy array is of unsigned integer dtype `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_arr_uint(PyArrayObject *__pyx_v_arr) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "utils.pxd":5712
 *     - Unsigned Integer dtype: `uint8`, `uint16`, `uint32` and `uint64`.
 *     """
 *     return np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_UINT8,
 *         np.NPY_TYPES.NPY_UINT16,
*/
  __pyx_t_1 = PyArray_TYPE(__pyx_v_arr);

  /* "utils.pxd":5713
 *     """
 *     return np.PyArray_TYPE(arr) in (
 *         np.NPY_TYPES.NPY_UINT8,             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_UINT16,
 *         np.NPY_TYPES.NPY_UINT32,
*/
  __pyx_t_3 = (__pyx_t_1 == NPY_UINT8);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }

  /* "utils.pxd":5712
 *     - Unsigned Integer dtype: `uint8`, `uint16`, `uint32` and `uint64`.
 *     """
 *     return np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_UINT8,
 *         np.NPY_TYPES.NPY_UINT16,
*/
  __pyx_t_3 = (__pyx_t_1 == NPY_UINT16);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }

  /* "utils.pxd":5715
 *         np.NPY_TYPES.NPY_UINT8,
 *         np.NPY_TYPES.NPY_UINT16,
 *         np.NPY_TYPES.NPY_UINT32,             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_UINT64,
 *     )
*/
  __pyx_t_3 = (__pyx_t_1 == NPY_UINT32);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }

  /* "utils.pxd":5712
 *     - Unsigned Integer dtype: `uint8`, `uint16`, `uint32` and `uint64`.
 *     """
 *     return np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_UINT8,
 *         np.NPY_TYPES.NPY_UINT16,
*/
  __pyx_t_3 = (__pyx_t_1 == NPY_UINT64);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "utils.pxd":5707
 *     )
 * 
 * cdef inline bint is_arr_uint(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Check if a numpy array is of unsigned integer dtype `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":5719
 *     )
 * 
 * cdef inline bint is_arr_float(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Check if a numpy array is of float dtype `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_arr_float(PyArrayObject *__pyx_v_arr) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "utils.pxd":5724
 *     - Float dtype: `float16`, `float32` and `float64`.
 *     """
 *     return np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_FLOAT16,
 *         np.NPY_TYPES.NPY_FLOAT32,
*/
  __pyx_t_1 = PyArray_TYPE(__pyx_v_arr);

  /* "utils.pxd":5725
 *     """
 *     return np.PyArray_TYPE(arr) in (
 *         np.NPY_TYPES.NPY_FLOAT16,             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_FLOAT32,
 *         np.NPY_TYPES.NPY_FLOAT64,
*/
  __pyx_t_3 = (__pyx_t_1 == NPY_FLOAT16);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }

  /* "utils.pxd":5724
 *     - Float dtype: `float16`, `float32` and `float64`.
 *     """
 *     return np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_FLOAT16,
 *         np.NPY_TYPES.NPY_FLOAT32,
*/
  __pyx_t_3 = (__pyx_t_1 == NPY_FLOAT32);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }

  /* "utils.pxd":5727
 *         np.NPY_TYPES.NPY_FLOAT16,
 *         np.NPY_TYPES.NPY_FLOAT32,
 *         np.NPY_TYPES.NPY_FLOAT64,             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_3 = (__pyx_t_1 == NPY_FLOAT64);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "utils.pxd":5719
 *     )
 * 
 * cdef inline bint is_arr_float(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Check if a numpy array is of float dtype `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":5731
 * 
 * # . dtype
 * cdef inline np.ndarray arr_assure_int64(np.ndarray arr, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ensure that a 1-D array is contiguous and dtype int64 `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_assure_int64(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 *__pyx_optional_args) {
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  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("arr_assure_int64", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_copy = __pyx_optional_args->copy;
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":5743
 *     """
 *     # Assure 1-D
 *     assure_1dim_arr(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Assure contiguous
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_assure_1dim_arr(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5743, __pyx_L1_error)

  /* "utils.pxd":5746
 * 
 *     # Assure contiguous
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):             # <<<<<<<<<<<<<<
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False
*/
  __pyx_t_1 = (!PyArray_IS_C_CONTIGUOUS(__pyx_v_arr));
  if (__pyx_t_1) {

    /* "utils.pxd":5747
 *     # Assure contiguous
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):
 *         arr = np.PyArray_GETCONTIGUOUS(arr)             # <<<<<<<<<<<<<<
 *         copy = False
 * 
*/
    __pyx_t_2 = ((PyObject *)PyArray_GETCONTIGUOUS(__pyx_v_arr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "utils.pxd":5748
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False             # <<<<<<<<<<<<<<
 * 
 *     # Assure dtype
*/
    __pyx_v_copy = 0;

    /* "utils.pxd":5746
 * 
 *     # Assure contiguous
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):             # <<<<<<<<<<<<<<
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False
*/
  }

  /* "utils.pxd":5751
 * 
 *     # Assure dtype
 *     if np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_INT64:             # <<<<<<<<<<<<<<
 *         return np.PyArray_Copy(arr) if copy else arr
 *     else:
*/
  __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) == NPY_INT64);
  if (__pyx_t_1) {

    /* "utils.pxd":5752
 *     # Assure dtype
 *     if np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_INT64:
 *         return np.PyArray_Copy(arr) if copy else arr             # <<<<<<<<<<<<<<
 *     else:
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_INT64)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    if (__pyx_v_copy) {
      __pyx_t_3 = PyArray_Copy(__pyx_v_arr); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 5752, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 5752, __pyx_L1_error)
      __pyx_t_2 = __pyx_t_3;
      __pyx_t_3 = 0;
    } else {
      __Pyx_INCREF((PyObject *)__pyx_v_arr);
      __pyx_t_2 = ((PyObject *)__pyx_v_arr);
    }
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":5751
 * 
 *     # Assure dtype
 *     if np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_INT64:             # <<<<<<<<<<<<<<
 *         return np.PyArray_Copy(arr) if copy else arr
 *     else:
*/
  }

  /* "utils.pxd":5754
 *         return np.PyArray_Copy(arr) if copy else arr
 *     else:
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_INT64)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_assure_int64_like(np.ndarray arr, bint copy=True):
*/
  /*else*/ {
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_2 = PyArray_Cast(__pyx_v_arr, NPY_INT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5754, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 5754, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "utils.pxd":5731
 * 
 * # . dtype
 * cdef inline np.ndarray arr_assure_int64(np.ndarray arr, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ensure that a 1-D array is contiguous and dtype int64 `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_assure_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5756
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_INT64)
 * 
 * cdef inline np.ndarray arr_assure_int64_like(np.ndarray arr, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ensure that a 1-D array is contiguous and dtype
 *     int64 / datetime64[*] / timedelta64[*] `<'ndarray[int64*]'>`.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_assure_int64_like(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like *__pyx_optional_args) {
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  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("arr_assure_int64_like", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_copy = __pyx_optional_args->copy;
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":5769
 *     """
 *     # Assure 1-D
 *     assure_1dim_arr(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Assure contiguous
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_assure_1dim_arr(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5769, __pyx_L1_error)

  /* "utils.pxd":5772
 * 
 *     # Assure contiguous
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):             # <<<<<<<<<<<<<<
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False
*/
  __pyx_t_1 = (!PyArray_IS_C_CONTIGUOUS(__pyx_v_arr));
  if (__pyx_t_1) {

    /* "utils.pxd":5773
 *     # Assure contiguous
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):
 *         arr = np.PyArray_GETCONTIGUOUS(arr)             # <<<<<<<<<<<<<<
 *         copy = False
 * 
*/
    __pyx_t_2 = ((PyObject *)PyArray_GETCONTIGUOUS(__pyx_v_arr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "utils.pxd":5774
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False             # <<<<<<<<<<<<<<
 * 
 *     # Assure dtype
*/
    __pyx_v_copy = 0;

    /* "utils.pxd":5772
 * 
 *     # Assure contiguous
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):             # <<<<<<<<<<<<<<
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False
*/
  }

  /* "utils.pxd":5777
 * 
 *     # Assure dtype
 *     if np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_INT64,
 *         np.NPY_TYPES.NPY_DATETIME,
*/
  __pyx_t_3 = PyArray_TYPE(__pyx_v_arr);

  /* "utils.pxd":5778
 *     # Assure dtype
 *     if np.PyArray_TYPE(arr) in (
 *         np.NPY_TYPES.NPY_INT64,             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_DATETIME,
 *         np.NPY_TYPES.NPY_TIMEDELTA,
*/
  __pyx_t_4 = (__pyx_t_3 == NPY_INT64);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L5_bool_binop_done;
  }

  /* "utils.pxd":5777
 * 
 *     # Assure dtype
 *     if np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_INT64,
 *         np.NPY_TYPES.NPY_DATETIME,
*/
  __pyx_t_4 = (__pyx_t_3 == NPY_DATETIME);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L5_bool_binop_done;
  }

  /* "utils.pxd":5780
 *         np.NPY_TYPES.NPY_INT64,
 *         np.NPY_TYPES.NPY_DATETIME,
 *         np.NPY_TYPES.NPY_TIMEDELTA,             # <<<<<<<<<<<<<<
 *     ):
 *         return np.PyArray_Copy(arr) if copy else arr
*/
  __pyx_t_4 = (__pyx_t_3 == NPY_TIMEDELTA);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L5_bool_binop_done:;

  /* "utils.pxd":5777
 * 
 *     # Assure dtype
 *     if np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_INT64,
 *         np.NPY_TYPES.NPY_DATETIME,
*/
  __pyx_t_4 = __pyx_t_1;
  if (__pyx_t_4) {

    /* "utils.pxd":5782
 *         np.NPY_TYPES.NPY_TIMEDELTA,
 *     ):
 *         return np.PyArray_Copy(arr) if copy else arr             # <<<<<<<<<<<<<<
 *     else:
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_INT64)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    if (__pyx_v_copy) {
      __pyx_t_5 = PyArray_Copy(__pyx_v_arr); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 5782, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 5782, __pyx_L1_error)
      __pyx_t_2 = __pyx_t_5;
      __pyx_t_5 = 0;
    } else {
      __Pyx_INCREF((PyObject *)__pyx_v_arr);
      __pyx_t_2 = ((PyObject *)__pyx_v_arr);
    }
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":5777
 * 
 *     # Assure dtype
 *     if np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_INT64,
 *         np.NPY_TYPES.NPY_DATETIME,
*/
  }

  /* "utils.pxd":5784
 *         return np.PyArray_Copy(arr) if copy else arr
 *     else:
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_INT64)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_assure_float64(np.ndarray arr, bint copy=True):
*/
  /*else*/ {
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_2 = PyArray_Cast(__pyx_v_arr, NPY_INT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 5784, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "utils.pxd":5756
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_INT64)
 * 
 * cdef inline np.ndarray arr_assure_int64_like(np.ndarray arr, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ensure that a 1-D array is contiguous and dtype
 *     int64 / datetime64[*] / timedelta64[*] `<'ndarray[int64*]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils.arr_assure_int64_like", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5786
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_INT64)
 * 
 * cdef inline np.ndarray arr_assure_float64(np.ndarray arr, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ensure that a 1-D array is contiguous and dtype float64 `<'ndarray[float64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_assure_float64(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_arr_assure_float64 *__pyx_optional_args) {
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  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("arr_assure_float64", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_copy = __pyx_optional_args->copy;
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":5798
 *     """
 *     # Assure 1-D
 *     assure_1dim_arr(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Assure contiguous
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_assure_1dim_arr(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5798, __pyx_L1_error)

  /* "utils.pxd":5801
 * 
 *     # Assure contiguous
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):             # <<<<<<<<<<<<<<
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False
*/
  __pyx_t_1 = (!PyArray_IS_C_CONTIGUOUS(__pyx_v_arr));
  if (__pyx_t_1) {

    /* "utils.pxd":5802
 *     # Assure contiguous
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):
 *         arr = np.PyArray_GETCONTIGUOUS(arr)             # <<<<<<<<<<<<<<
 *         copy = False
 * 
*/
    __pyx_t_2 = ((PyObject *)PyArray_GETCONTIGUOUS(__pyx_v_arr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "utils.pxd":5803
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False             # <<<<<<<<<<<<<<
 * 
 *     # Assure dtype
*/
    __pyx_v_copy = 0;

    /* "utils.pxd":5801
 * 
 *     # Assure contiguous
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):             # <<<<<<<<<<<<<<
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False
*/
  }

  /* "utils.pxd":5806
 * 
 *     # Assure dtype
 *     if np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_FLOAT64:             # <<<<<<<<<<<<<<
 *         return np.PyArray_Copy(arr) if copy else arr
 *     else:
*/
  __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) == NPY_FLOAT64);
  if (__pyx_t_1) {

    /* "utils.pxd":5807
 *     # Assure dtype
 *     if np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_FLOAT64:
 *         return np.PyArray_Copy(arr) if copy else arr             # <<<<<<<<<<<<<<
 *     else:
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_FLOAT64)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    if (__pyx_v_copy) {
      __pyx_t_3 = PyArray_Copy(__pyx_v_arr); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 5807, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 5807, __pyx_L1_error)
      __pyx_t_2 = __pyx_t_3;
      __pyx_t_3 = 0;
    } else {
      __Pyx_INCREF((PyObject *)__pyx_v_arr);
      __pyx_t_2 = ((PyObject *)__pyx_v_arr);
    }
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":5806
 * 
 *     # Assure dtype
 *     if np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_FLOAT64:             # <<<<<<<<<<<<<<
 *         return np.PyArray_Copy(arr) if copy else arr
 *     else:
*/
  }

  /* "utils.pxd":5809
 *         return np.PyArray_Copy(arr) if copy else arr
 *     else:
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_FLOAT64)             # <<<<<<<<<<<<<<
 * 
 * # . create
*/
  /*else*/ {
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_2 = PyArray_Cast(__pyx_v_arr, NPY_FLOAT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5809, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 5809, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "utils.pxd":5786
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_INT64)
 * 
 * cdef inline np.ndarray arr_assure_float64(np.ndarray arr, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ensure that a 1-D array is contiguous and dtype float64 `<'ndarray[float64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_assure_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5812
 * 
 * # . create
 * cdef inline np.ndarray arr_zero_int64(np.npy_intp size):             # <<<<<<<<<<<<<<
 *     """Create a 1-D ndarray[int64] filled with zero `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_zero_int64(npy_intp __pyx_v_size) {
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  npy_intp __pyx_t_5[1];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_zero_int64", 0);

  /* "utils.pxd":5821
 *     >>> np.zeros(size, dtype="int64")
 *     """
 *     if size < 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("The size of a new array must be a positive integer.")
 *     else:
*/
  __pyx_t_1 = (__pyx_v_size < 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":5822
 *     """
 *     if size < 0:
 *         raise ValueError("The size of a new array must be a positive integer.")             # <<<<<<<<<<<<<<
 *     else:
 *         return np.PyArray_ZEROS(1, [size], np.NPY_TYPES.NPY_INT64, 0)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_The_size_of_a_new_array_must_be};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5822, __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_ERR(5, 5822, __pyx_L1_error)

    /* "utils.pxd":5821
 *     >>> np.zeros(size, dtype="int64")
 *     """
 *     if size < 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("The size of a new array must be a positive integer.")
 *     else:
*/
  }

  /* "utils.pxd":5824
 *         raise ValueError("The size of a new array must be a positive integer.")
 *     else:
 *         return np.PyArray_ZEROS(1, [size], np.NPY_TYPES.NPY_INT64, 0)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_fill_int64(np.npy_int64 value, np.npy_intp size):
*/
  /*else*/ {
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5[0] = __pyx_v_size;
    __pyx_t_2 = PyArray_ZEROS(1, __pyx_t_5, NPY_INT64, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5824, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 5824, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "utils.pxd":5812
 * 
 * # . create
 * cdef inline np.ndarray arr_zero_int64(np.npy_intp size):             # <<<<<<<<<<<<<<
 *     """Create a 1-D ndarray[int64] filled with zero `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_zero_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5826
 *         return np.PyArray_ZEROS(1, [size], np.NPY_TYPES.NPY_INT64, 0)
 * 
 * cdef inline np.ndarray arr_fill_int64(np.npy_int64 value, np.npy_intp size):             # <<<<<<<<<<<<<<
 *     """Create a 1-D ndarray[int64] filled with a specific integer `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_fill_int64(npy_int64 __pyx_v_value, npy_intp __pyx_v_size) {
  PyArrayObject *__pyx_v_arr = 0;
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  npy_intp __pyx_t_5[1];
  npy_intp __pyx_t_6;
  npy_intp __pyx_t_7;
  npy_intp __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_fill_int64", 0);

  /* "utils.pxd":5837
 *     """
 *     # Fast-path
 *     if value == 0:             # <<<<<<<<<<<<<<
 *         return arr_zero_int64(size)
 * 
*/
  __pyx_t_1 = (__pyx_v_value == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":5838
 *     # Fast-path
 *     if value == 0:
 *         return arr_zero_int64(size)             # <<<<<<<<<<<<<<
 * 
 *     # New array
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_zero_int64(__pyx_v_size)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5838, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":5837
 *     """
 *     # Fast-path
 *     if value == 0:             # <<<<<<<<<<<<<<
 *         return arr_zero_int64(size)
 * 
*/
  }

  /* "utils.pxd":5841
 * 
 *     # New array
 *     if size < 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("The size of a new array must be a positive integer.")
 *     cdef:
*/
  __pyx_t_1 = (__pyx_v_size < 1);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":5842
 *     # New array
 *     if size < 1:
 *         raise ValueError("The size of a new array must be a positive integer.")             # <<<<<<<<<<<<<<
 *     cdef:
 *         np.ndarray arr = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_INT64, 0)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_The_size_of_a_new_array_must_be};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5842, __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_ERR(5, 5842, __pyx_L1_error)

    /* "utils.pxd":5841
 * 
 *     # New array
 *     if size < 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("The size of a new array must be a positive integer.")
 *     cdef:
*/
  }

  /* "utils.pxd":5844
 *         raise ValueError("The size of a new array must be a positive integer.")
 *     cdef:
 *         np.ndarray arr = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_INT64, 0)             # <<<<<<<<<<<<<<
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp i
*/
  __pyx_t_5[0] = __pyx_v_size;
  __pyx_t_2 = PyArray_EMPTY(1, __pyx_t_5, NPY_INT64, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 5844, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":5845
 *     cdef:
 *         np.ndarray arr = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_INT64, 0)
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *     for i in range(size):
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":5847
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp i
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         arr_ptr[i] = value
 *     return arr
*/
  __pyx_t_6 = __pyx_v_size;
  __pyx_t_7 = __pyx_t_6;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "utils.pxd":5848
 *         np.npy_intp i
 *     for i in range(size):
 *         arr_ptr[i] = value             # <<<<<<<<<<<<<<
 *     return arr
 * 
*/
    (__pyx_v_arr_ptr[__pyx_v_i]) = __pyx_v_value;
  }

  /* "utils.pxd":5849
 *     for i in range(size):
 *         arr_ptr[i] = value
 *     return arr             # <<<<<<<<<<<<<<
 * 
 * # . range
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_arr);
  __pyx_r = __pyx_v_arr;
  goto __pyx_L0;

  /* "utils.pxd":5826
 *         return np.PyArray_ZEROS(1, [size], np.NPY_TYPES.NPY_INT64, 0)
 * 
 * cdef inline np.ndarray arr_fill_int64(np.npy_int64 value, np.npy_intp size):             # <<<<<<<<<<<<<<
 *     """Create a 1-D ndarray[int64] filled with a specific integer `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_fill_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5852
 * 
 * # . range
 * cdef inline np.ndarray arr_clamp(np.ndarray arr, np.npy_int64 minimum, np.npy_int64 maximum, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Clamp the values of a 1-D ndarray between 'minimum' and 'maximum' value `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_clamp(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_minimum, npy_int64 __pyx_v_maximum, struct __pyx_opt_args_7cytimes_5utils_arr_clamp *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_5;
  npy_intp __pyx_t_6;
  npy_intp __pyx_t_7;
  npy_intp __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_clamp", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":5873
 *     """
 *     # Validate
 *     if minimum > maximum:             # <<<<<<<<<<<<<<
 *         raise ValueError("minimum value cannot be greater than maximum value.")
 * 
*/
  __pyx_t_1 = (__pyx_v_minimum > __pyx_v_maximum);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":5874
 *     # Validate
 *     if minimum > maximum:
 *         raise ValueError("minimum value cannot be greater than maximum value.")             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_minimum_value_cannot_be_greater};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5874, __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_ERR(5, 5874, __pyx_L1_error)

    /* "utils.pxd":5873
 *     """
 *     # Validate
 *     if minimum > maximum:             # <<<<<<<<<<<<<<
 *         raise ValueError("minimum value cannot be greater than maximum value.")
 * 
*/
  }

  /* "utils.pxd":5878
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_5.__pyx_n = 1;
  __pyx_t_5.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":5879
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":5880
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":5885
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
  __pyx_t_1 = (__pyx_v_offset == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":5886
 *     # No offset
 *     if offset == 0:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             v = out_ptr[i]
 *             # Preserve NaT
*/
    __pyx_t_6 = __pyx_v_size;
    __pyx_t_7 = __pyx_t_6;
    for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
      __pyx_v_i = __pyx_t_8;

      /* "utils.pxd":5887
 *     if offset == 0:
 *         for i in range(size):
 *             v = out_ptr[i]             # <<<<<<<<<<<<<<
 *             # Preserve NaT
 *             if v == LLONG_MIN:
*/
      __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":5889
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Clamp value
*/
      __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":5890
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Clamp value
 *             if v > maximum:
*/
        goto __pyx_L5_continue;

        /* "utils.pxd":5889
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Clamp value
*/
      }

      /* "utils.pxd":5892
 *                 continue
 *             # Clamp value
 *             if v > maximum:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = maximum
 *             elif v < minimum:
*/
      __pyx_t_1 = (__pyx_v_v > __pyx_v_maximum);
      if (__pyx_t_1) {

        /* "utils.pxd":5893
 *             # Clamp value
 *             if v > maximum:
 *                 out_ptr[i] = maximum             # <<<<<<<<<<<<<<
 *             elif v < minimum:
 *                 out_ptr[i] = minimum
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_maximum;

        /* "utils.pxd":5892
 *                 continue
 *             # Clamp value
 *             if v > maximum:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = maximum
 *             elif v < minimum:
*/
        goto __pyx_L8;
      }

      /* "utils.pxd":5894
 *             if v > maximum:
 *                 out_ptr[i] = maximum
 *             elif v < minimum:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = minimum
 * 
*/
      __pyx_t_1 = (__pyx_v_v < __pyx_v_minimum);
      if (__pyx_t_1) {

        /* "utils.pxd":5895
 *                 out_ptr[i] = maximum
 *             elif v < minimum:
 *                 out_ptr[i] = minimum             # <<<<<<<<<<<<<<
 * 
 *     # With offset
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_minimum;

        /* "utils.pxd":5894
 *             if v > maximum:
 *                 out_ptr[i] = maximum
 *             elif v < minimum:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = minimum
 * 
*/
      }
      __pyx_L8:;
      __pyx_L5_continue:;
    }

    /* "utils.pxd":5885
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":5899
 *     # With offset
 *     else:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             v = out_ptr[i]
 *             # Preserve NaT
*/
  /*else*/ {
    __pyx_t_6 = __pyx_v_size;
    __pyx_t_7 = __pyx_t_6;
    for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
      __pyx_v_i = __pyx_t_8;

      /* "utils.pxd":5900
 *     else:
 *         for i in range(size):
 *             v = out_ptr[i]             # <<<<<<<<<<<<<<
 *             # Preserve NaT
 *             if v == LLONG_MIN:
*/
      __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":5902
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Clamp value
*/
      __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":5903
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Clamp value
 *             if v > maximum:
*/
        goto __pyx_L9_continue;

        /* "utils.pxd":5902
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Clamp value
*/
      }

      /* "utils.pxd":5905
 *                 continue
 *             # Clamp value
 *             if v > maximum:             # <<<<<<<<<<<<<<
 *                 v = maximum
 *             elif v < minimum:
*/
      __pyx_t_1 = (__pyx_v_v > __pyx_v_maximum);
      if (__pyx_t_1) {

        /* "utils.pxd":5906
 *             # Clamp value
 *             if v > maximum:
 *                 v = maximum             # <<<<<<<<<<<<<<
 *             elif v < minimum:
 *                 v = minimum
*/
        __pyx_v_v = __pyx_v_maximum;

        /* "utils.pxd":5905
 *                 continue
 *             # Clamp value
 *             if v > maximum:             # <<<<<<<<<<<<<<
 *                 v = maximum
 *             elif v < minimum:
*/
        goto __pyx_L12;
      }

      /* "utils.pxd":5907
 *             if v > maximum:
 *                 v = maximum
 *             elif v < minimum:             # <<<<<<<<<<<<<<
 *                 v = minimum
 *             out_ptr[i] = v + offset
*/
      __pyx_t_1 = (__pyx_v_v < __pyx_v_minimum);
      if (__pyx_t_1) {

        /* "utils.pxd":5908
 *                 v = maximum
 *             elif v < minimum:
 *                 v = minimum             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v + offset
 * 
*/
        __pyx_v_v = __pyx_v_minimum;

        /* "utils.pxd":5907
 *             if v > maximum:
 *                 v = maximum
 *             elif v < minimum:             # <<<<<<<<<<<<<<
 *                 v = minimum
 *             out_ptr[i] = v + offset
*/
      }
      __pyx_L12:;

      /* "utils.pxd":5909
 *             elif v < minimum:
 *                 v = minimum
 *             out_ptr[i] = v + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v + __pyx_v_offset);
      __pyx_L9_continue:;
    }
  }
  __pyx_L4:;

  /* "utils.pxd":5911
 *             out_ptr[i] = v + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_min(np.ndarray arr, np.npy_int64 value, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":5852
 * 
 * # . range
 * cdef inline np.ndarray arr_clamp(np.ndarray arr, np.npy_int64 minimum, np.npy_int64 maximum, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Clamp the values of a 1-D ndarray between 'minimum' and 'maximum' value `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_clamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5913
 *     return out
 * 
 * cdef inline np.ndarray arr_min(np.ndarray arr, np.npy_int64 value, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise minimum of a 1-D array with the scalar 'value' `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_min(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_arr_min *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_2;
  int __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_min", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":5934
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 5934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":5935
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":5936
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":5941
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
  __pyx_t_3 = (__pyx_v_offset == 0);
  if (__pyx_t_3) {

    /* "utils.pxd":5942
 *     # No offset
 *     if offset == 0:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             v = out_ptr[i]
 *             # Preserve NaT
*/
    __pyx_t_4 = __pyx_v_size;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "utils.pxd":5943
 *     if offset == 0:
 *         for i in range(size):
 *             v = out_ptr[i]             # <<<<<<<<<<<<<<
 *             # Preserve NaT
 *             if v == LLONG_MIN:
*/
      __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":5945
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Min value
*/
      __pyx_t_3 = (__pyx_v_v == LLONG_MIN);
      if (__pyx_t_3) {

        /* "utils.pxd":5946
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Min value
 *             if v > value:
*/
        goto __pyx_L4_continue;

        /* "utils.pxd":5945
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Min value
*/
      }

      /* "utils.pxd":5948
 *                 continue
 *             # Min value
 *             if v > value:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = value
 * 
*/
      __pyx_t_3 = (__pyx_v_v > __pyx_v_value);
      if (__pyx_t_3) {

        /* "utils.pxd":5949
 *             # Min value
 *             if v > value:
 *                 out_ptr[i] = value             # <<<<<<<<<<<<<<
 * 
 *     # With offset
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_value;

        /* "utils.pxd":5948
 *                 continue
 *             # Min value
 *             if v > value:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = value
 * 
*/
      }
      __pyx_L4_continue:;
    }

    /* "utils.pxd":5941
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":5953
 *     # With offset
 *     else:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             v = out_ptr[i]
 *             # Preserve NaT
*/
  /*else*/ {
    __pyx_t_4 = __pyx_v_size;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "utils.pxd":5954
 *     else:
 *         for i in range(size):
 *             v = out_ptr[i]             # <<<<<<<<<<<<<<
 *             # Preserve NaT
 *             if v == LLONG_MIN:
*/
      __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":5956
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Min value
*/
      __pyx_t_3 = (__pyx_v_v == LLONG_MIN);
      if (__pyx_t_3) {

        /* "utils.pxd":5957
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Min value
 *             if v > value:
*/
        goto __pyx_L8_continue;

        /* "utils.pxd":5956
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Min value
*/
      }

      /* "utils.pxd":5959
 *                 continue
 *             # Min value
 *             if v > value:             # <<<<<<<<<<<<<<
 *                 v = value
 *             out_ptr[i] = v + offset
*/
      __pyx_t_3 = (__pyx_v_v > __pyx_v_value);
      if (__pyx_t_3) {

        /* "utils.pxd":5960
 *             # Min value
 *             if v > value:
 *                 v = value             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v + offset
 * 
*/
        __pyx_v_v = __pyx_v_value;

        /* "utils.pxd":5959
 *                 continue
 *             # Min value
 *             if v > value:             # <<<<<<<<<<<<<<
 *                 v = value
 *             out_ptr[i] = v + offset
*/
      }

      /* "utils.pxd":5961
 *             if v > value:
 *                 v = value
 *             out_ptr[i] = v + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v + __pyx_v_offset);
      __pyx_L8_continue:;
    }
  }
  __pyx_L3:;

  /* "utils.pxd":5963
 *             out_ptr[i] = v + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_max(np.ndarray arr, np.npy_int64 value, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":5913
 *     return out
 * 
 * cdef inline np.ndarray arr_min(np.ndarray arr, np.npy_int64 value, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise minimum of a 1-D array with the scalar 'value' `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.arr_min", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5965
 *     return out
 * 
 * cdef inline np.ndarray arr_max(np.ndarray arr, np.npy_int64 value, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise maximum of a 1-D array with the scalar 'value' `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_max(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_arr_max *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_2;
  int __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_max", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":5986
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 5986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":5987
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":5988
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":5993
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
  __pyx_t_3 = (__pyx_v_offset == 0);
  if (__pyx_t_3) {

    /* "utils.pxd":5994
 *     # No offset
 *     if offset == 0:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             v = out_ptr[i]
 *             # Preserve NaT
*/
    __pyx_t_4 = __pyx_v_size;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "utils.pxd":5995
 *     if offset == 0:
 *         for i in range(size):
 *             v = out_ptr[i]             # <<<<<<<<<<<<<<
 *             # Preserve NaT
 *             if v == LLONG_MIN:
*/
      __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":5997
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Max value
*/
      __pyx_t_3 = (__pyx_v_v == LLONG_MIN);
      if (__pyx_t_3) {

        /* "utils.pxd":5998
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Max value
 *             if v < value:
*/
        goto __pyx_L4_continue;

        /* "utils.pxd":5997
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Max value
*/
      }

      /* "utils.pxd":6000
 *                 continue
 *             # Max value
 *             if v < value:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = value
 * 
*/
      __pyx_t_3 = (__pyx_v_v < __pyx_v_value);
      if (__pyx_t_3) {

        /* "utils.pxd":6001
 *             # Max value
 *             if v < value:
 *                 out_ptr[i] = value             # <<<<<<<<<<<<<<
 * 
 *     # With offset
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_value;

        /* "utils.pxd":6000
 *                 continue
 *             # Max value
 *             if v < value:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = value
 * 
*/
      }
      __pyx_L4_continue:;
    }

    /* "utils.pxd":5993
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":6005
 *     # With offset
 *     else:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             v = out_ptr[i]
 *             # Preserve NaT
*/
  /*else*/ {
    __pyx_t_4 = __pyx_v_size;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "utils.pxd":6006
 *     else:
 *         for i in range(size):
 *             v = out_ptr[i]             # <<<<<<<<<<<<<<
 *             # Preserve NaT
 *             if v == LLONG_MIN:
*/
      __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":6008
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Max value
*/
      __pyx_t_3 = (__pyx_v_v == LLONG_MIN);
      if (__pyx_t_3) {

        /* "utils.pxd":6009
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Max value
 *             if v < value:
*/
        goto __pyx_L8_continue;

        /* "utils.pxd":6008
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Max value
*/
      }

      /* "utils.pxd":6011
 *                 continue
 *             # Max value
 *             if v < value:             # <<<<<<<<<<<<<<
 *                 v = value
 *             out_ptr[i] = v + offset
*/
      __pyx_t_3 = (__pyx_v_v < __pyx_v_value);
      if (__pyx_t_3) {

        /* "utils.pxd":6012
 *             # Max value
 *             if v < value:
 *                 v = value             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v + offset
 * 
*/
        __pyx_v_v = __pyx_v_value;

        /* "utils.pxd":6011
 *                 continue
 *             # Max value
 *             if v < value:             # <<<<<<<<<<<<<<
 *                 v = value
 *             out_ptr[i] = v + offset
*/
      }

      /* "utils.pxd":6013
 *             if v < value:
 *                 v = value
 *             out_ptr[i] = v + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v + __pyx_v_offset);
      __pyx_L8_continue:;
    }
  }
  __pyx_L3:;

  /* "utils.pxd":6015
 *             out_ptr[i] = v + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_min_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":5965
 *     return out
 * 
 * cdef inline np.ndarray arr_max(np.ndarray arr, np.npy_int64 value, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise maximum of a 1-D array with the scalar 'value' `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.arr_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6017
 *     return out
 * 
 * cdef inline np.ndarray arr_min_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise minimum of two 1-D arrays <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_min_arr(PyArrayObject *__pyx_v_arr1, PyArrayObject *__pyx_v_arr2, struct __pyx_opt_args_7cytimes_5utils_arr_min_arr *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  npy_intp __pyx_v_size;
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_v_arr = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v1;
  npy_int64 __pyx_v_v2;
  PyArrayObject *__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[4];
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  npy_intp __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_min_arr", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6038
 *     """
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]             # <<<<<<<<<<<<<<
 *     if size != arr2.shape[0]:
 *         raise ValueError(
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr1)[0]);

  /* "utils.pxd":6039
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"
*/
  __pyx_t_1 = (__pyx_v_size != (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6040
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot compare ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
*/
    __pyx_t_3 = NULL;

    /* "utils.pxd":6043
 *             "Cannot compare ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_4 = __Pyx_PyUnicode_From_npy_intp(__pyx_v_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 6043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_From_npy_intp((__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]), 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 6043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_compare_ndarrays_with_dif;
    __pyx_t_6[1] = __pyx_t_4;
    __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_arr2_length;
    __pyx_t_6[3] = __pyx_t_5;

    /* "utils.pxd":6041
 *     if size != arr2.shape[0]:
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"             # <<<<<<<<<<<<<<
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])
*/
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, 65 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127);
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 6041, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6040, __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_ERR(5, 6040, __pyx_L1_error)

    /* "utils.pxd":6039
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"
*/
  }

  /* "utils.pxd":6048
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)             # <<<<<<<<<<<<<<
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr1, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6049
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr2, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6050
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6051
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v1, v2
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":6056
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             # Propagate NaT
*/
  __pyx_t_1 = (__pyx_v_offset == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":6057
 *     # No offset
 *     if offset == 0:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             # Propagate NaT
 *             v1 = out_ptr[i]
*/
    __pyx_t_10 = __pyx_v_size;
    __pyx_t_11 = __pyx_t_10;
    for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
      __pyx_v_i = __pyx_t_12;

      /* "utils.pxd":6059
 *         for i in range(size):
 *             # Propagate NaT
 *             v1 = out_ptr[i]             # <<<<<<<<<<<<<<
 *             if v1 == LLONG_MIN:
 *                 continue
*/
      __pyx_v_v1 = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":6060
 *             # Propagate NaT
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             v2 = arr_ptr[i]
*/
      __pyx_t_1 = (__pyx_v_v1 == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":6061
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:
*/
        goto __pyx_L5_continue;

        /* "utils.pxd":6060
 *             # Propagate NaT
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             v2 = arr_ptr[i]
*/
      }

      /* "utils.pxd":6062
 *             if v1 == LLONG_MIN:
 *                 continue
 *             v2 = arr_ptr[i]             # <<<<<<<<<<<<<<
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2
*/
      __pyx_v_v2 = (__pyx_v_arr_ptr[__pyx_v_i]);

      /* "utils.pxd":6063
 *                 continue
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 *                 continue
*/
      __pyx_t_1 = (__pyx_v_v2 == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":6064
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2             # <<<<<<<<<<<<<<
 *                 continue
 *             # Min value
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_v2;

        /* "utils.pxd":6065
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2
 *                 continue             # <<<<<<<<<<<<<<
 *             # Min value
 *             if v1 > v2:
*/
        goto __pyx_L5_continue;

        /* "utils.pxd":6063
 *                 continue
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 *                 continue
*/
      }

      /* "utils.pxd":6067
 *                 continue
 *             # Min value
 *             if v1 > v2:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 * 
*/
      __pyx_t_1 = (__pyx_v_v1 > __pyx_v_v2);
      if (__pyx_t_1) {

        /* "utils.pxd":6068
 *             # Min value
 *             if v1 > v2:
 *                 out_ptr[i] = v2             # <<<<<<<<<<<<<<
 * 
 *     # With offset
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_v2;

        /* "utils.pxd":6067
 *                 continue
 *             # Min value
 *             if v1 > v2:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 * 
*/
      }
      __pyx_L5_continue:;
    }

    /* "utils.pxd":6056
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             # Propagate NaT
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":6072
 *     # With offset
 *     else:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             # Propagate NaT
 *             v1 = out_ptr[i]
*/
  /*else*/ {
    __pyx_t_10 = __pyx_v_size;
    __pyx_t_11 = __pyx_t_10;
    for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
      __pyx_v_i = __pyx_t_12;

      /* "utils.pxd":6074
 *         for i in range(size):
 *             # Propagate NaT
 *             v1 = out_ptr[i]             # <<<<<<<<<<<<<<
 *             if v1 == LLONG_MIN:
 *                 continue
*/
      __pyx_v_v1 = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":6075
 *             # Propagate NaT
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             v2 = arr_ptr[i]
*/
      __pyx_t_1 = (__pyx_v_v1 == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":6076
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:
*/
        goto __pyx_L10_continue;

        /* "utils.pxd":6075
 *             # Propagate NaT
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             v2 = arr_ptr[i]
*/
      }

      /* "utils.pxd":6077
 *             if v1 == LLONG_MIN:
 *                 continue
 *             v2 = arr_ptr[i]             # <<<<<<<<<<<<<<
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2
*/
      __pyx_v_v2 = (__pyx_v_arr_ptr[__pyx_v_i]);

      /* "utils.pxd":6078
 *                 continue
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 *                 continue
*/
      __pyx_t_1 = (__pyx_v_v2 == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":6079
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2             # <<<<<<<<<<<<<<
 *                 continue
 *             # Min value
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_v2;

        /* "utils.pxd":6080
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2
 *                 continue             # <<<<<<<<<<<<<<
 *             # Min value
 *             if v1 > v2:
*/
        goto __pyx_L10_continue;

        /* "utils.pxd":6078
 *                 continue
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 *                 continue
*/
      }

      /* "utils.pxd":6082
 *                 continue
 *             # Min value
 *             if v1 > v2:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2 + offset
 *             else:
*/
      __pyx_t_1 = (__pyx_v_v1 > __pyx_v_v2);
      if (__pyx_t_1) {

        /* "utils.pxd":6083
 *             # Min value
 *             if v1 > v2:
 *                 out_ptr[i] = v2 + offset             # <<<<<<<<<<<<<<
 *             else:
 *                 out_ptr[i] = v1 + offset
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v2 + __pyx_v_offset);

        /* "utils.pxd":6082
 *                 continue
 *             # Min value
 *             if v1 > v2:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2 + offset
 *             else:
*/
        goto __pyx_L14;
      }

      /* "utils.pxd":6085
 *                 out_ptr[i] = v2 + offset
 *             else:
 *                 out_ptr[i] = v1 + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
      /*else*/ {
        (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v1 + __pyx_v_offset);
      }
      __pyx_L14:;
      __pyx_L10_continue:;
    }
  }
  __pyx_L4:;

  /* "utils.pxd":6087
 *                 out_ptr[i] = v1 + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_max_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6017
 *     return out
 * 
 * cdef inline np.ndarray arr_min_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise minimum of two 1-D arrays <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.utils.arr_min_arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6089
 *     return out
 * 
 * cdef inline np.ndarray arr_max_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise maximum of two 1-D arrays <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_max_arr(PyArrayObject *__pyx_v_arr1, PyArrayObject *__pyx_v_arr2, struct __pyx_opt_args_7cytimes_5utils_arr_max_arr *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  npy_intp __pyx_v_size;
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_v_arr = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v1;
  npy_int64 __pyx_v_v2;
  PyArrayObject *__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[4];
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  npy_intp __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_max_arr", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6109
 *     """
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]             # <<<<<<<<<<<<<<
 *     if size != arr2.shape[0]:
 *         raise ValueError(
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr1)[0]);

  /* "utils.pxd":6110
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"
*/
  __pyx_t_1 = (__pyx_v_size != (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6111
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot compare ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
*/
    __pyx_t_3 = NULL;

    /* "utils.pxd":6114
 *             "Cannot compare ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_4 = __Pyx_PyUnicode_From_npy_intp(__pyx_v_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 6114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_From_npy_intp((__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]), 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 6114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_compare_ndarrays_with_dif;
    __pyx_t_6[1] = __pyx_t_4;
    __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_arr2_length;
    __pyx_t_6[3] = __pyx_t_5;

    /* "utils.pxd":6112
 *     if size != arr2.shape[0]:
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"             # <<<<<<<<<<<<<<
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])
*/
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, 65 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127);
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 6112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6111, __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_ERR(5, 6111, __pyx_L1_error)

    /* "utils.pxd":6110
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"
*/
  }

  /* "utils.pxd":6119
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)             # <<<<<<<<<<<<<<
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr1, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6120
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr2, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6121
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6122
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v1, v2
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":6127
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             # Propagate NaT
*/
  __pyx_t_1 = (__pyx_v_offset == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":6128
 *     # No offset
 *     if offset == 0:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             # Propagate NaT
 *             v1 = out_ptr[i]
*/
    __pyx_t_10 = __pyx_v_size;
    __pyx_t_11 = __pyx_t_10;
    for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
      __pyx_v_i = __pyx_t_12;

      /* "utils.pxd":6130
 *         for i in range(size):
 *             # Propagate NaT
 *             v1 = out_ptr[i]             # <<<<<<<<<<<<<<
 *             if v1 == LLONG_MIN:
 *                 continue
*/
      __pyx_v_v1 = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":6131
 *             # Propagate NaT
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             v2 = arr_ptr[i]
*/
      __pyx_t_1 = (__pyx_v_v1 == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":6132
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:
*/
        goto __pyx_L5_continue;

        /* "utils.pxd":6131
 *             # Propagate NaT
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             v2 = arr_ptr[i]
*/
      }

      /* "utils.pxd":6133
 *             if v1 == LLONG_MIN:
 *                 continue
 *             v2 = arr_ptr[i]             # <<<<<<<<<<<<<<
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2
*/
      __pyx_v_v2 = (__pyx_v_arr_ptr[__pyx_v_i]);

      /* "utils.pxd":6134
 *                 continue
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 *                 continue
*/
      __pyx_t_1 = (__pyx_v_v2 == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":6135
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2             # <<<<<<<<<<<<<<
 *                 continue
 *             # Max value
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_v2;

        /* "utils.pxd":6136
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2
 *                 continue             # <<<<<<<<<<<<<<
 *             # Max value
 *             if v1 < v2:
*/
        goto __pyx_L5_continue;

        /* "utils.pxd":6134
 *                 continue
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 *                 continue
*/
      }

      /* "utils.pxd":6138
 *                 continue
 *             # Max value
 *             if v1 < v2:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 * 
*/
      __pyx_t_1 = (__pyx_v_v1 < __pyx_v_v2);
      if (__pyx_t_1) {

        /* "utils.pxd":6139
 *             # Max value
 *             if v1 < v2:
 *                 out_ptr[i] = v2             # <<<<<<<<<<<<<<
 * 
 *     # With offset
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_v2;

        /* "utils.pxd":6138
 *                 continue
 *             # Max value
 *             if v1 < v2:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 * 
*/
      }
      __pyx_L5_continue:;
    }

    /* "utils.pxd":6127
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             # Propagate NaT
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":6143
 *     # With offset
 *     else:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             # Propagate NaT
 *             v1 = out_ptr[i]
*/
  /*else*/ {
    __pyx_t_10 = __pyx_v_size;
    __pyx_t_11 = __pyx_t_10;
    for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
      __pyx_v_i = __pyx_t_12;

      /* "utils.pxd":6145
 *         for i in range(size):
 *             # Propagate NaT
 *             v1 = out_ptr[i]             # <<<<<<<<<<<<<<
 *             if v1 == LLONG_MIN:
 *                 continue
*/
      __pyx_v_v1 = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":6146
 *             # Propagate NaT
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             v2 = arr_ptr[i]
*/
      __pyx_t_1 = (__pyx_v_v1 == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":6147
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:
*/
        goto __pyx_L10_continue;

        /* "utils.pxd":6146
 *             # Propagate NaT
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             v2 = arr_ptr[i]
*/
      }

      /* "utils.pxd":6148
 *             if v1 == LLONG_MIN:
 *                 continue
 *             v2 = arr_ptr[i]             # <<<<<<<<<<<<<<
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2
*/
      __pyx_v_v2 = (__pyx_v_arr_ptr[__pyx_v_i]);

      /* "utils.pxd":6149
 *                 continue
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 *                 continue
*/
      __pyx_t_1 = (__pyx_v_v2 == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":6150
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2             # <<<<<<<<<<<<<<
 *                 continue
 *             # Max value
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_v2;

        /* "utils.pxd":6151
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2
 *                 continue             # <<<<<<<<<<<<<<
 *             # Max value
 *             if v1 < v2:
*/
        goto __pyx_L10_continue;

        /* "utils.pxd":6149
 *                 continue
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 *                 continue
*/
      }

      /* "utils.pxd":6153
 *                 continue
 *             # Max value
 *             if v1 < v2:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2 + offset
 *             else:
*/
      __pyx_t_1 = (__pyx_v_v1 < __pyx_v_v2);
      if (__pyx_t_1) {

        /* "utils.pxd":6154
 *             # Max value
 *             if v1 < v2:
 *                 out_ptr[i] = v2 + offset             # <<<<<<<<<<<<<<
 *             else:
 *                 out_ptr[i] = v1 + offset
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v2 + __pyx_v_offset);

        /* "utils.pxd":6153
 *                 continue
 *             # Max value
 *             if v1 < v2:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2 + offset
 *             else:
*/
        goto __pyx_L14;
      }

      /* "utils.pxd":6156
 *                 out_ptr[i] = v2 + offset
 *             else:
 *                 out_ptr[i] = v1 + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
      /*else*/ {
        (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v1 + __pyx_v_offset);
      }
      __pyx_L14:;
      __pyx_L10_continue:;
    }
  }
  __pyx_L4:;

  /* "utils.pxd":6158
 *                 out_ptr[i] = v1 + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * # . arithmetic
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6089
 *     return out
 * 
 * cdef inline np.ndarray arr_max_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise maximum of two 1-D arrays <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.utils.arr_max_arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6161
 * 
 * # . arithmetic
 * cdef inline np.ndarray arr_abs(np.ndarray arr, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise absolute of a 1-D array `<'ndarray[int64]'`>
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_abs(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_arr_abs *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_2;
  int __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_abs", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6181
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 6181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":6182
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6183
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6188
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
  __pyx_t_3 = (__pyx_v_offset == 0);
  if (__pyx_t_3) {

    /* "utils.pxd":6189
 *     # No offset
 *     if offset == 0:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             v = out_ptr[i]
 *             # Preserve NaT
*/
    __pyx_t_4 = __pyx_v_size;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "utils.pxd":6190
 *     if offset == 0:
 *         for i in range(size):
 *             v = out_ptr[i]             # <<<<<<<<<<<<<<
 *             # Preserve NaT
 *             if v == LLONG_MIN:
*/
      __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":6192
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Abs value
*/
      __pyx_t_3 = (__pyx_v_v == LLONG_MIN);
      if (__pyx_t_3) {

        /* "utils.pxd":6193
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Abs value
 *             if v < 0:
*/
        goto __pyx_L4_continue;

        /* "utils.pxd":6192
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Abs value
*/
      }

      /* "utils.pxd":6195
 *                 continue
 *             # Abs value
 *             if v < 0:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = -v
 * 
*/
      __pyx_t_3 = (__pyx_v_v < 0);
      if (__pyx_t_3) {

        /* "utils.pxd":6196
 *             # Abs value
 *             if v < 0:
 *                 out_ptr[i] = -v             # <<<<<<<<<<<<<<
 * 
 *     # With offset
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = (-__pyx_v_v);

        /* "utils.pxd":6195
 *                 continue
 *             # Abs value
 *             if v < 0:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = -v
 * 
*/
      }
      __pyx_L4_continue:;
    }

    /* "utils.pxd":6188
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":6200
 *     # With offset
 *     else:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             v = out_ptr[i]
 *             # Preserve NaT
*/
  /*else*/ {
    __pyx_t_4 = __pyx_v_size;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "utils.pxd":6201
 *     else:
 *         for i in range(size):
 *             v = out_ptr[i]             # <<<<<<<<<<<<<<
 *             # Preserve NaT
 *             if v == LLONG_MIN:
*/
      __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":6203
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Abs value
*/
      __pyx_t_3 = (__pyx_v_v == LLONG_MIN);
      if (__pyx_t_3) {

        /* "utils.pxd":6204
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Abs value
 *             if v < 0:
*/
        goto __pyx_L8_continue;

        /* "utils.pxd":6203
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Abs value
*/
      }

      /* "utils.pxd":6206
 *                 continue
 *             # Abs value
 *             if v < 0:             # <<<<<<<<<<<<<<
 *                 v = -v
 *             out_ptr[i] = v + offset
*/
      __pyx_t_3 = (__pyx_v_v < 0);
      if (__pyx_t_3) {

        /* "utils.pxd":6207
 *             # Abs value
 *             if v < 0:
 *                 v = -v             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v + offset
 * 
*/
        __pyx_v_v = (-__pyx_v_v);

        /* "utils.pxd":6206
 *                 continue
 *             # Abs value
 *             if v < 0:             # <<<<<<<<<<<<<<
 *                 v = -v
 *             out_ptr[i] = v + offset
*/
      }

      /* "utils.pxd":6208
 *             if v < 0:
 *                 v = -v
 *             out_ptr[i] = v + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v + __pyx_v_offset);
      __pyx_L8_continue:;
    }
  }
  __pyx_L3:;

  /* "utils.pxd":6210
 *             out_ptr[i] = v + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_neg(np.ndarray arr, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6161
 * 
 * # . arithmetic
 * cdef inline np.ndarray arr_abs(np.ndarray arr, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise absolute of a 1-D array `<'ndarray[int64]'`>
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.arr_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6212
 *     return out
 * 
 * cdef inline np.ndarray arr_neg(np.ndarray arr, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Negate the values of a 1-D array `<'ndarray[int64]'>`
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_neg(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_arr_neg *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_neg", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6232
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 6232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":6233
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6234
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6239
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":6240
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6242
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Negate value
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":6243
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Negate value
 *         out_ptr[i] = -v + offset
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":6242
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Negate value
*/
    }

    /* "utils.pxd":6245
 *             continue
 *         # Negate value
 *         out_ptr[i] = -v + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((-__pyx_v_v) + __pyx_v_offset);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":6247
 *         out_ptr[i] = -v + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_add(np.ndarray arr, np.npy_int64 value, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6212
 *     return out
 * 
 * cdef inline np.ndarray arr_neg(np.ndarray arr, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Negate the values of a 1-D array `<'ndarray[int64]'>`
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.arr_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6249
 *     return out
 * 
 * cdef inline np.ndarray arr_add(np.ndarray arr, np.npy_int64 value, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Add a 'value' to the 1-D array `<'np.ndarray'>`
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_add(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_arr_add *__pyx_optional_args) {
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_2;
  int __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_add", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_copy = __pyx_optional_args->copy;
    }
  }

  /* "utils.pxd":6268
 *     """
 *     # Fast-path
 *     cdef np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *     if value == 0:
 *         return out
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 6268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":6269
 *     # Fast-path
 *     cdef np.ndarray out = arr_assure_int64_like(arr, copy)
 *     if value == 0:             # <<<<<<<<<<<<<<
 *         return out
 * 
*/
  __pyx_t_3 = (__pyx_v_value == 0);
  if (__pyx_t_3) {

    /* "utils.pxd":6270
 *     cdef np.ndarray out = arr_assure_int64_like(arr, copy)
 *     if value == 0:
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_out);
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "utils.pxd":6269
 *     # Fast-path
 *     cdef np.ndarray out = arr_assure_int64_like(arr, copy)
 *     if value == 0:             # <<<<<<<<<<<<<<
 *         return out
 * 
*/
  }

  /* "utils.pxd":6274
 *     # Setup
 *     cdef:
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6275
 *     cdef:
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6280
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_4 = __pyx_v_size;
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "utils.pxd":6281
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6283
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Add value
*/
    __pyx_t_3 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_3) {

      /* "utils.pxd":6284
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Add value
 *         out_ptr[i] = v + value
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":6283
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Add value
*/
    }

    /* "utils.pxd":6286
 *             continue
 *         # Add value
 *         out_ptr[i] = v + value             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v + __pyx_v_value);
    __pyx_L4_continue:;
  }

  /* "utils.pxd":6288
 *         out_ptr[i] = v + value
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6249
 *     return out
 * 
 * cdef inline np.ndarray arr_add(np.ndarray arr, np.npy_int64 value, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Add a 'value' to the 1-D array `<'np.ndarray'>`
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.arr_add", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6290
 *     return out
 * 
 * cdef inline np.ndarray arr_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Multiply the values of a 1-D array by the 'factor' `<'np.ndarray'>`
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_mul(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, struct __pyx_opt_args_7cytimes_5utils_arr_mul *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  npy_intp __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_mul", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6310
 *     """
 *     # Fast-path
 *     if factor == 1:             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6311
 *     # Fast-path
 *     if factor == 1:
 *         return arr_add(arr, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 1;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6310
 *     """
 *     # Fast-path
 *     if factor == 1:             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6315
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6316
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6317
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6322
 * 
 *     # Zero factor
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":6323
 *     # Zero factor
 *     if factor == 0:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             v = out_ptr[i]
 *             # Preserve NaT
*/
    __pyx_t_5 = __pyx_v_size;
    __pyx_t_6 = __pyx_t_5;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "utils.pxd":6324
 *     if factor == 0:
 *         for i in range(size):
 *             v = out_ptr[i]             # <<<<<<<<<<<<<<
 *             # Preserve NaT
 *             if v == LLONG_MIN:
*/
      __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":6326
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Set to offset
*/
      __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":6327
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Set to offset
 *             out_ptr[i] = offset
*/
        goto __pyx_L5_continue;

        /* "utils.pxd":6326
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Set to offset
*/
      }

      /* "utils.pxd":6329
 *                 continue
 *             # Set to offset
 *             out_ptr[i] = offset             # <<<<<<<<<<<<<<
 * 
 *     # Compute
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_offset;
      __pyx_L5_continue:;
    }

    /* "utils.pxd":6322
 * 
 *     # Zero factor
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
  }

  /* "utils.pxd":6332
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_5 = __pyx_v_size;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "utils.pxd":6333
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6335
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Multiply value
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6336
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Multiply value
 *         out_ptr[i] = v * factor + offset
*/
      goto __pyx_L8_continue;

      /* "utils.pxd":6335
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Multiply value
*/
    }

    /* "utils.pxd":6338
 *             continue
 *         # Multiply value
 *         out_ptr[i] = v * factor + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((__pyx_v_v * __pyx_v_factor) + __pyx_v_offset);
    __pyx_L8_continue:;
  }

  /* "utils.pxd":6340
 *         out_ptr[i] = v * factor + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_mod(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6290
 *     return out
 * 
 * cdef inline np.ndarray arr_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Multiply the values of a 1-D array by the 'factor' `<'np.ndarray'>`
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.arr_mul", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6342
 *     return out
 * 
 * cdef inline np.ndarray arr_mod(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise modulo of a 1-D array by `factor` with Python semantics
 *     (remainder has the same sign as the divisor) `<'np.ndarray'>`.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_mod(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, struct __pyx_opt_args_7cytimes_5utils_arr_mod *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  int __pyx_v_neg_f;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_5;
  npy_intp __pyx_t_6;
  npy_intp __pyx_t_7;
  npy_intp __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_mod", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6363
 *     """
 *     # Validate
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_mod: division by zero.")
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6364
 *     # Validate
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_mod: division by zero.")             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_arr_mod_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6364, __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_ERR(5, 6364, __pyx_L1_error)

    /* "utils.pxd":6363
 *     """
 *     # Validate
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_mod: division by zero.")
 * 
*/
  }

  /* "utils.pxd":6368
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_5.__pyx_n = 1;
  __pyx_t_5.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6369
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6370
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6373
 *         np.npy_intp i
 *         np.npy_int64 v
 *         bint neg_f = factor < 0             # <<<<<<<<<<<<<<
 * 
 *     # Fast path: factor == 1
*/
  __pyx_v_neg_f = (__pyx_v_factor < 0);

  /* "utils.pxd":6376
 * 
 *     # Fast path: factor == 1
 *     if factor == 1 or factor == -1:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
  switch (__pyx_v_factor) {
    case 1:
    case -1LL:

    /* "utils.pxd":6377
 *     # Fast path: factor == 1
 *     if factor == 1 or factor == -1:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             v = out_ptr[i]
 *             # Preserve NaT
*/
    __pyx_t_6 = __pyx_v_size;
    __pyx_t_7 = __pyx_t_6;
    for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
      __pyx_v_i = __pyx_t_8;

      /* "utils.pxd":6378
 *     if factor == 1 or factor == -1:
 *         for i in range(size):
 *             v = out_ptr[i]             # <<<<<<<<<<<<<<
 *             # Preserve NaT
 *             if v == LLONG_MIN:
*/
      __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":6380
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Set to offset
*/
      __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":6381
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Set to offset
 *             out_ptr[i] = offset
*/
        goto __pyx_L4_continue;

        /* "utils.pxd":6380
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Set to offset
*/
      }

      /* "utils.pxd":6383
 *                 continue
 *             # Set to offset
 *             out_ptr[i] = offset             # <<<<<<<<<<<<<<
 *         return out
 * 
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_offset;
      __pyx_L4_continue:;
    }

    /* "utils.pxd":6384
 *             # Set to offset
 *             out_ptr[i] = offset
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     # Compute
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_out);
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "utils.pxd":6376
 * 
 *     # Fast path: factor == 1
 *     if factor == 1 or factor == -1:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
    break;
    default: break;
  }

  /* "utils.pxd":6387
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_6 = __pyx_v_size;
  __pyx_t_7 = __pyx_t_6;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "utils.pxd":6388
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6390
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Modulo value
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6391
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Modulo value
 *         with cython.cdivision(True):
*/
      goto __pyx_L7_continue;

      /* "utils.pxd":6390
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Modulo value
*/
    }

    /* "utils.pxd":6394
 *         # Modulo value
 *         with cython.cdivision(True):
 *             v = v % factor             # <<<<<<<<<<<<<<
 *         if v != 0 and ((v < 0) != neg_f):
 *             v += factor
*/
    __pyx_v_v = (__pyx_v_v % __pyx_v_factor);

    /* "utils.pxd":6395
 *         with cython.cdivision(True):
 *             v = v % factor
 *         if v != 0 and ((v < 0) != neg_f):             # <<<<<<<<<<<<<<
 *             v += factor
 *         out_ptr[i] = v + offset
*/
    __pyx_t_9 = (__pyx_v_v != 0);
    if (__pyx_t_9) {
    } else {
      __pyx_t_1 = __pyx_t_9;
      goto __pyx_L11_bool_binop_done;
    }
    __pyx_t_9 = ((__pyx_v_v < 0) != __pyx_v_neg_f);
    __pyx_t_1 = __pyx_t_9;
    __pyx_L11_bool_binop_done:;
    if (__pyx_t_1) {

      /* "utils.pxd":6396
 *             v = v % factor
 *         if v != 0 and ((v < 0) != neg_f):
 *             v += factor             # <<<<<<<<<<<<<<
 *         out_ptr[i] = v + offset
 * 
*/
      __pyx_v_v = (__pyx_v_v + __pyx_v_factor);

      /* "utils.pxd":6395
 *         with cython.cdivision(True):
 *             v = v % factor
 *         if v != 0 and ((v < 0) != neg_f):             # <<<<<<<<<<<<<<
 *             v += factor
 *         out_ptr[i] = v + offset
*/
    }

    /* "utils.pxd":6397
 *         if v != 0 and ((v < 0) != neg_f):
 *             v += factor
 *         out_ptr[i] = v + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v + __pyx_v_offset);
    __pyx_L7_continue:;
  }

  /* "utils.pxd":6399
 *         out_ptr[i] = v + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_even(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6342
 *     return out
 * 
 * cdef inline np.ndarray arr_mod(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise modulo of a 1-D array by `factor` with Python semantics
 *     (remainder has the same sign as the divisor) `<'np.ndarray'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_mod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6401
 *     return out
 * 
 * cdef inline np.ndarray arr_div_even(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-to-even) <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_even(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, struct __pyx_opt_args_7cytimes_5utils_arr_div_even *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_v_abs_f;
  npy_int64 __pyx_v_abs_r;
  npy_int64 __pyx_v_half;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_neg __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_int64 __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_even", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6421
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_even: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6422
 *     # Validate / Fast-path
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_even: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_arr_div_even_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6422, __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_ERR(5, 6422, __pyx_L1_error)

    /* "utils.pxd":6421
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_even: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  }

  /* "utils.pxd":6423
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_even: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6424
 *         raise ZeroDivisionError("arr_div_even: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6423
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_even: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  }

  /* "utils.pxd":6425
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":6426
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_neg(__pyx_v_arr, &__pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6425
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6430
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6431
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6432
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r, abs_f, abs_r, half
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6437
 * 
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor             # <<<<<<<<<<<<<<
 *     for i in range(size):
 *         v = out_ptr[i]
*/
  __pyx_t_1 = (__pyx_v_factor < 0);
  if (__pyx_t_1) {
    __pyx_t_8 = (-__pyx_v_factor);
  } else {
    __pyx_t_8 = __pyx_v_factor;
  }
  __pyx_v_abs_f = __pyx_t_8;

  /* "utils.pxd":6438
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_9 = __pyx_v_size;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "utils.pxd":6439
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6441
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6442
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":6441
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "utils.pxd":6445
 *         # Divide value
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor             # <<<<<<<<<<<<<<
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);
    __pyx_v_r = (__pyx_v_v % __pyx_v_factor);

    /* "utils.pxd":6446
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    __pyx_t_1 = (__pyx_v_r != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":6447
 *             q = v / factor; r = v % factor
 *         if r != 0:
 *             abs_r = -r if r < 0 else r             # <<<<<<<<<<<<<<
 *             half  = abs_f - abs_r
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {
        __pyx_t_8 = (-__pyx_v_r);
      } else {
        __pyx_t_8 = __pyx_v_r;
      }
      __pyx_v_abs_r = __pyx_t_8;

      /* "utils.pxd":6448
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r             # <<<<<<<<<<<<<<
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):
 *                 q += 1 if ((v ^ factor) >= 0) else -1
*/
      __pyx_v_half = (__pyx_v_abs_f - __pyx_v_abs_r);

      /* "utils.pxd":6449
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q + offset
*/
      __pyx_t_12 = (__pyx_v_abs_r > __pyx_v_half);
      if (!__pyx_t_12) {
      } else {
        __pyx_t_1 = __pyx_t_12;
        goto __pyx_L11_bool_binop_done;
      }
      __pyx_t_12 = (__pyx_v_abs_r == __pyx_v_half);
      if (__pyx_t_12) {
      } else {
        __pyx_t_1 = __pyx_t_12;
        goto __pyx_L11_bool_binop_done;
      }
      __pyx_t_12 = ((__pyx_v_q & 1) != 0);
      __pyx_t_1 = __pyx_t_12;
      __pyx_L11_bool_binop_done:;
      if (__pyx_t_1) {

        /* "utils.pxd":6450
 *             half  = abs_f - abs_r
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):
 *                 q += 1 if ((v ^ factor) >= 0) else -1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q + offset
 * 
*/
        __pyx_t_1 = ((__pyx_v_v ^ __pyx_v_factor) >= 0);
        if (__pyx_t_1) {
          __pyx_t_8 = 1;
        } else {
          __pyx_t_8 = -1LL;
        }
        __pyx_v_q = (__pyx_v_q + __pyx_t_8);

        /* "utils.pxd":6449
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q + offset
*/
      }

      /* "utils.pxd":6446
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    }

    /* "utils.pxd":6451
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_q + __pyx_v_offset);
    __pyx_L6_continue:;
  }

  /* "utils.pxd":6453
 *         out_ptr[i] = q + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_even_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6401
 *     return out
 * 
 * cdef inline np.ndarray arr_div_even(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-to-even) <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_div_even", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6455
 *     return out
 * 
 * cdef inline np.ndarray arr_div_even_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-to-even),
 *     then scale by `multiple` <'ndarray[int64]'>.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_even_mul(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, npy_int64 __pyx_v_multiple, struct __pyx_opt_args_7cytimes_5utils_arr_div_even_mul *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_v_abs_f;
  npy_int64 __pyx_v_abs_r;
  npy_int64 __pyx_v_half;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_even __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_int64 __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_even_mul", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6477
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  __pyx_t_1 = (__pyx_v_multiple == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":6478
 *     # Validate / Fast-path
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)             # <<<<<<<<<<<<<<
 *     if multiple == 1:
 *         return arr_div_even(arr, factor, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6478, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6477
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  }

  /* "utils.pxd":6479
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_even(arr, factor, offset, copy)
 *     if factor == 0:
*/
  __pyx_t_1 = (__pyx_v_multiple == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6480
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
 *         return arr_div_even(arr, factor, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_even_mul: division by zero.")
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even(__pyx_v_arr, __pyx_v_factor, &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6479
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_even(arr, factor, offset, copy)
 *     if factor == 0:
*/
  }

  /* "utils.pxd":6481
 *     if multiple == 1:
 *         return arr_div_even(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_even_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6482
 *         return arr_div_even(arr, factor, offset, copy)
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_even_mul: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_arr_div_even_mul_division_by_zer};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6482, __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_ERR(5, 6482, __pyx_L1_error)

    /* "utils.pxd":6481
 *     if multiple == 1:
 *         return arr_div_even(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_even_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  }

  /* "utils.pxd":6483
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_even_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6484
 *         raise ZeroDivisionError("arr_div_even_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_multiple, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6483
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_even_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  }

  /* "utils.pxd":6485
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":6486
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, (-__pyx_v_multiple), &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6485
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6490
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6491
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6492
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r, abs_f, abs_r, half
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6497
 * 
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor             # <<<<<<<<<<<<<<
 *     for i in range(size):
 *         v = out_ptr[i]
*/
  __pyx_t_1 = (__pyx_v_factor < 0);
  if (__pyx_t_1) {
    __pyx_t_8 = (-__pyx_v_factor);
  } else {
    __pyx_t_8 = __pyx_v_factor;
  }
  __pyx_v_abs_f = __pyx_t_8;

  /* "utils.pxd":6498
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_9 = __pyx_v_size;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "utils.pxd":6499
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6501
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide & Multiply
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6502
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide & Multiply
 *         with cython.cdivision(True):
*/
      goto __pyx_L8_continue;

      /* "utils.pxd":6501
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide & Multiply
*/
    }

    /* "utils.pxd":6505
 *         # Divide & Multiply
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor             # <<<<<<<<<<<<<<
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);
    __pyx_v_r = (__pyx_v_v % __pyx_v_factor);

    /* "utils.pxd":6506
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    __pyx_t_1 = (__pyx_v_r != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":6507
 *             q = v / factor; r = v % factor
 *         if r != 0:
 *             abs_r = -r if r < 0 else r             # <<<<<<<<<<<<<<
 *             half  = abs_f - abs_r
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {
        __pyx_t_8 = (-__pyx_v_r);
      } else {
        __pyx_t_8 = __pyx_v_r;
      }
      __pyx_v_abs_r = __pyx_t_8;

      /* "utils.pxd":6508
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r             # <<<<<<<<<<<<<<
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):
 *                 q += 1 if ((v ^ factor) >= 0) else -1
*/
      __pyx_v_half = (__pyx_v_abs_f - __pyx_v_abs_r);

      /* "utils.pxd":6509
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q * multiple + offset
*/
      __pyx_t_12 = (__pyx_v_abs_r > __pyx_v_half);
      if (!__pyx_t_12) {
      } else {
        __pyx_t_1 = __pyx_t_12;
        goto __pyx_L13_bool_binop_done;
      }
      __pyx_t_12 = (__pyx_v_abs_r == __pyx_v_half);
      if (__pyx_t_12) {
      } else {
        __pyx_t_1 = __pyx_t_12;
        goto __pyx_L13_bool_binop_done;
      }
      __pyx_t_12 = ((__pyx_v_q & 1) != 0);
      __pyx_t_1 = __pyx_t_12;
      __pyx_L13_bool_binop_done:;
      if (__pyx_t_1) {

        /* "utils.pxd":6510
 *             half  = abs_f - abs_r
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):
 *                 q += 1 if ((v ^ factor) >= 0) else -1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q * multiple + offset
 * 
*/
        __pyx_t_1 = ((__pyx_v_v ^ __pyx_v_factor) >= 0);
        if (__pyx_t_1) {
          __pyx_t_8 = 1;
        } else {
          __pyx_t_8 = -1LL;
        }
        __pyx_v_q = (__pyx_v_q + __pyx_t_8);

        /* "utils.pxd":6509
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q * multiple + offset
*/
      }

      /* "utils.pxd":6506
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    }

    /* "utils.pxd":6511
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q * multiple + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((__pyx_v_q * __pyx_v_multiple) + __pyx_v_offset);
    __pyx_L8_continue:;
  }

  /* "utils.pxd":6513
 *         out_ptr[i] = q * multiple + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_up(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6455
 *     return out
 * 
 * cdef inline np.ndarray arr_div_even_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-to-even),
 *     then scale by `multiple` <'ndarray[int64]'>.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils.arr_div_even_mul", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6515
 *     return out
 * 
 * cdef inline np.ndarray arr_div_up(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-up / away-from-zero) <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_up(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, struct __pyx_opt_args_7cytimes_5utils_arr_div_up *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_v_abs_f;
  npy_int64 __pyx_v_abs_r;
  npy_int64 __pyx_v_half;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_neg __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_int64 __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_up", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6532
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_up: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6533
 *     # Validate / Fast-path
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_up: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_arr_div_up_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6533, __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_ERR(5, 6533, __pyx_L1_error)

    /* "utils.pxd":6532
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_up: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  }

  /* "utils.pxd":6534
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_up: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6535
 *         raise ZeroDivisionError("arr_div_up: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6535, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6534
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_up: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  }

  /* "utils.pxd":6536
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":6537
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_neg(__pyx_v_arr, &__pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6536
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6541
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6542
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6543
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r, abs_f, abs_r, half
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6548
 * 
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor             # <<<<<<<<<<<<<<
 *     for i in range(size):
 *         v = out_ptr[i]
*/
  __pyx_t_1 = (__pyx_v_factor < 0);
  if (__pyx_t_1) {
    __pyx_t_8 = (-__pyx_v_factor);
  } else {
    __pyx_t_8 = __pyx_v_factor;
  }
  __pyx_v_abs_f = __pyx_t_8;

  /* "utils.pxd":6549
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_9 = __pyx_v_size;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "utils.pxd":6550
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6552
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6553
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":6552
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "utils.pxd":6556
 *         # Divide value
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor             # <<<<<<<<<<<<<<
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);
    __pyx_v_r = (__pyx_v_v % __pyx_v_factor);

    /* "utils.pxd":6557
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    __pyx_t_1 = (__pyx_v_r != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":6558
 *             q = v / factor; r = v % factor
 *         if r != 0:
 *             abs_r = -r if r < 0 else r             # <<<<<<<<<<<<<<
 *             half  = abs_f - abs_r
 *             if abs_r >= half:
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {
        __pyx_t_8 = (-__pyx_v_r);
      } else {
        __pyx_t_8 = __pyx_v_r;
      }
      __pyx_v_abs_r = __pyx_t_8;

      /* "utils.pxd":6559
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r             # <<<<<<<<<<<<<<
 *             if abs_r >= half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1
*/
      __pyx_v_half = (__pyx_v_abs_f - __pyx_v_abs_r);

      /* "utils.pxd":6560
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r >= half:             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q + offset
*/
      __pyx_t_1 = (__pyx_v_abs_r >= __pyx_v_half);
      if (__pyx_t_1) {

        /* "utils.pxd":6561
 *             half  = abs_f - abs_r
 *             if abs_r >= half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q + offset
 * 
*/
        __pyx_t_1 = ((__pyx_v_v ^ __pyx_v_factor) >= 0);
        if (__pyx_t_1) {
          __pyx_t_8 = 1;
        } else {
          __pyx_t_8 = -1LL;
        }
        __pyx_v_q = (__pyx_v_q + __pyx_t_8);

        /* "utils.pxd":6560
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r >= half:             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q + offset
*/
      }

      /* "utils.pxd":6557
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    }

    /* "utils.pxd":6562
 *             if abs_r >= half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_q + __pyx_v_offset);
    __pyx_L6_continue:;
  }

  /* "utils.pxd":6564
 *         out_ptr[i] = q + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_up_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6515
 *     return out
 * 
 * cdef inline np.ndarray arr_div_up(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-up / away-from-zero) <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_div_up", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6566
 *     return out
 * 
 * cdef inline np.ndarray arr_div_up_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to nearest away from
 *     zero (half-up), then scale by 'multiple' <'ndarray[int64]'>.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_up_mul(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, npy_int64 __pyx_v_multiple, struct __pyx_opt_args_7cytimes_5utils_arr_div_up_mul *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_v_abs_f;
  npy_int64 __pyx_v_abs_r;
  npy_int64 __pyx_v_half;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_up __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_int64 __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_up_mul", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6585
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  __pyx_t_1 = (__pyx_v_multiple == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":6586
 *     # Validate / Fast-path
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)             # <<<<<<<<<<<<<<
 *     if multiple == 1:
 *         return arr_div_up(arr, factor, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6585
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  }

  /* "utils.pxd":6587
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_up(arr, factor, offset, copy)
 *     if factor == 0:
*/
  __pyx_t_1 = (__pyx_v_multiple == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6588
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
 *         return arr_div_up(arr, factor, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_up_mul: division by zero.")
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_up(__pyx_v_arr, __pyx_v_factor, &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6587
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_up(arr, factor, offset, copy)
 *     if factor == 0:
*/
  }

  /* "utils.pxd":6589
 *     if multiple == 1:
 *         return arr_div_up(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_up_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6590
 *         return arr_div_up(arr, factor, offset, copy)
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_up_mul: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_arr_div_up_mul_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6590, __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_ERR(5, 6590, __pyx_L1_error)

    /* "utils.pxd":6589
 *     if multiple == 1:
 *         return arr_div_up(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_up_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  }

  /* "utils.pxd":6591
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_up_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6592
 *         raise ZeroDivisionError("arr_div_up_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_multiple, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6592, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6591
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_up_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  }

  /* "utils.pxd":6593
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":6594
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, (-__pyx_v_multiple), &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6593
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6598
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6599
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6600
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r, abs_f, abs_r, half
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6605
 * 
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor             # <<<<<<<<<<<<<<
 *     for i in range(size):
 *         v = out_ptr[i]
*/
  __pyx_t_1 = (__pyx_v_factor < 0);
  if (__pyx_t_1) {
    __pyx_t_8 = (-__pyx_v_factor);
  } else {
    __pyx_t_8 = __pyx_v_factor;
  }
  __pyx_v_abs_f = __pyx_t_8;

  /* "utils.pxd":6606
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_9 = __pyx_v_size;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "utils.pxd":6607
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6609
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide & Multiply
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6610
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide & Multiply
 *         with cython.cdivision(True):
*/
      goto __pyx_L8_continue;

      /* "utils.pxd":6609
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide & Multiply
*/
    }

    /* "utils.pxd":6613
 *         # Divide & Multiply
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor             # <<<<<<<<<<<<<<
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);
    __pyx_v_r = (__pyx_v_v % __pyx_v_factor);

    /* "utils.pxd":6614
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    __pyx_t_1 = (__pyx_v_r != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":6615
 *             q = v / factor; r = v % factor
 *         if r != 0:
 *             abs_r = -r if r < 0 else r             # <<<<<<<<<<<<<<
 *             half  = abs_f - abs_r
 *             if abs_r >= half:
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {
        __pyx_t_8 = (-__pyx_v_r);
      } else {
        __pyx_t_8 = __pyx_v_r;
      }
      __pyx_v_abs_r = __pyx_t_8;

      /* "utils.pxd":6616
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r             # <<<<<<<<<<<<<<
 *             if abs_r >= half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1
*/
      __pyx_v_half = (__pyx_v_abs_f - __pyx_v_abs_r);

      /* "utils.pxd":6617
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r >= half:             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q * multiple + offset
*/
      __pyx_t_1 = (__pyx_v_abs_r >= __pyx_v_half);
      if (__pyx_t_1) {

        /* "utils.pxd":6618
 *             half  = abs_f - abs_r
 *             if abs_r >= half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q * multiple + offset
 * 
*/
        __pyx_t_1 = ((__pyx_v_v ^ __pyx_v_factor) >= 0);
        if (__pyx_t_1) {
          __pyx_t_8 = 1;
        } else {
          __pyx_t_8 = -1LL;
        }
        __pyx_v_q = (__pyx_v_q + __pyx_t_8);

        /* "utils.pxd":6617
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r >= half:             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q * multiple + offset
*/
      }

      /* "utils.pxd":6614
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    }

    /* "utils.pxd":6619
 *             if abs_r >= half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q * multiple + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((__pyx_v_q * __pyx_v_multiple) + __pyx_v_offset);
    __pyx_L8_continue:;
  }

  /* "utils.pxd":6621
 *         out_ptr[i] = q * multiple + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_down(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6566
 *     return out
 * 
 * cdef inline np.ndarray arr_div_up_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to nearest away from
 *     zero (half-up), then scale by 'multiple' <'ndarray[int64]'>.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils.arr_div_up_mul", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6623
 *     return out
 * 
 * cdef inline np.ndarray arr_div_down(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest
 *     integers (half-down / toward-zero) <'ndarray[int64]'>.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_down(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, struct __pyx_opt_args_7cytimes_5utils_arr_div_down *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_v_abs_f;
  npy_int64 __pyx_v_abs_r;
  npy_int64 __pyx_v_half;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_neg __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_int64 __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_down", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6641
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_down: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6642
 *     # Validate / Fast-path
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_down: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_arr_div_down_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6642, __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_ERR(5, 6642, __pyx_L1_error)

    /* "utils.pxd":6641
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_down: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  }

  /* "utils.pxd":6643
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_down: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6644
 *         raise ZeroDivisionError("arr_div_down: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6643
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_down: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  }

  /* "utils.pxd":6645
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":6646
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_neg(__pyx_v_arr, &__pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6646, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6645
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6650
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6651
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6652
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r, abs_f, abs_r, half
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6657
 * 
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor             # <<<<<<<<<<<<<<
 *     for i in range(size):
 *         v = out_ptr[i]
*/
  __pyx_t_1 = (__pyx_v_factor < 0);
  if (__pyx_t_1) {
    __pyx_t_8 = (-__pyx_v_factor);
  } else {
    __pyx_t_8 = __pyx_v_factor;
  }
  __pyx_v_abs_f = __pyx_t_8;

  /* "utils.pxd":6658
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_9 = __pyx_v_size;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "utils.pxd":6659
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6661
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6662
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":6661
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "utils.pxd":6665
 *         # Divide value
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor             # <<<<<<<<<<<<<<
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);
    __pyx_v_r = (__pyx_v_v % __pyx_v_factor);

    /* "utils.pxd":6666
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    __pyx_t_1 = (__pyx_v_r != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":6667
 *             q = v / factor; r = v % factor
 *         if r != 0:
 *             abs_r = -r if r < 0 else r             # <<<<<<<<<<<<<<
 *             half  = abs_f - abs_r
 *             if abs_r > half:
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {
        __pyx_t_8 = (-__pyx_v_r);
      } else {
        __pyx_t_8 = __pyx_v_r;
      }
      __pyx_v_abs_r = __pyx_t_8;

      /* "utils.pxd":6668
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r             # <<<<<<<<<<<<<<
 *             if abs_r > half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1
*/
      __pyx_v_half = (__pyx_v_abs_f - __pyx_v_abs_r);

      /* "utils.pxd":6669
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r > half:             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q + offset
*/
      __pyx_t_1 = (__pyx_v_abs_r > __pyx_v_half);
      if (__pyx_t_1) {

        /* "utils.pxd":6670
 *             half  = abs_f - abs_r
 *             if abs_r > half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q + offset
 * 
*/
        __pyx_t_1 = ((__pyx_v_v ^ __pyx_v_factor) >= 0);
        if (__pyx_t_1) {
          __pyx_t_8 = 1;
        } else {
          __pyx_t_8 = -1LL;
        }
        __pyx_v_q = (__pyx_v_q + __pyx_t_8);

        /* "utils.pxd":6669
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r > half:             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q + offset
*/
      }

      /* "utils.pxd":6666
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    }

    /* "utils.pxd":6671
 *             if abs_r > half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_q + __pyx_v_offset);
    __pyx_L6_continue:;
  }

  /* "utils.pxd":6673
 *         out_ptr[i] = q + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_down_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6623
 *     return out
 * 
 * cdef inline np.ndarray arr_div_down(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest
 *     integers (half-down / toward-zero) <'ndarray[int64]'>.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_div_down", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6675
 *     return out
 * 
 * cdef inline np.ndarray arr_div_down_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-down),
 *     then scale by `multiple` <'ndarray[int64]'>.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_down_mul(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, npy_int64 __pyx_v_multiple, struct __pyx_opt_args_7cytimes_5utils_arr_div_down_mul *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_v_abs_f;
  npy_int64 __pyx_v_abs_r;
  npy_int64 __pyx_v_half;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_down __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_int64 __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_down_mul", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6694
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  __pyx_t_1 = (__pyx_v_multiple == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":6695
 *     # Validate / Fast-path
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)             # <<<<<<<<<<<<<<
 *     if multiple == 1:
 *         return arr_div_down(arr, factor, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6694
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  }

  /* "utils.pxd":6696
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_down(arr, factor, offset, copy)
 *     if factor == 0:
*/
  __pyx_t_1 = (__pyx_v_multiple == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6697
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
 *         return arr_div_down(arr, factor, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_down_mul: division by zero.")
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_down(__pyx_v_arr, __pyx_v_factor, &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6696
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_down(arr, factor, offset, copy)
 *     if factor == 0:
*/
  }

  /* "utils.pxd":6698
 *     if multiple == 1:
 *         return arr_div_down(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_down_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6699
 *         return arr_div_down(arr, factor, offset, copy)
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_down_mul: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_arr_div_down_mul_division_by_zer};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6699, __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_ERR(5, 6699, __pyx_L1_error)

    /* "utils.pxd":6698
 *     if multiple == 1:
 *         return arr_div_down(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_down_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  }

  /* "utils.pxd":6700
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_down_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6701
 *         raise ZeroDivisionError("arr_div_down_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_multiple, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6700
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_down_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  }

  /* "utils.pxd":6702
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":6703
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, (-__pyx_v_multiple), &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6702
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6707
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6708
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6709
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r, abs_f, abs_r, half
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6714
 * 
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor             # <<<<<<<<<<<<<<
 *     for i in range(size):
 *         v = out_ptr[i]
*/
  __pyx_t_1 = (__pyx_v_factor < 0);
  if (__pyx_t_1) {
    __pyx_t_8 = (-__pyx_v_factor);
  } else {
    __pyx_t_8 = __pyx_v_factor;
  }
  __pyx_v_abs_f = __pyx_t_8;

  /* "utils.pxd":6715
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_9 = __pyx_v_size;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "utils.pxd":6716
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6718
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide & Multiply
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6719
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide & Multiply
 *         with cython.cdivision(True):
*/
      goto __pyx_L8_continue;

      /* "utils.pxd":6718
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide & Multiply
*/
    }

    /* "utils.pxd":6722
 *         # Divide & Multiply
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor             # <<<<<<<<<<<<<<
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);
    __pyx_v_r = (__pyx_v_v % __pyx_v_factor);

    /* "utils.pxd":6723
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    __pyx_t_1 = (__pyx_v_r != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":6724
 *             q = v / factor; r = v % factor
 *         if r != 0:
 *             abs_r = -r if r < 0 else r             # <<<<<<<<<<<<<<
 *             half  = abs_f - abs_r
 *             if abs_r > half:
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {
        __pyx_t_8 = (-__pyx_v_r);
      } else {
        __pyx_t_8 = __pyx_v_r;
      }
      __pyx_v_abs_r = __pyx_t_8;

      /* "utils.pxd":6725
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r             # <<<<<<<<<<<<<<
 *             if abs_r > half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1
*/
      __pyx_v_half = (__pyx_v_abs_f - __pyx_v_abs_r);

      /* "utils.pxd":6726
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r > half:             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q * multiple + offset
*/
      __pyx_t_1 = (__pyx_v_abs_r > __pyx_v_half);
      if (__pyx_t_1) {

        /* "utils.pxd":6727
 *             half  = abs_f - abs_r
 *             if abs_r > half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q * multiple + offset
 * 
*/
        __pyx_t_1 = ((__pyx_v_v ^ __pyx_v_factor) >= 0);
        if (__pyx_t_1) {
          __pyx_t_8 = 1;
        } else {
          __pyx_t_8 = -1LL;
        }
        __pyx_v_q = (__pyx_v_q + __pyx_t_8);

        /* "utils.pxd":6726
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r > half:             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q * multiple + offset
*/
      }

      /* "utils.pxd":6723
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    }

    /* "utils.pxd":6728
 *             if abs_r > half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q * multiple + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((__pyx_v_q * __pyx_v_multiple) + __pyx_v_offset);
    __pyx_L8_continue:;
  }

  /* "utils.pxd":6730
 *         out_ptr[i] = q * multiple + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_ceil(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6675
 *     return out
 * 
 * cdef inline np.ndarray arr_div_down_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-down),
 *     then scale by `multiple` <'ndarray[int64]'>.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils.arr_div_down_mul", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6732
 *     return out
 * 
 * cdef inline np.ndarray arr_div_ceil(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and ceils up to the nearest integers `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_ceil(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, struct __pyx_opt_args_7cytimes_5utils_arr_div_ceil *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_neg __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_intp __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_ceil", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6752
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_ceil: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6753
 *     # Validate / Fast-path
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_ceil: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_arr_div_ceil_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6753, __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_ERR(5, 6753, __pyx_L1_error)

    /* "utils.pxd":6752
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_ceil: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  }

  /* "utils.pxd":6754
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_ceil: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6755
 *         raise ZeroDivisionError("arr_div_ceil: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6754
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_ceil: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  }

  /* "utils.pxd":6756
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":6757
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_neg(__pyx_v_arr, &__pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6756
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6761
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6762
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6763
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6768
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_8 = __pyx_v_size;
  __pyx_t_9 = __pyx_t_8;
  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
    __pyx_v_i = __pyx_t_10;

    /* "utils.pxd":6769
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6771
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6772
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":6771
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "utils.pxd":6775
 *         # Divide value
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor             # <<<<<<<<<<<<<<
 *         if r != 0 and ((v ^ factor) >= 0):
 *             q += 1
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);
    __pyx_v_r = (__pyx_v_v % __pyx_v_factor);

    /* "utils.pxd":6776
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) >= 0):             # <<<<<<<<<<<<<<
 *             q += 1
 *         out_ptr[i] = q + offset
*/
    __pyx_t_11 = (__pyx_v_r != 0);
    if (__pyx_t_11) {
    } else {
      __pyx_t_1 = __pyx_t_11;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_11 = ((__pyx_v_v ^ __pyx_v_factor) >= 0);
    __pyx_t_1 = __pyx_t_11;
    __pyx_L10_bool_binop_done:;
    if (__pyx_t_1) {

      /* "utils.pxd":6777
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) >= 0):
 *             q += 1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q + offset
 * 
*/
      __pyx_v_q = (__pyx_v_q + 1);

      /* "utils.pxd":6776
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) >= 0):             # <<<<<<<<<<<<<<
 *             q += 1
 *         out_ptr[i] = q + offset
*/
    }

    /* "utils.pxd":6778
 *         if r != 0 and ((v ^ factor) >= 0):
 *             q += 1
 *         out_ptr[i] = q + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_q + __pyx_v_offset);
    __pyx_L6_continue:;
  }

  /* "utils.pxd":6780
 *         out_ptr[i] = q + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_ceil_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6732
 *     return out
 * 
 * cdef inline np.ndarray arr_div_ceil(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and ceils up to the nearest integers `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_div_ceil", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6782
 *     return out
 * 
 * cdef inline np.ndarray arr_div_ceil_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and ceils up to the nearest integers,
 *     then scale by `multiple` <'ndarray[int64]'>.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_ceil_mul(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, npy_int64 __pyx_v_multiple, struct __pyx_opt_args_7cytimes_5utils_arr_div_ceil_mul *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_ceil __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_intp __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_ceil_mul", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6804
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  __pyx_t_1 = (__pyx_v_multiple == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":6805
 *     # Validate / Fast-path
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)             # <<<<<<<<<<<<<<
 *     if multiple == 1:
 *         return arr_div_ceil(arr, factor, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6804
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  }

  /* "utils.pxd":6806
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_ceil(arr, factor, offset, copy)
 *     if factor == 0:
*/
  __pyx_t_1 = (__pyx_v_multiple == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6807
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
 *         return arr_div_ceil(arr, factor, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_ceil_mul: division by zero.")
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil(__pyx_v_arr, __pyx_v_factor, &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6807, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6806
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_ceil(arr, factor, offset, copy)
 *     if factor == 0:
*/
  }

  /* "utils.pxd":6808
 *     if multiple == 1:
 *         return arr_div_ceil(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_ceil_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6809
 *         return arr_div_ceil(arr, factor, offset, copy)
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_ceil_mul: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_arr_div_ceil_mul_division_by_zer};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6809, __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_ERR(5, 6809, __pyx_L1_error)

    /* "utils.pxd":6808
 *     if multiple == 1:
 *         return arr_div_ceil(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_ceil_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  }

  /* "utils.pxd":6810
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_ceil_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6811
 *         raise ZeroDivisionError("arr_div_ceil_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_multiple, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6810
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_ceil_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  }

  /* "utils.pxd":6812
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":6813
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, (-__pyx_v_multiple), &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6812
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6817
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6818
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6819
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6824
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_8 = __pyx_v_size;
  __pyx_t_9 = __pyx_t_8;
  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
    __pyx_v_i = __pyx_t_10;

    /* "utils.pxd":6825
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6827
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6828
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L8_continue;

      /* "utils.pxd":6827
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "utils.pxd":6831
 *         # Divide value
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor             # <<<<<<<<<<<<<<
 *         if r != 0 and ((v ^ factor) >= 0):
 *             q += 1
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);
    __pyx_v_r = (__pyx_v_v % __pyx_v_factor);

    /* "utils.pxd":6832
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) >= 0):             # <<<<<<<<<<<<<<
 *             q += 1
 *         out_ptr[i] = q * multiple + offset
*/
    __pyx_t_11 = (__pyx_v_r != 0);
    if (__pyx_t_11) {
    } else {
      __pyx_t_1 = __pyx_t_11;
      goto __pyx_L12_bool_binop_done;
    }
    __pyx_t_11 = ((__pyx_v_v ^ __pyx_v_factor) >= 0);
    __pyx_t_1 = __pyx_t_11;
    __pyx_L12_bool_binop_done:;
    if (__pyx_t_1) {

      /* "utils.pxd":6833
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) >= 0):
 *             q += 1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q * multiple + offset
 * 
*/
      __pyx_v_q = (__pyx_v_q + 1);

      /* "utils.pxd":6832
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) >= 0):             # <<<<<<<<<<<<<<
 *             q += 1
 *         out_ptr[i] = q * multiple + offset
*/
    }

    /* "utils.pxd":6834
 *         if r != 0 and ((v ^ factor) >= 0):
 *             q += 1
 *         out_ptr[i] = q * multiple + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((__pyx_v_q * __pyx_v_multiple) + __pyx_v_offset);
    __pyx_L8_continue:;
  }

  /* "utils.pxd":6836
 *         out_ptr[i] = q * multiple + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_floor(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6782
 *     return out
 * 
 * cdef inline np.ndarray arr_div_ceil_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and ceils up to the nearest integers,
 *     then scale by `multiple` <'ndarray[int64]'>.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils.arr_div_ceil_mul", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6838
 *     return out
 * 
 * cdef inline np.ndarray arr_div_floor(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and floors down to the nearest integers `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_floor(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, struct __pyx_opt_args_7cytimes_5utils_arr_div_floor *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_neg __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_intp __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_floor", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6858
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_floor: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6859
 *     # Validate / Fast-path
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_floor: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_arr_div_floor_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6859, __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_ERR(5, 6859, __pyx_L1_error)

    /* "utils.pxd":6858
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_floor: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  }

  /* "utils.pxd":6860
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_floor: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6861
 *         raise ZeroDivisionError("arr_div_floor: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6861, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6860
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_floor: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  }

  /* "utils.pxd":6862
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":6863
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_neg(__pyx_v_arr, &__pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6862
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6867
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6868
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6869
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6874
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_8 = __pyx_v_size;
  __pyx_t_9 = __pyx_t_8;
  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
    __pyx_v_i = __pyx_t_10;

    /* "utils.pxd":6875
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6877
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6878
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":6877
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "utils.pxd":6881
 *         # Divide value
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor             # <<<<<<<<<<<<<<
 *         if r != 0 and ((v ^ factor) < 0):
 *             q -= 1
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);
    __pyx_v_r = (__pyx_v_v % __pyx_v_factor);

    /* "utils.pxd":6882
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) < 0):             # <<<<<<<<<<<<<<
 *             q -= 1
 *         out_ptr[i] = q + offset
*/
    __pyx_t_11 = (__pyx_v_r != 0);
    if (__pyx_t_11) {
    } else {
      __pyx_t_1 = __pyx_t_11;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_11 = ((__pyx_v_v ^ __pyx_v_factor) < 0);
    __pyx_t_1 = __pyx_t_11;
    __pyx_L10_bool_binop_done:;
    if (__pyx_t_1) {

      /* "utils.pxd":6883
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) < 0):
 *             q -= 1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q + offset
 * 
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":6882
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) < 0):             # <<<<<<<<<<<<<<
 *             q -= 1
 *         out_ptr[i] = q + offset
*/
    }

    /* "utils.pxd":6884
 *         if r != 0 and ((v ^ factor) < 0):
 *             q -= 1
 *         out_ptr[i] = q + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_q + __pyx_v_offset);
    __pyx_L6_continue:;
  }

  /* "utils.pxd":6886
 *         out_ptr[i] = q + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_floor_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6838
 *     return out
 * 
 * cdef inline np.ndarray arr_div_floor(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and floors down to the nearest integers `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_div_floor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6888
 *     return out
 * 
 * cdef inline np.ndarray arr_div_floor_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and floors down to the nearest integers,
 *     then scale by `multiple` <'ndarray[int64]'>.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_floor_mul(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, npy_int64 __pyx_v_multiple, struct __pyx_opt_args_7cytimes_5utils_arr_div_floor_mul *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_intp __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_floor_mul", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6910
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  __pyx_t_1 = (__pyx_v_multiple == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":6911
 *     # Validate / Fast-path
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)             # <<<<<<<<<<<<<<
 *     if multiple == 1:
 *         return arr_div_floor(arr, factor, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6911, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6910
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  }

  /* "utils.pxd":6912
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, factor, offset, copy)
 *     if factor == 0:
*/
  __pyx_t_1 = (__pyx_v_multiple == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6913
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
 *         return arr_div_floor(arr, factor, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_floor_mul: division by zero.")
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_factor, &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6913, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6912
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, factor, offset, copy)
 *     if factor == 0:
*/
  }

  /* "utils.pxd":6914
 *     if multiple == 1:
 *         return arr_div_floor(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_floor_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6915
 *         return arr_div_floor(arr, factor, offset, copy)
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_floor_mul: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_arr_div_floor_mul_division_by_ze};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6915, __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_ERR(5, 6915, __pyx_L1_error)

    /* "utils.pxd":6914
 *     if multiple == 1:
 *         return arr_div_floor(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_floor_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  }

  /* "utils.pxd":6916
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_floor_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6917
 *         raise ZeroDivisionError("arr_div_floor_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_multiple, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6916
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_floor_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  }

  /* "utils.pxd":6918
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":6919
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, (-__pyx_v_multiple), &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6918
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6923
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6924
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6925
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6930
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_8 = __pyx_v_size;
  __pyx_t_9 = __pyx_t_8;
  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
    __pyx_v_i = __pyx_t_10;

    /* "utils.pxd":6931
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6933
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6934
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L8_continue;

      /* "utils.pxd":6933
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "utils.pxd":6937
 *         # Divide value
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor             # <<<<<<<<<<<<<<
 *         if r != 0 and ((v ^ factor) < 0):
 *             q -= 1
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);
    __pyx_v_r = (__pyx_v_v % __pyx_v_factor);

    /* "utils.pxd":6938
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) < 0):             # <<<<<<<<<<<<<<
 *             q -= 1
 *         out_ptr[i] = q * multiple + offset
*/
    __pyx_t_11 = (__pyx_v_r != 0);
    if (__pyx_t_11) {
    } else {
      __pyx_t_1 = __pyx_t_11;
      goto __pyx_L12_bool_binop_done;
    }
    __pyx_t_11 = ((__pyx_v_v ^ __pyx_v_factor) < 0);
    __pyx_t_1 = __pyx_t_11;
    __pyx_L12_bool_binop_done:;
    if (__pyx_t_1) {

      /* "utils.pxd":6939
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) < 0):
 *             q -= 1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q * multiple + offset
 * 
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":6938
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) < 0):             # <<<<<<<<<<<<<<
 *             q -= 1
 *         out_ptr[i] = q * multiple + offset
*/
    }

    /* "utils.pxd":6940
 *         if r != 0 and ((v ^ factor) < 0):
 *             q -= 1
 *         out_ptr[i] = q * multiple + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((__pyx_v_q * __pyx_v_multiple) + __pyx_v_offset);
    __pyx_L8_continue:;
  }

  /* "utils.pxd":6942
 *         out_ptr[i] = q * multiple + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_trunc(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6888
 *     return out
 * 
 * cdef inline np.ndarray arr_div_floor_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and floors down to the nearest integers,
 *     then scale by `multiple` <'ndarray[int64]'>.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils.arr_div_floor_mul", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6944
 *     return out
 * 
 * cdef inline np.ndarray arr_div_trunc(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and and truncate toward zero `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_trunc(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, struct __pyx_opt_args_7cytimes_5utils_arr_div_trunc *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_neg __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_intp __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_trunc", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6961
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_trunc: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6962
 *     # Validate / Fast-path
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_trunc: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_arr_div_trunc_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6962, __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_ERR(5, 6962, __pyx_L1_error)

    /* "utils.pxd":6961
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_trunc: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  }

  /* "utils.pxd":6963
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_trunc: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6964
 *         raise ZeroDivisionError("arr_div_trunc: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6963
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_trunc: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  }

  /* "utils.pxd":6965
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":6966
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_neg(__pyx_v_arr, &__pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6965
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6970
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6971
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6972
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6977
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_8 = __pyx_v_size;
  __pyx_t_9 = __pyx_t_8;
  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
    __pyx_v_i = __pyx_t_10;

    /* "utils.pxd":6978
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6980
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6981
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":6980
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "utils.pxd":6984
 *         # Divide value
 *         with cython.cdivision(True):
 *             q = v / factor             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q + offset
 * 
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);

    /* "utils.pxd":6985
 *         with cython.cdivision(True):
 *             q = v / factor
 *         out_ptr[i] = q + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_q + __pyx_v_offset);
    __pyx_L6_continue:;
  }

  /* "utils.pxd":6987
 *         out_ptr[i] = q + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_trunc_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6944
 *     return out
 * 
 * cdef inline np.ndarray arr_div_trunc(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and and truncate toward zero `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_div_trunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6989
 *     return out
 * 
 * cdef inline np.ndarray arr_div_trunc_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and truncate toward zero,
 *     then scale by `multiple` <'ndarray[int64]'>.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_trunc_mul(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, npy_int64 __pyx_v_multiple, struct __pyx_opt_args_7cytimes_5utils_arr_div_trunc_mul *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_trunc __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_intp __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_trunc_mul", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":7008
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  __pyx_t_1 = (__pyx_v_multiple == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":7009
 *     # Validate / Fast-path
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)             # <<<<<<<<<<<<<<
 *     if multiple == 1:
 *         return arr_div_trunc(arr, factor, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":7008
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  }

  /* "utils.pxd":7010
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_trunc(arr, factor, offset, copy)
 *     if factor == 0:
*/
  __pyx_t_1 = (__pyx_v_multiple == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":7011
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
 *         return arr_div_trunc(arr, factor, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_trunc_mul: division by zero.")
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_trunc(__pyx_v_arr, __pyx_v_factor, &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7011, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":7010
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_trunc(arr, factor, offset, copy)
 *     if factor == 0:
*/
  }

  /* "utils.pxd":7012
 *     if multiple == 1:
 *         return arr_div_trunc(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_trunc_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":7013
 *         return arr_div_trunc(arr, factor, offset, copy)
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_trunc_mul: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_arr_div_trunc_mul_division_by_ze};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7013, __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_ERR(5, 7013, __pyx_L1_error)

    /* "utils.pxd":7012
 *     if multiple == 1:
 *         return arr_div_trunc(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_trunc_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  }

  /* "utils.pxd":7014
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_trunc_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":7015
 *         raise ZeroDivisionError("arr_div_trunc_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_multiple, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":7014
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_trunc_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  }

  /* "utils.pxd":7016
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":7017
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, (-__pyx_v_multiple), &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7017, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":7016
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  }

  /* "utils.pxd":7021
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":7022
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7023
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":7028
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_8 = __pyx_v_size;
  __pyx_t_9 = __pyx_t_8;
  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
    __pyx_v_i = __pyx_t_10;

    /* "utils.pxd":7029
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":7031
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7032
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L8_continue;

      /* "utils.pxd":7031
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "utils.pxd":7035
 *         # Divide value
 *         with cython.cdivision(True):
 *             q = v / factor             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q * multiple + offset
 * 
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);

    /* "utils.pxd":7036
 *         with cython.cdivision(True):
 *             q = v / factor
 *         out_ptr[i] = q * multiple + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((__pyx_v_q * __pyx_v_multiple) + __pyx_v_offset);
    __pyx_L8_continue:;
  }

  /* "utils.pxd":7038
 *         out_ptr[i] = q * multiple + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_add_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6989
 *     return out
 * 
 * cdef inline np.ndarray arr_div_trunc_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and truncate toward zero,
 *     then scale by `multiple` <'ndarray[int64]'>.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils.arr_div_trunc_mul", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7040
 *     return out
 * 
 * cdef inline np.ndarray arr_add_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise addition of two 1-D arrays <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_add_arr(PyArrayObject *__pyx_v_arr1, PyArrayObject *__pyx_v_arr2, struct __pyx_opt_args_7cytimes_5utils_arr_add_arr *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  npy_intp __pyx_v_size;
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_v_arr = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v1;
  npy_int64 __pyx_v_v2;
  PyArrayObject *__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[4];
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  npy_intp __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_add_arr", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":7061
 *     """
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]             # <<<<<<<<<<<<<<
 *     if size != arr2.shape[0]:
 *         raise ValueError(
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr1)[0]);

  /* "utils.pxd":7062
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot perform addition on ndarrays with different lengths.\n"
*/
  __pyx_t_1 = (__pyx_v_size != (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":7063
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot perform addition on ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
*/
    __pyx_t_3 = NULL;

    /* "utils.pxd":7066
 *             "Cannot perform addition on ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_4 = __Pyx_PyUnicode_From_npy_intp(__pyx_v_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 7066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_From_npy_intp((__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]), 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 7066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_perform_addition_on_ndarr;
    __pyx_t_6[1] = __pyx_t_4;
    __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_arr2_length;
    __pyx_t_6[3] = __pyx_t_5;

    /* "utils.pxd":7064
 *     if size != arr2.shape[0]:
 *         raise ValueError(
 *             "Cannot perform addition on ndarrays with different lengths.\n"             # <<<<<<<<<<<<<<
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])
*/
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, 77 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127);
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 7064, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7063, __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_ERR(5, 7063, __pyx_L1_error)

    /* "utils.pxd":7062
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot perform addition on ndarrays with different lengths.\n"
*/
  }

  /* "utils.pxd":7071
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)             # <<<<<<<<<<<<<<
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr1, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":7072
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr2, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":7073
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7074
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v1, v2
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":7079
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         v1 = out_ptr[i]
*/
  __pyx_t_10 = __pyx_v_size;
  __pyx_t_11 = __pyx_t_10;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "utils.pxd":7081
 *     for i in range(size):
 *         # Propagate NaT
 *         v1 = out_ptr[i]             # <<<<<<<<<<<<<<
 *         if v1 == LLONG_MIN:
 *             continue
*/
    __pyx_v_v1 = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":7082
 *         # Propagate NaT
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         v2 = arr_ptr[i]
*/
    __pyx_t_1 = (__pyx_v_v1 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7083
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7082
 *         # Propagate NaT
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         v2 = arr_ptr[i]
*/
    }

    /* "utils.pxd":7084
 *         if v1 == LLONG_MIN:
 *             continue
 *         v2 = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = v2
*/
    __pyx_v_v2 = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":7085
 *             continue
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v2
 *             continue
*/
    __pyx_t_1 = (__pyx_v_v2 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7086
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = v2             # <<<<<<<<<<<<<<
 *             continue
 *         # Add values
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_v2;

      /* "utils.pxd":7087
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = v2
 *             continue             # <<<<<<<<<<<<<<
 *         # Add values
 *         out_ptr[i] = v1 + v2 + offset
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7085
 *             continue
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v2
 *             continue
*/
    }

    /* "utils.pxd":7089
 *             continue
 *         # Add values
 *         out_ptr[i] = v1 + v2 + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((__pyx_v_v1 + __pyx_v_v2) + __pyx_v_offset);
    __pyx_L4_continue:;
  }

  /* "utils.pxd":7091
 *         out_ptr[i] = v1 + v2 + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_sub_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7040
 *     return out
 * 
 * cdef inline np.ndarray arr_add_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise addition of two 1-D arrays <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.utils.arr_add_arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7093
 *     return out
 * 
 * cdef inline np.ndarray arr_sub_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise subtraction of two 1-D arrays <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_sub_arr(PyArrayObject *__pyx_v_arr1, PyArrayObject *__pyx_v_arr2, struct __pyx_opt_args_7cytimes_5utils_arr_sub_arr *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  npy_intp __pyx_v_size;
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_v_arr = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v1;
  npy_int64 __pyx_v_v2;
  PyArrayObject *__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[4];
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  npy_intp __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_sub_arr", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":7114
 *     """
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]             # <<<<<<<<<<<<<<
 *     if size != arr2.shape[0]:
 *         raise ValueError(
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr1)[0]);

  /* "utils.pxd":7115
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot perform subtraction on ndarrays with different lengths.\n"
*/
  __pyx_t_1 = (__pyx_v_size != (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":7116
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot perform subtraction on ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
*/
    __pyx_t_3 = NULL;

    /* "utils.pxd":7119
 *             "Cannot perform subtraction on ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_4 = __Pyx_PyUnicode_From_npy_intp(__pyx_v_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 7119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_From_npy_intp((__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]), 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 7119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_perform_subtraction_on_nd;
    __pyx_t_6[1] = __pyx_t_4;
    __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_arr2_length;
    __pyx_t_6[3] = __pyx_t_5;

    /* "utils.pxd":7117
 *     if size != arr2.shape[0]:
 *         raise ValueError(
 *             "Cannot perform subtraction on ndarrays with different lengths.\n"             # <<<<<<<<<<<<<<
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])
*/
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, 80 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127);
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 7117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7116, __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_ERR(5, 7116, __pyx_L1_error)

    /* "utils.pxd":7115
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot perform subtraction on ndarrays with different lengths.\n"
*/
  }

  /* "utils.pxd":7124
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)             # <<<<<<<<<<<<<<
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr1, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":7125
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr2, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":7126
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7127
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v1, v2
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":7132
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         v1 = out_ptr[i]
*/
  __pyx_t_10 = __pyx_v_size;
  __pyx_t_11 = __pyx_t_10;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "utils.pxd":7134
 *     for i in range(size):
 *         # Propagate NaT
 *         v1 = out_ptr[i]             # <<<<<<<<<<<<<<
 *         if v1 == LLONG_MIN:
 *             continue
*/
    __pyx_v_v1 = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":7135
 *         # Propagate NaT
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         v2 = arr_ptr[i]
*/
    __pyx_t_1 = (__pyx_v_v1 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7136
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7135
 *         # Propagate NaT
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         v2 = arr_ptr[i]
*/
    }

    /* "utils.pxd":7137
 *         if v1 == LLONG_MIN:
 *             continue
 *         v2 = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = v2
*/
    __pyx_v_v2 = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":7138
 *             continue
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v2
 *             continue
*/
    __pyx_t_1 = (__pyx_v_v2 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7139
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = v2             # <<<<<<<<<<<<<<
 *             continue
 *         # Subtract values
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_v2;

      /* "utils.pxd":7140
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = v2
 *             continue             # <<<<<<<<<<<<<<
 *         # Subtract values
 *         out_ptr[i] = v1 - v2 + offset
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7138
 *             continue
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v2
 *             continue
*/
    }

    /* "utils.pxd":7142
 *             continue
 *         # Subtract values
 *         out_ptr[i] = v1 - v2 + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((__pyx_v_v1 - __pyx_v_v2) + __pyx_v_offset);
    __pyx_L4_continue:;
  }

  /* "utils.pxd":7144
 *         out_ptr[i] = v1 - v2 + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_mul_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7093
 *     return out
 * 
 * cdef inline np.ndarray arr_sub_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise subtraction of two 1-D arrays <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.utils.arr_sub_arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7146
 *     return out
 * 
 * cdef inline np.ndarray arr_mul_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise multiplication of two 1-D arrays <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_mul_arr(PyArrayObject *__pyx_v_arr1, PyArrayObject *__pyx_v_arr2, struct __pyx_opt_args_7cytimes_5utils_arr_mul_arr *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  npy_intp __pyx_v_size;
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_v_arr = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v1;
  npy_int64 __pyx_v_v2;
  PyArrayObject *__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[4];
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  npy_intp __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_mul_arr", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":7167
 *     """
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]             # <<<<<<<<<<<<<<
 *     if size != arr2.shape[0]:
 *         raise ValueError(
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr1)[0]);

  /* "utils.pxd":7168
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot perform multiplication on ndarrays with different lengths.\n"
*/
  __pyx_t_1 = (__pyx_v_size != (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":7169
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot perform multiplication on ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
*/
    __pyx_t_3 = NULL;

    /* "utils.pxd":7172
 *             "Cannot perform multiplication on ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_4 = __Pyx_PyUnicode_From_npy_intp(__pyx_v_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 7172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_From_npy_intp((__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]), 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 7172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_perform_multiplication_on;
    __pyx_t_6[1] = __pyx_t_4;
    __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_arr2_length;
    __pyx_t_6[3] = __pyx_t_5;

    /* "utils.pxd":7170
 *     if size != arr2.shape[0]:
 *         raise ValueError(
 *             "Cannot perform multiplication on ndarrays with different lengths.\n"             # <<<<<<<<<<<<<<
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])
*/
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, 83 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127);
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 7170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7169, __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_ERR(5, 7169, __pyx_L1_error)

    /* "utils.pxd":7168
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot perform multiplication on ndarrays with different lengths.\n"
*/
  }

  /* "utils.pxd":7177
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)             # <<<<<<<<<<<<<<
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr1, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":7178
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr2, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":7179
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7180
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v1, v2
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":7185
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         v1 = out_ptr[i]
*/
  __pyx_t_10 = __pyx_v_size;
  __pyx_t_11 = __pyx_t_10;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "utils.pxd":7187
 *     for i in range(size):
 *         # Propagate NaT
 *         v1 = out_ptr[i]             # <<<<<<<<<<<<<<
 *         if v1 == LLONG_MIN:
 *             continue
*/
    __pyx_v_v1 = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":7188
 *         # Propagate NaT
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         v2 = arr_ptr[i]
*/
    __pyx_t_1 = (__pyx_v_v1 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7189
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7188
 *         # Propagate NaT
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         v2 = arr_ptr[i]
*/
    }

    /* "utils.pxd":7190
 *         if v1 == LLONG_MIN:
 *             continue
 *         v2 = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = v2
*/
    __pyx_v_v2 = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":7191
 *             continue
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v2
 *             continue
*/
    __pyx_t_1 = (__pyx_v_v2 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7192
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = v2             # <<<<<<<<<<<<<<
 *             continue
 *         # Multiply values
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_v2;

      /* "utils.pxd":7193
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = v2
 *             continue             # <<<<<<<<<<<<<<
 *         # Multiply values
 *         out_ptr[i] = v1 * v2 + offset
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7191
 *             continue
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v2
 *             continue
*/
    }

    /* "utils.pxd":7195
 *             continue
 *         # Multiply values
 *         out_ptr[i] = v1 * v2 + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((__pyx_v_v1 * __pyx_v_v2) + __pyx_v_offset);
    __pyx_L4_continue:;
  }

  /* "utils.pxd":7197
 *         out_ptr[i] = v1 * v2 + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * # . comparison
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7146
 *     return out
 * 
 * cdef inline np.ndarray arr_mul_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise multiplication of two 1-D arrays <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.utils.arr_mul_arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7200
 * 
 * # . comparison
 * cdef inline np.ndarray arr_eq(np.ndarray arr, np.npy_int64 value):             # <<<<<<<<<<<<<<
 *     """Elementwise equal comparison of a 1-D array to a scalar 'value' `<'ndarray[bool]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_eq(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_value) {
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_v_out = 0;
  npy_bool *__pyx_v_out_ptr;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_2;
  npy_intp __pyx_t_3[1];
  int __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  npy_intp __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_eq", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":7217
 *     """
 *     # Setup
 *     arr = arr_assure_int64_like(arr, False)             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target array
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "utils.pxd":7220
 *     cdef:
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = arr.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":7221
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp size = arr.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         # Output array
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]);

  /* "utils.pxd":7224
 *         np.npy_intp i
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)             # <<<<<<<<<<<<<<
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)
 *         np.npy_int64 v
*/
  __pyx_t_3[0] = __pyx_v_size;
  __pyx_t_1 = PyArray_EMPTY(1, __pyx_t_3, NPY_BOOL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 7224, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7225
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64 v
 * 
*/
  __pyx_v_out_ptr = ((npy_bool *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7229
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  __pyx_t_4 = (__pyx_v_value == LLONG_MIN);
  if (__pyx_t_4) {

    /* "utils.pxd":7230
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *         return out
*/
    __pyx_t_5 = __pyx_v_size;
    __pyx_t_6 = __pyx_t_5;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "utils.pxd":7231
 *     if value == LLONG_MIN:
 *         for i in range(size):
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *         return out
 * 
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;
    }

    /* "utils.pxd":7232
 *         for i in range(size):
 *             out_ptr[i] = False
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     # Compare
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_out);
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "utils.pxd":7229
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  }

  /* "utils.pxd":7235
 * 
 *     # Compare
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         v = arr_ptr[i]
*/
  __pyx_t_5 = __pyx_v_size;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "utils.pxd":7237
 *     for i in range(size):
 *         # Preserve NaT
 *         v = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
*/
    __pyx_v_v = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":7238
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_4 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_4) {

      /* "utils.pxd":7239
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         # Compare value
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":7240
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare value
 *         out_ptr[i] = v == value
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":7238
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":7242
 *             continue
 *         # Compare value
 *         out_ptr[i] = v == value             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v == __pyx_v_value);
    __pyx_L6_continue:;
  }

  /* "utils.pxd":7243
 *         # Compare value
 *         out_ptr[i] = v == value
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_gt(np.ndarray arr, np.npy_int64 value):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7200
 * 
 * # . comparison
 * cdef inline np.ndarray arr_eq(np.ndarray arr, np.npy_int64 value):             # <<<<<<<<<<<<<<
 *     """Elementwise equal comparison of a 1-D array to a scalar 'value' `<'ndarray[bool]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.arr_eq", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7245
 *     return out
 * 
 * cdef inline np.ndarray arr_gt(np.ndarray arr, np.npy_int64 value):             # <<<<<<<<<<<<<<
 *     """Elementwise greater-than comparison of a 1-D array to a scalar 'value' `<'ndarray[bool]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_gt(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_value) {
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_v_out = 0;
  npy_bool *__pyx_v_out_ptr;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_2;
  npy_intp __pyx_t_3[1];
  int __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  npy_intp __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_gt", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":7262
 *     """
 *     # Setup
 *     arr = arr_assure_int64_like(arr, False)             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target array
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "utils.pxd":7265
 *     cdef:
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = arr.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":7266
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp size = arr.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         # Output array
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]);

  /* "utils.pxd":7269
 *         np.npy_intp i
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)             # <<<<<<<<<<<<<<
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)
 *         np.npy_int64 v
*/
  __pyx_t_3[0] = __pyx_v_size;
  __pyx_t_1 = PyArray_EMPTY(1, __pyx_t_3, NPY_BOOL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 7269, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7270
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64 v
 * 
*/
  __pyx_v_out_ptr = ((npy_bool *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7274
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  __pyx_t_4 = (__pyx_v_value == LLONG_MIN);
  if (__pyx_t_4) {

    /* "utils.pxd":7275
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *         return out
*/
    __pyx_t_5 = __pyx_v_size;
    __pyx_t_6 = __pyx_t_5;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "utils.pxd":7276
 *     if value == LLONG_MIN:
 *         for i in range(size):
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *         return out
 * 
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;
    }

    /* "utils.pxd":7277
 *         for i in range(size):
 *             out_ptr[i] = False
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     # Compare
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_out);
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "utils.pxd":7274
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  }

  /* "utils.pxd":7280
 * 
 *     # Compare
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         v = arr_ptr[i]
*/
  __pyx_t_5 = __pyx_v_size;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "utils.pxd":7282
 *     for i in range(size):
 *         # Preserve NaT
 *         v = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
*/
    __pyx_v_v = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":7283
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_4 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_4) {

      /* "utils.pxd":7284
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         # Compare value
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":7285
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare value
 *         out_ptr[i] = v > value
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":7283
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":7287
 *             continue
 *         # Compare value
 *         out_ptr[i] = v > value             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v > __pyx_v_value);
    __pyx_L6_continue:;
  }

  /* "utils.pxd":7288
 *         # Compare value
 *         out_ptr[i] = v > value
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_ge(np.ndarray arr, np.npy_int64 value):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7245
 *     return out
 * 
 * cdef inline np.ndarray arr_gt(np.ndarray arr, np.npy_int64 value):             # <<<<<<<<<<<<<<
 *     """Elementwise greater-than comparison of a 1-D array to a scalar 'value' `<'ndarray[bool]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.arr_gt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7290
 *     return out
 * 
 * cdef inline np.ndarray arr_ge(np.ndarray arr, np.npy_int64 value):             # <<<<<<<<<<<<<<
 *     """Elementwise greater-than-or-equal comparison of a 1-D array to a scalar 'value' `<'ndarray[bool]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_ge(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_value) {
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_v_out = 0;
  npy_bool *__pyx_v_out_ptr;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_2;
  npy_intp __pyx_t_3[1];
  int __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  npy_intp __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_ge", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":7307
 *     """
 *     # Setup
 *     arr = arr_assure_int64_like(arr, False)             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target array
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "utils.pxd":7310
 *     cdef:
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = arr.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":7311
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp size = arr.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         # Output array
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]);

  /* "utils.pxd":7314
 *         np.npy_intp i
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)             # <<<<<<<<<<<<<<
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)
 *         np.npy_int64 v
*/
  __pyx_t_3[0] = __pyx_v_size;
  __pyx_t_1 = PyArray_EMPTY(1, __pyx_t_3, NPY_BOOL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 7314, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7315
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64 v
 * 
*/
  __pyx_v_out_ptr = ((npy_bool *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7319
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  __pyx_t_4 = (__pyx_v_value == LLONG_MIN);
  if (__pyx_t_4) {

    /* "utils.pxd":7320
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *         return out
*/
    __pyx_t_5 = __pyx_v_size;
    __pyx_t_6 = __pyx_t_5;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "utils.pxd":7321
 *     if value == LLONG_MIN:
 *         for i in range(size):
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *         return out
 * 
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;
    }

    /* "utils.pxd":7322
 *         for i in range(size):
 *             out_ptr[i] = False
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     # Compare
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_out);
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "utils.pxd":7319
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  }

  /* "utils.pxd":7325
 * 
 *     # Compare
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         v = arr_ptr[i]
*/
  __pyx_t_5 = __pyx_v_size;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "utils.pxd":7327
 *     for i in range(size):
 *         # Preserve NaT
 *         v = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
*/
    __pyx_v_v = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":7328
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_4 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_4) {

      /* "utils.pxd":7329
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         # Compare value
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":7330
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare value
 *         out_ptr[i] = v >= value
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":7328
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":7332
 *             continue
 *         # Compare value
 *         out_ptr[i] = v >= value             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v >= __pyx_v_value);
    __pyx_L6_continue:;
  }

  /* "utils.pxd":7333
 *         # Compare value
 *         out_ptr[i] = v >= value
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_lt(np.ndarray arr, np.npy_int64 value):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7290
 *     return out
 * 
 * cdef inline np.ndarray arr_ge(np.ndarray arr, np.npy_int64 value):             # <<<<<<<<<<<<<<
 *     """Elementwise greater-than-or-equal comparison of a 1-D array to a scalar 'value' `<'ndarray[bool]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.arr_ge", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7335
 *     return out
 * 
 * cdef inline np.ndarray arr_lt(np.ndarray arr, np.npy_int64 value):             # <<<<<<<<<<<<<<
 *     """Elementwise less-than comparison of a 1-D array to a scalar 'value' `<'ndarray[bool]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_lt(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_value) {
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_v_out = 0;
  npy_bool *__pyx_v_out_ptr;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_2;
  npy_intp __pyx_t_3[1];
  int __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  npy_intp __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_lt", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":7352
 *     """
 *     # Setup
 *     arr = arr_assure_int64_like(arr, False)             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target array
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "utils.pxd":7355
 *     cdef:
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = arr.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":7356
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp size = arr.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         # Output array
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]);

  /* "utils.pxd":7359
 *         np.npy_intp i
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)             # <<<<<<<<<<<<<<
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)
 *         np.npy_int64 v
*/
  __pyx_t_3[0] = __pyx_v_size;
  __pyx_t_1 = PyArray_EMPTY(1, __pyx_t_3, NPY_BOOL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 7359, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7360
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64 v
 * 
*/
  __pyx_v_out_ptr = ((npy_bool *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7364
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  __pyx_t_4 = (__pyx_v_value == LLONG_MIN);
  if (__pyx_t_4) {

    /* "utils.pxd":7365
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *         return out
*/
    __pyx_t_5 = __pyx_v_size;
    __pyx_t_6 = __pyx_t_5;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "utils.pxd":7366
 *     if value == LLONG_MIN:
 *         for i in range(size):
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *         return out
 * 
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;
    }

    /* "utils.pxd":7367
 *         for i in range(size):
 *             out_ptr[i] = False
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     # Compare
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_out);
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "utils.pxd":7364
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  }

  /* "utils.pxd":7370
 * 
 *     # Compare
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         v = arr_ptr[i]
*/
  __pyx_t_5 = __pyx_v_size;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "utils.pxd":7372
 *     for i in range(size):
 *         # Preserve NaT
 *         v = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
*/
    __pyx_v_v = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":7373
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_4 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_4) {

      /* "utils.pxd":7374
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         # Compare value
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":7375
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare value
 *         out_ptr[i] = v < value
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":7373
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":7377
 *             continue
 *         # Compare value
 *         out_ptr[i] = v < value             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v < __pyx_v_value);
    __pyx_L6_continue:;
  }

  /* "utils.pxd":7378
 *         # Compare value
 *         out_ptr[i] = v < value
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_le(np.ndarray arr, np.npy_int64 value):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7335
 *     return out
 * 
 * cdef inline np.ndarray arr_lt(np.ndarray arr, np.npy_int64 value):             # <<<<<<<<<<<<<<
 *     """Elementwise less-than comparison of a 1-D array to a scalar 'value' `<'ndarray[bool]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.arr_lt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7380
 *     return out
 * 
 * cdef inline np.ndarray arr_le(np.ndarray arr, np.npy_int64 value):             # <<<<<<<<<<<<<<
 *     """Elementwise less-than-or-equal comparison of a 1-D array to a scalar 'value' `<'ndarray[bool]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_le(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_value) {
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_v_out = 0;
  npy_bool *__pyx_v_out_ptr;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_2;
  npy_intp __pyx_t_3[1];
  int __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  npy_intp __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_le", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":7397
 *     """
 *     # Setup
 *     arr = arr_assure_int64_like(arr, False)             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target array
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "utils.pxd":7400
 *     cdef:
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = arr.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":7401
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp size = arr.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         # Output array
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]);

  /* "utils.pxd":7404
 *         np.npy_intp i
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)             # <<<<<<<<<<<<<<
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)
 *         np.npy_int64 v
*/
  __pyx_t_3[0] = __pyx_v_size;
  __pyx_t_1 = PyArray_EMPTY(1, __pyx_t_3, NPY_BOOL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 7404, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7405
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64 v
 * 
*/
  __pyx_v_out_ptr = ((npy_bool *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7409
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  __pyx_t_4 = (__pyx_v_value == LLONG_MIN);
  if (__pyx_t_4) {

    /* "utils.pxd":7410
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *         return out
*/
    __pyx_t_5 = __pyx_v_size;
    __pyx_t_6 = __pyx_t_5;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "utils.pxd":7411
 *     if value == LLONG_MIN:
 *         for i in range(size):
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *         return out
 * 
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;
    }

    /* "utils.pxd":7412
 *         for i in range(size):
 *             out_ptr[i] = False
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     # Compare
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_out);
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "utils.pxd":7409
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  }

  /* "utils.pxd":7415
 * 
 *     # Compare
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         v = arr_ptr[i]
*/
  __pyx_t_5 = __pyx_v_size;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "utils.pxd":7417
 *     for i in range(size):
 *         # Preserve NaT
 *         v = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
*/
    __pyx_v_v = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":7418
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_4 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_4) {

      /* "utils.pxd":7419
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         # Compare value
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":7420
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare value
 *         out_ptr[i] = v <= value
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":7418
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":7422
 *             continue
 *         # Compare value
 *         out_ptr[i] = v <= value             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v <= __pyx_v_value);
    __pyx_L6_continue:;
  }

  /* "utils.pxd":7423
 *         # Compare value
 *         out_ptr[i] = v <= value
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_eq_arr(np.ndarray arr1, np.ndarray arr2):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7380
 *     return out
 * 
 * cdef inline np.ndarray arr_le(np.ndarray arr, np.npy_int64 value):             # <<<<<<<<<<<<<<
 *     """Elementwise less-than-or-equal comparison of a 1-D array to a scalar 'value' `<'ndarray[bool]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.arr_le", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7425
 *     return out
 * 
 * cdef inline np.ndarray arr_eq_arr(np.ndarray arr1, np.ndarray arr2):             # <<<<<<<<<<<<<<
 *     """Elementwise equal comparison of two 1-D arrays `<'ndarray[bool]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_eq_arr(PyArrayObject *__pyx_v_arr1, PyArrayObject *__pyx_v_arr2) {
  npy_intp __pyx_v_size;
  npy_int64 *__pyx_v_arr1_ptr;
  npy_int64 *__pyx_v_arr2_ptr;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_v_out = 0;
  npy_bool *__pyx_v_out_ptr;
  npy_int64 __pyx_v_v1;
  npy_int64 __pyx_v_v2;
  PyArrayObject *__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[4];
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_9;
  npy_intp __pyx_t_10[1];
  npy_intp __pyx_t_11;
  npy_intp __pyx_t_12;
  npy_intp __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_eq_arr", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_arr1);
  __Pyx_INCREF((PyObject *)__pyx_v_arr2);

  /* "utils.pxd":7441
 *     """
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]             # <<<<<<<<<<<<<<
 *     if size != arr2.shape[0]:
 *         raise ValueError(
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr1)[0]);

  /* "utils.pxd":7442
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"
*/
  __pyx_t_1 = (__pyx_v_size != (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":7443
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot compare ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
*/
    __pyx_t_3 = NULL;

    /* "utils.pxd":7446
 *             "Cannot compare ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_4 = __Pyx_PyUnicode_From_npy_intp(__pyx_v_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 7446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_From_npy_intp((__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]), 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 7446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_compare_ndarrays_with_dif;
    __pyx_t_6[1] = __pyx_t_4;
    __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_arr2_length;
    __pyx_t_6[3] = __pyx_t_5;

    /* "utils.pxd":7444
 *     if size != arr2.shape[0]:
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"             # <<<<<<<<<<<<<<
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])
*/
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, 65 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127);
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 7444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7443, __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_ERR(5, 7443, __pyx_L1_error)

    /* "utils.pxd":7442
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"
*/
  }

  /* "utils.pxd":7450
 * 
 *     # Setup
 *     arr1 = arr_assure_int64_like(arr1, False)             # <<<<<<<<<<<<<<
 *     arr2 = arr_assure_int64_like(arr2, False)
 *     cdef:
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr1, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_arr1, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "utils.pxd":7451
 *     # Setup
 *     arr1 = arr_assure_int64_like(arr1, False)
 *     arr2 = arr_assure_int64_like(arr2, False)             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target arrays
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr2, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_arr2, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "utils.pxd":7454
 *     cdef:
 *         # Target arrays
 *         np.npy_int64* arr1_ptr = <np.npy_int64*> np.PyArray_DATA(arr1)             # <<<<<<<<<<<<<<
 *         np.npy_int64* arr2_ptr = <np.npy_int64*> np.PyArray_DATA(arr2)
 *         np.npy_intp i
*/
  __pyx_v_arr1_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr1));

  /* "utils.pxd":7455
 *         # Target arrays
 *         np.npy_int64* arr1_ptr = <np.npy_int64*> np.PyArray_DATA(arr1)
 *         np.npy_int64* arr2_ptr = <np.npy_int64*> np.PyArray_DATA(arr2)             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         # Output array
*/
  __pyx_v_arr2_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr2));

  /* "utils.pxd":7458
 *         np.npy_intp i
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)             # <<<<<<<<<<<<<<
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)
 *         np.npy_int64 v1, v2
*/
  __pyx_t_10[0] = __pyx_v_size;
  __pyx_t_2 = PyArray_EMPTY(1, __pyx_t_10, NPY_BOOL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 7458, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":7459
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64 v1, v2
 * 
*/
  __pyx_v_out_ptr = ((npy_bool *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7463
 * 
 *     # Compare
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]
*/
  __pyx_t_11 = __pyx_v_size;
  __pyx_t_12 = __pyx_t_11;
  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
    __pyx_v_i = __pyx_t_13;

    /* "utils.pxd":7465
 *     for i in range(size):
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]             # <<<<<<<<<<<<<<
 *         if v1 == LLONG_MIN:
 *             out_ptr[i] = False
*/
    __pyx_v_v1 = (__pyx_v_arr1_ptr[__pyx_v_i]);

    /* "utils.pxd":7466
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_1 = (__pyx_v_v1 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7467
 *         v1 = arr1_ptr[i]
 *         if v1 == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         v2 = arr2_ptr[i]
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":7468
 *         if v1 == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7466
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":7469
 *             out_ptr[i] = False
 *             continue
 *         v2 = arr2_ptr[i]             # <<<<<<<<<<<<<<
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = False
*/
    __pyx_v_v2 = (__pyx_v_arr2_ptr[__pyx_v_i]);

    /* "utils.pxd":7470
 *             continue
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_1 = (__pyx_v_v2 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7471
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         # Compare values
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":7472
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare values
 *         out_ptr[i] = v1 == v2
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7470
 *             continue
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":7474
 *             continue
 *         # Compare values
 *         out_ptr[i] = v1 == v2             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v1 == __pyx_v_v2);
    __pyx_L4_continue:;
  }

  /* "utils.pxd":7475
 *         # Compare values
 *         out_ptr[i] = v1 == v2
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_gt_arr(np.ndarray arr1, np.ndarray arr2):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7425
 *     return out
 * 
 * cdef inline np.ndarray arr_eq_arr(np.ndarray arr1, np.ndarray arr2):             # <<<<<<<<<<<<<<
 *     """Elementwise equal comparison of two 1-D arrays `<'ndarray[bool]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.utils.arr_eq_arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr1);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr2);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7477
 *     return out
 * 
 * cdef inline np.ndarray arr_gt_arr(np.ndarray arr1, np.ndarray arr2):             # <<<<<<<<<<<<<<
 *     """Elementwise greater-than comparison of two 1-D arrays `<'ndarray[bool]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_gt_arr(PyArrayObject *__pyx_v_arr1, PyArrayObject *__pyx_v_arr2) {
  npy_intp __pyx_v_size;
  npy_int64 *__pyx_v_arr1_ptr;
  npy_int64 *__pyx_v_arr2_ptr;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_v_out = 0;
  npy_bool *__pyx_v_out_ptr;
  npy_int64 __pyx_v_v1;
  npy_int64 __pyx_v_v2;
  PyArrayObject *__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[4];
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_9;
  npy_intp __pyx_t_10[1];
  npy_intp __pyx_t_11;
  npy_intp __pyx_t_12;
  npy_intp __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_gt_arr", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_arr1);
  __Pyx_INCREF((PyObject *)__pyx_v_arr2);

  /* "utils.pxd":7493
 *     """
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]             # <<<<<<<<<<<<<<
 *     if size != arr2.shape[0]:
 *         raise ValueError(
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr1)[0]);

  /* "utils.pxd":7494
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"
*/
  __pyx_t_1 = (__pyx_v_size != (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":7495
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot compare ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
*/
    __pyx_t_3 = NULL;

    /* "utils.pxd":7498
 *             "Cannot compare ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_4 = __Pyx_PyUnicode_From_npy_intp(__pyx_v_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 7498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_From_npy_intp((__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]), 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 7498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_compare_ndarrays_with_dif;
    __pyx_t_6[1] = __pyx_t_4;
    __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_arr2_length;
    __pyx_t_6[3] = __pyx_t_5;

    /* "utils.pxd":7496
 *     if size != arr2.shape[0]:
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"             # <<<<<<<<<<<<<<
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])
*/
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, 65 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127);
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 7496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7495, __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_ERR(5, 7495, __pyx_L1_error)

    /* "utils.pxd":7494
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"
*/
  }

  /* "utils.pxd":7502
 * 
 *     # Setup
 *     arr1 = arr_assure_int64_like(arr1, False)             # <<<<<<<<<<<<<<
 *     arr2 = arr_assure_int64_like(arr2, False)
 *     cdef:
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr1, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_arr1, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "utils.pxd":7503
 *     # Setup
 *     arr1 = arr_assure_int64_like(arr1, False)
 *     arr2 = arr_assure_int64_like(arr2, False)             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target arrays
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr2, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_arr2, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "utils.pxd":7506
 *     cdef:
 *         # Target arrays
 *         np.npy_int64* arr1_ptr = <np.npy_int64*> np.PyArray_DATA(arr1)             # <<<<<<<<<<<<<<
 *         np.npy_int64* arr2_ptr = <np.npy_int64*> np.PyArray_DATA(arr2)
 *         np.npy_intp i
*/
  __pyx_v_arr1_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr1));

  /* "utils.pxd":7507
 *         # Target arrays
 *         np.npy_int64* arr1_ptr = <np.npy_int64*> np.PyArray_DATA(arr1)
 *         np.npy_int64* arr2_ptr = <np.npy_int64*> np.PyArray_DATA(arr2)             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         # Output array
*/
  __pyx_v_arr2_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr2));

  /* "utils.pxd":7510
 *         np.npy_intp i
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)             # <<<<<<<<<<<<<<
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)
 *         np.npy_int64 v1, v2
*/
  __pyx_t_10[0] = __pyx_v_size;
  __pyx_t_2 = PyArray_EMPTY(1, __pyx_t_10, NPY_BOOL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 7510, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":7511
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64 v1, v2
 * 
*/
  __pyx_v_out_ptr = ((npy_bool *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7515
 * 
 *     # Compare
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]
*/
  __pyx_t_11 = __pyx_v_size;
  __pyx_t_12 = __pyx_t_11;
  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
    __pyx_v_i = __pyx_t_13;

    /* "utils.pxd":7517
 *     for i in range(size):
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]             # <<<<<<<<<<<<<<
 *         if v1 == LLONG_MIN:
 *             out_ptr[i] = False
*/
    __pyx_v_v1 = (__pyx_v_arr1_ptr[__pyx_v_i]);

    /* "utils.pxd":7518
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_1 = (__pyx_v_v1 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7519
 *         v1 = arr1_ptr[i]
 *         if v1 == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         v2 = arr2_ptr[i]
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":7520
 *         if v1 == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7518
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":7521
 *             out_ptr[i] = False
 *             continue
 *         v2 = arr2_ptr[i]             # <<<<<<<<<<<<<<
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = False
*/
    __pyx_v_v2 = (__pyx_v_arr2_ptr[__pyx_v_i]);

    /* "utils.pxd":7522
 *             continue
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_1 = (__pyx_v_v2 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7523
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         # Compare values
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":7524
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare values
 *         out_ptr[i] = v1 > v2
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7522
 *             continue
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":7526
 *             continue
 *         # Compare values
 *         out_ptr[i] = v1 > v2             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v1 > __pyx_v_v2);
    __pyx_L4_continue:;
  }

  /* "utils.pxd":7527
 *         # Compare values
 *         out_ptr[i] = v1 > v2
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_ge_arr(np.ndarray arr1, np.ndarray arr2):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7477
 *     return out
 * 
 * cdef inline np.ndarray arr_gt_arr(np.ndarray arr1, np.ndarray arr2):             # <<<<<<<<<<<<<<
 *     """Elementwise greater-than comparison of two 1-D arrays `<'ndarray[bool]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.utils.arr_gt_arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr1);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr2);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7529
 *     return out
 * 
 * cdef inline np.ndarray arr_ge_arr(np.ndarray arr1, np.ndarray arr2):             # <<<<<<<<<<<<<<
 *     """Elementwise greater-than-or-equal comparison of two 1-D arrays `<'ndarray[bool]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_ge_arr(PyArrayObject *__pyx_v_arr1, PyArrayObject *__pyx_v_arr2) {
  npy_intp __pyx_v_size;
  npy_int64 *__pyx_v_arr1_ptr;
  npy_int64 *__pyx_v_arr2_ptr;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_v_out = 0;
  npy_bool *__pyx_v_out_ptr;
  npy_int64 __pyx_v_v1;
  npy_int64 __pyx_v_v2;
  PyArrayObject *__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[4];
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_9;
  npy_intp __pyx_t_10[1];
  npy_intp __pyx_t_11;
  npy_intp __pyx_t_12;
  npy_intp __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_ge_arr", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_arr1);
  __Pyx_INCREF((PyObject *)__pyx_v_arr2);

  /* "utils.pxd":7545
 *     """
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]             # <<<<<<<<<<<<<<
 *     if size != arr2.shape[0]:
 *         raise ValueError(
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr1)[0]);

  /* "utils.pxd":7546
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"
*/
  __pyx_t_1 = (__pyx_v_size != (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":7547
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot compare ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
*/
    __pyx_t_3 = NULL;

    /* "utils.pxd":7550
 *             "Cannot compare ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_4 = __Pyx_PyUnicode_From_npy_intp(__pyx_v_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 7550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_From_npy_intp((__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]), 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 7550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_compare_ndarrays_with_dif;
    __pyx_t_6[1] = __pyx_t_4;
    __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_arr2_length;
    __pyx_t_6[3] = __pyx_t_5;

    /* "utils.pxd":7548
 *     if size != arr2.shape[0]:
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"             # <<<<<<<<<<<<<<
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])
*/
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, 65 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127);
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 7548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7547, __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_ERR(5, 7547, __pyx_L1_error)

    /* "utils.pxd":7546
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"
*/
  }

  /* "utils.pxd":7554
 * 
 *     # Setup
 *     arr1 = arr_assure_int64_like(arr1, False)             # <<<<<<<<<<<<<<
 *     arr2 = arr_assure_int64_like(arr2, False)
 *     cdef:
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr1, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_arr1, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "utils.pxd":7555
 *     # Setup
 *     arr1 = arr_assure_int64_like(arr1, False)
 *     arr2 = arr_assure_int64_like(arr2, False)             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target arrays
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr2, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_arr2, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "utils.pxd":7558
 *     cdef:
 *         # Target arrays
 *         np.npy_int64* arr1_ptr = <np.npy_int64*> np.PyArray_DATA(arr1)             # <<<<<<<<<<<<<<
 *         np.npy_int64* arr2_ptr = <np.npy_int64*> np.PyArray_DATA(arr2)
 *         np.npy_intp i
*/
  __pyx_v_arr1_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr1));

  /* "utils.pxd":7559
 *         # Target arrays
 *         np.npy_int64* arr1_ptr = <np.npy_int64*> np.PyArray_DATA(arr1)
 *         np.npy_int64* arr2_ptr = <np.npy_int64*> np.PyArray_DATA(arr2)             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         # Output array
*/
  __pyx_v_arr2_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr2));

  /* "utils.pxd":7562
 *         np.npy_intp i
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)             # <<<<<<<<<<<<<<
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)
 *         np.npy_int64 v1, v2
*/
  __pyx_t_10[0] = __pyx_v_size;
  __pyx_t_2 = PyArray_EMPTY(1, __pyx_t_10, NPY_BOOL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 7562, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":7563
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64 v1, v2
 * 
*/
  __pyx_v_out_ptr = ((npy_bool *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7567
 * 
 *     # Compare
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]
*/
  __pyx_t_11 = __pyx_v_size;
  __pyx_t_12 = __pyx_t_11;
  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
    __pyx_v_i = __pyx_t_13;

    /* "utils.pxd":7569
 *     for i in range(size):
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]             # <<<<<<<<<<<<<<
 *         if v1 == LLONG_MIN:
 *             out_ptr[i] = False
*/
    __pyx_v_v1 = (__pyx_v_arr1_ptr[__pyx_v_i]);

    /* "utils.pxd":7570
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_1 = (__pyx_v_v1 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7571
 *         v1 = arr1_ptr[i]
 *         if v1 == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         v2 = arr2_ptr[i]
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":7572
 *         if v1 == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7570
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":7573
 *             out_ptr[i] = False
 *             continue
 *         v2 = arr2_ptr[i]             # <<<<<<<<<<<<<<
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = False
*/
    __pyx_v_v2 = (__pyx_v_arr2_ptr[__pyx_v_i]);

    /* "utils.pxd":7574
 *             continue
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_1 = (__pyx_v_v2 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7575
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         # Compare values
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":7576
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare values
 *         out_ptr[i] = v1 >= v2
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7574
 *             continue
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":7578
 *             continue
 *         # Compare values
 *         out_ptr[i] = v1 >= v2             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v1 >= __pyx_v_v2);
    __pyx_L4_continue:;
  }

  /* "utils.pxd":7579
 *         # Compare values
 *         out_ptr[i] = v1 >= v2
 *     return out             # <<<<<<<<<<<<<<
 * 
 * # NumPy: ndarray[datetime64] ---------------------------------------------------------------------------
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7529
 *     return out
 * 
 * cdef inline np.ndarray arr_ge_arr(np.ndarray arr1, np.ndarray arr2):             # <<<<<<<<<<<<<<
 *     """Elementwise greater-than-or-equal comparison of two 1-D arrays `<'ndarray[bool]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.utils.arr_ge_arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr1);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr2);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7583
 * # NumPy: ndarray[datetime64] ---------------------------------------------------------------------------
 * # . type check
 * cdef inline bint is_dt64arr(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Check if the array is dtype of 'datetime64[*]' `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_dt64arr(PyArrayObject *__pyx_v_arr) {
  int __pyx_r;

  /* "utils.pxd":7589
 *     >>> isinstance(arr.dtype, np.dtypes.DateTime64DType)
 *     """
 *     return np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint assure_dt64arr(np.ndarray arr) except -1:
*/
  __pyx_r = (PyArray_TYPE(__pyx_v_arr) == NPY_DATETIME);
  goto __pyx_L0;

  /* "utils.pxd":7583
 * # NumPy: ndarray[datetime64] ---------------------------------------------------------------------------
 * # . type check
 * cdef inline bint is_dt64arr(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Check if the array is dtype of 'datetime64[*]' `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":7591
 *     return np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 * 
 * cdef inline bint assure_dt64arr(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Assure the array is dtype of 'datetime64[*]'"""
 *     if not is_dt64arr(arr):
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_assure_dt64arr(PyArrayObject *__pyx_v_arr) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("assure_dt64arr", 0);

  /* "utils.pxd":7593
 * cdef inline bint assure_dt64arr(np.ndarray arr) except -1:
 *     """Assure the array is dtype of 'datetime64[*]'"""
 *     if not is_dt64arr(arr):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Expects an instance of 'np.ndarray[datetime64[*]]', "
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 7593, __pyx_L1_error)
  __pyx_t_2 = (!__pyx_t_1);
  if (unlikely(__pyx_t_2)) {

    /* "utils.pxd":7594
 *     """Assure the array is dtype of 'datetime64[*]'"""
 *     if not is_dt64arr(arr):
 *         raise TypeError(             # <<<<<<<<<<<<<<
 *             "Expects an instance of 'np.ndarray[datetime64[*]]', "
 *             "instead got 'np.ndarray[%s]'." % arr.dtype
*/
    __pyx_t_4 = NULL;

    /* "utils.pxd":7596
 *         raise TypeError(
 *             "Expects an instance of 'np.ndarray[datetime64[*]]', "
 *             "instead got 'np.ndarray[%s]'." % arr.dtype             # <<<<<<<<<<<<<<
 *         )
 *     return True
*/
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 7596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Expects_an_instance_of_np_ndarra, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 7596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 7594, __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_ERR(5, 7594, __pyx_L1_error)

    /* "utils.pxd":7593
 * cdef inline bint assure_dt64arr(np.ndarray arr) except -1:
 *     """Assure the array is dtype of 'datetime64[*]'"""
 *     if not is_dt64arr(arr):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Expects an instance of 'np.ndarray[datetime64[*]]', "
*/
  }

  /* "utils.pxd":7598
 *             "instead got 'np.ndarray[%s]'." % arr.dtype
 *         )
 *     return True             # <<<<<<<<<<<<<<
 * 
 * # . range check
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "utils.pxd":7591
 *     return np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 * 
 * cdef inline bint assure_dt64arr(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Assure the array is dtype of 'datetime64[*]'"""
 *     if not is_dt64arr(arr):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytimes.utils.assure_dt64arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7601
 * 
 * # . range check
 * cdef inline bint is_dt64arr_ns_safe(np.ndarray arr, int arr_reso=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check if a 1-D array can be safely represented as datetime64[ns] `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_minimum;
  npy_int64 __pyx_v_maximum;
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PY_LONG_LONG __pyx_t_3;
  PY_LONG_LONG __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_10;
  npy_intp __pyx_t_11;
  npy_intp __pyx_t_12;
  npy_intp __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_dt64arr_ns_safe", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":7620
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":7621
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":7622
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 7622, __pyx_L1_error)

      /* "utils.pxd":7621
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":7623
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Get min & max range
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 7623, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":7620
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":7627
 *     # Get min & max range
 *     cdef np.npy_int64 minimum, maximum
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         minimum, maximum = DT64_NS_NS_MIN, DT64_NS_NS_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  switch (__pyx_v_arr_reso) {
    case NPY_FR_ns:

    /* "utils.pxd":7628
 *     cdef np.npy_int64 minimum, maximum
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         minimum, maximum = DT64_NS_NS_MIN, DT64_NS_NS_MAX             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         minimum, maximum = DT64_NS_US_MIN, DT64_NS_US_MAX
*/
    __pyx_t_3 = __pyx_v_7cytimes_5utils_DT64_NS_NS_MIN;
    __pyx_t_4 = __pyx_v_7cytimes_5utils_DT64_NS_NS_MAX;
    __pyx_v_minimum = __pyx_t_3;
    __pyx_v_maximum = __pyx_t_4;

    /* "utils.pxd":7627
 *     # Get min & max range
 *     cdef np.npy_int64 minimum, maximum
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         minimum, maximum = DT64_NS_NS_MIN, DT64_NS_NS_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
    break;
    case NPY_FR_us:

    /* "utils.pxd":7630
 *         minimum, maximum = DT64_NS_NS_MIN, DT64_NS_NS_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         minimum, maximum = DT64_NS_US_MIN, DT64_NS_US_MAX             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         minimum, maximum = DT64_NS_MS_MIN, DT64_NS_MS_MAX
*/
    __pyx_t_4 = __pyx_v_7cytimes_5utils_DT64_NS_US_MIN;
    __pyx_t_3 = __pyx_v_7cytimes_5utils_DT64_NS_US_MAX;
    __pyx_v_minimum = __pyx_t_4;
    __pyx_v_maximum = __pyx_t_3;

    /* "utils.pxd":7629
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         minimum, maximum = DT64_NS_NS_MIN, DT64_NS_NS_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         minimum, maximum = DT64_NS_US_MIN, DT64_NS_US_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
    break;
    case NPY_FR_ms:

    /* "utils.pxd":7632
 *         minimum, maximum = DT64_NS_US_MIN, DT64_NS_US_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         minimum, maximum = DT64_NS_MS_MIN, DT64_NS_MS_MAX             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         minimum, maximum = DT64_NS_SS_MIN, DT64_NS_SS_MAX
*/
    __pyx_t_3 = __pyx_v_7cytimes_5utils_DT64_NS_MS_MIN;
    __pyx_t_4 = __pyx_v_7cytimes_5utils_DT64_NS_MS_MAX;
    __pyx_v_minimum = __pyx_t_3;
    __pyx_v_maximum = __pyx_t_4;

    /* "utils.pxd":7631
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         minimum, maximum = DT64_NS_US_MIN, DT64_NS_US_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         minimum, maximum = DT64_NS_MS_MIN, DT64_NS_MS_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
    break;
    case NPY_FR_s:

    /* "utils.pxd":7634
 *         minimum, maximum = DT64_NS_MS_MIN, DT64_NS_MS_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         minimum, maximum = DT64_NS_SS_MIN, DT64_NS_SS_MAX             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         minimum, maximum = DT64_NS_MI_MIN, DT64_NS_MI_MAX
*/
    __pyx_t_4 = __pyx_v_7cytimes_5utils_DT64_NS_SS_MIN;
    __pyx_t_3 = __pyx_v_7cytimes_5utils_DT64_NS_SS_MAX;
    __pyx_v_minimum = __pyx_t_4;
    __pyx_v_maximum = __pyx_t_3;

    /* "utils.pxd":7633
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         minimum, maximum = DT64_NS_MS_MIN, DT64_NS_MS_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         minimum, maximum = DT64_NS_SS_MIN, DT64_NS_SS_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
    break;
    case NPY_FR_m:

    /* "utils.pxd":7636
 *         minimum, maximum = DT64_NS_SS_MIN, DT64_NS_SS_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         minimum, maximum = DT64_NS_MI_MIN, DT64_NS_MI_MAX             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         minimum, maximum = DT64_NS_HH_MIN, DT64_NS_HH_MAX
*/
    __pyx_t_3 = __pyx_v_7cytimes_5utils_DT64_NS_MI_MIN;
    __pyx_t_4 = __pyx_v_7cytimes_5utils_DT64_NS_MI_MAX;
    __pyx_v_minimum = __pyx_t_3;
    __pyx_v_maximum = __pyx_t_4;

    /* "utils.pxd":7635
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         minimum, maximum = DT64_NS_SS_MIN, DT64_NS_SS_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         minimum, maximum = DT64_NS_MI_MIN, DT64_NS_MI_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
    break;
    case NPY_FR_h:

    /* "utils.pxd":7638
 *         minimum, maximum = DT64_NS_MI_MIN, DT64_NS_MI_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         minimum, maximum = DT64_NS_HH_MIN, DT64_NS_HH_MAX             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         minimum, maximum = DT64_NS_DD_MIN, DT64_NS_DD_MAX
*/
    __pyx_t_4 = __pyx_v_7cytimes_5utils_DT64_NS_HH_MIN;
    __pyx_t_3 = __pyx_v_7cytimes_5utils_DT64_NS_HH_MAX;
    __pyx_v_minimum = __pyx_t_4;
    __pyx_v_maximum = __pyx_t_3;

    /* "utils.pxd":7637
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         minimum, maximum = DT64_NS_MI_MIN, DT64_NS_MI_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         minimum, maximum = DT64_NS_HH_MIN, DT64_NS_HH_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
    break;
    case NPY_FR_D:

    /* "utils.pxd":7640
 *         minimum, maximum = DT64_NS_HH_MIN, DT64_NS_HH_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         minimum, maximum = DT64_NS_DD_MIN, DT64_NS_DD_MAX             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         minimum, maximum = DT64_NS_WW_MIN, DT64_NS_WW_MAX
*/
    __pyx_t_3 = __pyx_v_7cytimes_5utils_DT64_NS_DD_MIN;
    __pyx_t_4 = __pyx_v_7cytimes_5utils_DT64_NS_DD_MAX;
    __pyx_v_minimum = __pyx_t_3;
    __pyx_v_maximum = __pyx_t_4;

    /* "utils.pxd":7639
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         minimum, maximum = DT64_NS_HH_MIN, DT64_NS_HH_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         minimum, maximum = DT64_NS_DD_MIN, DT64_NS_DD_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
    break;
    case NPY_FR_W:

    /* "utils.pxd":7642
 *         minimum, maximum = DT64_NS_DD_MIN, DT64_NS_DD_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         minimum, maximum = DT64_NS_WW_MIN, DT64_NS_WW_MAX             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         minimum, maximum = DT64_NS_MM_MIN, DT64_NS_MM_MAX
*/
    __pyx_t_4 = __pyx_v_7cytimes_5utils_DT64_NS_WW_MIN;
    __pyx_t_3 = __pyx_v_7cytimes_5utils_DT64_NS_WW_MAX;
    __pyx_v_minimum = __pyx_t_4;
    __pyx_v_maximum = __pyx_t_3;

    /* "utils.pxd":7641
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         minimum, maximum = DT64_NS_DD_MIN, DT64_NS_DD_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         minimum, maximum = DT64_NS_WW_MIN, DT64_NS_WW_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
    break;
    case NPY_FR_M:

    /* "utils.pxd":7644
 *         minimum, maximum = DT64_NS_WW_MIN, DT64_NS_WW_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         minimum, maximum = DT64_NS_MM_MIN, DT64_NS_MM_MAX             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         minimum, maximum = DT64_NS_YY_MIN, DT64_NS_YY_MAX
*/
    __pyx_t_3 = __pyx_v_7cytimes_5utils_DT64_NS_MM_MIN;
    __pyx_t_4 = __pyx_v_7cytimes_5utils_DT64_NS_MM_MAX;
    __pyx_v_minimum = __pyx_t_3;
    __pyx_v_maximum = __pyx_t_4;

    /* "utils.pxd":7643
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         minimum, maximum = DT64_NS_WW_MIN, DT64_NS_WW_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         minimum, maximum = DT64_NS_MM_MIN, DT64_NS_MM_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
    break;
    case NPY_FR_Y:

    /* "utils.pxd":7646
 *         minimum, maximum = DT64_NS_MM_MIN, DT64_NS_MM_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         minimum, maximum = DT64_NS_YY_MIN, DT64_NS_YY_MAX             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError(
*/
    __pyx_t_4 = __pyx_v_7cytimes_5utils_DT64_NS_YY_MIN;
    __pyx_t_3 = __pyx_v_7cytimes_5utils_DT64_NS_YY_MAX;
    __pyx_v_minimum = __pyx_t_4;
    __pyx_v_maximum = __pyx_t_3;

    /* "utils.pxd":7645
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         minimum, maximum = DT64_NS_MM_MIN, DT64_NS_MM_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         minimum, maximum = DT64_NS_YY_MIN, DT64_NS_YY_MAX
 *     else:
*/
    break;
    default:

    /* "utils.pxd":7648
 *         minimum, maximum = DT64_NS_YY_MIN, DT64_NS_YY_MAX
 *     else:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Unsupported datetime resolution '%s'. "
 *             "Accepts: Y, M, W, D, h, m, s, ms, us, ns."
*/
    __pyx_t_6 = NULL;

    /* "utils.pxd":7651
 *             "Unsupported datetime resolution '%s'. "
 *             "Accepts: Y, M, W, D, h, m, s, ms, us, ns."
 *             % nptime_unit_int2str(arr_reso)             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_7 = __pyx_f_7cytimes_5utils_nptime_unit_int2str(__pyx_v_arr_reso); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 7651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Unsupported_datetime_resolution, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 7651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8};
      __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 7648, __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_ERR(5, 7648, __pyx_L1_error)
    break;
  }

  /* "utils.pxd":7655
 * 
 *     # Setup
 *     arr = arr_assure_int64_like(arr, False)             # <<<<<<<<<<<<<<
 *     cdef:
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
*/
  __pyx_t_10.__pyx_n = 1;
  __pyx_t_10.copy = 0;
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_10)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 7655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
  __pyx_t_5 = 0;

  /* "utils.pxd":7657
 *     arr = arr_assure_int64_like(arr, False)
 *     cdef:
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = arr.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":7658
 *     cdef:
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp size = arr.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]);

  /* "utils.pxd":7663
 * 
 *     # Check
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = arr_ptr[i]
 *         if not minimum < v < maximum and v != LLONG_MIN:
*/
  __pyx_t_11 = __pyx_v_size;
  __pyx_t_12 = __pyx_t_11;
  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
    __pyx_v_i = __pyx_t_13;

    /* "utils.pxd":7664
 *     # Check
 *     for i in range(size):
 *         v = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         if not minimum < v < maximum and v != LLONG_MIN:
 *             return False
*/
    __pyx_v_v = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":7665
 *     for i in range(size):
 *         v = arr_ptr[i]
 *         if not minimum < v < maximum and v != LLONG_MIN:             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    __pyx_t_14 = (__pyx_v_minimum < __pyx_v_v);
    if (__pyx_t_14) {
      __pyx_t_14 = (__pyx_v_v < __pyx_v_maximum);
    }
    __pyx_t_15 = (!__pyx_t_14);
    if (__pyx_t_15) {
    } else {
      __pyx_t_1 = __pyx_t_15;
      goto __pyx_L8_bool_binop_done;
    }
    __pyx_t_15 = (__pyx_v_v != LLONG_MIN);
    __pyx_t_1 = __pyx_t_15;
    __pyx_L8_bool_binop_done:;
    if (__pyx_t_1) {

      /* "utils.pxd":7666
 *         v = arr_ptr[i]
 *         if not minimum < v < maximum and v != LLONG_MIN:
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
*/
      __pyx_r = 0;
      goto __pyx_L0;

      /* "utils.pxd":7665
 *     for i in range(size):
 *         v = arr_ptr[i]
 *         if not minimum < v < maximum and v != LLONG_MIN:             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    }
  }

  /* "utils.pxd":7667
 *         if not minimum < v < maximum and v != LLONG_MIN:
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * # . access
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "utils.pxd":7601
 * 
 * # . range check
 * cdef inline bint is_dt64arr_ns_safe(np.ndarray arr, int arr_reso=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check if a 1-D array can be safely represented as datetime64[ns] `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cytimes.utils.is_dt64arr_ns_safe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7670
 * 
 * # . access
 * cdef inline np.ndarray dt64arr_year(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract civil year numbers from a 1-D ndarray[datetime64[*]] `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_year(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_year *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_year", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":7690
 *     >>> arr.astype('datetime64[Y]').astype('int64') + 1970 + offset
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *     return arr_add(out, EPOCH_YEAR + offset, False)
 * 
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7691
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)
 *     return arr_add(out, EPOCH_YEAR + offset, False)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_quarter(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_out, (__pyx_v_7cytimes_5utils_EPOCH_YEAR + __pyx_v_offset), &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":7670
 * 
 * # . access
 * cdef inline np.ndarray dt64arr_year(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract civil year numbers from a 1-D ndarray[datetime64[*]] `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7693
 *     return arr_add(out, EPOCH_YEAR + offset, False)
 * 
 * cdef inline np.ndarray dt64arr_quarter(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract quarter numbers (1..4) from a 1-D ndarray[datetime64[*]] `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_quarter(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_quarter *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_quarter", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":7715
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_M(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7716
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_M(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7717
 *         np.ndarray out = dt64arr_as_int64_M(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, r
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":7721
 *         np.npy_int64 v, r
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":7722
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":7724
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Convert to quarter
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":7725
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Convert to quarter
 *         with cython.cdivision(True):
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":7724
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Convert to quarter
*/
    }

    /* "utils.pxd":7728
 *         # Convert to quarter
 *         with cython.cdivision(True):
 *             r = v % 12             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 r += 12
*/
    __pyx_v_r = (__pyx_v_v % 12);

    /* "utils.pxd":7729
 *         with cython.cdivision(True):
 *             r = v % 12
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 r += 12
 *             out_ptr[i] = (r / 3) + 1 + offset
*/
    __pyx_t_6 = (__pyx_v_r < 0);
    if (__pyx_t_6) {

      /* "utils.pxd":7730
 *             r = v % 12
 *             if r < 0:
 *                 r += 12             # <<<<<<<<<<<<<<
 *             out_ptr[i] = (r / 3) + 1 + offset
 * 
*/
      __pyx_v_r = (__pyx_v_r + 12);

      /* "utils.pxd":7729
 *         with cython.cdivision(True):
 *             r = v % 12
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 r += 12
 *             out_ptr[i] = (r / 3) + 1 + offset
*/
    }

    /* "utils.pxd":7731
 *             if r < 0:
 *                 r += 12
 *             out_ptr[i] = (r / 3) + 1 + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (((__pyx_v_r / 3) + 1) + __pyx_v_offset);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":7733
 *             out_ptr[i] = (r / 3) + 1 + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_month(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7693
 *     return arr_add(out, EPOCH_YEAR + offset, False)
 * 
 * cdef inline np.ndarray dt64arr_quarter(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract quarter numbers (1..4) from a 1-D ndarray[datetime64[*]] `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7735
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_month(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract month numbers (1..12) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_month(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_month *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_arr_mod __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_month", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":7755
 *     >>> arr.astype('datetime64[M]').astype('int64') % 12 + 1 + offset
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_M(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *     return arr_mod(out, 12, offset + 1, False)
 * 
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7756
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_M(arr, arr_reso, 0, copy)
 *     return arr_mod(out, 12, offset + 1, False)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_weekday(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.offset = (__pyx_v_offset + 1);
  __pyx_t_3.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_out, 12, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":7735
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_month(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract month numbers (1..12) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7758
 *     return arr_mod(out, 12, offset + 1, False)
 * 
 * cdef inline np.ndarray dt64arr_weekday(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract weekday numbers (0=Mon .. 6=Sun) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_weekday(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_weekday *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_weekday", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":7780
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7781
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7782
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, r
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":7786
 *         np.npy_int64 v, r
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":7787
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":7789
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Convert to weekday (0=Monday, 6=Sunday)
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":7790
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Convert to weekday (0=Monday, 6=Sunday)
 *         with cython.cdivision(True):
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":7789
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Convert to weekday (0=Monday, 6=Sunday)
*/
    }

    /* "utils.pxd":7793
 *         # Convert to weekday (0=Monday, 6=Sunday)
 *         with cython.cdivision(True):
 *             r = v % 7             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             r += 7
*/
    __pyx_v_r = (__pyx_v_v % 7);

    /* "utils.pxd":7794
 *         with cython.cdivision(True):
 *             r = v % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             r += 7
 *         # Anchor to Thursday (3)
*/
    __pyx_t_6 = (__pyx_v_r < 0);
    if (__pyx_t_6) {

      /* "utils.pxd":7795
 *             r = v % 7
 *         if r < 0:
 *             r += 7             # <<<<<<<<<<<<<<
 *         # Anchor to Thursday (3)
 *         r += 3
*/
      __pyx_v_r = (__pyx_v_r + 7);

      /* "utils.pxd":7794
 *         with cython.cdivision(True):
 *             r = v % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             r += 7
 *         # Anchor to Thursday (3)
*/
    }

    /* "utils.pxd":7797
 *             r += 7
 *         # Anchor to Thursday (3)
 *         r += 3             # <<<<<<<<<<<<<<
 *         if r >= 7:
 *             r -= 7
*/
    __pyx_v_r = (__pyx_v_r + 3);

    /* "utils.pxd":7798
 *         # Anchor to Thursday (3)
 *         r += 3
 *         if r >= 7:             # <<<<<<<<<<<<<<
 *             r -= 7
 *         out_ptr[i] = r + offset
*/
    __pyx_t_6 = (__pyx_v_r >= 7);
    if (__pyx_t_6) {

      /* "utils.pxd":7799
 *         r += 3
 *         if r >= 7:
 *             r -= 7             # <<<<<<<<<<<<<<
 *         out_ptr[i] = r + offset
 * 
*/
      __pyx_v_r = (__pyx_v_r - 7);

      /* "utils.pxd":7798
 *         # Anchor to Thursday (3)
 *         r += 3
 *         if r >= 7:             # <<<<<<<<<<<<<<
 *             r -= 7
 *         out_ptr[i] = r + offset
*/
    }

    /* "utils.pxd":7800
 *         if r >= 7:
 *             r -= 7
 *         out_ptr[i] = r + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_r + __pyx_v_offset);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":7802
 *         out_ptr[i] = r + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_day(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7758
 *     return arr_mod(out, 12, offset + 1, False)
 * 
 * cdef inline np.ndarray dt64arr_weekday(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract weekday numbers (0=Mon .. 6=Sun) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7804
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_day(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract day-of-month (1..31) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_day(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_day *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_n;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_v_n400;
  npy_int64 __pyx_v_n100;
  npy_int64 __pyx_v_n4;
  npy_int64 __pyx_v_n1;
  npy_int64 __pyx_v_yy;
  npy_int64 __pyx_v_mm;
  npy_int64 __pyx_v_days_bf;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __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("dt64arr_day", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":7822
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7823
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7824
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, n, r, n400, n100, n4, n1, yy, mm, days_bf
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":7828
 *         np.npy_int64 v, n, r, n400, n100, n4, n1, yy, mm, days_bf
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":7829
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":7831
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 * 
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":7832
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         # Convert to 0-based offset from 0001-01-01
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":7831
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 * 
*/
    }

    /* "utils.pxd":7835
 * 
 *         # Convert to 0-based offset from 0001-01-01
 *         n = v + EPOCH_DAY - 1             # <<<<<<<<<<<<<<
 * 
 *         with cython.cdivision(True):
*/
    __pyx_v_n = ((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY) - 1);

    /* "utils.pxd":7839
 *         with cython.cdivision(True):
 *             # Number of complete 400-year cycles
 *             n400 = n / 146_097; r = n % 146_097             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 n400 -= 1; r += 146_097
*/
    __pyx_v_n400 = (__pyx_v_n / 0x23AB1);
    __pyx_v_r = (__pyx_v_n % 0x23AB1);

    /* "utils.pxd":7840
 *             # Number of complete 400-year cycles
 *             n400 = n / 146_097; r = n % 146_097
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 n400 -= 1; r += 146_097
 *             n = r
*/
    __pyx_t_6 = (__pyx_v_r < 0);
    if (__pyx_t_6) {

      /* "utils.pxd":7841
 *             n400 = n / 146_097; r = n % 146_097
 *             if r < 0:
 *                 n400 -= 1; r += 146_097             # <<<<<<<<<<<<<<
 *             n = r
 *             # Number of complete 100-year cycles within the 400-year cycle
*/
      __pyx_v_n400 = (__pyx_v_n400 - 1);
      __pyx_v_r = (__pyx_v_r + 0x23AB1);

      /* "utils.pxd":7840
 *             # Number of complete 400-year cycles
 *             n400 = n / 146_097; r = n % 146_097
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 n400 -= 1; r += 146_097
 *             n = r
*/
    }

    /* "utils.pxd":7842
 *             if r < 0:
 *                 n400 -= 1; r += 146_097
 *             n = r             # <<<<<<<<<<<<<<
 *             # Number of complete 100-year cycles within the 400-year cycle
 *             n100 = n / 36_524;  n %= 36_524
*/
    __pyx_v_n = __pyx_v_r;

    /* "utils.pxd":7844
 *             n = r
 *             # Number of complete 100-year cycles within the 400-year cycle
 *             n100 = n / 36_524;  n %= 36_524             # <<<<<<<<<<<<<<
 *             # Number of complete 4-year cycles within the 100-year cycle
 *             n4   = n / 1_461;   n %= 1_461
*/
    __pyx_v_n100 = (__pyx_v_n / 0x8EAC);
    __pyx_v_n = __Pyx_mod_npy_int64(__pyx_v_n, 0x8EAC, 1);

    /* "utils.pxd":7846
 *             n100 = n / 36_524;  n %= 36_524
 *             # Number of complete 4-year cycles within the 100-year cycle
 *             n4   = n / 1_461;   n %= 1_461             # <<<<<<<<<<<<<<
 *             # Number of complete years within the 4-year cycle
 *             n1   = n / 365;     n %= 365
*/
    __pyx_v_n4 = (__pyx_v_n / 0x5B5);
    __pyx_v_n = __Pyx_mod_npy_int64(__pyx_v_n, 0x5B5, 1);

    /* "utils.pxd":7848
 *             n4   = n / 1_461;   n %= 1_461
 *             # Number of complete years within the 4-year cycle
 *             n1   = n / 365;     n %= 365             # <<<<<<<<<<<<<<
 * 
 *         # End-of-cycle dates map directly to December 31 (day=31)
*/
    __pyx_v_n1 = (__pyx_v_n / 0x16D);
    __pyx_v_n = __Pyx_mod_npy_int64(__pyx_v_n, 0x16D, 1);

    /* "utils.pxd":7851
 * 
 *         # End-of-cycle dates map directly to December 31 (day=31)
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates             # <<<<<<<<<<<<<<
 *             out_ptr[i] = 31 + offset
 *             continue
*/
    __pyx_t_7 = (__pyx_v_n100 == 4);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L8_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_n1 == 4);
    __pyx_t_6 = __pyx_t_7;
    __pyx_L8_bool_binop_done:;
    if (__pyx_t_6) {

      /* "utils.pxd":7852
 *         # End-of-cycle dates map directly to December 31 (day=31)
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates
 *             out_ptr[i] = 31 + offset             # <<<<<<<<<<<<<<
 *             continue
 * 
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = (31 + __pyx_v_offset);

      /* "utils.pxd":7853
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates
 *             out_ptr[i] = 31 + offset
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         # Compute day of month (1..31)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":7851
 * 
 *         # End-of-cycle dates map directly to December 31 (day=31)
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates             # <<<<<<<<<<<<<<
 *             out_ptr[i] = 31 + offset
 *             continue
*/
    }

    /* "utils.pxd":7856
 * 
 *         # Compute day of month (1..31)
 *         yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1             # <<<<<<<<<<<<<<
 *         mm = (n + 50) >> 5  # initial 1..12 estimate
 *         days_bf = days_bf_month(yy, mm)
*/
    __pyx_v_yy = (((((__pyx_v_n400 * 0x190) + (__pyx_v_n100 * 0x64)) + (__pyx_v_n4 * 4)) + __pyx_v_n1) + 1);

    /* "utils.pxd":7857
 *         # Compute day of month (1..31)
 *         yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1
 *         mm = (n + 50) >> 5  # initial 1..12 estimate             # <<<<<<<<<<<<<<
 *         days_bf = days_bf_month(yy, mm)
 *         if days_bf > n:
*/
    __pyx_v_mm = ((__pyx_v_n + 50) >> 5);

    /* "utils.pxd":7858
 *         yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1
 *         mm = (n + 50) >> 5  # initial 1..12 estimate
 *         days_bf = days_bf_month(yy, mm)             # <<<<<<<<<<<<<<
 *         if days_bf > n:
 *             days_bf = days_bf_month(yy, mm - 1)
*/
    __pyx_v_days_bf = __pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_yy, __pyx_v_mm);

    /* "utils.pxd":7859
 *         mm = (n + 50) >> 5  # initial 1..12 estimate
 *         days_bf = days_bf_month(yy, mm)
 *         if days_bf > n:             # <<<<<<<<<<<<<<
 *             days_bf = days_bf_month(yy, mm - 1)
 *         out_ptr[i] = (n - days_bf + 1) + offset
*/
    __pyx_t_6 = (__pyx_v_days_bf > __pyx_v_n);
    if (__pyx_t_6) {

      /* "utils.pxd":7860
 *         days_bf = days_bf_month(yy, mm)
 *         if days_bf > n:
 *             days_bf = days_bf_month(yy, mm - 1)             # <<<<<<<<<<<<<<
 *         out_ptr[i] = (n - days_bf + 1) + offset
 * 
*/
      __pyx_v_days_bf = __pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_yy, (__pyx_v_mm - 1));

      /* "utils.pxd":7859
 *         mm = (n + 50) >> 5  # initial 1..12 estimate
 *         days_bf = days_bf_month(yy, mm)
 *         if days_bf > n:             # <<<<<<<<<<<<<<
 *             days_bf = days_bf_month(yy, mm - 1)
 *         out_ptr[i] = (n - days_bf + 1) + offset
*/
    }

    /* "utils.pxd":7861
 *         if days_bf > n:
 *             days_bf = days_bf_month(yy, mm - 1)
 *         out_ptr[i] = (n - days_bf + 1) + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (((__pyx_v_n - __pyx_v_days_bf) + 1) + __pyx_v_offset);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":7863
 *         out_ptr[i] = (n - days_bf + 1) + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_hour(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7804
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_day(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract day-of-month (1..31) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_day", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7865
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_hour(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract hour-of-day (0..23) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_hour(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_hour *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_h __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_arr_mod __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_hour", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":7885
 *     >>> arr.astype('datetime64[h]').astype('int64') % 24 + offset
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_h(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *     return arr_mod(out, 24, offset, False)
 * 
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_h(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7886
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_h(arr, arr_reso, 0, copy)
 *     return arr_mod(out, 24, offset, False)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_minute(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.offset = __pyx_v_offset;
  __pyx_t_3.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_out, 24, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":7865
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_hour(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract hour-of-day (0..23) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_hour", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7888
 *     return arr_mod(out, 24, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_minute(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract minute-of-hour (0..59) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_minute(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_minute *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_m __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_arr_mod __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_minute", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":7908
 *     >>> arr.astype('datetime64[m]').astype('int64') % 60 + offset
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_m(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *     return arr_mod(out, 60, offset, False)
 * 
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_m(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7909
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_m(arr, arr_reso, 0, copy)
 *     return arr_mod(out, 60, offset, False)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_second(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.offset = __pyx_v_offset;
  __pyx_t_3.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_out, 60, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":7888
 *     return arr_mod(out, 24, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_minute(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract minute-of-hour (0..59) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_minute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7911
 *     return arr_mod(out, 60, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_second(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract second-of-minute (0..59) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_second(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_second *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_s __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_arr_mod __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_second", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":7931
 *     >>> arr.astype('datetime64[s]').astype('int64') % 60 + offset
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_s(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *     return arr_mod(out, 60, offset, False)
 * 
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_s(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7932
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_s(arr, arr_reso, 0, copy)
 *     return arr_mod(out, 60, offset, False)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_millisecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.offset = __pyx_v_offset;
  __pyx_t_3.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_out, 60, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":7911
 *     return arr_mod(out, 60, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_second(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract second-of-minute (0..59) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_second", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7934
 *     return arr_mod(out, 60, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_millisecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract millisecond-of-second (0..999) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_millisecond(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_millisecond *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ms __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_arr_mod __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_millisecond", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":7954
 *     >>> arr.astype('datetime64[ms]').astype('int64') % 1000 + offset
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_ms(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *     return arr_mod(out, 1_000, offset, False)
 * 
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_ms(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7955
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_ms(arr, arr_reso, 0, copy)
 *     return arr_mod(out, 1_000, offset, False)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_microsecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.offset = __pyx_v_offset;
  __pyx_t_3.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_out, 0x3E8, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":7934
 *     return arr_mod(out, 60, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_millisecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract millisecond-of-second (0..999) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_millisecond", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7957
 *     return arr_mod(out, 1_000, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_microsecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract microsecond-of-second (0..999,999) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_microsecond(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_microsecond *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_us __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_arr_mod __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_microsecond", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":7977
 *     >>> arr.astype('datetime64[us]').astype('int64') % 1_000_000 + offset
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_us(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *     return arr_mod(out, 1_000_000, offset, False)
 * 
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_us(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7978
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_us(arr, arr_reso, 0, copy)
 *     return arr_mod(out, 1_000_000, offset, False)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_nanosecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.offset = __pyx_v_offset;
  __pyx_t_3.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_out, 0xF4240, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":7957
 *     return arr_mod(out, 1_000, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_microsecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract microsecond-of-second (0..999,999) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_microsecond", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7980
 *     return arr_mod(out, 1_000_000, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_nanosecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract nanosecond-of-microsecond (0..999) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_nanosecond(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_nanosecond *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ns __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_mod __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_6;
  npy_intp __pyx_t_7;
  npy_intp __pyx_t_8;
  npy_intp __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_nanosecond", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":8001
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":8002
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":8003
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 8003, __pyx_L1_error)

      /* "utils.pxd":8002
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":8004
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Compute nanosecond
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 8004, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":8001
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":8008
 *     # Compute nanosecond
 *     cdef np.ndarray out
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         out = dt64arr_as_int64_ns(arr, arr_reso, 0, copy)
 *         return arr_mod(out, 1_000, offset, False)
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":8009
 *     cdef np.ndarray out
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         out = dt64arr_as_int64_ns(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         return arr_mod(out, 1_000, offset, False)
 * 
*/
    __pyx_t_4.__pyx_n = 3;
    __pyx_t_4.arr_reso = __pyx_v_arr_reso;
    __pyx_t_4.offset = 0;
    __pyx_t_4.copy = __pyx_v_copy;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_ns(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_out = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":8010
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         out = dt64arr_as_int64_ns(arr, arr_reso, 0, copy)
 *         return arr_mod(out, 1_000, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Return zero for coarser resolutions
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_out, 0x3E8, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8010, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8008
 *     # Compute nanosecond
 *     cdef np.ndarray out
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         out = dt64arr_as_int64_ns(arr, arr_reso, 0, copy)
 *         return arr_mod(out, 1_000, offset, False)
*/
  }

  /* "utils.pxd":8013
 * 
 *     # Return zero for coarser resolutions
 *     out = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     cdef:
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
*/
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "utils.pxd":8015
 *     out = arr_assure_int64(arr, copy)
 *     cdef:
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i, v
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8016
 *     cdef:
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i, v
 *     for i in range(size):
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8018
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i, v
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if out_ptr[i] == LLONG_MIN:
*/
  __pyx_t_7 = __pyx_v_size;
  __pyx_t_8 = __pyx_t_7;
  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
    __pyx_v_i = __pyx_t_9;

    /* "utils.pxd":8020
 *     for i in range(size):
 *         # Propagate NaT
 *         if out_ptr[i] == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         out_ptr[i] = offset
*/
    __pyx_t_1 = ((__pyx_v_out_ptr[__pyx_v_i]) == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":8021
 *         # Propagate NaT
 *         if out_ptr[i] == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         out_ptr[i] = offset
 *     return out
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":8020
 *     for i in range(size):
 *         # Propagate NaT
 *         if out_ptr[i] == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         out_ptr[i] = offset
*/
    }

    /* "utils.pxd":8022
 *         if out_ptr[i] == LLONG_MIN:
 *             continue
 *         out_ptr[i] = offset             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_offset;
    __pyx_L6_continue:;
  }

  /* "utils.pxd":8023
 *             continue
 *         out_ptr[i] = offset
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_times(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7980
 *     return arr_mod(out, 1_000_000, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_nanosecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract nanosecond-of-microsecond (0..999) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_nanosecond", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8025
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_times(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract time-of-day (elapsed since midnight) in the same unit as `arr` <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_times(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_times *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_mod __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_times", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":8043
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":8044
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":8045
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 8045, __pyx_L1_error)

      /* "utils.pxd":8044
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":8046
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Compute times
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 8046, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":8043
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":8049
 * 
 *     # Compute times
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_mod(arr, NS_DAY, offset, False)
*/
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":8050
 *     # Compute times
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":8051
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_mod(arr, NS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mod(arr, US_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_DAY, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8051, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8050
 *     # Compute times
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":8052
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_mod(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":8053
 *         return arr_mod(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mod(arr, US_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mod(arr, MS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8052
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_mod(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":8054
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mod(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":8055
 *         return arr_mod(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mod(arr, MS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mod(arr, SS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_DAY, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8054
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mod(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
*/
  }

  /* "utils.pxd":8056
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mod(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":8057
 *         return arr_mod(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mod(arr, SS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_mod(arr, 1440, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_DAY, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8056
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mod(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
*/
  }

  /* "utils.pxd":8058
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mod(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, 1440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":8059
 *         return arr_mod(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_mod(arr, 1440, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_mod(arr, 24, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_arr, 0x5A0, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8058
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mod(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, 1440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
*/
  }

  /* "utils.pxd":8060
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_mod(arr, 1440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, 24, offset, False)
 *     if arr_reso in (
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":8061
 *         return arr_mod(arr, 1440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_mod(arr, 24, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso in (
 *         np.NPY_DATETIMEUNIT.NPY_FR_D,  # day
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_arr, 24, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8060
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_mod(arr, 1440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, 24, offset, False)
 *     if arr_reso in (
*/
  }

  /* "utils.pxd":8062
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_mod(arr, 24, offset, False)
 *     if arr_reso in (             # <<<<<<<<<<<<<<
 *         np.NPY_DATETIMEUNIT.NPY_FR_D,  # day
 *         np.NPY_DATETIMEUNIT.NPY_FR_W,  # week
*/
  switch (__pyx_v_arr_reso) {
    case NPY_FR_D:

    /* "utils.pxd":8063
 *         return arr_mod(arr, 24, offset, False)
 *     if arr_reso in (
 *         np.NPY_DATETIMEUNIT.NPY_FR_D,  # day             # <<<<<<<<<<<<<<
 *         np.NPY_DATETIMEUNIT.NPY_FR_W,  # week
 *         np.NPY_DATETIMEUNIT.NPY_FR_M,  # month
*/
    case NPY_FR_W:

    /* "utils.pxd":8064
 *     if arr_reso in (
 *         np.NPY_DATETIMEUNIT.NPY_FR_D,  # day
 *         np.NPY_DATETIMEUNIT.NPY_FR_W,  # week             # <<<<<<<<<<<<<<
 *         np.NPY_DATETIMEUNIT.NPY_FR_M,  # month
 *         np.NPY_DATETIMEUNIT.NPY_FR_Y,  # year
*/
    case NPY_FR_M:

    /* "utils.pxd":8065
 *         np.NPY_DATETIMEUNIT.NPY_FR_D,  # day
 *         np.NPY_DATETIMEUNIT.NPY_FR_W,  # week
 *         np.NPY_DATETIMEUNIT.NPY_FR_M,  # month             # <<<<<<<<<<<<<<
 *         np.NPY_DATETIMEUNIT.NPY_FR_Y,  # year
 *     ):
*/
    case NPY_FR_Y:

    /* "utils.pxd":8068
 *         np.NPY_DATETIMEUNIT.NPY_FR_Y,  # year
 *     ):
 *         return arr_mul(arr, 0, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8068, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8062
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_mod(arr, 24, offset, False)
 *     if arr_reso in (             # <<<<<<<<<<<<<<
 *         np.NPY_DATETIMEUNIT.NPY_FR_D,  # day
 *         np.NPY_DATETIMEUNIT.NPY_FR_W,  # week
*/
    break;
    default: break;
  }

  /* "utils.pxd":8071
 * 
 *     # Unsupported resolution
 *     _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 * 
 * # . calendar
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 8071, __pyx_L1_error)

  /* "utils.pxd":8025
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_times(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract time-of-day (elapsed since midnight) in the same unit as `arr` <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_times", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8074
 * 
 * # . calendar
 * cdef inline np.ndarray dt64arr_isocalendar(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Return ISO-8601 calendar components for each element of a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_isocalendar(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_isocalendar *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_int64 __pyx_v_v;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  __pyx_t_7cytimes_5utils_iso __pyx_v__iso;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3[2];
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_isocalendar", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":8106
 *          [2003   43    1]]
 *     """
 *     arr = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target array
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "utils.pxd":8109
 *     cdef:
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = arr.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":8110
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp size = arr.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         # Output array
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]);

  /* "utils.pxd":8113
 *         np.npy_intp i
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(2, [size, 3], np.NPY_TYPES.NPY_INT64, 0)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_int64 v
*/
  __pyx_t_3[0] = __pyx_v_size;
  __pyx_t_3[1] = 3;
  __pyx_t_1 = PyArray_EMPTY(2, __pyx_t_3, NPY_INT64, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 8113, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8114
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(2, [size, 3], np.NPY_TYPES.NPY_INT64, 0)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64 v
 *         ymd _ymd
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8119
 *         iso _iso
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = arr_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_4 = __pyx_v_size;
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "utils.pxd":8120
 * 
 *     for i in range(size):
 *         v = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":8122
 *         v = arr_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[0] = out_ptr[1] = out_ptr[2] = v
 *         # Calculate ISO calendar (year, week, weekday)
*/
    __pyx_t_7 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_7) {

      /* "utils.pxd":8123
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             out_ptr[0] = out_ptr[1] = out_ptr[2] = v             # <<<<<<<<<<<<<<
 *         # Calculate ISO calendar (year, week, weekday)
 *         else:
*/
      (__pyx_v_out_ptr[0]) = __pyx_v_v;
      (__pyx_v_out_ptr[1]) = __pyx_v_v;
      (__pyx_v_out_ptr[2]) = __pyx_v_v;

      /* "utils.pxd":8122
 *         v = arr_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[0] = out_ptr[1] = out_ptr[2] = v
 *         # Calculate ISO calendar (year, week, weekday)
*/
      goto __pyx_L5;
    }

    /* "utils.pxd":8126
 *         # Calculate ISO calendar (year, week, weekday)
 *         else:
 *             _ymd = ymd_fr_ord(v + EPOCH_DAY)             # <<<<<<<<<<<<<<
 *             _iso = ymd_isocalendar(_ymd.year, _ymd.month, _ymd.day)
 *             out_ptr[0] = _iso.year
*/
    /*else*/ {
      __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY));

      /* "utils.pxd":8127
 *         else:
 *             _ymd = ymd_fr_ord(v + EPOCH_DAY)
 *             _iso = ymd_isocalendar(_ymd.year, _ymd.month, _ymd.day)             # <<<<<<<<<<<<<<
 *             out_ptr[0] = _iso.year
 *             out_ptr[1] = _iso.week
*/
      __pyx_v__iso = __pyx_f_7cytimes_5utils_ymd_isocalendar(__pyx_v__ymd.year, __pyx_v__ymd.month, __pyx_v__ymd.day);

      /* "utils.pxd":8128
 *             _ymd = ymd_fr_ord(v + EPOCH_DAY)
 *             _iso = ymd_isocalendar(_ymd.year, _ymd.month, _ymd.day)
 *             out_ptr[0] = _iso.year             # <<<<<<<<<<<<<<
 *             out_ptr[1] = _iso.week
 *             out_ptr[2] = _iso.weekday
*/
      __pyx_t_8 = __pyx_v__iso.year;
      (__pyx_v_out_ptr[0]) = __pyx_t_8;

      /* "utils.pxd":8129
 *             _iso = ymd_isocalendar(_ymd.year, _ymd.month, _ymd.day)
 *             out_ptr[0] = _iso.year
 *             out_ptr[1] = _iso.week             # <<<<<<<<<<<<<<
 *             out_ptr[2] = _iso.weekday
 *         # Increment +3
*/
      __pyx_t_8 = __pyx_v__iso.week;
      (__pyx_v_out_ptr[1]) = __pyx_t_8;

      /* "utils.pxd":8130
 *             out_ptr[0] = _iso.year
 *             out_ptr[1] = _iso.week
 *             out_ptr[2] = _iso.weekday             # <<<<<<<<<<<<<<
 *         # Increment +3
 *         out_ptr += 3
*/
      __pyx_t_8 = __pyx_v__iso.weekday;
      (__pyx_v_out_ptr[2]) = __pyx_t_8;
    }
    __pyx_L5:;

    /* "utils.pxd":8132
 *             out_ptr[2] = _iso.weekday
 *         # Increment +3
 *         out_ptr += 3             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    __pyx_v_out_ptr = (__pyx_v_out_ptr + 3);
  }

  /* "utils.pxd":8134
 *         out_ptr += 3
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_isoyear(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8074
 * 
 * # . calendar
 * cdef inline np.ndarray dt64arr_isocalendar(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Return ISO-8601 calendar components for each element of a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_isocalendar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8136
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_isoyear(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract ISO-8601 year numbers from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_isoyear(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_isoyear *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_isoyear", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8155
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8156
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8157
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8162
 *         ymd _ymd
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8163
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8165
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Calculate ISO year
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8166
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Calculate ISO year
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8165
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Calculate ISO year
*/
    }

    /* "utils.pxd":8168
 *             continue
 *         # Calculate ISO year
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)             # <<<<<<<<<<<<<<
 *         out_ptr[i] = ymd_isoyear(_ymd.year, _ymd.month, _ymd.day)
 * 
*/
    __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY));

    /* "utils.pxd":8169
 *         # Calculate ISO year
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
 *         out_ptr[i] = ymd_isoyear(_ymd.year, _ymd.month, _ymd.day)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_ymd_isoyear(__pyx_v__ymd.year, __pyx_v__ymd.month, __pyx_v__ymd.day);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8171
 *         out_ptr[i] = ymd_isoyear(_ymd.year, _ymd.month, _ymd.day)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_isoweek(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8136
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_isoyear(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract ISO-8601 year numbers from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_isoyear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8173
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_isoweek(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract ISO-8601 week numbers from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_isoweek(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_isoweek *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_isoweek", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8192
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8193
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8194
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8199
 *         ymd _ymd
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8200
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8202
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Calculate ISO week
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8203
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Calculate ISO week
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8202
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Calculate ISO week
*/
    }

    /* "utils.pxd":8205
 *             continue
 *         # Calculate ISO week
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)             # <<<<<<<<<<<<<<
 *         out_ptr[i] = ymd_isoweek(_ymd.year, _ymd.month, _ymd.day)
 * 
*/
    __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY));

    /* "utils.pxd":8206
 *         # Calculate ISO week
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
 *         out_ptr[i] = ymd_isoweek(_ymd.year, _ymd.month, _ymd.day)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_ymd_isoweek(__pyx_v__ymd.year, __pyx_v__ymd.month, __pyx_v__ymd.day);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8208
 *         out_ptr[i] = ymd_isoweek(_ymd.year, _ymd.month, _ymd.day)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_isoweekday(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8173
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_isoweek(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract ISO-8601 week numbers from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_isoweek", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8210
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_isoweekday(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract ISO-8601 weekday numbers (1=Mon .. 7=Sun) from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_isoweekday(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_isoweekday *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_isoweekday", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8229
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8230
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8231
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8236
 *         ymd _ymd
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8237
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8239
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Calculate ISO weekday
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8240
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Calculate ISO weekday
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8239
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Calculate ISO weekday
*/
    }

    /* "utils.pxd":8242
 *             continue
 *         # Calculate ISO weekday
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)             # <<<<<<<<<<<<<<
 *         out_ptr[i] = ymd_isoweekday(_ymd.year, _ymd.month, _ymd.day)
 * 
*/
    __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY));

    /* "utils.pxd":8243
 *         # Calculate ISO weekday
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
 *         out_ptr[i] = ymd_isoweekday(_ymd.year, _ymd.month, _ymd.day)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_ymd_isoweekday(__pyx_v__ymd.year, __pyx_v__ymd.month, __pyx_v__ymd.day);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8245
 *         out_ptr[i] = ymd_isoweekday(_ymd.year, _ymd.month, _ymd.day)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_is_leap_year(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8210
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_isoweekday(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract ISO-8601 weekday numbers (1=Mon .. 7=Sun) from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_isoweekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8247
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_is_leap_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise check for leap years of a 1-D datetime64 array `<'ndarray[bool]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_is_leap_year(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_is_leap_year *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_v_out = 0;
  npy_bool *__pyx_v_out_ptr;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_2;
  npy_intp __pyx_t_3[1];
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_is_leap_year", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":8264
 *         NaT values (LLONG_MIN) are emitted as `False`.
 *     """
 *     arr = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target array
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "utils.pxd":8267
 *     cdef:
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = arr.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":8268
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp size = arr.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         # Output array
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]);

  /* "utils.pxd":8271
 *         np.npy_intp i
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)             # <<<<<<<<<<<<<<
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)
 *         np.npy_int64 v
*/
  __pyx_t_3[0] = __pyx_v_size;
  __pyx_t_1 = PyArray_EMPTY(1, __pyx_t_3, NPY_BOOL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 8271, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8272
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64 v
 * 
*/
  __pyx_v_out_ptr = ((npy_bool *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8275
 *         np.npy_int64 v
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = arr_ptr[i]
 *         # Handle NaT
*/
  __pyx_t_4 = __pyx_v_size;
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "utils.pxd":8276
 * 
 *     for i in range(size):
 *         v = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         # Handle NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":8278
 *         v = arr_ptr[i]
 *         # Handle NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_7 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_7) {

      /* "utils.pxd":8279
 *         # Handle NaT
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         # Check leap year
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":8280
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Check leap year
 *         out_ptr[i] = is_leap_year(v + EPOCH_YEAR)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8278
 *         v = arr_ptr[i]
 *         # Handle NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":8282
 *             continue
 *         # Check leap year
 *         out_ptr[i] = is_leap_year(v + EPOCH_YEAR)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_is_leap_year((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_YEAR));
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8284
 *         out_ptr[i] = is_leap_year(v + EPOCH_YEAR)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_is_long_year(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8247
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_is_leap_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise check for leap years of a 1-D datetime64 array `<'ndarray[bool]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_is_leap_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8286
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_is_long_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise check for long years of a 1-D datetime64 array `<'ndarray[bool]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_is_long_year(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_is_long_year *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_v_out = 0;
  npy_bool *__pyx_v_out_ptr;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_2;
  npy_intp __pyx_t_3[1];
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_is_long_year", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":8303
 *         NaT values (LLONG_MIN) are emitted as `False`.
 *     """
 *     arr = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target array
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "utils.pxd":8306
 *     cdef:
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = arr.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":8307
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp size = arr.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         # Output array
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]);

  /* "utils.pxd":8310
 *         np.npy_intp i
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)             # <<<<<<<<<<<<<<
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)
 *         np.npy_int64 v
*/
  __pyx_t_3[0] = __pyx_v_size;
  __pyx_t_1 = PyArray_EMPTY(1, __pyx_t_3, NPY_BOOL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 8310, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8311
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64 v
 * 
*/
  __pyx_v_out_ptr = ((npy_bool *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8314
 *         np.npy_int64 v
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = arr_ptr[i]
 *         # Handle NaT
*/
  __pyx_t_4 = __pyx_v_size;
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "utils.pxd":8315
 * 
 *     for i in range(size):
 *         v = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         # Handle NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":8317
 *         v = arr_ptr[i]
 *         # Handle NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_7 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_7) {

      /* "utils.pxd":8318
 *         # Handle NaT
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         # Check long year
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":8319
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Check long year
 *         out_ptr[i] = is_long_year(v + EPOCH_YEAR)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8317
 *         v = arr_ptr[i]
 *         # Handle NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":8321
 *             continue
 *         # Check long year
 *         out_ptr[i] = is_long_year(v + EPOCH_YEAR)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_is_long_year((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_YEAR));
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8323
 *         out_ptr[i] = is_long_year(v + EPOCH_YEAR)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_leap_bt_years(np.ndarray arr, np.npy_int64 year, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8286
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_is_long_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise check for long years of a 1-D datetime64 array `<'ndarray[bool]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_is_long_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8325
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_leap_bt_years(np.ndarray arr, np.npy_int64 year, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Compute the number of leap years between the target `year` and elements
 *     of a 1-D datetime64 array `<'ndarray[int64]'>`.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_leap_bt_years(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_year, struct __pyx_opt_args_7cytimes_5utils_dt64arr_leap_bt_years *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_leap_bt_years", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8347
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8348
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8349
 *         np.ndarray out = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8353
 *         np.npy_int64 v
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8354
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8356
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Calculate leap years between
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8357
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Calculate leap years between
 *         out_ptr[i] = leaps_bt_years(v + EPOCH_YEAR, year)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8356
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Calculate leap years between
*/
    }

    /* "utils.pxd":8359
 *             continue
 *         # Calculate leap years between
 *         out_ptr[i] = leaps_bt_years(v + EPOCH_YEAR, year)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_leaps_bt_years((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_YEAR), __pyx_v_year);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8361
 *         out_ptr[i] = leaps_bt_years(v + EPOCH_YEAR, year)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_days_in_year(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8325
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_leap_bt_years(np.ndarray arr, np.npy_int64 year, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Compute the number of leap years between the target `year` and elements
 *     of a 1-D datetime64 array `<'ndarray[int64]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_leap_bt_years", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8363
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_in_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the number of days in the year (365/366) from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_days_in_year(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_year *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_days_in_year", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8382
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8383
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8384
 *         np.ndarray out = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8388
 *         np.npy_int64 v
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8389
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8391
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Get days in year
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8392
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Get days in year
 *         out_ptr[i] = days_in_year(v + EPOCH_YEAR)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8391
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Get days in year
*/
    }

    /* "utils.pxd":8394
 *             continue
 *         # Get days in year
 *         out_ptr[i] = days_in_year(v + EPOCH_YEAR)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_days_in_year((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_YEAR));
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8396
 *         out_ptr[i] = days_in_year(v + EPOCH_YEAR)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_days_bf_year(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8363
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_in_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the number of days in the year (365/366) from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_days_in_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8398
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_bf_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the number of days strictly before January 1 of year under the
 *     proleptic Gregorian rules from a 1-D datetime64 array `<'ndarray[int64]'>`.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_days_bf_year(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_bf_year *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_days_bf_year", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8418
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8419
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8420
 *         np.ndarray out = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8424
 *         np.npy_int64 v
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8425
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8427
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Get days before year
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8428
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Get days before year
 *         out_ptr[i] = days_bf_year(v + EPOCH_YEAR)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8427
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Get days before year
*/
    }

    /* "utils.pxd":8430
 *             continue
 *         # Get days before year
 *         out_ptr[i] = days_bf_year(v + EPOCH_YEAR)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_days_bf_year((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_YEAR));
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8432
 *         out_ptr[i] = days_bf_year(v + EPOCH_YEAR)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_day_of_year(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8398
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_bf_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the number of days strictly before January 1 of year under the
 *     proleptic Gregorian rules from a 1-D datetime64 array `<'ndarray[int64]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_days_bf_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8434
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_day_of_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the 1-based ordinal day-of-year from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_day_of_year(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_day_of_year *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_day_of_year", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8453
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8454
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8455
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8460
 *         ymd _ymd
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8461
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8463
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Get days of year
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8464
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Get days of year
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8463
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Get days of year
*/
    }

    /* "utils.pxd":8466
 *             continue
 *         # Get days of year
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)             # <<<<<<<<<<<<<<
 *         out_ptr[i] = day_of_year(_ymd.year, _ymd.month, _ymd.day)
 * 
*/
    __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY));

    /* "utils.pxd":8467
 *         # Get days of year
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
 *         out_ptr[i] = day_of_year(_ymd.year, _ymd.month, _ymd.day)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_day_of_year(__pyx_v__ymd.year, __pyx_v__ymd.month, __pyx_v__ymd.day);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8469
 *         out_ptr[i] = day_of_year(_ymd.year, _ymd.month, _ymd.day)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_days_in_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8434
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_day_of_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the 1-based ordinal day-of-year from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_day_of_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8471
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_in_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days in calendar quarter under the proleptic Gregorian rules
 *     from a 1-D datetime64 array `<'ndarray[int64]'>`.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_days_in_quarter(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_quarter *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_days_in_quarter", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8491
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8492
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8493
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8498
 *         ymd _ymd
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8499
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8501
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days in quarter
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8502
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Compute days in quarter
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8501
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days in quarter
*/
    }

    /* "utils.pxd":8504
 *             continue
 *         # Compute days in quarter
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)             # <<<<<<<<<<<<<<
 *         out_ptr[i] = days_in_quarter(_ymd.year, _ymd.month)
 * 
*/
    __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY));

    /* "utils.pxd":8505
 *         # Compute days in quarter
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
 *         out_ptr[i] = days_in_quarter(_ymd.year, _ymd.month)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_days_in_quarter(__pyx_v__ymd.year, __pyx_v__ymd.month);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8507
 *         out_ptr[i] = days_in_quarter(_ymd.year, _ymd.month)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_days_bf_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8471
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_in_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days in calendar quarter under the proleptic Gregorian rules
 *     from a 1-D datetime64 array `<'ndarray[int64]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_days_in_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8509
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_bf_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days strictly before the first day of the
 *     calendar quarter under the proleptic Gregorian rules from a 1-D
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_days_bf_quarter(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_bf_quarter *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_days_bf_quarter", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8530
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8531
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8532
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8537
 *         ymd _ymd
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8538
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8540
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days before quarter
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8541
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Compute days before quarter
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8540
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days before quarter
*/
    }

    /* "utils.pxd":8543
 *             continue
 *         # Compute days before quarter
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)             # <<<<<<<<<<<<<<
 *         out_ptr[i] = days_bf_quarter(_ymd.year, _ymd.month)
 * 
*/
    __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY));

    /* "utils.pxd":8544
 *         # Compute days before quarter
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
 *         out_ptr[i] = days_bf_quarter(_ymd.year, _ymd.month)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_days_bf_quarter(__pyx_v__ymd.year, __pyx_v__ymd.month);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8546
 *         out_ptr[i] = days_bf_quarter(_ymd.year, _ymd.month)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_day_of_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8509
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_bf_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days strictly before the first day of the
 *     calendar quarter under the proleptic Gregorian rules from a 1-D
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_days_bf_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8548
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_day_of_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the 1-based ordinal day-of-quarter from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_day_of_quarter(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_day_of_quarter *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_day_of_quarter", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8568
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8569
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8570
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8575
 *         ymd _ymd
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8576
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8578
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days of quarter
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8579
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Compute days of quarter
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8578
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days of quarter
*/
    }

    /* "utils.pxd":8581
 *             continue
 *         # Compute days of quarter
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)             # <<<<<<<<<<<<<<
 *         out_ptr[i] = day_of_quarter(_ymd.year, _ymd.month, _ymd.day)
 * 
*/
    __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY));

    /* "utils.pxd":8582
 *         # Compute days of quarter
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
 *         out_ptr[i] = day_of_quarter(_ymd.year, _ymd.month, _ymd.day)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_day_of_quarter(__pyx_v__ymd.year, __pyx_v__ymd.month, __pyx_v__ymd.day);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8584
 *         out_ptr[i] = day_of_quarter(_ymd.year, _ymd.month, _ymd.day)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_days_in_month(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8548
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_day_of_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the 1-based ordinal day-of-quarter from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_day_of_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8586
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_in_month(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days in calendar month under the proleptic Gregorian rules
 *     from a 1-D datetime64 array `<'ndarray[int64]'>`.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_days_in_month(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_month *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_days_in_month", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8606
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8607
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8608
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8613
 *         ymd _ymd
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8614
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8616
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days in month
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8617
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Compute days in month
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8616
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days in month
*/
    }

    /* "utils.pxd":8619
 *             continue
 *         # Compute days in month
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)             # <<<<<<<<<<<<<<
 *         out_ptr[i] = days_in_month(_ymd.year, _ymd.month)
 * 
*/
    __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY));

    /* "utils.pxd":8620
 *         # Compute days in month
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
 *         out_ptr[i] = days_in_month(_ymd.year, _ymd.month)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v__ymd.year, __pyx_v__ymd.month);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8622
 *         out_ptr[i] = days_in_month(_ymd.year, _ymd.month)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_days_bf_month(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8586
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_in_month(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days in calendar month under the proleptic Gregorian rules
 *     from a 1-D datetime64 array `<'ndarray[int64]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_days_in_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8624
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_bf_month(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days strictly before the first day of the
 *     calendar month under the proleptic Gregorian rules from a 1-D
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_days_bf_month(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_bf_month *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_days_bf_month", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8645
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8646
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8647
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8652
 *         ymd _ymd
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8653
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8655
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days before month
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8656
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Compute days before month
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8655
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days before month
*/
    }

    /* "utils.pxd":8658
 *             continue
 *         # Compute days before month
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)             # <<<<<<<<<<<<<<
 *         out_ptr[i] = days_bf_month(_ymd.year, _ymd.month)
 * 
*/
    __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY));

    /* "utils.pxd":8659
 *         # Compute days before month
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
 *         out_ptr[i] = days_bf_month(_ymd.year, _ymd.month)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_days_bf_month(__pyx_v__ymd.year, __pyx_v__ymd.month);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8661
 *         out_ptr[i] = days_bf_month(_ymd.year, _ymd.month)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * # . conversion: int64
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8624
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_bf_month(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days strictly before the first day of the
 *     calendar month under the proleptic Gregorian rules from a 1-D
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_days_bf_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8664
 * 
 * # . conversion: int64
 * cdef inline np.ndarray dt64arr_fr_int64(np.npy_int64 value, np.npy_intp size, str unit):             # <<<<<<<<<<<<<<
 *     """Create a 1-D datetime64 array filled with the specified integer `value` `<'ndarray[datetime64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_fr_int64(npy_int64 __pyx_v_value, npy_intp __pyx_v_size, PyObject *__pyx_v_unit) {
  PyArrayObject *__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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_fr_int64", 0);

  /* "utils.pxd":8675
 *     >>> np.full(size, value, dtype=f"datetime64[{unit}]")
 *     """
 *     return arr_fill_int64(value, size).astype(nptime_unit_str2dt64(unit))             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64(np.ndarray arr, str as_unit, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_fill_int64(__pyx_v_value, __pyx_v_size)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __pyx_t_3;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_str2dt64(__pyx_v_unit); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 8675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 8675, __pyx_L1_error)
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":8664
 * 
 * # . conversion: int64
 * cdef inline np.ndarray dt64arr_fr_int64(np.npy_int64 value, np.npy_intp size, str unit):             # <<<<<<<<<<<<<<
 *     """Create a 1-D datetime64 array filled with the specified integer `value` `<'ndarray[datetime64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_fr_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8677
 *     return arr_fill_int64(value, size).astype(nptime_unit_str2dt64(unit))
 * 
 * cdef inline np.ndarray dt64arr_as_int64(np.ndarray arr, str as_unit, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 ticks in the requested unit `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_as_unit, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  Py_ssize_t __pyx_v_size;
  Py_UCS4 __pyx_v_ch;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_UCS4 __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_s __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_m __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_h __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_W __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Q __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_11;
  int __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ns __pyx_t_13;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_us __pyx_t_14;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ms __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":8703
 *     >>> arr.astype(f"datetime64[{as_unit}]").astype("int64") + offset
 *     """
 *     if as_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(as_unit)
 *     cdef:
*/
  __pyx_t_1 = (__pyx_v_as_unit == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":8704
 *     """
 *     if as_unit is None:
 *         _raise_invalid_nptime_str_unit_error(as_unit)             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t size = str_len(as_unit)
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(__pyx_v_as_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 8704, __pyx_L1_error)

    /* "utils.pxd":8703
 *     >>> arr.astype(f"datetime64[{as_unit}]").astype("int64") + offset
 *     """
 *     if as_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(as_unit)
 *     cdef:
*/
  }

  /* "utils.pxd":8706
 *         _raise_invalid_nptime_str_unit_error(as_unit)
 *     cdef:
 *         Py_ssize_t size = str_len(as_unit)             # <<<<<<<<<<<<<<
 *         Py_UCS4 ch
 * 
*/
  __pyx_v_size = PyUnicode_GET_LENGTH(__pyx_v_as_unit);

  /* "utils.pxd":8710
 * 
 *     # Unit: 's', 'm', 'h', 'D', 'M', 'Y'
 *     if size == 1:             # <<<<<<<<<<<<<<
 *         ch = str_read(as_unit, 0)
 *         if ch == "s":
*/
  __pyx_t_1 = (__pyx_v_size == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":8711
 *     # Unit: 's', 'm', 'h', 'D', 'M', 'Y'
 *     if size == 1:
 *         ch = str_read(as_unit, 0)             # <<<<<<<<<<<<<<
 *         if ch == "s":
 *             return dt64arr_as_int64_s(arr, arr_reso, offset, copy)
*/
    __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_as_unit, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 8711, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_2;

    /* "utils.pxd":8712
 *     if size == 1:
 *         ch = str_read(as_unit, 0)
 *         if ch == "s":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_s(arr, arr_reso, offset, copy)
 *         if ch == "m":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x73);
    if (__pyx_t_1) {

      /* "utils.pxd":8713
 *         ch = str_read(as_unit, 0)
 *         if ch == "s":
 *             return dt64arr_as_int64_s(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 *         if ch == "m":
 *             return dt64arr_as_int64_m(arr, arr_reso, offset, copy)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_4.__pyx_n = 3;
      __pyx_t_4.arr_reso = __pyx_v_arr_reso;
      __pyx_t_4.offset = __pyx_v_offset;
      __pyx_t_4.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_s(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8713, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":8712
 *     if size == 1:
 *         ch = str_read(as_unit, 0)
 *         if ch == "s":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_s(arr, arr_reso, offset, copy)
 *         if ch == "m":
*/
    }

    /* "utils.pxd":8714
 *         if ch == "s":
 *             return dt64arr_as_int64_s(arr, arr_reso, offset, copy)
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_m(arr, arr_reso, offset, copy)
 *         if ch == "h":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x6D);
    if (__pyx_t_1) {

      /* "utils.pxd":8715
 *             return dt64arr_as_int64_s(arr, arr_reso, offset, copy)
 *         if ch == "m":
 *             return dt64arr_as_int64_m(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 *         if ch == "h":
 *             return dt64arr_as_int64_h(arr, arr_reso, offset, copy)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_5.__pyx_n = 3;
      __pyx_t_5.arr_reso = __pyx_v_arr_reso;
      __pyx_t_5.offset = __pyx_v_offset;
      __pyx_t_5.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_m(__pyx_v_arr, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8715, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":8714
 *         if ch == "s":
 *             return dt64arr_as_int64_s(arr, arr_reso, offset, copy)
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_m(arr, arr_reso, offset, copy)
 *         if ch == "h":
*/
    }

    /* "utils.pxd":8716
 *         if ch == "m":
 *             return dt64arr_as_int64_m(arr, arr_reso, offset, copy)
 *         if ch == "h":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_h(arr, arr_reso, offset, copy)
 *         if ch == "D":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x68);
    if (__pyx_t_1) {

      /* "utils.pxd":8717
 *             return dt64arr_as_int64_m(arr, arr_reso, offset, copy)
 *         if ch == "h":
 *             return dt64arr_as_int64_h(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 *         if ch == "D":
 *             return dt64arr_as_int64_D(arr, arr_reso, offset, copy)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6.__pyx_n = 3;
      __pyx_t_6.arr_reso = __pyx_v_arr_reso;
      __pyx_t_6.offset = __pyx_v_offset;
      __pyx_t_6.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_h(__pyx_v_arr, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8717, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":8716
 *         if ch == "m":
 *             return dt64arr_as_int64_m(arr, arr_reso, offset, copy)
 *         if ch == "h":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_h(arr, arr_reso, offset, copy)
 *         if ch == "D":
*/
    }

    /* "utils.pxd":8718
 *         if ch == "h":
 *             return dt64arr_as_int64_h(arr, arr_reso, offset, copy)
 *         if ch == "D":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_D(arr, arr_reso, offset, copy)
 *         if ch == "W":
*/
    __pyx_t_1 = (__pyx_v_ch == 68);
    if (__pyx_t_1) {

      /* "utils.pxd":8719
 *             return dt64arr_as_int64_h(arr, arr_reso, offset, copy)
 *         if ch == "D":
 *             return dt64arr_as_int64_D(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 *         if ch == "W":
 *             return dt64arr_as_int64_W(arr, arr_reso, offset, copy)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_7.__pyx_n = 3;
      __pyx_t_7.arr_reso = __pyx_v_arr_reso;
      __pyx_t_7.offset = __pyx_v_offset;
      __pyx_t_7.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8719, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":8718
 *         if ch == "h":
 *             return dt64arr_as_int64_h(arr, arr_reso, offset, copy)
 *         if ch == "D":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_D(arr, arr_reso, offset, copy)
 *         if ch == "W":
*/
    }

    /* "utils.pxd":8720
 *         if ch == "D":
 *             return dt64arr_as_int64_D(arr, arr_reso, offset, copy)
 *         if ch == "W":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_W(arr, arr_reso, offset, copy)
 *         if ch == "M":
*/
    __pyx_t_1 = (__pyx_v_ch == 87);
    if (__pyx_t_1) {

      /* "utils.pxd":8721
 *             return dt64arr_as_int64_D(arr, arr_reso, offset, copy)
 *         if ch == "W":
 *             return dt64arr_as_int64_W(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 *         if ch == "M":
 *             return dt64arr_as_int64_M(arr, arr_reso, offset, copy)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_8.__pyx_n = 3;
      __pyx_t_8.arr_reso = __pyx_v_arr_reso;
      __pyx_t_8.offset = __pyx_v_offset;
      __pyx_t_8.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_W(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8721, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":8720
 *         if ch == "D":
 *             return dt64arr_as_int64_D(arr, arr_reso, offset, copy)
 *         if ch == "W":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_W(arr, arr_reso, offset, copy)
 *         if ch == "M":
*/
    }

    /* "utils.pxd":8722
 *         if ch == "W":
 *             return dt64arr_as_int64_W(arr, arr_reso, offset, copy)
 *         if ch == "M":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_M(arr, arr_reso, offset, copy)
 *         if ch == "Q":
*/
    __pyx_t_1 = (__pyx_v_ch == 77);
    if (__pyx_t_1) {

      /* "utils.pxd":8723
 *             return dt64arr_as_int64_W(arr, arr_reso, offset, copy)
 *         if ch == "M":
 *             return dt64arr_as_int64_M(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 *         if ch == "Q":
 *             return dt64arr_as_int64_Q(arr, arr_reso, offset, copy)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_9.__pyx_n = 3;
      __pyx_t_9.arr_reso = __pyx_v_arr_reso;
      __pyx_t_9.offset = __pyx_v_offset;
      __pyx_t_9.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(__pyx_v_arr, &__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8723, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":8722
 *         if ch == "W":
 *             return dt64arr_as_int64_W(arr, arr_reso, offset, copy)
 *         if ch == "M":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_M(arr, arr_reso, offset, copy)
 *         if ch == "Q":
*/
    }

    /* "utils.pxd":8724
 *         if ch == "M":
 *             return dt64arr_as_int64_M(arr, arr_reso, offset, copy)
 *         if ch == "Q":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_Q(arr, arr_reso, offset, copy)
 *         if ch == "Y":
*/
    __pyx_t_1 = (__pyx_v_ch == 81);
    if (__pyx_t_1) {

      /* "utils.pxd":8725
 *             return dt64arr_as_int64_M(arr, arr_reso, offset, copy)
 *         if ch == "Q":
 *             return dt64arr_as_int64_Q(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 *         if ch == "Y":
 *             return dt64arr_as_int64_Y(arr, arr_reso, offset, copy)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_10.__pyx_n = 3;
      __pyx_t_10.arr_reso = __pyx_v_arr_reso;
      __pyx_t_10.offset = __pyx_v_offset;
      __pyx_t_10.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Q(__pyx_v_arr, &__pyx_t_10)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":8724
 *         if ch == "M":
 *             return dt64arr_as_int64_M(arr, arr_reso, offset, copy)
 *         if ch == "Q":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_Q(arr, arr_reso, offset, copy)
 *         if ch == "Y":
*/
    }

    /* "utils.pxd":8726
 *         if ch == "Q":
 *             return dt64arr_as_int64_Q(arr, arr_reso, offset, copy)
 *         if ch == "Y":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_Y(arr, arr_reso, offset, copy)
 * 
*/
    __pyx_t_1 = (__pyx_v_ch == 89);
    if (__pyx_t_1) {

      /* "utils.pxd":8727
 *             return dt64arr_as_int64_Q(arr, arr_reso, offset, copy)
 *         if ch == "Y":
 *             return dt64arr_as_int64_Y(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Unit: 'ns', 'us', 'ms'
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_11.__pyx_n = 3;
      __pyx_t_11.arr_reso = __pyx_v_arr_reso;
      __pyx_t_11.offset = __pyx_v_offset;
      __pyx_t_11.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_11)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8727, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":8726
 *         if ch == "Q":
 *             return dt64arr_as_int64_Q(arr, arr_reso, offset, copy)
 *         if ch == "Y":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_Y(arr, arr_reso, offset, copy)
 * 
*/
    }

    /* "utils.pxd":8710
 * 
 *     # Unit: 's', 'm', 'h', 'D', 'M', 'Y'
 *     if size == 1:             # <<<<<<<<<<<<<<
 *         ch = str_read(as_unit, 0)
 *         if ch == "s":
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":8730
 * 
 *     # Unit: 'ns', 'us', 'ms'
 *     elif size == 2 and str_read(as_unit, 1) == "s":             # <<<<<<<<<<<<<<
 *         ch = str_read(as_unit, 0)
 *         if ch == "n":
*/
  __pyx_t_12 = (__pyx_v_size == 2);
  if (__pyx_t_12) {
  } else {
    __pyx_t_1 = __pyx_t_12;
    goto __pyx_L13_bool_binop_done;
  }
  __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_as_unit, 1); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 8730, __pyx_L1_error)
  __pyx_t_12 = (__pyx_t_2 == 0x73);
  __pyx_t_1 = __pyx_t_12;
  __pyx_L13_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":8731
 *     # Unit: 'ns', 'us', 'ms'
 *     elif size == 2 and str_read(as_unit, 1) == "s":
 *         ch = str_read(as_unit, 0)             # <<<<<<<<<<<<<<
 *         if ch == "n":
 *             return dt64arr_as_int64_ns(arr, arr_reso, offset, copy)
*/
    __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_as_unit, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 8731, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_2;

    /* "utils.pxd":8732
 *     elif size == 2 and str_read(as_unit, 1) == "s":
 *         ch = str_read(as_unit, 0)
 *         if ch == "n":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_ns(arr, arr_reso, offset, copy)
 *         if ch == "u":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x6E);
    if (__pyx_t_1) {

      /* "utils.pxd":8733
 *         ch = str_read(as_unit, 0)
 *         if ch == "n":
 *             return dt64arr_as_int64_ns(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 *         if ch == "u":
 *             return dt64arr_as_int64_us(arr, arr_reso, offset, copy)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_13.__pyx_n = 3;
      __pyx_t_13.arr_reso = __pyx_v_arr_reso;
      __pyx_t_13.offset = __pyx_v_offset;
      __pyx_t_13.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_ns(__pyx_v_arr, &__pyx_t_13)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8733, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":8732
 *     elif size == 2 and str_read(as_unit, 1) == "s":
 *         ch = str_read(as_unit, 0)
 *         if ch == "n":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_ns(arr, arr_reso, offset, copy)
 *         if ch == "u":
*/
    }

    /* "utils.pxd":8734
 *         if ch == "n":
 *             return dt64arr_as_int64_ns(arr, arr_reso, offset, copy)
 *         if ch == "u":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_us(arr, arr_reso, offset, copy)
 *         if ch == "m":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x75);
    if (__pyx_t_1) {

      /* "utils.pxd":8735
 *             return dt64arr_as_int64_ns(arr, arr_reso, offset, copy)
 *         if ch == "u":
 *             return dt64arr_as_int64_us(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 *         if ch == "m":
 *             return dt64arr_as_int64_ms(arr, arr_reso, offset, copy)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_14.__pyx_n = 3;
      __pyx_t_14.arr_reso = __pyx_v_arr_reso;
      __pyx_t_14.offset = __pyx_v_offset;
      __pyx_t_14.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_us(__pyx_v_arr, &__pyx_t_14)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8735, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":8734
 *         if ch == "n":
 *             return dt64arr_as_int64_ns(arr, arr_reso, offset, copy)
 *         if ch == "u":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_us(arr, arr_reso, offset, copy)
 *         if ch == "m":
*/
    }

    /* "utils.pxd":8736
 *         if ch == "u":
 *             return dt64arr_as_int64_us(arr, arr_reso, offset, copy)
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_ms(arr, arr_reso, offset, copy)
 * 
*/
    __pyx_t_1 = (__pyx_v_ch == 0x6D);
    if (__pyx_t_1) {

      /* "utils.pxd":8737
 *             return dt64arr_as_int64_us(arr, arr_reso, offset, copy)
 *         if ch == "m":
 *             return dt64arr_as_int64_ms(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Unit: 'min' for pandas compatibility
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_15.__pyx_n = 3;
      __pyx_t_15.arr_reso = __pyx_v_arr_reso;
      __pyx_t_15.offset = __pyx_v_offset;
      __pyx_t_15.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_ms(__pyx_v_arr, &__pyx_t_15)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8737, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":8736
 *         if ch == "u":
 *             return dt64arr_as_int64_us(arr, arr_reso, offset, copy)
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_ms(arr, arr_reso, offset, copy)
 * 
*/
    }

    /* "utils.pxd":8730
 * 
 *     # Unit: 'ns', 'us', 'ms'
 *     elif size == 2 and str_read(as_unit, 1) == "s":             # <<<<<<<<<<<<<<
 *         ch = str_read(as_unit, 0)
 *         if ch == "n":
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":8740
 * 
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and as_unit == "min":             # <<<<<<<<<<<<<<
 *         return dt64arr_as_int64_m(arr, arr_reso, offset, copy)
 * 
*/
  __pyx_t_12 = (__pyx_v_size == 3);
  if (__pyx_t_12) {
  } else {
    __pyx_t_1 = __pyx_t_12;
    goto __pyx_L18_bool_binop_done;
  }
  __pyx_t_12 = (__Pyx_PyUnicode_Equals(__pyx_v_as_unit, __pyx_mstate_global->__pyx_n_u_min, Py_EQ)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(5, 8740, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_12;
  __pyx_L18_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":8741
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and as_unit == "min":
 *         return dt64arr_as_int64_m(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported unit
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 3;
    __pyx_t_5.arr_reso = __pyx_v_arr_reso;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = __pyx_v_copy;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_m(__pyx_v_arr, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8740
 * 
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and as_unit == "min":             # <<<<<<<<<<<<<<
 *         return dt64arr_as_int64_m(arr, arr_reso, offset, copy)
 * 
*/
  }
  __pyx_L4:;

  /* "utils.pxd":8744
 * 
 *     # Unsupported unit
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, as_unit)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64_Y(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_dt64arr_to_reso_error(__pyx_v_arr, __pyx_v_arr_reso, __pyx_v_as_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 8744, __pyx_L1_error)

  /* "utils.pxd":8677
 *     return arr_fill_int64(value, size).astype(nptime_unit_str2dt64(unit))
 * 
 * cdef inline np.ndarray dt64arr_as_int64(np.ndarray arr, str as_unit, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 ticks in the requested unit `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8746
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, as_unit)
 * 
 * cdef inline np.ndarray dt64arr_as_int64_Y(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 year ticks (Y) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_n;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_v_n400;
  npy_int64 __pyx_v_n100;
  npy_int64 __pyx_v_n4;
  npy_int64 __pyx_v_n1;
  npy_int64 __pyx_v_yy;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_7;
  npy_intp __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64_Y", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":8769
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":8770
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":8771
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 8771, __pyx_L1_error)

      /* "utils.pxd":8770
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":8772
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path: datetime64[Y]
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 8772, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":8769
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":8775
 * 
 *     # Fast-path: datetime64[Y]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:             # <<<<<<<<<<<<<<
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_add(arr, offset, False)
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":8776
 *     # Fast-path: datetime64[Y]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 * 
*/
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.copy = __pyx_v_copy;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":8777
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_add(arr, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path: datetime64[M]
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8775
 * 
 *     # Fast-path: datetime64[Y]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:             # <<<<<<<<<<<<<<
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_add(arr, offset, False)
*/
  }

  /* "utils.pxd":8780
 * 
 *     # Fast-path: datetime64[M]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:             # <<<<<<<<<<<<<<
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_div_floor(arr, 12, offset, False)
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":8781
 *     # Fast-path: datetime64[M]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, 12, offset, False)
 * 
*/
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.copy = __pyx_v_copy;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":8782
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_div_floor(arr, 12, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, 12, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8780
 * 
 *     # Fast-path: datetime64[M]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:             # <<<<<<<<<<<<<<
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_div_floor(arr, 12, offset, False)
*/
  }

  /* "utils.pxd":8786
 *     # Setup
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 3;
  __pyx_t_7.arr_reso = __pyx_v_arr_reso;
  __pyx_t_7.offset = 0;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "utils.pxd":8787
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8788
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, n, r, n400, n100, n4, n1, yy
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8793
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_8 = __pyx_v_size;
  __pyx_t_9 = __pyx_t_8;
  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
    __pyx_v_i = __pyx_t_10;

    /* "utils.pxd":8794
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8796
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 * 
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":8797
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         # Convert to 0-based offset from 0001-01-01
*/
      goto __pyx_L7_continue;

      /* "utils.pxd":8796
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 * 
*/
    }

    /* "utils.pxd":8800
 * 
 *         # Convert to 0-based offset from 0001-01-01
 *         n = v + EPOCH_DAY - 1             # <<<<<<<<<<<<<<
 * 
 *         with cython.cdivision(True):
*/
    __pyx_v_n = ((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY) - 1);

    /* "utils.pxd":8804
 *         with cython.cdivision(True):
 *             # Number of complete 400-year cycles
 *             n400 = n / 146_097; r = n % 146_097             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 n400 -= 1; r += 146_097
*/
    __pyx_v_n400 = (__pyx_v_n / 0x23AB1);
    __pyx_v_r = (__pyx_v_n % 0x23AB1);

    /* "utils.pxd":8805
 *             # Number of complete 400-year cycles
 *             n400 = n / 146_097; r = n % 146_097
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 n400 -= 1; r += 146_097
 *             n = r
*/
    __pyx_t_1 = (__pyx_v_r < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":8806
 *             n400 = n / 146_097; r = n % 146_097
 *             if r < 0:
 *                 n400 -= 1; r += 146_097             # <<<<<<<<<<<<<<
 *             n = r
 *             # Number of complete 100-year cycles within the 400-year cycle
*/
      __pyx_v_n400 = (__pyx_v_n400 - 1);
      __pyx_v_r = (__pyx_v_r + 0x23AB1);

      /* "utils.pxd":8805
 *             # Number of complete 400-year cycles
 *             n400 = n / 146_097; r = n % 146_097
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 n400 -= 1; r += 146_097
 *             n = r
*/
    }

    /* "utils.pxd":8807
 *             if r < 0:
 *                 n400 -= 1; r += 146_097
 *             n = r             # <<<<<<<<<<<<<<
 *             # Number of complete 100-year cycles within the 400-year cycle
 *             n100 = n / 36_524;  n %= 36_524
*/
    __pyx_v_n = __pyx_v_r;

    /* "utils.pxd":8809
 *             n = r
 *             # Number of complete 100-year cycles within the 400-year cycle
 *             n100 = n / 36_524;  n %= 36_524             # <<<<<<<<<<<<<<
 *             # Number of complete 4-year cycles within the 100-year cycle
 *             n4   = n / 1_461;   n %= 1_461
*/
    __pyx_v_n100 = (__pyx_v_n / 0x8EAC);
    __pyx_v_n = __Pyx_mod_npy_int64(__pyx_v_n, 0x8EAC, 1);

    /* "utils.pxd":8811
 *             n100 = n / 36_524;  n %= 36_524
 *             # Number of complete 4-year cycles within the 100-year cycle
 *             n4   = n / 1_461;   n %= 1_461             # <<<<<<<<<<<<<<
 *             # Number of complete years within the 4-year cycle
 *             n1   = n / 365;     n %= 365
*/
    __pyx_v_n4 = (__pyx_v_n / 0x5B5);
    __pyx_v_n = __Pyx_mod_npy_int64(__pyx_v_n, 0x5B5, 1);

    /* "utils.pxd":8813
 *             n4   = n / 1_461;   n %= 1_461
 *             # Number of complete years within the 4-year cycle
 *             n1   = n / 365;     n %= 365             # <<<<<<<<<<<<<<
 * 
 *         # Compute the year
*/
    __pyx_v_n1 = (__pyx_v_n / 0x16D);
    __pyx_v_n = __Pyx_mod_npy_int64(__pyx_v_n, 0x16D, 1);

    /* "utils.pxd":8816
 * 
 *         # Compute the year
 *         yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1             # <<<<<<<<<<<<<<
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates
 *             yy -= 1
*/
    __pyx_v_yy = (((((__pyx_v_n400 * 0x190) + (__pyx_v_n100 * 0x64)) + (__pyx_v_n4 * 4)) + __pyx_v_n1) + 1);

    /* "utils.pxd":8817
 *         # Compute the year
 *         yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates             # <<<<<<<<<<<<<<
 *             yy -= 1
 *         out_ptr[i] = yy - EPOCH_YEAR + offset
*/
    __pyx_t_11 = (__pyx_v_n100 == 4);
    if (!__pyx_t_11) {
    } else {
      __pyx_t_1 = __pyx_t_11;
      goto __pyx_L12_bool_binop_done;
    }
    __pyx_t_11 = (__pyx_v_n1 == 4);
    __pyx_t_1 = __pyx_t_11;
    __pyx_L12_bool_binop_done:;
    if (__pyx_t_1) {

      /* "utils.pxd":8818
 *         yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates
 *             yy -= 1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = yy - EPOCH_YEAR + offset
 * 
*/
      __pyx_v_yy = (__pyx_v_yy - 1);

      /* "utils.pxd":8817
 *         # Compute the year
 *         yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates             # <<<<<<<<<<<<<<
 *             yy -= 1
 *         out_ptr[i] = yy - EPOCH_YEAR + offset
*/
    }

    /* "utils.pxd":8819
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates
 *             yy -= 1
 *         out_ptr[i] = yy - EPOCH_YEAR + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((__pyx_v_yy - __pyx_v_7cytimes_5utils_EPOCH_YEAR) + __pyx_v_offset);
    __pyx_L7_continue:;
  }

  /* "utils.pxd":8821
 *         out_ptr[i] = yy - EPOCH_YEAR + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64_Q(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8746
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, as_unit)
 * 
 * cdef inline np.ndarray dt64arr_as_int64_Y(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 year ticks (Y) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64_Y", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8823
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_Q(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 quarter ticks (Q) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_Q(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Q *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64_Q", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":8846
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_M(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8847
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_M(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8848
 *         np.ndarray out = dt64arr_as_int64_M(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8853
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # preserve NaT value
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8854
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # preserve NaT value
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8856
 *         v = out_ptr[i]
 *         # preserve NaT value
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # convert months to quarters
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8857
 *         # preserve NaT value
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # convert months to quarters
 *         with cython.cdivision(True):
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8856
 *         v = out_ptr[i]
 *         # preserve NaT value
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # convert months to quarters
*/
    }

    /* "utils.pxd":8860
 *         # convert months to quarters
 *         with cython.cdivision(True):
 *             q = v / 3; r = v % 3             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1
*/
    __pyx_v_q = (__pyx_v_v / 3);
    __pyx_v_r = (__pyx_v_v % 3);

    /* "utils.pxd":8861
 *         with cython.cdivision(True):
 *             q = v / 3; r = v % 3
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *         out_ptr[i] = q + offset
*/
    __pyx_t_6 = (__pyx_v_r < 0);
    if (__pyx_t_6) {

      /* "utils.pxd":8862
 *             q = v / 3; r = v % 3
 *         if r < 0:
 *             q -= 1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q + offset
 * 
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":8861
 *         with cython.cdivision(True):
 *             q = v / 3; r = v % 3
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *         out_ptr[i] = q + offset
*/
    }

    /* "utils.pxd":8863
 *         if r < 0:
 *             q -= 1
 *         out_ptr[i] = q + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_q + __pyx_v_offset);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8865
 *         out_ptr[i] = q + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64_M(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8823
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_Q(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 quarter ticks (Q) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64_Q", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8867
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_M(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 month ticks (M) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_n;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_v_n400;
  npy_int64 __pyx_v_n100;
  npy_int64 __pyx_v_n4;
  npy_int64 __pyx_v_n1;
  npy_int64 __pyx_v_yy;
  npy_int64 __pyx_v_mm;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_7;
  npy_intp __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64_M", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":8890
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":8891
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":8892
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 8892, __pyx_L1_error)

      /* "utils.pxd":8891
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":8893
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path: datetime64[Y]
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 8893, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":8890
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":8896
 * 
 *     # Fast-path: datetime64[Y]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:             # <<<<<<<<<<<<<<
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_mul(arr, 12, offset, False)
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":8897
 *     # Fast-path: datetime64[Y]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 12, offset, False)
 * 
*/
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.copy = __pyx_v_copy;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":8898
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_mul(arr, 12, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path: datetime64[M]
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 12, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8896
 * 
 *     # Fast-path: datetime64[Y]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:             # <<<<<<<<<<<<<<
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_mul(arr, 12, offset, False)
*/
  }

  /* "utils.pxd":8901
 * 
 *     # Fast-path: datetime64[M]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:             # <<<<<<<<<<<<<<
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_add(arr, offset, False)
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":8902
 *     # Fast-path: datetime64[M]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 * 
*/
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.copy = __pyx_v_copy;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8902, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":8903
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_add(arr, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8903, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8901
 * 
 *     # Fast-path: datetime64[M]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:             # <<<<<<<<<<<<<<
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_add(arr, offset, False)
*/
  }

  /* "utils.pxd":8907
 *     # Setup
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 3;
  __pyx_t_7.arr_reso = __pyx_v_arr_reso;
  __pyx_t_7.offset = 0;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "utils.pxd":8908
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8909
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, n, r, n400, n100, n4, n1, yy, mm
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8914
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_8 = __pyx_v_size;
  __pyx_t_9 = __pyx_t_8;
  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
    __pyx_v_i = __pyx_t_10;

    /* "utils.pxd":8915
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8917
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 * 
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":8918
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         # Convert to 0-based offset from 0001-01-01
*/
      goto __pyx_L7_continue;

      /* "utils.pxd":8917
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 * 
*/
    }

    /* "utils.pxd":8921
 * 
 *         # Convert to 0-based offset from 0001-01-01
 *         n = v + EPOCH_DAY - 1             # <<<<<<<<<<<<<<
 * 
 *         with cython.cdivision(True):
*/
    __pyx_v_n = ((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY) - 1);

    /* "utils.pxd":8925
 *         with cython.cdivision(True):
 *             # Number of complete 400-year cycles
 *             n400 = n / 146_097; r = n % 146_097             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 n400 -= 1; r += 146_097
*/
    __pyx_v_n400 = (__pyx_v_n / 0x23AB1);
    __pyx_v_r = (__pyx_v_n % 0x23AB1);

    /* "utils.pxd":8926
 *             # Number of complete 400-year cycles
 *             n400 = n / 146_097; r = n % 146_097
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 n400 -= 1; r += 146_097
 *             n = r
*/
    __pyx_t_1 = (__pyx_v_r < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":8927
 *             n400 = n / 146_097; r = n % 146_097
 *             if r < 0:
 *                 n400 -= 1; r += 146_097             # <<<<<<<<<<<<<<
 *             n = r
 *             # Number of complete 100-year cycles within the 400-year cycle
*/
      __pyx_v_n400 = (__pyx_v_n400 - 1);
      __pyx_v_r = (__pyx_v_r + 0x23AB1);

      /* "utils.pxd":8926
 *             # Number of complete 400-year cycles
 *             n400 = n / 146_097; r = n % 146_097
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 n400 -= 1; r += 146_097
 *             n = r
*/
    }

    /* "utils.pxd":8928
 *             if r < 0:
 *                 n400 -= 1; r += 146_097
 *             n = r             # <<<<<<<<<<<<<<
 *             # Number of complete 100-year cycles within the 400-year cycle
 *             n100 = n / 36_524;  n %= 36_524
*/
    __pyx_v_n = __pyx_v_r;

    /* "utils.pxd":8930
 *             n = r
 *             # Number of complete 100-year cycles within the 400-year cycle
 *             n100 = n / 36_524;  n %= 36_524             # <<<<<<<<<<<<<<
 *             # Number of complete 4-year cycles within the 100-year cycle
 *             n4   = n / 1_461;   n %= 1_461
*/
    __pyx_v_n100 = (__pyx_v_n / 0x8EAC);
    __pyx_v_n = __Pyx_mod_npy_int64(__pyx_v_n, 0x8EAC, 1);

    /* "utils.pxd":8932
 *             n100 = n / 36_524;  n %= 36_524
 *             # Number of complete 4-year cycles within the 100-year cycle
 *             n4   = n / 1_461;   n %= 1_461             # <<<<<<<<<<<<<<
 *             # Number of complete years within the 4-year cycle
 *             n1   = n / 365;     n %= 365
*/
    __pyx_v_n4 = (__pyx_v_n / 0x5B5);
    __pyx_v_n = __Pyx_mod_npy_int64(__pyx_v_n, 0x5B5, 1);

    /* "utils.pxd":8934
 *             n4   = n / 1_461;   n %= 1_461
 *             # Number of complete years within the 4-year cycle
 *             n1   = n / 365;     n %= 365             # <<<<<<<<<<<<<<
 * 
 *         # Compute year & month
*/
    __pyx_v_n1 = (__pyx_v_n / 0x16D);
    __pyx_v_n = __Pyx_mod_npy_int64(__pyx_v_n, 0x16D, 1);

    /* "utils.pxd":8937
 * 
 *         # Compute year & month
 *         yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1             # <<<<<<<<<<<<<<
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates
 *             yy -= 1; mm = 12
*/
    __pyx_v_yy = (((((__pyx_v_n400 * 0x190) + (__pyx_v_n100 * 0x64)) + (__pyx_v_n4 * 4)) + __pyx_v_n1) + 1);

    /* "utils.pxd":8938
 *         # Compute year & month
 *         yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates             # <<<<<<<<<<<<<<
 *             yy -= 1; mm = 12
 *         else:
*/
    __pyx_t_11 = (__pyx_v_n100 == 4);
    if (!__pyx_t_11) {
    } else {
      __pyx_t_1 = __pyx_t_11;
      goto __pyx_L12_bool_binop_done;
    }
    __pyx_t_11 = (__pyx_v_n1 == 4);
    __pyx_t_1 = __pyx_t_11;
    __pyx_L12_bool_binop_done:;
    if (__pyx_t_1) {

      /* "utils.pxd":8939
 *         yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates
 *             yy -= 1; mm = 12             # <<<<<<<<<<<<<<
 *         else:
 *             mm = (n + 50) >> 5  # initial 1..12 estimate
*/
      __pyx_v_yy = (__pyx_v_yy - 1);
      __pyx_v_mm = 12;

      /* "utils.pxd":8938
 *         # Compute year & month
 *         yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates             # <<<<<<<<<<<<<<
 *             yy -= 1; mm = 12
 *         else:
*/
      goto __pyx_L11;
    }

    /* "utils.pxd":8941
 *             yy -= 1; mm = 12
 *         else:
 *             mm = (n + 50) >> 5  # initial 1..12 estimate             # <<<<<<<<<<<<<<
 *             if days_bf_month(yy, mm) > n:
 *                 mm -= 1
*/
    /*else*/ {
      __pyx_v_mm = ((__pyx_v_n + 50) >> 5);

      /* "utils.pxd":8942
 *         else:
 *             mm = (n + 50) >> 5  # initial 1..12 estimate
 *             if days_bf_month(yy, mm) > n:             # <<<<<<<<<<<<<<
 *                 mm -= 1
 * 
*/
      __pyx_t_1 = (__pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_yy, __pyx_v_mm) > __pyx_v_n);
      if (__pyx_t_1) {

        /* "utils.pxd":8943
 *             mm = (n + 50) >> 5  # initial 1..12 estimate
 *             if days_bf_month(yy, mm) > n:
 *                 mm -= 1             # <<<<<<<<<<<<<<
 * 
 *         # Total months since epoch
*/
        __pyx_v_mm = (__pyx_v_mm - 1);

        /* "utils.pxd":8942
 *         else:
 *             mm = (n + 50) >> 5  # initial 1..12 estimate
 *             if days_bf_month(yy, mm) > n:             # <<<<<<<<<<<<<<
 *                 mm -= 1
 * 
*/
      }
    }
    __pyx_L11:;

    /* "utils.pxd":8946
 * 
 *         # Total months since epoch
 *         out_ptr[i] = (yy - EPOCH_YEAR) * 12 + (mm - 1) + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((((__pyx_v_yy - __pyx_v_7cytimes_5utils_EPOCH_YEAR) * 12) + (__pyx_v_mm - 1)) + __pyx_v_offset);
    __pyx_L7_continue:;
  }

  /* "utils.pxd":8948
 *         out_ptr[i] = (yy - EPOCH_YEAR) * 12 + (mm - 1) + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64_W(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8867
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_M(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 month ticks (M) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64_M", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8950
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_W(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 week ticks (W) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_W(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_W *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64_W", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":8973
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8974
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8975
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8980
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # preserve NaT value
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8981
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # preserve NaT value
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8983
 *         v = out_ptr[i]
 *         # preserve NaT value
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # convert days to weeks
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8984
 *         # preserve NaT value
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # convert days to weeks
 *         with cython.cdivision(True):
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8983
 *         v = out_ptr[i]
 *         # preserve NaT value
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # convert days to weeks
*/
    }

    /* "utils.pxd":8987
 *         # convert days to weeks
 *         with cython.cdivision(True):
 *             q = v / 7; r = v % 7             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1
*/
    __pyx_v_q = (__pyx_v_v / 7);
    __pyx_v_r = (__pyx_v_v % 7);

    /* "utils.pxd":8988
 *         with cython.cdivision(True):
 *             q = v / 7; r = v % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *         out_ptr[i] = q + offset
*/
    __pyx_t_6 = (__pyx_v_r < 0);
    if (__pyx_t_6) {

      /* "utils.pxd":8989
 *             q = v / 7; r = v % 7
 *         if r < 0:
 *             q -= 1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q + offset
 * 
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":8988
 *         with cython.cdivision(True):
 *             q = v / 7; r = v % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *         out_ptr[i] = q + offset
*/
    }

    /* "utils.pxd":8990
 *         if r < 0:
 *             q -= 1
 *         out_ptr[i] = q + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_q + __pyx_v_offset);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8992
 *         out_ptr[i] = q + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64_D(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8950
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_W(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 week ticks (W) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64_W", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8994
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_D(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 day ticks (D) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_M_as_int64_D __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_Y_as_int64_D __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64_D", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":9017
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":9018
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":9019
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9019, __pyx_L1_error)

      /* "utils.pxd":9018
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":9020
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Conversion
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 9020, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":9017
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":9023
 * 
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_DAY, offset, False)
*/
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":9024
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":9025
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_DAY, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9025, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9024
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":9026
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":9027
 *         return arr_div_floor(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9026
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":9028
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":9029
 *         return arr_div_floor(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_DAY, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9029, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9028
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  }

  /* "utils.pxd":9030
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":9031
 *         return arr_div_floor(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_div_floor(arr, 1440, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_DAY, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9031, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9030
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  }

  /* "utils.pxd":9032
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, 1440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":9033
 *         return arr_div_floor(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_div_floor(arr, 1440, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_div_floor(arr, 24, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, 0x5A0, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9033, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9032
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, 1440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  }

  /* "utils.pxd":9034
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_div_floor(arr, 1440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":9035
 *         return arr_div_floor(arr, 1440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_div_floor(arr, 24, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_add(arr, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, 24, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9034
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_div_floor(arr, 1440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  }

  /* "utils.pxd":9036
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_div_floor(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":9037
 *         return arr_div_floor(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_add(arr, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 7, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9037, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9036
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_div_floor(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  }

  /* "utils.pxd":9038
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":9039
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 7, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 1, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 7, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9039, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9038
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  }

  /* "utils.pxd":9040
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, 1, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":9041
 *         return arr_mul(arr, 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 1, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, 1, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_8.__pyx_n = 3;
    __pyx_t_8.factor = 1;
    __pyx_t_8.offset = __pyx_v_offset;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_M_as_int64_D(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9041, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9040
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, 1, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  }

  /* "utils.pxd":9042
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 1, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, 1, offset, False)
 * 
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":9043
 *         return _dt64arr_M_as_int64_D(arr, 1, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, 1, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported array resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_9.__pyx_n = 3;
    __pyx_t_9.factor = 1;
    __pyx_t_9.offset = __pyx_v_offset;
    __pyx_t_9.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_Y_as_int64_D(__pyx_v_arr, &__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9042
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 1, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, 1, offset, False)
 * 
*/
  }

  /* "utils.pxd":9046
 * 
 *     # Unsupported array resolution
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "D")             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64_h(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_dt64arr_to_reso_error(__pyx_v_arr, __pyx_v_arr_reso, __pyx_mstate_global->__pyx_n_u_D); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9046, __pyx_L1_error)

  /* "utils.pxd":8994
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_D(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 day ticks (D) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64_D", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9048
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "D")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_h(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 hour ticks (h) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_h(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_h *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_M_as_int64_D __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_Y_as_int64_D __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64_h", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":9071
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":9072
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":9073
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9073, __pyx_L1_error)

      /* "utils.pxd":9072
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":9074
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Conversion
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 9074, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":9071
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":9077
 * 
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_HOUR, offset, False)
*/
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9077, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":9078
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":9079
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_HOUR, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_HOUR, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_HOUR, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9078
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":9080
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":9081
 *         return arr_div_floor(arr, NS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_HOUR, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_HOUR, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_HOUR, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9081, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9080
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":9082
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, MS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":9083
 *         return arr_div_floor(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_HOUR, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_HOUR, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_HOUR, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9083, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9082
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, MS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  }

  /* "utils.pxd":9084
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, SS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":9085
 *         return arr_div_floor(arr, MS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_HOUR, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_div_floor(arr, 60, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_HOUR, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9085, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9084
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, SS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  }

  /* "utils.pxd":9086
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, 60, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":9087
 *         return arr_div_floor(arr, SS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_div_floor(arr, 60, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_add(arr, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, 60, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9087, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9086
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, 60, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  }

  /* "utils.pxd":9088
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_div_floor(arr, 60, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":9089
 *         return arr_div_floor(arr, 60, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_add(arr, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, 24, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9089, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9088
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_div_floor(arr, 60, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  }

  /* "utils.pxd":9090
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":9091
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, 24, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 24 * 7, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 24, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9091, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9090
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  }

  /* "utils.pxd":9092
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 24 * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":9093
 *         return arr_mul(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 24 * 7, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 24, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0xa8, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9092
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 24 * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  }

  /* "utils.pxd":9094
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 24 * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":9095
 *         return arr_mul(arr, 24 * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 24, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, 24, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_8.__pyx_n = 3;
    __pyx_t_8.factor = 24;
    __pyx_t_8.offset = __pyx_v_offset;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_M_as_int64_D(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9094
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 24 * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  }

  /* "utils.pxd":9096
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, 24, offset, False)
 * 
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":9097
 *         return _dt64arr_M_as_int64_D(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, 24, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported array resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_9.__pyx_n = 3;
    __pyx_t_9.factor = 24;
    __pyx_t_9.offset = __pyx_v_offset;
    __pyx_t_9.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_Y_as_int64_D(__pyx_v_arr, &__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9097, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9096
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, 24, offset, False)
 * 
*/
  }

  /* "utils.pxd":9100
 * 
 *     # Unsupported array resolution
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "h")             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64_m(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_dt64arr_to_reso_error(__pyx_v_arr, __pyx_v_arr_reso, __pyx_mstate_global->__pyx_n_u_h); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9100, __pyx_L1_error)

  /* "utils.pxd":9048
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "D")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_h(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 hour ticks (h) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64_h", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9102
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "h")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_m(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 minute ticks (m) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_m(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_m *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_M_as_int64_D __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_Y_as_int64_D __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64_m", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":9125
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":9126
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":9127
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9127, __pyx_L1_error)

      /* "utils.pxd":9126
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":9128
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Conversion
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 9128, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":9125
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":9131
 * 
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MINUTE, offset, False)
*/
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":9132
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":9133
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MINUTE, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_MINUTE, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MINUTE, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9132
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":9134
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":9135
 *         return arr_div_floor(arr, NS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_MINUTE, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_MINUTE, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MINUTE, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9134
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":9136
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, MS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":9137
 *         return arr_div_floor(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_MINUTE, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_MINUTE, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_MINUTE, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9136
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, MS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  }

  /* "utils.pxd":9138
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, SS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":9139
 *         return arr_div_floor(arr, MS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_MINUTE, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_add(arr, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_MINUTE, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9138
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, SS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  }

  /* "utils.pxd":9140
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":9141
 *         return arr_div_floor(arr, SS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_add(arr, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, 60, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9140
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  }

  /* "utils.pxd":9142
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 60, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":9143
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, 60, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, 1_440, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 60, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9142
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 60, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  }

  /* "utils.pxd":9144
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, 60, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 1_440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":9145
 *         return arr_mul(arr, 60, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, 1_440, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 1_440 * 7, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0x5A0, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9144
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, 60, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 1_440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  }

  /* "utils.pxd":9146
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, 1_440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 1_440 * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":9147
 *         return arr_mul(arr, 1_440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 1_440 * 7, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 1_440, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0x2760, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9146
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, 1_440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 1_440 * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  }

  /* "utils.pxd":9148
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 1_440 * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, 1_440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":9149
 *         return arr_mul(arr, 1_440 * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 1_440, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, 1_440, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_8.__pyx_n = 3;
    __pyx_t_8.factor = 0x5A0;
    __pyx_t_8.offset = __pyx_v_offset;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_M_as_int64_D(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9148
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 1_440 * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, 1_440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  }

  /* "utils.pxd":9150
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 1_440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, 1_440, offset, False)
 * 
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":9151
 *         return _dt64arr_M_as_int64_D(arr, 1_440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, 1_440, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported array resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_9.__pyx_n = 3;
    __pyx_t_9.factor = 0x5A0;
    __pyx_t_9.offset = __pyx_v_offset;
    __pyx_t_9.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_Y_as_int64_D(__pyx_v_arr, &__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9150
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 1_440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, 1_440, offset, False)
 * 
*/
  }

  /* "utils.pxd":9154
 * 
 *     # Unsupported array resolution
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "m")             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64_s(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_dt64arr_to_reso_error(__pyx_v_arr, __pyx_v_arr_reso, __pyx_mstate_global->__pyx_n_u_m); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9154, __pyx_L1_error)

  /* "utils.pxd":9102
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "h")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_m(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 minute ticks (m) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64_m", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9156
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "m")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_s(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 second ticks (s) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_s(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_s *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_M_as_int64_D __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_Y_as_int64_D __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64_s", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":9179
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":9180
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":9181
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9181, __pyx_L1_error)

      /* "utils.pxd":9180
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":9182
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Conversion
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 9182, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":9179
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":9185
 * 
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_SECOND, offset, False)
*/
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":9186
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":9187
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_SECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_SECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_SECOND, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9186
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":9188
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":9189
 *         return arr_div_floor(arr, NS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_SECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_SECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_SECOND, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9188
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":9190
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, MS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":9191
 *         return arr_div_floor(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_SECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_add(arr, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_SECOND, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9190
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, MS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  }

  /* "utils.pxd":9192
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":9193
 *         return arr_div_floor(arr, MS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_add(arr, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, SS_MINUTE, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9192
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  }

  /* "utils.pxd":9194
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, SS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":9195
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, SS_MINUTE, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, SS_HOUR, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_MINUTE, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9194
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, SS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  }

  /* "utils.pxd":9196
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, SS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, SS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":9197
 *         return arr_mul(arr, SS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, SS_HOUR, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, SS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_HOUR, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9196
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, SS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, SS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  }

  /* "utils.pxd":9198
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, SS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":9199
 *         return arr_mul(arr, SS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, SS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, SS_DAY * 7, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_DAY, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9198
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, SS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  }

  /* "utils.pxd":9200
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, SS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":9201
 *         return arr_mul(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, SS_DAY * 7, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, SS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, (__pyx_v_7cytimes_5utils_SS_DAY * 7), &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9200
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, SS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  }

  /* "utils.pxd":9202
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, SS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":9203
 *         return arr_mul(arr, SS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, SS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, SS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_8.__pyx_n = 3;
    __pyx_t_8.factor = __pyx_v_7cytimes_5utils_SS_DAY;
    __pyx_t_8.offset = __pyx_v_offset;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_M_as_int64_D(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9202
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, SS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  }

  /* "utils.pxd":9204
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, SS_DAY, offset, False)
 * 
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":9205
 *         return _dt64arr_M_as_int64_D(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, SS_DAY, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported array resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_9.__pyx_n = 3;
    __pyx_t_9.factor = __pyx_v_7cytimes_5utils_SS_DAY;
    __pyx_t_9.offset = __pyx_v_offset;
    __pyx_t_9.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_Y_as_int64_D(__pyx_v_arr, &__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9204
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, SS_DAY, offset, False)
 * 
*/
  }

  /* "utils.pxd":9208
 * 
 *     # Unsupported array resolution
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "s")             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64_ms(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_dt64arr_to_reso_error(__pyx_v_arr, __pyx_v_arr_reso, __pyx_mstate_global->__pyx_n_u_s); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9208, __pyx_L1_error)

  /* "utils.pxd":9156
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "m")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_s(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 second ticks (s) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64_s", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9210
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "s")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_ms(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 millisecond ticks (ms) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_ms(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ms *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_M_as_int64_D __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_Y_as_int64_D __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64_ms", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":9233
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":9234
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":9235
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9235, __pyx_L1_error)

      /* "utils.pxd":9234
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":9236
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Conversion
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 9236, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":9233
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":9239
 * 
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MILLISECOND, offset, False)
*/
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":9240
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":9241
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MILLISECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_MILLISECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MILLISECOND, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9240
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":9242
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":9243
 *         return arr_div_floor(arr, NS_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_MILLISECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_add(arr, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MILLISECOND, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9242
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":9244
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":9245
 *         return arr_div_floor(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_add(arr, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, MS_SECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9244
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  }

  /* "utils.pxd":9246
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, MS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":9247
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, MS_SECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, MS_MINUTE, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_SECOND, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9246
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, MS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  }

  /* "utils.pxd":9248
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, MS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, MS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":9249
 *         return arr_mul(arr, MS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, MS_MINUTE, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, MS_HOUR, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_MINUTE, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9248
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, MS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, MS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  }

  /* "utils.pxd":9250
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, MS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, MS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":9251
 *         return arr_mul(arr, MS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, MS_HOUR, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, MS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_HOUR, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9250
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, MS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, MS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  }

  /* "utils.pxd":9252
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, MS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":9253
 *         return arr_mul(arr, MS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, MS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, MS_DAY * 7, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_DAY, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9252
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, MS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  }

  /* "utils.pxd":9254
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, MS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":9255
 *         return arr_mul(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, MS_DAY * 7, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, MS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, (__pyx_v_7cytimes_5utils_MS_DAY * 7), &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9255, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9254
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, MS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  }

  /* "utils.pxd":9256
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, MS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":9257
 *         return arr_mul(arr, MS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, MS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, MS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_8.__pyx_n = 3;
    __pyx_t_8.factor = __pyx_v_7cytimes_5utils_MS_DAY;
    __pyx_t_8.offset = __pyx_v_offset;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_M_as_int64_D(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9256
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, MS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  }

  /* "utils.pxd":9258
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, MS_DAY, offset, False)
 * 
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":9259
 *         return _dt64arr_M_as_int64_D(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, MS_DAY, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported array resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_9.__pyx_n = 3;
    __pyx_t_9.factor = __pyx_v_7cytimes_5utils_MS_DAY;
    __pyx_t_9.offset = __pyx_v_offset;
    __pyx_t_9.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_Y_as_int64_D(__pyx_v_arr, &__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9258
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, MS_DAY, offset, False)
 * 
*/
  }

  /* "utils.pxd":9262
 * 
 *     # Unsupported array resolution
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "ms")             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64_us(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_dt64arr_to_reso_error(__pyx_v_arr, __pyx_v_arr_reso, __pyx_mstate_global->__pyx_n_u_ms); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9262, __pyx_L1_error)

  /* "utils.pxd":9210
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "s")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_ms(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 millisecond ticks (ms) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64_ms", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9264
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "ms")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_us(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 microsecond ticks (us) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_us(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_us *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_M_as_int64_D __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_Y_as_int64_D __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64_us", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":9287
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":9288
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":9289
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9289, __pyx_L1_error)

      /* "utils.pxd":9288
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":9290
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Conversion
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 9290, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":9287
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":9293
 * 
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
*/
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":9294
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":9295
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_add(arr, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9294
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":9296
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":9297
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_add(arr, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9296
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":9298
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":9299
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, US_MILLISECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, US_SECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MILLISECOND, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9298
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  }

  /* "utils.pxd":9300
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":9301
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, US_SECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, US_MINUTE, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_SECOND, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9300
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  }

  /* "utils.pxd":9302
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":9303
 *         return arr_mul(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, US_MINUTE, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, US_HOUR, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MINUTE, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9302
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  }

  /* "utils.pxd":9304
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":9305
 *         return arr_mul(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, US_HOUR, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, US_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_HOUR, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9304
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  }

  /* "utils.pxd":9306
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":9307
 *         return arr_mul(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, US_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, US_DAY * 7, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9306
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  }

  /* "utils.pxd":9308
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":9309
 *         return arr_mul(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, US_DAY * 7, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, US_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, (__pyx_v_7cytimes_5utils_US_DAY * 7), &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9308
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  }

  /* "utils.pxd":9310
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, US_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":9311
 *         return arr_mul(arr, US_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, US_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, US_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_8.__pyx_n = 3;
    __pyx_t_8.factor = __pyx_v_7cytimes_5utils_US_DAY;
    __pyx_t_8.offset = __pyx_v_offset;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_M_as_int64_D(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9310
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, US_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  }

  /* "utils.pxd":9312
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, US_DAY, offset, False)
 * 
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":9313
 *         return _dt64arr_M_as_int64_D(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, US_DAY, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported array resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_9.__pyx_n = 3;
    __pyx_t_9.factor = __pyx_v_7cytimes_5utils_US_DAY;
    __pyx_t_9.offset = __pyx_v_offset;
    __pyx_t_9.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_Y_as_int64_D(__pyx_v_arr, &__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9312
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, US_DAY, offset, False)
 * 
*/
  }

  /* "utils.pxd":9316
 * 
 *     # Unsupported array resolution
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "us")             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64_ns(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_dt64arr_to_reso_error(__pyx_v_arr, __pyx_v_arr_reso, __pyx_mstate_global->__pyx_n_u_us); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9316, __pyx_L1_error)

  /* "utils.pxd":9264
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "ms")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_us(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 microsecond ticks (us) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64_us", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9318
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "us")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_ns(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 nanosecond ticks (ns) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_ns(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ns *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_M_as_int64_D __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_Y_as_int64_D __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64_ns", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":9341
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":9342
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":9343
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9343, __pyx_L1_error)

      /* "utils.pxd":9342
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":9344
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Conversion
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 9344, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":9341
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":9347
 * 
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_add(arr, offset, False)
*/
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":9348
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":9349
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_add(arr, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, NS_MICROSECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9348
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":9350
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":9351
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, NS_MICROSECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, NS_MILLISECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9350
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":9352
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":9353
 *         return arr_mul(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, NS_MILLISECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, NS_SECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MILLISECOND, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9352
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  }

  /* "utils.pxd":9354
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, NS_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":9355
 *         return arr_mul(arr, NS_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, NS_SECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, NS_MINUTE, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_SECOND, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9354
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, NS_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  }

  /* "utils.pxd":9356
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, NS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":9357
 *         return arr_mul(arr, NS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, NS_MINUTE, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, NS_HOUR, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MINUTE, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9356
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, NS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  }

  /* "utils.pxd":9358
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, NS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":9359
 *         return arr_mul(arr, NS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, NS_HOUR, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, NS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_HOUR, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9359, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9358
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, NS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  }

  /* "utils.pxd":9360
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, NS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":9361
 *         return arr_mul(arr, NS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, NS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, NS_DAY * 7, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_DAY, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9361, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9360
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, NS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  }

  /* "utils.pxd":9362
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":9363
 *         return arr_mul(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, NS_DAY * 7, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, NS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, (__pyx_v_7cytimes_5utils_NS_DAY * 7), &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9362
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  }

  /* "utils.pxd":9364
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, NS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":9365
 *         return arr_mul(arr, NS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, NS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, NS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.factor = __pyx_v_7cytimes_5utils_NS_DAY;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_M_as_int64_D(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9364
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, NS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  }

  /* "utils.pxd":9366
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, NS_DAY, offset, False)
 * 
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":9367
 *         return _dt64arr_M_as_int64_D(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, NS_DAY, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported array resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_8.__pyx_n = 3;
    __pyx_t_8.factor = __pyx_v_7cytimes_5utils_NS_DAY;
    __pyx_t_8.offset = __pyx_v_offset;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_Y_as_int64_D(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9366
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, NS_DAY, offset, False)
 * 
*/
  }

  /* "utils.pxd":9370
 * 
 *     # Unsupported array resolution
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "ns")             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray _dt64arr_Y_as_int64_D(np.ndarray arr, np.npy_int64 factor=1, np.npy_int64 offset=0, bint copy=True):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_dt64arr_to_reso_error(__pyx_v_arr, __pyx_v_arr_reso, __pyx_mstate_global->__pyx_n_u_ns); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9370, __pyx_L1_error)

  /* "utils.pxd":9318
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "us")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_ns(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 nanosecond ticks (ns) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64_ns", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9372
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "ns")
 * 
 * cdef inline np.ndarray _dt64arr_Y_as_int64_D(np.ndarray arr, np.npy_int64 factor=1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert an ndarray[datetime64[Y]] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'ndarray[int64]'>`.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__dt64arr_Y_as_int64_D(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils__dt64arr_Y_as_int64_D *__pyx_optional_args) {
  npy_int64 __pyx_v_factor = ((npy_int64)1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  npy_int64 __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils__dt64_Y_as_int64_D __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_dt64arr_Y_as_int64_D", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_factor = __pyx_optional_args->factor;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":9388
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 9388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":9389
 *     cdef:
 *         np.ndarray out = arr_assure_int64(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":9390
 *         np.ndarray out = arr_assure_int64(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":9395
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":9396
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":9398
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Convert to day resolution
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":9399
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Convert to day resolution
 *         out_ptr[i] = _dt64_Y_as_int64_D(v, factor, offset)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":9398
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Convert to day resolution
*/
    }

    /* "utils.pxd":9401
 *             continue
 *         # Convert to day resolution
 *         out_ptr[i] = _dt64_Y_as_int64_D(v, factor, offset)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    __pyx_t_8.__pyx_n = 2;
    __pyx_t_8.factor = __pyx_v_factor;
    __pyx_t_8.offset = __pyx_v_offset;
    __pyx_t_7 = __pyx_f_7cytimes_5utils__dt64_Y_as_int64_D(__pyx_v_v, &__pyx_t_8); 
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_t_7;
    __pyx_L3_continue:;
  }

  /* "utils.pxd":9403
 *         out_ptr[i] = _dt64_Y_as_int64_D(v, factor, offset)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray _dt64arr_M_as_int64_D(np.ndarray arr, np.npy_int64 factor=1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":9372
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "ns")
 * 
 * cdef inline np.ndarray _dt64arr_Y_as_int64_D(np.ndarray arr, np.npy_int64 factor=1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert an ndarray[datetime64[Y]] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'ndarray[int64]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils._dt64arr_Y_as_int64_D", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9405
 *     return out
 * 
 * cdef inline np.ndarray _dt64arr_M_as_int64_D(np.ndarray arr, np.npy_int64 factor=1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert an ndarray[datetime64[M]] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'ndarray[int64]'>`.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__dt64arr_M_as_int64_D(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils__dt64arr_M_as_int64_D *__pyx_optional_args) {
  npy_int64 __pyx_v_factor = ((npy_int64)1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  npy_int64 __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils__dt64_M_as_int64_D __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_dt64arr_M_as_int64_D", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_factor = __pyx_optional_args->factor;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":9421
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 9421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":9422
 *     cdef:
 *         np.ndarray out = arr_assure_int64(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":9423
 *         np.ndarray out = arr_assure_int64(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, yy_ep, yy, mm, leaps
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":9428
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":9429
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":9431
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Convert to day resolution
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":9432
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Convert to day resolution
 *         out_ptr[i] = _dt64_M_as_int64_D(v, factor, offset)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":9431
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Convert to day resolution
*/
    }

    /* "utils.pxd":9434
 *             continue
 *         # Convert to day resolution
 *         out_ptr[i] = _dt64_M_as_int64_D(v, factor, offset)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    __pyx_t_8.__pyx_n = 2;
    __pyx_t_8.factor = __pyx_v_factor;
    __pyx_t_8.offset = __pyx_v_offset;
    __pyx_t_7 = __pyx_f_7cytimes_5utils__dt64_M_as_int64_D(__pyx_v_v, &__pyx_t_8); 
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_t_7;
    __pyx_L3_continue:;
  }

  /* "utils.pxd":9436
 *         out_ptr[i] = _dt64_M_as_int64_D(v, factor, offset)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_W_iso(np.ndarray arr, int weekday, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":9405
 *     return out
 * 
 * cdef inline np.ndarray _dt64arr_M_as_int64_D(np.ndarray arr, np.npy_int64 factor=1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert an ndarray[datetime64[M]] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'ndarray[int64]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils._dt64arr_M_as_int64_D", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9438
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_W_iso(np.ndarray arr, int weekday, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 week ticks (W) aligned to an ISO weekday `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_W_iso(PyArrayObject *__pyx_v_arr, int __pyx_v_weekday, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_W_iso *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  npy_int64 __pyx_v_adj;
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  long __pyx_t_2;
  int __pyx_t_3;
  long __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_W __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_W_iso", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":9467
 * 
 *     # Fast-path
 *     cdef np.npy_int64 adj = 4 - min(max(weekday, 1), 7)             # <<<<<<<<<<<<<<
 *     if adj == 0:
 *         return dt64arr_as_int64_W(arr, arr_reso, offset, copy)
*/
  __pyx_t_1 = 7;
  __pyx_t_2 = 1;
  __pyx_t_3 = __pyx_v_weekday;
  __pyx_t_5 = (__pyx_t_2 > __pyx_t_3);
  if (__pyx_t_5) {
    __pyx_t_4 = __pyx_t_2;
  } else {
    __pyx_t_4 = __pyx_t_3;
  }
  __pyx_t_2 = __pyx_t_4;
  __pyx_t_5 = (__pyx_t_1 < __pyx_t_2);
  if (__pyx_t_5) {
    __pyx_t_4 = __pyx_t_1;
  } else {
    __pyx_t_4 = __pyx_t_2;
  }
  __pyx_v_adj = (4 - __pyx_t_4);

  /* "utils.pxd":9468
 *     # Fast-path
 *     cdef np.npy_int64 adj = 4 - min(max(weekday, 1), 7)
 *     if adj == 0:             # <<<<<<<<<<<<<<
 *         return dt64arr_as_int64_W(arr, arr_reso, offset, copy)
 * 
*/
  __pyx_t_5 = (__pyx_v_adj == 0);
  if (__pyx_t_5) {

    /* "utils.pxd":9469
 *     cdef np.npy_int64 adj = 4 - min(max(weekday, 1), 7)
 *     if adj == 0:
 *         return dt64arr_as_int64_W(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = __pyx_v_arr_reso;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = __pyx_v_copy;
    __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_W(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 9469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_r = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9468
 *     # Fast-path
 *     cdef np.npy_int64 adj = 4 - min(max(weekday, 1), 7)
 *     if adj == 0:             # <<<<<<<<<<<<<<
 *         return dt64arr_as_int64_W(arr, arr_reso, offset, copy)
 * 
*/
  }

  /* "utils.pxd":9473
 *     # Setup
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_8.__pyx_n = 3;
  __pyx_t_8.arr_reso = __pyx_v_arr_reso;
  __pyx_t_8.offset = 0;
  __pyx_t_8.copy = __pyx_v_copy;
  __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 9473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "utils.pxd":9474
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":9475
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":9480
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_9 = __pyx_v_size;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "utils.pxd":9481
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":9483
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Aligned to the specified weekday
*/
    __pyx_t_5 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_5) {

      /* "utils.pxd":9484
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Aligned to the specified weekday
 *         v += adj
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":9483
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Aligned to the specified weekday
*/
    }

    /* "utils.pxd":9486
 *             continue
 *         # Aligned to the specified weekday
 *         v += adj             # <<<<<<<<<<<<<<
 *         # Convert to week resolution
 *         with cython.cdivision(True):
*/
    __pyx_v_v = (__pyx_v_v + __pyx_v_adj);

    /* "utils.pxd":9489
 *         # Convert to week resolution
 *         with cython.cdivision(True):
 *             q = v / 7; r = v % 7             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1
*/
    __pyx_v_q = (__pyx_v_v / 7);
    __pyx_v_r = (__pyx_v_v % 7);

    /* "utils.pxd":9490
 *         with cython.cdivision(True):
 *             q = v / 7; r = v % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *         out_ptr[i] = q + offset
*/
    __pyx_t_5 = (__pyx_v_r < 0);
    if (__pyx_t_5) {

      /* "utils.pxd":9491
 *             q = v / 7; r = v % 7
 *         if r < 0:
 *             q -= 1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q + offset
 * 
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":9490
 *         with cython.cdivision(True):
 *             q = v / 7; r = v % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *         out_ptr[i] = q + offset
*/
    }

    /* "utils.pxd":9492
 *         if r < 0:
 *             q -= 1
 *         out_ptr[i] = q + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_q + __pyx_v_offset);
    __pyx_L4_continue:;
  }

  /* "utils.pxd":9494
 *         out_ptr[i] = q + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_to_ord(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":9438
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_W_iso(np.ndarray arr, int weekday, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 week ticks (W) aligned to an ISO weekday `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_W_iso", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9496
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_to_ord(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 proleptic
 *     Gregorian ordinals `<'ndarray[int64]'>`.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_to_ord(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_to_ord *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_to_ord", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":9520
 *     >>> arr.astype("datetime64[D]").astype("int64") + 719163 + offset
 *     """
 *     return dt64arr_as_int64_D(arr, arr_reso, EPOCH_DAY + offset, copy)             # <<<<<<<<<<<<<<
 * 
 * # . conversion: float64
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = (__pyx_v_7cytimes_5utils_EPOCH_DAY + __pyx_v_offset);
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 9520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":9496
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_to_ord(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 proleptic
 *     Gregorian ordinals `<'ndarray[int64]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_to_ord", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9523
 * 
 * # . conversion: float64
 * cdef inline np.ndarray dt64arr_to_ts(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to float64 Unix timestamps `<'ndarray[float64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_to_ts(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_to_ts *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_v_out = 0;
  npy_float64 *__pyx_v_out_ptr;
  npy_float64 __pyx_v_inv_us;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_us __pyx_t_2;
  npy_intp __pyx_t_3[1];
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_to_ts", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":9546
 *     >>> arr.astype("datetime64[us]").astype("int64") / 1_000_000
 *     """
 *     arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)  # int64[us]             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target array
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_us(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 9546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "utils.pxd":9549
 *     cdef:
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = arr.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":9550
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp size = arr.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]);

  /* "utils.pxd":9554
 *         np.npy_int64 v, q, r
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_FLOAT64, 0)             # <<<<<<<<<<<<<<
 *         np.npy_float64* out_ptr = <np.npy_float64*> np.PyArray_DATA(out)
 *         # Pre-computed
*/
  __pyx_t_3[0] = __pyx_v_size;
  __pyx_t_1 = PyArray_EMPTY(1, __pyx_t_3, NPY_FLOAT64, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 9554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9554, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":9555
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_FLOAT64, 0)
 *         np.npy_float64* out_ptr = <np.npy_float64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         # Pre-computed
 *         np.npy_float64 inv_us = 1.0 / <np.npy_float64> US_SECOND
*/
  __pyx_v_out_ptr = ((npy_float64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":9557
 *         np.npy_float64* out_ptr = <np.npy_float64*> np.PyArray_DATA(out)
 *         # Pre-computed
 *         np.npy_float64 inv_us = 1.0 / <np.npy_float64> US_SECOND             # <<<<<<<<<<<<<<
 * 
 *     for i in range(size):
*/
  if (unlikely(((npy_float64)__pyx_v_7cytimes_5utils_US_SECOND) == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(5, 9557, __pyx_L1_error)
  }
  __pyx_v_inv_us = (((npy_float64)1.0) / ((npy_float64)__pyx_v_7cytimes_5utils_US_SECOND));

  /* "utils.pxd":9559
 *         np.npy_float64 inv_us = 1.0 / <np.npy_float64> US_SECOND
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = arr_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_4 = __pyx_v_size;
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "utils.pxd":9560
 * 
 *     for i in range(size):
 *         v = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":9562
 *         v = arr_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = math.NAN
 *             continue
*/
    __pyx_t_7 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_7) {

      /* "utils.pxd":9563
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             out_ptr[i] = math.NAN             # <<<<<<<<<<<<<<
 *             continue
 *         # Convert to seconds
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = NAN;

      /* "utils.pxd":9564
 *         if v == LLONG_MIN:
 *             out_ptr[i] = math.NAN
 *             continue             # <<<<<<<<<<<<<<
 *         # Convert to seconds
 *         #: r in C semantics can be negative; normalize to 0 <= r < US_SECOND
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":9562
 *         v = arr_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = math.NAN
 *             continue
*/
    }

    /* "utils.pxd":9568
 *         #: r in C semantics can be negative; normalize to 0 <= r < US_SECOND
 *         with cython.cdivision(True):
 *             r = v % US_SECOND             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 r += US_SECOND
*/
    __pyx_v_r = (__pyx_v_v % __pyx_v_7cytimes_5utils_US_SECOND);

    /* "utils.pxd":9569
 *         with cython.cdivision(True):
 *             r = v % US_SECOND
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 r += US_SECOND
 *             #: (v - r) is an exact multiple of US_SECOND
*/
    __pyx_t_7 = (__pyx_v_r < 0);
    if (__pyx_t_7) {

      /* "utils.pxd":9570
 *             r = v % US_SECOND
 *             if r < 0:
 *                 r += US_SECOND             # <<<<<<<<<<<<<<
 *             #: (v - r) is an exact multiple of US_SECOND
 *             q = (v - r) / US_SECOND
*/
      __pyx_v_r = (__pyx_v_r + __pyx_v_7cytimes_5utils_US_SECOND);

      /* "utils.pxd":9569
 *         with cython.cdivision(True):
 *             r = v % US_SECOND
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 r += US_SECOND
 *             #: (v - r) is an exact multiple of US_SECOND
*/
    }

    /* "utils.pxd":9572
 *                 r += US_SECOND
 *             #: (v - r) is an exact multiple of US_SECOND
 *             q = (v - r) / US_SECOND             # <<<<<<<<<<<<<<
 *         #: Combine whole seconds and sub-second fraction
 *         out_ptr[i] = (<np.npy_float64> r * inv_us) + <np.npy_float64> q
*/
    __pyx_v_q = ((__pyx_v_v - __pyx_v_r) / ((npy_int64)__pyx_v_7cytimes_5utils_US_SECOND));

    /* "utils.pxd":9574
 *             q = (v - r) / US_SECOND
 *         #: Combine whole seconds and sub-second fraction
 *         out_ptr[i] = (<np.npy_float64> r * inv_us) + <np.npy_float64> q             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((((npy_float64)__pyx_v_r) * __pyx_v_inv_us) + ((npy_float64)__pyx_v_q));
    __pyx_L3_continue:;
  }

  /* "utils.pxd":9576
 *         out_ptr[i] = (<np.npy_float64> r * inv_us) + <np.npy_float64> q
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * # . conversion: unit
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":9523
 * 
 * # . conversion: float64
 * cdef inline np.ndarray dt64arr_to_ts(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to float64 Unix timestamps `<'ndarray[float64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_to_ts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9579
 * 
 * # . conversion: unit
 * cdef inline np.ndarray dt64arr_as_unit(np.ndarray arr, str as_unit, int arr_reso=-1, bint limit=False, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D datetime64 array to a specifc NumPy datetime64 unit `<'ndarray[datetime64]'>`
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_unit(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_as_unit, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_unit *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_limit = ((int)0);
  int __pyx_v_copy = ((int)1);
  int __pyx_v_is_dt64;
  int __pyx_v_as_reso;
  int __pyx_v_is_ns_safe;
  PyObject *__pyx_v_as_dtype = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10[5];
  size_t __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_13;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_us __pyx_t_14;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ns __pyx_t_15;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_16;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_17;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ms __pyx_t_18;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_s __pyx_t_19;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_m __pyx_t_20;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_h __pyx_t_21;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_22;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_W __pyx_t_23;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M __pyx_t_24;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_25;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_unit", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_limit = __pyx_optional_args->limit;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":9611
 *     """
 *     # Guard
 *     if as_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(as_unit)
 * 
*/
  __pyx_t_1 = (__pyx_v_as_unit == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":9612
 *     # Guard
 *     if as_unit is None:
 *         _raise_invalid_nptime_str_unit_error(as_unit)             # <<<<<<<<<<<<<<
 * 
 *     # Get array resolution
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(__pyx_v_as_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9612, __pyx_L1_error)

    /* "utils.pxd":9611
 *     """
 *     # Guard
 *     if as_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(as_unit)
 * 
*/
  }

  /* "utils.pxd":9615
 * 
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME             # <<<<<<<<<<<<<<
 *     if arr_reso < 0:
 *         if not is_dt64:
*/
  __pyx_v_is_dt64 = (PyArray_TYPE(__pyx_v_arr) == NPY_DATETIME);

  /* "utils.pxd":9616
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":9617
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:
 *         if not is_dt64:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (!__pyx_v_is_dt64);
    if (__pyx_t_1) {

      /* "utils.pxd":9618
 *     if arr_reso < 0:
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9618, __pyx_L1_error)

      /* "utils.pxd":9617
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:
 *         if not is_dt64:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":9619
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Parse target resolution
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 9619, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":9616
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":9622
 * 
 *     # Parse target resolution
 *     cdef int as_reso = nptime_unit_str2int(as_unit)             # <<<<<<<<<<<<<<
 * 
 *     # Check limit
*/
  __pyx_t_2 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_as_unit); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 9622, __pyx_L1_error)
  __pyx_v_as_reso = __pyx_t_2;

  /* "utils.pxd":9625
 * 
 *     # Check limit
 *     if limit:             # <<<<<<<<<<<<<<
 *         if as_reso not in (
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
*/
  if (__pyx_v_limit) {

    /* "utils.pxd":9626
 *     # Check limit
 *     if limit:
 *         if as_reso not in (             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,
*/
    switch (__pyx_v_as_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":9627
 *     if limit:
 *         if as_reso not in (
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,
 *             np.NPY_DATETIMEUNIT.NPY_FR_ms,
*/
      case NPY_FR_us:

      /* "utils.pxd":9628
 *         if as_reso not in (
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_ms,
 *             np.NPY_DATETIMEUNIT.NPY_FR_s,
*/
      case NPY_FR_ms:

      /* "utils.pxd":9629
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,
 *             np.NPY_DATETIMEUNIT.NPY_FR_ms,             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_s,
 *         ) or arr_reso not in (
*/
      case NPY_FR_s:

      /* "utils.pxd":9626
 *     # Check limit
 *     if limit:
 *         if as_reso not in (             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,
*/
      __pyx_t_3 = 0;
      break;
      default:
      __pyx_t_3 = 1;
      break;
    }
    __pyx_t_4 = __pyx_t_3;
    if (!__pyx_t_4) {
    } else {
      __pyx_t_1 = __pyx_t_4;
      goto __pyx_L8_bool_binop_done;
    }

    /* "utils.pxd":9631
 *             np.NPY_DATETIMEUNIT.NPY_FR_ms,
 *             np.NPY_DATETIMEUNIT.NPY_FR_s,
 *         ) or arr_reso not in (             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":9632
 *             np.NPY_DATETIMEUNIT.NPY_FR_s,
 *         ) or arr_reso not in (
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,
 *             np.NPY_DATETIMEUNIT.NPY_FR_ms,
*/
      case NPY_FR_us:

      /* "utils.pxd":9633
 *         ) or arr_reso not in (
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_ms,
 *             np.NPY_DATETIMEUNIT.NPY_FR_s,
*/
      case NPY_FR_ms:

      /* "utils.pxd":9634
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,
 *             np.NPY_DATETIMEUNIT.NPY_FR_ms,             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_s,
 *         ):
*/
      case NPY_FR_s:

      /* "utils.pxd":9631
 *             np.NPY_DATETIMEUNIT.NPY_FR_ms,
 *             np.NPY_DATETIMEUNIT.NPY_FR_s,
 *         ) or arr_reso not in (             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,
*/
      __pyx_t_4 = 0;
      break;
      default:
      __pyx_t_4 = 1;
      break;
    }
    __pyx_t_3 = __pyx_t_4;
    __pyx_t_1 = __pyx_t_3;
    __pyx_L8_bool_binop_done:;

    /* "utils.pxd":9626
 *     # Check limit
 *     if limit:
 *         if as_reso not in (             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,
*/
    if (unlikely(__pyx_t_1)) {

      /* "utils.pxd":9637
 *             np.NPY_DATETIMEUNIT.NPY_FR_s,
 *         ):
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Cannot convert array from datetime64[%s] to datetime64[%s].\n"
 *                 "Conversion limits to units between: 's', 'ms', 'us', 'ns'."
*/
      __pyx_t_6 = NULL;

      /* "utils.pxd":9640
 *                 "Cannot convert array from datetime64[%s] to datetime64[%s].\n"
 *                 "Conversion limits to units between: 's', 'ms', 'us', 'ns'."
 *                 % (nptime_unit_int2str(arr_reso), nptime_unit_int2str(as_reso))             # <<<<<<<<<<<<<<
 *             )
 * 
*/
      __pyx_t_7 = __pyx_f_7cytimes_5utils_nptime_unit_int2str(__pyx_v_arr_reso); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 9640, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyUnicode_Unicode(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 9640, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __pyx_f_7cytimes_5utils_nptime_unit_int2str(__pyx_v_as_reso); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 9640, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = __Pyx_PyUnicode_Unicode(__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 9640, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_convert_array_from_dateti;
      __pyx_t_10[1] = __pyx_t_8;
      __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u_to_datetime64;
      __pyx_t_10[3] = __pyx_t_9;
      __pyx_t_10[4] = __pyx_mstate_global->__pyx_kp_u_Conversion_limits_to_units_betw;

      /* "utils.pxd":9638
 *         ):
 *             raise ValueError(
 *                 "Cannot convert array from datetime64[%s] to datetime64[%s].\n"             # <<<<<<<<<<<<<<
 *                 "Conversion limits to units between: 's', 'ms', 'us', 'ns'."
 *                 % (nptime_unit_int2str(arr_reso), nptime_unit_int2str(as_reso))
*/
      __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_10, 5, 37 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 16 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 61, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9));
      if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 9638, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_11 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7};
        __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9637, __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_ERR(5, 9637, __pyx_L1_error)

      /* "utils.pxd":9626
 *     # Check limit
 *     if limit:
 *         if as_reso not in (             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,
*/
    }

    /* "utils.pxd":9625
 * 
 *     # Check limit
 *     if limit:             # <<<<<<<<<<<<<<
 *         if as_reso not in (
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
*/
  }

  /* "utils.pxd":9644
 * 
 *     # Fast-path: same unit
 *     if arr_reso == as_reso:             # <<<<<<<<<<<<<<
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor 'copy' flag
*/
  __pyx_t_1 = (__pyx_v_arr_reso == __pyx_v_as_reso);
  if (__pyx_t_1) {

    /* "utils.pxd":9645
 *     # Fast-path: same unit
 *     if arr_reso == as_reso:
 *         if is_dt64:             # <<<<<<<<<<<<<<
 *             return arr_add(arr, 0, copy)  # honor 'copy' flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
*/
    if (__pyx_v_is_dt64) {

      /* "utils.pxd":9646
 *     if arr_reso == as_reso:
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor 'copy' flag             # <<<<<<<<<<<<<<
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_12.__pyx_n = 1;
      __pyx_t_12.copy = __pyx_v_copy;
      __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, 0, &__pyx_t_12)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_r = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "utils.pxd":9645
 *     # Fast-path: same unit
 *     if arr_reso == as_reso:
 *         if is_dt64:             # <<<<<<<<<<<<<<
 *             return arr_add(arr, 0, copy)  # honor 'copy' flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
*/
    }

    /* "utils.pxd":9647
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor 'copy' flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))             # <<<<<<<<<<<<<<
 * 
 *     # To nanosecond [ns]
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = __pyx_f_7cytimes_5utils_nptime_unit_int2dt64(__pyx_v_arr_reso); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 9647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_11 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9647, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9647, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9644
 * 
 *     # Fast-path: same unit
 *     if arr_reso == as_reso:             # <<<<<<<<<<<<<<
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor 'copy' flag
*/
  }

  /* "utils.pxd":9651
 *     # To nanosecond [ns]
 *     cdef bint is_ns_safe
 *     cdef object as_dtype = None             # <<<<<<<<<<<<<<
 *     if as_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         # check 'ns' overflow
*/
  __Pyx_INCREF(Py_None);
  __pyx_v_as_dtype = Py_None;

  /* "utils.pxd":9652
 *     cdef bint is_ns_safe
 *     cdef object as_dtype = None
 *     if as_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         # check 'ns' overflow
 *         is_ns_safe = is_dt64arr_ns_safe(arr, arr_reso)
*/
  switch (__pyx_v_as_reso) {
    case NPY_FR_ns:

    /* "utils.pxd":9654
 *     if as_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         # check 'ns' overflow
 *         is_ns_safe = is_dt64arr_ns_safe(arr, arr_reso)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [ns]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
    __pyx_t_13.__pyx_n = 1;
    __pyx_t_13.arr_reso = __pyx_v_arr_reso;
    __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_13); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9654, __pyx_L1_error)
    __pyx_v_is_ns_safe = __pyx_t_1;

    /* "utils.pxd":9656
 *         is_ns_safe = is_dt64arr_ns_safe(arr, arr_reso)
 *         # my_unit [us] -> [ns]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             if not is_ns_safe:
 *                 if is_dt64:
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_us:

      /* "utils.pxd":9657
 *         # my_unit [us] -> [ns]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             if not is_ns_safe:             # <<<<<<<<<<<<<<
 *                 if is_dt64:
 *                     return arr_add(arr, 0, copy)  # honor 'copy' flag
*/
      __pyx_t_1 = (!__pyx_v_is_ns_safe);
      if (__pyx_t_1) {

        /* "utils.pxd":9658
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             if not is_ns_safe:
 *                 if is_dt64:             # <<<<<<<<<<<<<<
 *                     return arr_add(arr, 0, copy)  # honor 'copy' flag
 *                 return arr.astype(nptime_unit_int2dt64(arr_reso))
*/
        if (__pyx_v_is_dt64) {

          /* "utils.pxd":9659
 *             if not is_ns_safe:
 *                 if is_dt64:
 *                     return arr_add(arr, 0, copy)  # honor 'copy' flag             # <<<<<<<<<<<<<<
 *                 return arr.astype(nptime_unit_int2dt64(arr_reso))
 *         # my_unit [M, Y] -> [ns]
*/
          __Pyx_XDECREF((PyObject *)__pyx_r);
          __pyx_t_12.__pyx_n = 1;
          __pyx_t_12.copy = __pyx_v_copy;
          __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, 0, &__pyx_t_12)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9659, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_r = ((PyArrayObject *)__pyx_t_5);
          __pyx_t_5 = 0;
          goto __pyx_L0;

          /* "utils.pxd":9658
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             if not is_ns_safe:
 *                 if is_dt64:             # <<<<<<<<<<<<<<
 *                     return arr_add(arr, 0, copy)  # honor 'copy' flag
 *                 return arr.astype(nptime_unit_int2dt64(arr_reso))
*/
        }

        /* "utils.pxd":9660
 *                 if is_dt64:
 *                     return arr_add(arr, 0, copy)  # honor 'copy' flag
 *                 return arr.astype(nptime_unit_int2dt64(arr_reso))             # <<<<<<<<<<<<<<
 *         # my_unit [M, Y] -> [ns]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = __pyx_f_7cytimes_5utils_nptime_unit_int2dt64(__pyx_v_arr_reso); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 9660, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_11 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7};
          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9660, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9660, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "utils.pxd":9657
 *         # my_unit [us] -> [ns]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             if not is_ns_safe:             # <<<<<<<<<<<<<<
 *                 if is_dt64:
 *                     return arr_add(arr, 0, copy)  # honor 'copy' flag
*/
      }

      /* "utils.pxd":9656
 *         is_ns_safe = is_dt64arr_ns_safe(arr, arr_reso)
 *         # my_unit [us] -> [ns]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             if not is_ns_safe:
 *                 if is_dt64:
*/
      break;
      case NPY_FR_M:

      /* "utils.pxd":9662
 *                 return arr.astype(nptime_unit_int2dt64(arr_reso))
 *         # my_unit [M, Y] -> [ns]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             if not is_ns_safe:
 *                 arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)
*/
      case NPY_FR_Y:

      /* "utils.pxd":9663
 *         # my_unit [M, Y] -> [ns]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             if not is_ns_safe:             # <<<<<<<<<<<<<<
 *                 arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_1 = (!__pyx_v_is_ns_safe);
      if (__pyx_t_1) {

        /* "utils.pxd":9664
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             if not is_ns_safe:
 *                 arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             arr = dt64arr_as_int64_ns(arr, arr_reso, 0, copy)
*/
        __pyx_t_14.__pyx_n = 3;
        __pyx_t_14.arr_reso = __pyx_v_arr_reso;
        __pyx_t_14.offset = 0;
        __pyx_t_14.copy = __pyx_v_copy;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_us(__pyx_v_arr, &__pyx_t_14)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9664, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9665
 *             if not is_ns_safe:
 *                 arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_ns(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_NS)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_11 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9665, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9665, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "utils.pxd":9663
 *         # my_unit [M, Y] -> [ns]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             if not is_ns_safe:             # <<<<<<<<<<<<<<
 *                 arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":9666
 *                 arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)
 *                 return arr.astype(DT64_DTYPE_US)
 *             arr = dt64arr_as_int64_ns(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_NS)
 *         # Fallback [rest] -> [ns]
*/
      __pyx_t_15.__pyx_n = 3;
      __pyx_t_15.arr_reso = __pyx_v_arr_reso;
      __pyx_t_15.offset = 0;
      __pyx_t_15.copy = __pyx_v_copy;
      __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_ns(__pyx_v_arr, &__pyx_t_15)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9666, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "utils.pxd":9667
 *                 return arr.astype(DT64_DTYPE_US)
 *             arr = dt64arr_as_int64_ns(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # Fallback [rest] -> [ns]
 *         as_dtype = DT64_DTYPE_NS if is_ns_safe else DT64_DTYPE_US
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_7 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9667, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9667, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "utils.pxd":9662
 *                 return arr.astype(nptime_unit_int2dt64(arr_reso))
 *         # my_unit [M, Y] -> [ns]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             if not is_ns_safe:
 *                 arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)
*/
      break;
      default: break;
    }

    /* "utils.pxd":9669
 *             return arr.astype(DT64_DTYPE_NS)
 *         # Fallback [rest] -> [ns]
 *         as_dtype = DT64_DTYPE_NS if is_ns_safe else DT64_DTYPE_US             # <<<<<<<<<<<<<<
 * 
 *     # To microsecond [us]
*/
    if (__pyx_v_is_ns_safe) {
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_NS);
      __pyx_t_5 = __pyx_v_7cytimes_5utils_DT64_DTYPE_NS;
    } else {
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
      __pyx_t_5 = __pyx_v_7cytimes_5utils_DT64_DTYPE_US;
    }
    __Pyx_DECREF_SET(__pyx_v_as_dtype, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "utils.pxd":9652
 *     cdef bint is_ns_safe
 *     cdef object as_dtype = None
 *     if as_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         # check 'ns' overflow
 *         is_ns_safe = is_dt64arr_ns_safe(arr, arr_reso)
*/
    break;
    case NPY_FR_us:

    /* "utils.pxd":9674
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":9675
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MICROSECOND, 0, False)
*/
      __pyx_t_13.__pyx_n = 1;
      __pyx_t_13.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_13); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9675, __pyx_L1_error)
      __pyx_t_3 = (!__pyx_t_1);
      if (__pyx_t_3) {

        /* "utils.pxd":9676
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor(arr, NS_MICROSECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
        __pyx_t_16.__pyx_n = 1;
        __pyx_t_16.copy = __pyx_v_copy;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_16)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9676, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9677
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *         # my_unit [M, Y] -> [us]
*/
        __pyx_t_17.__pyx_n = 2;
        __pyx_t_17.offset = 0;
        __pyx_t_17.copy = 0;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_17)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9677, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9678
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MICROSECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [M, Y] -> [us]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_11 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9678, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9678, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "utils.pxd":9675
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MICROSECOND, 0, False)
*/
      }

      /* "utils.pxd":9674
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
      break;
      case NPY_FR_M:

      /* "utils.pxd":9680
 *                 return arr.astype(DT64_DTYPE_US)
 *         # my_unit [M, Y] -> [us]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_US)
*/
      case NPY_FR_Y:

      /* "utils.pxd":9681
 *         # my_unit [M, Y] -> [us]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # Fallback [rest] -> [us]
*/
      __pyx_t_14.__pyx_n = 3;
      __pyx_t_14.arr_reso = __pyx_v_arr_reso;
      __pyx_t_14.offset = 0;
      __pyx_t_14.copy = __pyx_v_copy;
      __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_us(__pyx_v_arr, &__pyx_t_14)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "utils.pxd":9682
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # Fallback [rest] -> [us]
 *         as_dtype = DT64_DTYPE_US
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_7 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9682, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9682, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "utils.pxd":9680
 *                 return arr.astype(DT64_DTYPE_US)
 *         # my_unit [M, Y] -> [us]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      default: break;
    }

    /* "utils.pxd":9684
 *             return arr.astype(DT64_DTYPE_US)
 *         # Fallback [rest] -> [us]
 *         as_dtype = DT64_DTYPE_US             # <<<<<<<<<<<<<<
 * 
 *     # To millisecond [ms]
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
    __Pyx_DECREF_SET(__pyx_v_as_dtype, __pyx_v_7cytimes_5utils_DT64_DTYPE_US);

    /* "utils.pxd":9672
 * 
 *     # To microsecond [us]
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_ms:

    /* "utils.pxd":9689
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":9690
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MILLISECOND, 0, False)
*/
      __pyx_t_13.__pyx_n = 1;
      __pyx_t_13.arr_reso = NPY_FR_ns;
      __pyx_t_3 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_13); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5, 9690, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_3);
      if (__pyx_t_1) {

        /* "utils.pxd":9691
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor(arr, NS_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_MS)
*/
        __pyx_t_16.__pyx_n = 1;
        __pyx_t_16.copy = __pyx_v_copy;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_16)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9691, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9692
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MILLISECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [M, Y] -> [ms]
*/
        __pyx_t_17.__pyx_n = 2;
        __pyx_t_17.offset = 0;
        __pyx_t_17.copy = 0;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MILLISECOND, &__pyx_t_17)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9692, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9693
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # my_unit [M, Y] -> [ms]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_11 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9693, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9693, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "utils.pxd":9690
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MILLISECOND, 0, False)
*/
      }

      /* "utils.pxd":9689
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
      break;
      case NPY_FR_M:

      /* "utils.pxd":9695
 *                 return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [M, Y] -> [ms]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_ms(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      case NPY_FR_Y:

      /* "utils.pxd":9696
 *         # my_unit [M, Y] -> [ms]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_ms(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # Fallback [rest] -> [ms]
*/
      __pyx_t_18.__pyx_n = 3;
      __pyx_t_18.arr_reso = __pyx_v_arr_reso;
      __pyx_t_18.offset = 0;
      __pyx_t_18.copy = __pyx_v_copy;
      __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_ms(__pyx_v_arr, &__pyx_t_18)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9696, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "utils.pxd":9697
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_ms(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # Fallback [rest] -> [ms]
 *         as_dtype = DT64_DTYPE_MS
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_7 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9697, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9697, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "utils.pxd":9695
 *                 return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [M, Y] -> [ms]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_ms(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      default: break;
    }

    /* "utils.pxd":9699
 *             return arr.astype(DT64_DTYPE_MS)
 *         # Fallback [rest] -> [ms]
 *         as_dtype = DT64_DTYPE_MS             # <<<<<<<<<<<<<<
 * 
 *     # To second [s]
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_MS);
    __Pyx_DECREF_SET(__pyx_v_as_dtype, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS);

    /* "utils.pxd":9687
 * 
 *     # To millisecond [ms]
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_s:

    /* "utils.pxd":9704
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":9705
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_SECOND, 0, False)
*/
      __pyx_t_13.__pyx_n = 1;
      __pyx_t_13.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_13); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9705, __pyx_L1_error)
      __pyx_t_3 = (!__pyx_t_1);
      if (__pyx_t_3) {

        /* "utils.pxd":9706
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor(arr, NS_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_SS)
*/
        __pyx_t_16.__pyx_n = 1;
        __pyx_t_16.copy = __pyx_v_copy;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_16)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9706, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9707
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [M, Y] -> [s]
*/
        __pyx_t_17.__pyx_n = 2;
        __pyx_t_17.offset = 0;
        __pyx_t_17.copy = 0;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_SECOND, &__pyx_t_17)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9707, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9708
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 *         # my_unit [M, Y] -> [s]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_11 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9708, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9708, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "utils.pxd":9705
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_SECOND, 0, False)
*/
      }

      /* "utils.pxd":9704
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
      break;
      case NPY_FR_M:

      /* "utils.pxd":9710
 *                 return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [M, Y] -> [s]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_s(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_SS)
*/
      case NPY_FR_Y:

      /* "utils.pxd":9711
 *         # my_unit [M, Y] -> [s]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_s(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_SS)
 *         # Fallback [rest] -> [s]
*/
      __pyx_t_19.__pyx_n = 3;
      __pyx_t_19.arr_reso = __pyx_v_arr_reso;
      __pyx_t_19.offset = 0;
      __pyx_t_19.copy = __pyx_v_copy;
      __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_s(__pyx_v_arr, &__pyx_t_19)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9711, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "utils.pxd":9712
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_s(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 *         # Fallback [rest] -> [s]
 *         as_dtype = DT64_DTYPE_SS
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_7 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9712, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9712, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "utils.pxd":9710
 *                 return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [M, Y] -> [s]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_s(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_SS)
*/
      break;
      default: break;
    }

    /* "utils.pxd":9714
 *             return arr.astype(DT64_DTYPE_SS)
 *         # Fallback [rest] -> [s]
 *         as_dtype = DT64_DTYPE_SS             # <<<<<<<<<<<<<<
 * 
 *     # To minute [m]
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_SS);
    __Pyx_DECREF_SET(__pyx_v_as_dtype, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS);

    /* "utils.pxd":9702
 * 
 *     # To second [s]
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_m:

    /* "utils.pxd":9719
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":9720
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MINUTE, 0, False)
*/
      __pyx_t_13.__pyx_n = 1;
      __pyx_t_13.arr_reso = NPY_FR_ns;
      __pyx_t_3 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_13); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5, 9720, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_3);
      if (__pyx_t_1) {

        /* "utils.pxd":9721
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor(arr, NS_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_MI)
*/
        __pyx_t_16.__pyx_n = 1;
        __pyx_t_16.copy = __pyx_v_copy;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_16)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9721, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9722
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_MI)
 *         # my_unit [M, Y] -> [m]
*/
        __pyx_t_17.__pyx_n = 2;
        __pyx_t_17.offset = 0;
        __pyx_t_17.copy = 0;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MINUTE, &__pyx_t_17)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9722, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9723
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_MI)             # <<<<<<<<<<<<<<
 *         # my_unit [M, Y] -> [m]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_11 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_MI};
          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9723, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9723, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "utils.pxd":9720
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MINUTE, 0, False)
*/
      }

      /* "utils.pxd":9719
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
      break;
      case NPY_FR_M:

      /* "utils.pxd":9725
 *                 return arr.astype(DT64_DTYPE_MI)
 *         # my_unit [M, Y] -> [m]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_m(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_MI)
*/
      case NPY_FR_Y:

      /* "utils.pxd":9726
 *         # my_unit [M, Y] -> [m]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_m(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MI)
 *         # Fallback [rest] -> [m]
*/
      __pyx_t_20.__pyx_n = 3;
      __pyx_t_20.arr_reso = __pyx_v_arr_reso;
      __pyx_t_20.offset = 0;
      __pyx_t_20.copy = __pyx_v_copy;
      __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_m(__pyx_v_arr, &__pyx_t_20)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9726, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "utils.pxd":9727
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_m(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_MI)             # <<<<<<<<<<<<<<
 *         # Fallback [rest] -> [m]
 *         as_dtype = DT64_DTYPE_MI
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_7 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_MI};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9727, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9727, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "utils.pxd":9725
 *                 return arr.astype(DT64_DTYPE_MI)
 *         # my_unit [M, Y] -> [m]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_m(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_MI)
*/
      break;
      default: break;
    }

    /* "utils.pxd":9729
 *             return arr.astype(DT64_DTYPE_MI)
 *         # Fallback [rest] -> [m]
 *         as_dtype = DT64_DTYPE_MI             # <<<<<<<<<<<<<<
 * 
 *     # To hour [h]
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_MI);
    __Pyx_DECREF_SET(__pyx_v_as_dtype, __pyx_v_7cytimes_5utils_DT64_DTYPE_MI);

    /* "utils.pxd":9717
 * 
 *     # To minute [m]
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_h:

    /* "utils.pxd":9734
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":9735
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_HOUR, 0, False)
*/
      __pyx_t_13.__pyx_n = 1;
      __pyx_t_13.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_13); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9735, __pyx_L1_error)
      __pyx_t_3 = (!__pyx_t_1);
      if (__pyx_t_3) {

        /* "utils.pxd":9736
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor(arr, NS_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_HH)
*/
        __pyx_t_16.__pyx_n = 1;
        __pyx_t_16.copy = __pyx_v_copy;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_16)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9736, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9737
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_HH)
 *         # my_unit [M, Y] -> [h]
*/
        __pyx_t_17.__pyx_n = 2;
        __pyx_t_17.offset = 0;
        __pyx_t_17.copy = 0;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_HOUR, &__pyx_t_17)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9737, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9738
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_HH)             # <<<<<<<<<<<<<<
 *         # my_unit [M, Y] -> [h]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_11 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_HH};
          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9738, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9738, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "utils.pxd":9735
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_HOUR, 0, False)
*/
      }

      /* "utils.pxd":9734
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
      break;
      case NPY_FR_M:

      /* "utils.pxd":9740
 *                 return arr.astype(DT64_DTYPE_HH)
 *         # my_unit [M, Y] -> [h]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_h(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_HH)
*/
      case NPY_FR_Y:

      /* "utils.pxd":9741
 *         # my_unit [M, Y] -> [h]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_h(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_HH)
 *         # Fallback [rest] -> [h]
*/
      __pyx_t_21.__pyx_n = 3;
      __pyx_t_21.arr_reso = __pyx_v_arr_reso;
      __pyx_t_21.offset = 0;
      __pyx_t_21.copy = __pyx_v_copy;
      __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_h(__pyx_v_arr, &__pyx_t_21)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9741, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "utils.pxd":9742
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_h(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_HH)             # <<<<<<<<<<<<<<
 *         # Fallback [rest] -> [h]
 *         as_dtype = DT64_DTYPE_HH
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_7 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_HH};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9742, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9742, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "utils.pxd":9740
 *                 return arr.astype(DT64_DTYPE_HH)
 *         # my_unit [M, Y] -> [h]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_h(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_HH)
*/
      break;
      default: break;
    }

    /* "utils.pxd":9744
 *             return arr.astype(DT64_DTYPE_HH)
 *         # Fallback [rest] -> [h]
 *         as_dtype = DT64_DTYPE_HH             # <<<<<<<<<<<<<<
 * 
 *     # To day [D]
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_HH);
    __Pyx_DECREF_SET(__pyx_v_as_dtype, __pyx_v_7cytimes_5utils_DT64_DTYPE_HH);

    /* "utils.pxd":9732
 * 
 *     # To hour [h]
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_D:

    /* "utils.pxd":9749
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":9750
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_DAY, 0, False)
*/
      __pyx_t_13.__pyx_n = 1;
      __pyx_t_13.arr_reso = NPY_FR_ns;
      __pyx_t_3 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_13); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5, 9750, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_3);
      if (__pyx_t_1) {

        /* "utils.pxd":9751
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor(arr, NS_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_DD)
*/
        __pyx_t_16.__pyx_n = 1;
        __pyx_t_16.copy = __pyx_v_copy;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_16)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9751, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9752
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_DD)
 *         # my_unit [M, Y] -> [D]
*/
        __pyx_t_17.__pyx_n = 2;
        __pyx_t_17.offset = 0;
        __pyx_t_17.copy = 0;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_DAY, &__pyx_t_17)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9752, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9753
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_DD)             # <<<<<<<<<<<<<<
 *         # my_unit [M, Y] -> [D]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_11 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_DD};
          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9753, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9753, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "utils.pxd":9750
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_DAY, 0, False)
*/
      }

      /* "utils.pxd":9749
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
      break;
      case NPY_FR_M:

      /* "utils.pxd":9755
 *                 return arr.astype(DT64_DTYPE_DD)
 *         # my_unit [M, Y] -> [D]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_DD)
*/
      case NPY_FR_Y:

      /* "utils.pxd":9756
 *         # my_unit [M, Y] -> [D]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_DD)
 *         # Fallback [rest] -> [D]
*/
      __pyx_t_22.__pyx_n = 3;
      __pyx_t_22.arr_reso = __pyx_v_arr_reso;
      __pyx_t_22.offset = 0;
      __pyx_t_22.copy = __pyx_v_copy;
      __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_22)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9756, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "utils.pxd":9757
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_DD)             # <<<<<<<<<<<<<<
 *         # Fallback [rest] -> [D]
 *         as_dtype = DT64_DTYPE_DD
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_7 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_DD};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9757, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9757, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "utils.pxd":9755
 *                 return arr.astype(DT64_DTYPE_DD)
 *         # my_unit [M, Y] -> [D]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_DD)
*/
      break;
      default: break;
    }

    /* "utils.pxd":9759
 *             return arr.astype(DT64_DTYPE_DD)
 *         # Fallback [rest] -> [D]
 *         as_dtype = DT64_DTYPE_DD             # <<<<<<<<<<<<<<
 * 
 *     # To week [W]
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_DD);
    __Pyx_DECREF_SET(__pyx_v_as_dtype, __pyx_v_7cytimes_5utils_DT64_DTYPE_DD);

    /* "utils.pxd":9747
 * 
 *     # To day [D]
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_W:

    /* "utils.pxd":9764
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:
 *         # my_unit [ns] -> [W]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":9765
 *         # my_unit [ns] -> [W]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_DAY * 7, 0, False)
*/
      __pyx_t_13.__pyx_n = 1;
      __pyx_t_13.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_13); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9765, __pyx_L1_error)
      __pyx_t_3 = (!__pyx_t_1);
      if (__pyx_t_3) {

        /* "utils.pxd":9766
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor(arr, NS_DAY * 7, 0, False)
 *                 return arr.astype(DT64_DTYPE_WW)
*/
        __pyx_t_16.__pyx_n = 1;
        __pyx_t_16.copy = __pyx_v_copy;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_16)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9766, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9767
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_DAY * 7, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_WW)
 *         # my_unit [M, Y] -> [W]
*/
        __pyx_t_17.__pyx_n = 2;
        __pyx_t_17.offset = 0;
        __pyx_t_17.copy = 0;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, (__pyx_v_7cytimes_5utils_NS_DAY * 7), &__pyx_t_17)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9767, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9768
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_DAY * 7, 0, False)
 *                 return arr.astype(DT64_DTYPE_WW)             # <<<<<<<<<<<<<<
 *         # my_unit [M, Y] -> [W]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_11 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_WW};
          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9768, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9768, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "utils.pxd":9765
 *         # my_unit [ns] -> [W]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_DAY * 7, 0, False)
*/
      }

      /* "utils.pxd":9764
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:
 *         # my_unit [ns] -> [W]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
      break;
      case NPY_FR_M:

      /* "utils.pxd":9770
 *                 return arr.astype(DT64_DTYPE_WW)
 *         # my_unit [M, Y] -> [W]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_W(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_WW)
*/
      case NPY_FR_Y:

      /* "utils.pxd":9771
 *         # my_unit [M, Y] -> [W]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_W(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_WW)
 *         # Fallback [rest] -> [W]
*/
      __pyx_t_23.__pyx_n = 3;
      __pyx_t_23.arr_reso = __pyx_v_arr_reso;
      __pyx_t_23.offset = 0;
      __pyx_t_23.copy = __pyx_v_copy;
      __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_W(__pyx_v_arr, &__pyx_t_23)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9771, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "utils.pxd":9772
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_W(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_WW)             # <<<<<<<<<<<<<<
 *         # Fallback [rest] -> [W]
 *         as_dtype = DT64_DTYPE_WW
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_7 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_WW};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9772, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9772, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "utils.pxd":9770
 *                 return arr.astype(DT64_DTYPE_WW)
 *         # my_unit [M, Y] -> [W]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_W(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_WW)
*/
      break;
      default: break;
    }

    /* "utils.pxd":9774
 *             return arr.astype(DT64_DTYPE_WW)
 *         # Fallback [rest] -> [W]
 *         as_dtype = DT64_DTYPE_WW             # <<<<<<<<<<<<<<
 * 
 *     # To month [M]
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_WW);
    __Pyx_DECREF_SET(__pyx_v_as_dtype, __pyx_v_7cytimes_5utils_DT64_DTYPE_WW);

    /* "utils.pxd":9762
 * 
 *     # To week [W]
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [W]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_M:

    /* "utils.pxd":9779
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         # my_unit [ns, Y] -> [M]
 *         if arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_ns, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_M(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_MM)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:
      case NPY_FR_Y:

      /* "utils.pxd":9780
 *         # my_unit [ns, Y] -> [M]
 *         if arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_ns, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_M(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MM)
 *         # Fallback [rest] -> [ms]
*/
      __pyx_t_24.__pyx_n = 3;
      __pyx_t_24.arr_reso = __pyx_v_arr_reso;
      __pyx_t_24.offset = 0;
      __pyx_t_24.copy = __pyx_v_copy;
      __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(__pyx_v_arr, &__pyx_t_24)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9780, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "utils.pxd":9781
 *         if arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_ns, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_M(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_MM)             # <<<<<<<<<<<<<<
 *         # Fallback [rest] -> [ms]
 *         as_dtype = DT64_DTYPE_MM
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_7 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_MM};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9781, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9781, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "utils.pxd":9779
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         # my_unit [ns, Y] -> [M]
 *         if arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_ns, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_M(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_MM)
*/
      break;
      default: break;
    }

    /* "utils.pxd":9783
 *             return arr.astype(DT64_DTYPE_MM)
 *         # Fallback [rest] -> [ms]
 *         as_dtype = DT64_DTYPE_MM             # <<<<<<<<<<<<<<
 * 
 *     # To year [Y]
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_MM);
    __Pyx_DECREF_SET(__pyx_v_as_dtype, __pyx_v_7cytimes_5utils_DT64_DTYPE_MM);

    /* "utils.pxd":9777
 * 
 *     # To month [M]
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:             # <<<<<<<<<<<<<<
 *         # my_unit [ns, Y] -> [M]
 *         if arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_ns, np.NPY_DATETIMEUNIT.NPY_FR_Y):
*/
    break;
    case NPY_FR_Y:

    /* "utils.pxd":9787
 *     # To year [Y]
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         arr = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         return arr.astype(DT64_DTYPE_YY)
 * 
*/
    __pyx_t_25.__pyx_n = 3;
    __pyx_t_25.arr_reso = __pyx_v_arr_reso;
    __pyx_t_25.offset = 0;
    __pyx_t_25.copy = __pyx_v_copy;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_25)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "utils.pxd":9788
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         arr = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)
 *         return arr.astype(DT64_DTYPE_YY)             # <<<<<<<<<<<<<<
 * 
 *     # Fallback
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_11 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_YY};
      __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9788, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9788, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9786
 * 
 *     # To year [Y]
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:             # <<<<<<<<<<<<<<
 *         arr = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)
 *         return arr.astype(DT64_DTYPE_YY)
*/
    break;
    default: break;
  }

  /* "utils.pxd":9791
 * 
 *     # Fallback
 *     if not is_dt64:             # <<<<<<<<<<<<<<
 *         arr = arr.astype(nptime_unit_int2dt64(arr_reso))
 *     if as_dtype is None:
*/
  __pyx_t_3 = (!__pyx_v_is_dt64);
  if (__pyx_t_3) {

    /* "utils.pxd":9792
 *     # Fallback
 *     if not is_dt64:
 *         arr = arr.astype(nptime_unit_int2dt64(arr_reso))             # <<<<<<<<<<<<<<
 *     if as_dtype is None:
 *         as_dtype = nptime_unit_int2dt64(as_reso)
*/
    __pyx_t_7 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = __pyx_f_7cytimes_5utils_nptime_unit_int2dt64(__pyx_v_arr_reso); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 9792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_11 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9792, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9792, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "utils.pxd":9791
 * 
 *     # Fallback
 *     if not is_dt64:             # <<<<<<<<<<<<<<
 *         arr = arr.astype(nptime_unit_int2dt64(arr_reso))
 *     if as_dtype is None:
*/
  }

  /* "utils.pxd":9793
 *     if not is_dt64:
 *         arr = arr.astype(nptime_unit_int2dt64(arr_reso))
 *     if as_dtype is None:             # <<<<<<<<<<<<<<
 *         as_dtype = nptime_unit_int2dt64(as_reso)
 *     return arr.astype(as_dtype)
*/
  __pyx_t_3 = (__pyx_v_as_dtype == Py_None);
  if (__pyx_t_3) {

    /* "utils.pxd":9794
 *         arr = arr.astype(nptime_unit_int2dt64(arr_reso))
 *     if as_dtype is None:
 *         as_dtype = nptime_unit_int2dt64(as_reso)             # <<<<<<<<<<<<<<
 *     return arr.astype(as_dtype)
 * 
*/
    __pyx_t_5 = __pyx_f_7cytimes_5utils_nptime_unit_int2dt64(__pyx_v_as_reso); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF_SET(__pyx_v_as_dtype, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "utils.pxd":9793
 *     if not is_dt64:
 *         arr = arr.astype(nptime_unit_int2dt64(arr_reso))
 *     if as_dtype is None:             # <<<<<<<<<<<<<<
 *         as_dtype = nptime_unit_int2dt64(as_reso)
 *     return arr.astype(as_dtype)
*/
  }

  /* "utils.pxd":9795
 *     if as_dtype is None:
 *         as_dtype = nptime_unit_int2dt64(as_reso)
 *     return arr.astype(as_dtype)             # <<<<<<<<<<<<<<
 * 
 * # . manipulation
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_6 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_11 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_as_dtype};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9795, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9795, __pyx_L1_error)
  __pyx_r = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "utils.pxd":9579
 * 
 * # . conversion: unit
 * cdef inline np.ndarray dt64arr_as_unit(np.ndarray arr, str as_unit, int arr_reso=-1, bint limit=False, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D datetime64 array to a specifc NumPy datetime64 unit `<'ndarray[datetime64]'>`
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __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("cytimes.utils.dt64arr_as_unit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_as_dtype);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9798
 * 
 * # . manipulation
 * cdef inline np.ndarray dt64arr_add_delta(np.ndarray arr,             # <<<<<<<<<<<<<<
 *     np.npy_int64 years=0, np.npy_int64 quarters=0, np.npy_int64 months=0, np.npy_int64 weeks=0, np.npy_int64 days=0,
 *     np.npy_int64 hours=0, np.npy_int64 minutes=0, np.npy_int64 seconds=0, np.npy_int64 milliseconds=0,
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_add_delta(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_add_delta *__pyx_optional_args) {
  npy_int64 __pyx_v_years = ((npy_int64)0);
  npy_int64 __pyx_v_quarters = ((npy_int64)0);
  npy_int64 __pyx_v_months = ((npy_int64)0);
  npy_int64 __pyx_v_weeks = ((npy_int64)0);
  npy_int64 __pyx_v_days = ((npy_int64)0);
  npy_int64 __pyx_v_hours = ((npy_int64)0);
  npy_int64 __pyx_v_minutes = ((npy_int64)0);
  npy_int64 __pyx_v_seconds = ((npy_int64)0);
  npy_int64 __pyx_v_milliseconds = ((npy_int64)0);
  npy_int64 __pyx_v_microseconds = ((npy_int64)0);
  npy_int64 __pyx_v_nanoseconds = ((npy_int64)0);
  int __pyx_v_arr_reso = ((int)-1);
  PyArrayObject *__pyx_v_dates = 0;
  npy_int64 __pyx_v_delta;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_v_times = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_add_delta_date __pyx_t_4;
  npy_int64 __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_times __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_11;
  size_t __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_add_delta", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_years = __pyx_optional_args->years;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_quarters = __pyx_optional_args->quarters;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_months = __pyx_optional_args->months;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_weeks = __pyx_optional_args->weeks;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_days = __pyx_optional_args->days;
              if (__pyx_optional_args->__pyx_n > 5) {
                __pyx_v_hours = __pyx_optional_args->hours;
                if (__pyx_optional_args->__pyx_n > 6) {
                  __pyx_v_minutes = __pyx_optional_args->minutes;
                  if (__pyx_optional_args->__pyx_n > 7) {
                    __pyx_v_seconds = __pyx_optional_args->seconds;
                    if (__pyx_optional_args->__pyx_n > 8) {
                      __pyx_v_milliseconds = __pyx_optional_args->milliseconds;
                      if (__pyx_optional_args->__pyx_n > 9) {
                        __pyx_v_microseconds = __pyx_optional_args->microseconds;
                        if (__pyx_optional_args->__pyx_n > 10) {
                          __pyx_v_nanoseconds = __pyx_optional_args->nanoseconds;
                          if (__pyx_optional_args->__pyx_n > 11) {
                            __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }

  /* "utils.pxd":9833
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":9834
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":9835
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9835, __pyx_L1_error)

      /* "utils.pxd":9834
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":9836
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Resolution: 'ns'
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 9836, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":9833
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":9839
 * 
 *     # Resolution: 'ns'
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         return _dt64arr_ns_add_delta(
 *             arr, years, quarters, months, weeks, days,
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":9840
 *     # Resolution: 'ns'
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         return _dt64arr_ns_add_delta(             # <<<<<<<<<<<<<<
 *             arr, years, quarters, months, weeks, days,
 *             hours, minutes, seconds, milliseconds,
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);

    /* "utils.pxd":9843
 *             arr, years, quarters, months, weeks, days,
 *             hours, minutes, seconds, milliseconds,
 *             microseconds, nanoseconds             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_ns_add_delta(__pyx_v_arr, __pyx_v_years, __pyx_v_quarters, __pyx_v_months, __pyx_v_weeks, __pyx_v_days, __pyx_v_hours, __pyx_v_minutes, __pyx_v_seconds, __pyx_v_milliseconds, __pyx_v_microseconds, __pyx_v_nanoseconds)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9840, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9839
 * 
 *     # Resolution: 'ns'
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         return _dt64arr_ns_add_delta(
 *             arr, years, quarters, months, weeks, days,
*/
  }

  /* "utils.pxd":9847
 * 
 *     # Adjust dates -> int64[D]
 *     cdef np.ndarray dates = _dt64arr_add_delta_date(arr, years, quarters, months, weeks, days, arr_reso)             # <<<<<<<<<<<<<<
 * 
 *     # Total time delta in 'us'
*/
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.arr_reso = __pyx_v_arr_reso;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_add_delta_date(__pyx_v_arr, __pyx_v_years, __pyx_v_quarters, __pyx_v_months, __pyx_v_weeks, __pyx_v_days, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_dates = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "utils.pxd":9851
 *     # Total time delta in 'us'
 *     cdef np.npy_int64 delta, q, r
 *     if nanoseconds != 0:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = nanoseconds / NS_MICROSECOND; r = nanoseconds % NS_MICROSECOND
*/
  __pyx_t_1 = (__pyx_v_nanoseconds != 0);
  if (__pyx_t_1) {

    /* "utils.pxd":9853
 *     if nanoseconds != 0:
 *         with cython.cdivision(True):
 *             q = nanoseconds / NS_MICROSECOND; r = nanoseconds % NS_MICROSECOND             # <<<<<<<<<<<<<<
 *             microseconds += (q - 1 if r < 0 else q)
 *     if hours != 0 or minutes != 0 or seconds != 0 or milliseconds != 0 or microseconds != 0:
*/
    __pyx_v_q = (__pyx_v_nanoseconds / ((npy_int64)__pyx_v_7cytimes_5utils_NS_MICROSECOND));
    __pyx_v_r = (__pyx_v_nanoseconds % __pyx_v_7cytimes_5utils_NS_MICROSECOND);

    /* "utils.pxd":9854
 *         with cython.cdivision(True):
 *             q = nanoseconds / NS_MICROSECOND; r = nanoseconds % NS_MICROSECOND
 *             microseconds += (q - 1 if r < 0 else q)             # <<<<<<<<<<<<<<
 *     if hours != 0 or minutes != 0 or seconds != 0 or milliseconds != 0 or microseconds != 0:
 *         delta = (
*/
    __pyx_t_1 = (__pyx_v_r < 0);
    if (__pyx_t_1) {
      __pyx_t_5 = (__pyx_v_q - 1);
    } else {
      __pyx_t_5 = __pyx_v_q;
    }
    __pyx_v_microseconds = (__pyx_v_microseconds + __pyx_t_5);

    /* "utils.pxd":9851
 *     # Total time delta in 'us'
 *     cdef np.npy_int64 delta, q, r
 *     if nanoseconds != 0:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = nanoseconds / NS_MICROSECOND; r = nanoseconds % NS_MICROSECOND
*/
  }

  /* "utils.pxd":9855
 *             q = nanoseconds / NS_MICROSECOND; r = nanoseconds % NS_MICROSECOND
 *             microseconds += (q - 1 if r < 0 else q)
 *     if hours != 0 or minutes != 0 or seconds != 0 or milliseconds != 0 or microseconds != 0:             # <<<<<<<<<<<<<<
 *         delta = (
 *             (hours * 3600 + minutes * 60 + seconds) * US_SECOND
*/
  __pyx_t_6 = (__pyx_v_hours != 0);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_6 = (__pyx_v_minutes != 0);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_6 = (__pyx_v_seconds != 0);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_6 = (__pyx_v_milliseconds != 0);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_6 = (__pyx_v_microseconds != 0);
  __pyx_t_1 = __pyx_t_6;
  __pyx_L8_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":9859
 *             (hours * 3600 + minutes * 60 + seconds) * US_SECOND
 *             + milliseconds * US_MILLISECOND
 *             + microseconds             # <<<<<<<<<<<<<<
 *         )
 *     else:
*/
    __pyx_v_delta = ((((((__pyx_v_hours * 0xE10) + (__pyx_v_minutes * 60)) + __pyx_v_seconds) * __pyx_v_7cytimes_5utils_US_SECOND) + (__pyx_v_milliseconds * __pyx_v_7cytimes_5utils_US_MILLISECOND)) + __pyx_v_microseconds);

    /* "utils.pxd":9855
 *             q = nanoseconds / NS_MICROSECOND; r = nanoseconds % NS_MICROSECOND
 *             microseconds += (q - 1 if r < 0 else q)
 *     if hours != 0 or minutes != 0 or seconds != 0 or milliseconds != 0 or microseconds != 0:             # <<<<<<<<<<<<<<
 *         delta = (
 *             (hours * 3600 + minutes * 60 + seconds) * US_SECOND
*/
    goto __pyx_L7;
  }

  /* "utils.pxd":9862
 *         )
 *     else:
 *         delta = 0             # <<<<<<<<<<<<<<
 * 
 *     # Resolution: 'us'
*/
  /*else*/ {
    __pyx_v_delta = 0;
  }
  __pyx_L7:;

  /* "utils.pxd":9866
 *     # Resolution: 'us'
 *     cdef np.ndarray times
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, delta, True)
 *         dates = arr_mul(dates, US_DAY, 0, False)
*/
  switch (__pyx_v_arr_reso) {
    case NPY_FR_us:

    /* "utils.pxd":9867
 *     cdef np.ndarray times
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, delta, True)             # <<<<<<<<<<<<<<
 *         dates = arr_mul(dates, US_DAY, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_US)
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = NPY_FR_us;
    __pyx_t_7.offset = __pyx_v_delta;
    __pyx_t_7.copy = 1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9867, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_times = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":9868
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, delta, True)
 *         dates = arr_mul(dates, US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_US)
 * 
*/
    __pyx_t_8.__pyx_n = 2;
    __pyx_t_8.offset = 0;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dates, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9868, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_dates, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":9869
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, delta, True)
 *         dates = arr_mul(dates, US_DAY, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 * 
 *     # Resolution: 'ms'
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_11.__pyx_n = 2;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 0;
    __pyx_t_10 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_11)); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 9869, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __pyx_t_10;
    __Pyx_INCREF(__pyx_t_9);
    __pyx_t_12 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9869, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9869, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9866
 *     # Resolution: 'us'
 *     cdef np.ndarray times
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, delta, True)
 *         dates = arr_mul(dates, US_DAY, 0, False)
*/
    break;
    case NPY_FR_ms:

    /* "utils.pxd":9873
 *     # Resolution: 'ms'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         if delta != 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = delta / US_MILLISECOND; r = delta % US_MILLISECOND
*/
    __pyx_t_1 = (__pyx_v_delta != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":9875
 *         if delta != 0:
 *             with cython.cdivision(True):
 *                 q = delta / US_MILLISECOND; r = delta % US_MILLISECOND             # <<<<<<<<<<<<<<
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_ms, delta, True)
*/
      __pyx_v_q = (__pyx_v_delta / ((npy_int64)__pyx_v_7cytimes_5utils_US_MILLISECOND));
      __pyx_v_r = (__pyx_v_delta % __pyx_v_7cytimes_5utils_US_MILLISECOND);

      /* "utils.pxd":9876
 *             with cython.cdivision(True):
 *                 q = delta / US_MILLISECOND; r = delta % US_MILLISECOND
 *                 delta = q - 1 if r < 0 else q             # <<<<<<<<<<<<<<
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_ms, delta, True)
 *         dates = arr_mul(dates, MS_DAY, 0, False)
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {
        __pyx_t_5 = (__pyx_v_q - 1);
      } else {
        __pyx_t_5 = __pyx_v_q;
      }
      __pyx_v_delta = __pyx_t_5;

      /* "utils.pxd":9873
 *     # Resolution: 'ms'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         if delta != 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = delta / US_MILLISECOND; r = delta % US_MILLISECOND
*/
    }

    /* "utils.pxd":9877
 *                 q = delta / US_MILLISECOND; r = delta % US_MILLISECOND
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_ms, delta, True)             # <<<<<<<<<<<<<<
 *         dates = arr_mul(dates, MS_DAY, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_MS)
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = NPY_FR_ms;
    __pyx_t_7.offset = __pyx_v_delta;
    __pyx_t_7.copy = 1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_times = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":9878
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_ms, delta, True)
 *         dates = arr_mul(dates, MS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_MS)
 * 
*/
    __pyx_t_8.__pyx_n = 2;
    __pyx_t_8.offset = 0;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dates, __pyx_v_7cytimes_5utils_MS_DAY, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9878, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_dates, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":9879
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_ms, delta, True)
 *         dates = arr_mul(dates, MS_DAY, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 * 
 *     # Resolution: 's'
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_11.__pyx_n = 2;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 0;
    __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_11)); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 9879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __pyx_t_9;
    __Pyx_INCREF(__pyx_t_10);
    __pyx_t_12 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9879, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9872
 * 
 *     # Resolution: 'ms'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         if delta != 0:
 *             with cython.cdivision(True):
*/
    break;
    case NPY_FR_s:

    /* "utils.pxd":9883
 *     # Resolution: 's'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         if delta != 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = delta / US_SECOND; r = delta % US_SECOND
*/
    __pyx_t_1 = (__pyx_v_delta != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":9885
 *         if delta != 0:
 *             with cython.cdivision(True):
 *                 q = delta / US_SECOND; r = delta % US_SECOND             # <<<<<<<<<<<<<<
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_s, delta, True)
*/
      __pyx_v_q = (__pyx_v_delta / ((npy_int64)__pyx_v_7cytimes_5utils_US_SECOND));
      __pyx_v_r = (__pyx_v_delta % __pyx_v_7cytimes_5utils_US_SECOND);

      /* "utils.pxd":9886
 *             with cython.cdivision(True):
 *                 q = delta / US_SECOND; r = delta % US_SECOND
 *                 delta = q - 1 if r < 0 else q             # <<<<<<<<<<<<<<
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_s, delta, True)
 *         dates = arr_mul(dates, SS_DAY, 0, False)
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {
        __pyx_t_5 = (__pyx_v_q - 1);
      } else {
        __pyx_t_5 = __pyx_v_q;
      }
      __pyx_v_delta = __pyx_t_5;

      /* "utils.pxd":9883
 *     # Resolution: 's'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         if delta != 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = delta / US_SECOND; r = delta % US_SECOND
*/
    }

    /* "utils.pxd":9887
 *                 q = delta / US_SECOND; r = delta % US_SECOND
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_s, delta, True)             # <<<<<<<<<<<<<<
 *         dates = arr_mul(dates, SS_DAY, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_SS)
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = NPY_FR_s;
    __pyx_t_7.offset = __pyx_v_delta;
    __pyx_t_7.copy = 1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_times = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":9888
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_s, delta, True)
 *         dates = arr_mul(dates, SS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_SS)
 * 
*/
    __pyx_t_8.__pyx_n = 2;
    __pyx_t_8.offset = 0;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dates, __pyx_v_7cytimes_5utils_SS_DAY, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9888, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_dates, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":9889
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_s, delta, True)
 *         dates = arr_mul(dates, SS_DAY, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 * 
 *     # Resolution: 'm'
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_11.__pyx_n = 2;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 0;
    __pyx_t_10 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_11)); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 9889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __pyx_t_10;
    __Pyx_INCREF(__pyx_t_9);
    __pyx_t_12 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9889, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9882
 * 
 *     # Resolution: 's'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         if delta != 0:
 *             with cython.cdivision(True):
*/
    break;
    case NPY_FR_m:

    /* "utils.pxd":9893
 *     # Resolution: 'm'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         if delta != 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = delta / US_MINUTE; r = delta % US_MINUTE
*/
    __pyx_t_1 = (__pyx_v_delta != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":9895
 *         if delta != 0:
 *             with cython.cdivision(True):
 *                 q = delta / US_MINUTE; r = delta % US_MINUTE             # <<<<<<<<<<<<<<
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_m, delta, True)
*/
      __pyx_v_q = (__pyx_v_delta / ((npy_int64)__pyx_v_7cytimes_5utils_US_MINUTE));
      __pyx_v_r = (__pyx_v_delta % __pyx_v_7cytimes_5utils_US_MINUTE);

      /* "utils.pxd":9896
 *             with cython.cdivision(True):
 *                 q = delta / US_MINUTE; r = delta % US_MINUTE
 *                 delta = q - 1 if r < 0 else q             # <<<<<<<<<<<<<<
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_m, delta, True)
 *         dates = arr_mul(dates, 1_440, 0, False)
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {
        __pyx_t_5 = (__pyx_v_q - 1);
      } else {
        __pyx_t_5 = __pyx_v_q;
      }
      __pyx_v_delta = __pyx_t_5;

      /* "utils.pxd":9893
 *     # Resolution: 'm'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         if delta != 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = delta / US_MINUTE; r = delta % US_MINUTE
*/
    }

    /* "utils.pxd":9897
 *                 q = delta / US_MINUTE; r = delta % US_MINUTE
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_m, delta, True)             # <<<<<<<<<<<<<<
 *         dates = arr_mul(dates, 1_440, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_MI)
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = NPY_FR_m;
    __pyx_t_7.offset = __pyx_v_delta;
    __pyx_t_7.copy = 1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_times = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":9898
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_m, delta, True)
 *         dates = arr_mul(dates, 1_440, 0, False)             # <<<<<<<<<<<<<<
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_MI)
 * 
*/
    __pyx_t_8.__pyx_n = 2;
    __pyx_t_8.offset = 0;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dates, 0x5A0, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_dates, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":9899
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_m, delta, True)
 *         dates = arr_mul(dates, 1_440, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_MI)             # <<<<<<<<<<<<<<
 * 
 *     # Resolution: 'h'
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_11.__pyx_n = 2;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 0;
    __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_11)); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 9899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __pyx_t_9;
    __Pyx_INCREF(__pyx_t_10);
    __pyx_t_12 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_7cytimes_5utils_DT64_DTYPE_MI};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9899, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9899, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9892
 * 
 *     # Resolution: 'm'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *         if delta != 0:
 *             with cython.cdivision(True):
*/
    break;
    case NPY_FR_h:

    /* "utils.pxd":9903
 *     # Resolution: 'h'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         if delta != 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = delta / US_HOUR; r = delta % US_HOUR
*/
    __pyx_t_1 = (__pyx_v_delta != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":9905
 *         if delta != 0:
 *             with cython.cdivision(True):
 *                 q = delta / US_HOUR; r = delta % US_HOUR             # <<<<<<<<<<<<<<
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_h, delta, True)
*/
      __pyx_v_q = (__pyx_v_delta / ((npy_int64)__pyx_v_7cytimes_5utils_US_HOUR));
      __pyx_v_r = (__pyx_v_delta % __pyx_v_7cytimes_5utils_US_HOUR);

      /* "utils.pxd":9906
 *             with cython.cdivision(True):
 *                 q = delta / US_HOUR; r = delta % US_HOUR
 *                 delta = q - 1 if r < 0 else q             # <<<<<<<<<<<<<<
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_h, delta, True)
 *         dates = arr_mul(dates, 24, 0, False)
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {
        __pyx_t_5 = (__pyx_v_q - 1);
      } else {
        __pyx_t_5 = __pyx_v_q;
      }
      __pyx_v_delta = __pyx_t_5;

      /* "utils.pxd":9903
 *     # Resolution: 'h'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         if delta != 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = delta / US_HOUR; r = delta % US_HOUR
*/
    }

    /* "utils.pxd":9907
 *                 q = delta / US_HOUR; r = delta % US_HOUR
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_h, delta, True)             # <<<<<<<<<<<<<<
 *         dates = arr_mul(dates, 24, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_HH)
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = NPY_FR_h;
    __pyx_t_7.offset = __pyx_v_delta;
    __pyx_t_7.copy = 1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9907, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_times = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":9908
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_h, delta, True)
 *         dates = arr_mul(dates, 24, 0, False)             # <<<<<<<<<<<<<<
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_HH)
 * 
*/
    __pyx_t_8.__pyx_n = 2;
    __pyx_t_8.offset = 0;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dates, 24, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9908, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_dates, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":9909
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_h, delta, True)
 *         dates = arr_mul(dates, 24, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_HH)             # <<<<<<<<<<<<<<
 * 
 *     # Resolution: 'D'
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_11.__pyx_n = 2;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 0;
    __pyx_t_10 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_11)); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 9909, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __pyx_t_10;
    __Pyx_INCREF(__pyx_t_9);
    __pyx_t_12 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_7cytimes_5utils_DT64_DTYPE_HH};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9909, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9909, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9902
 * 
 *     # Resolution: 'h'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *         if delta != 0:
 *             with cython.cdivision(True):
*/
    break;
    case NPY_FR_D:

    /* "utils.pxd":9913
 *     # Resolution: 'D'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         if delta != 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = delta / US_DAY; r = delta % US_DAY
*/
    __pyx_t_1 = (__pyx_v_delta != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":9915
 *         if delta != 0:
 *             with cython.cdivision(True):
 *                 q = delta / US_DAY; r = delta % US_DAY             # <<<<<<<<<<<<<<
 *                 delta = q - 1 if r < 0 else q
 *         return arr_add(dates, delta, False).astype(DT64_DTYPE_DD)
*/
      __pyx_v_q = (__pyx_v_delta / ((npy_int64)__pyx_v_7cytimes_5utils_US_DAY));
      __pyx_v_r = (__pyx_v_delta % __pyx_v_7cytimes_5utils_US_DAY);

      /* "utils.pxd":9916
 *             with cython.cdivision(True):
 *                 q = delta / US_DAY; r = delta % US_DAY
 *                 delta = q - 1 if r < 0 else q             # <<<<<<<<<<<<<<
 *         return arr_add(dates, delta, False).astype(DT64_DTYPE_DD)
 * 
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {
        __pyx_t_5 = (__pyx_v_q - 1);
      } else {
        __pyx_t_5 = __pyx_v_q;
      }
      __pyx_v_delta = __pyx_t_5;

      /* "utils.pxd":9913
 *     # Resolution: 'D'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         if delta != 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = delta / US_DAY; r = delta % US_DAY
*/
    }

    /* "utils.pxd":9917
 *                 q = delta / US_DAY; r = delta % US_DAY
 *                 delta = q - 1 if r < 0 else q
 *         return arr_add(dates, delta, False).astype(DT64_DTYPE_DD)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported array resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_13.__pyx_n = 1;
    __pyx_t_13.copy = 0;
    __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_dates, __pyx_v_delta, &__pyx_t_13)); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 9917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __pyx_t_9;
    __Pyx_INCREF(__pyx_t_10);
    __pyx_t_12 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_7cytimes_5utils_DT64_DTYPE_DD};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9917, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9917, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9912
 * 
 *     # Resolution: 'D'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:             # <<<<<<<<<<<<<<
 *         if delta != 0:
 *             with cython.cdivision(True):
*/
    break;
    default: break;
  }

  /* "utils.pxd":9920
 * 
 *     # Unsupported array resolution
 *     raise ValueError(             # <<<<<<<<<<<<<<
 *         "Cannot add delta to ndarray[%s].\n"
 *         "Supported resolutions: 'ns', 'us', 'ms', 's', 'm', 'h', 'D'." % (arr.dtype)
*/
  __pyx_t_9 = NULL;

  /* "utils.pxd":9922
 *     raise ValueError(
 *         "Cannot add delta to ndarray[%s].\n"
 *         "Supported resolutions: 'ns', 'us', 'ms', 's', 'm', 'h', 'D'." % (arr.dtype)             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 9922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_14 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Cannot_add_delta_to_ndarray_s_Su, __pyx_t_10); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 9922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_12 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_14};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9920, __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_ERR(5, 9920, __pyx_L1_error)

  /* "utils.pxd":9798
 * 
 * # . manipulation
 * cdef inline np.ndarray dt64arr_add_delta(np.ndarray arr,             # <<<<<<<<<<<<<<
 *     np.npy_int64 years=0, np.npy_int64 quarters=0, np.npy_int64 months=0, np.npy_int64 weeks=0, np.npy_int64 days=0,
 *     np.npy_int64 hours=0, np.npy_int64 minutes=0, np.npy_int64 seconds=0, np.npy_int64 milliseconds=0,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_add_delta", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dates);
  __Pyx_XDECREF((PyObject *)__pyx_v_times);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9925
 *     )
 * 
 * cdef inline np.ndarray _dt64arr_add_delta_date(np.ndarray arr, np.npy_int64 years, np.npy_int64 quarters, np.npy_int64 months, np.npy_int64 weeks, np.npy_int64 days, int arr_reso=-1):             # <<<<<<<<<<<<<<
 *     """(internal) Apply only the calendar delta (Y/Q/M/W/D) to an ndarray[datetime64]
 *     and return `int64` day ticks `<'ndarray[int64]'>`.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__dt64arr_add_delta_date(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_years, npy_int64 __pyx_v_quarters, npy_int64 __pyx_v_months, npy_int64 __pyx_v_weeks, npy_int64 __pyx_v_days, struct __pyx_opt_args_7cytimes_5utils__dt64arr_add_delta_date *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  PyArrayObject *__pyx_v_dateM = 0;
  PyArrayObject *__pyx_v_dateD = 0;
  PyArrayObject *__pyx_v_delta = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_month __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_day __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_min_arr __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_dt64arr_add_delta_date", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
    }
  }

  /* "utils.pxd":9963
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":9964
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":9965
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9965, __pyx_L1_error)

      /* "utils.pxd":9964
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":9966
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     cdef np.ndarray dateM, dateD, delta
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 9966, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":9963
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":9970
 *     cdef np.ndarray dateM, dateD, delta
 *     # Year/Quarter/Month -> int64[M] -> int64[D]
 *     if years != 0 or quarters != 0 or months != 0:             # <<<<<<<<<<<<<<
 *         #: convert to int64[M]
 *         dateM = dt64arr_as_int64_M(arr, arr_reso, 0, True)
*/
  __pyx_t_3 = (__pyx_v_years != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_3 = (__pyx_v_quarters != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_3 = (__pyx_v_months != 0);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":9972
 *     if years != 0 or quarters != 0 or months != 0:
 *         #: convert to int64[M]
 *         dateM = dt64arr_as_int64_M(arr, arr_reso, 0, True)             # <<<<<<<<<<<<<<
 *         #: add 'months' delta
 *         dateM = arr_add(dateM, years * 12 + quarters * 3 + months, False)
*/
    __pyx_t_5.__pyx_n = 3;
    __pyx_t_5.arr_reso = __pyx_v_arr_reso;
    __pyx_t_5.offset = 0;
    __pyx_t_5.copy = 1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(__pyx_v_arr, &__pyx_t_5)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 9972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dateM = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "utils.pxd":9974
 *         dateM = dt64arr_as_int64_M(arr, arr_reso, 0, True)
 *         #: add 'months' delta
 *         dateM = arr_add(dateM, years * 12 + quarters * 3 + months, False)             # <<<<<<<<<<<<<<
 *         #: compute the maximum days in the target month
 *         delta = dt64arr_days_in_month(dateM, np.NPY_DATETIMEUNIT.NPY_FR_M, True)
*/
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_dateM, (((__pyx_v_years * 12) + (__pyx_v_quarters * 3)) + __pyx_v_months), &__pyx_t_6)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 9974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_dateM, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "utils.pxd":9976
 *         dateM = arr_add(dateM, years * 12 + quarters * 3 + months, False)
 *         #: compute the maximum days in the target month
 *         delta = dt64arr_days_in_month(dateM, np.NPY_DATETIMEUNIT.NPY_FR_M, True)             # <<<<<<<<<<<<<<
 *         #: convert to int64[D]
 *         dateD = dt64arr_as_int64_D(dateM, np.NPY_DATETIMEUNIT.NPY_FR_M, 0, False)
*/
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.arr_reso = NPY_FR_M;
    __pyx_t_7.copy = 1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_month(__pyx_v_dateM, &__pyx_t_7)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 9976, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "utils.pxd":9978
 *         delta = dt64arr_days_in_month(dateM, np.NPY_DATETIMEUNIT.NPY_FR_M, True)
 *         #: convert to int64[D]
 *         dateD = dt64arr_as_int64_D(dateM, np.NPY_DATETIMEUNIT.NPY_FR_M, 0, False)             # <<<<<<<<<<<<<<
 *         #: compute original day and clamp to max days in month
 *         delta = arr_min_arr(delta, dt64arr_day(arr, arr_reso, 0, True), 0, False)
*/
    __pyx_t_8.__pyx_n = 3;
    __pyx_t_8.arr_reso = NPY_FR_M;
    __pyx_t_8.offset = 0;
    __pyx_t_8.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_8)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 9978, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "utils.pxd":9980
 *         dateD = dt64arr_as_int64_D(dateM, np.NPY_DATETIMEUNIT.NPY_FR_M, 0, False)
 *         #: compute original day and clamp to max days in month
 *         delta = arr_min_arr(delta, dt64arr_day(arr, arr_reso, 0, True), 0, False)             # <<<<<<<<<<<<<<
 *         #: add back original day-1 (0-based) and 'days' delta
 *         return arr_add_arr(dateD, delta, weeks * 7 + days - 1, False)
*/
    __pyx_t_9.__pyx_n = 3;
    __pyx_t_9.arr_reso = __pyx_v_arr_reso;
    __pyx_t_9.offset = 0;
    __pyx_t_9.copy = 1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_day(__pyx_v_arr, &__pyx_t_9)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 9980, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_11.__pyx_n = 2;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 0;
    __pyx_t_10 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_min_arr(__pyx_v_delta, ((PyArrayObject *)__pyx_t_4), &__pyx_t_11)); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 9980, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_10));
    __pyx_t_10 = 0;

    /* "utils.pxd":9982
 *         delta = arr_min_arr(delta, dt64arr_day(arr, arr_reso, 0, True), 0, False)
 *         #: add back original day-1 (0-based) and 'days' delta
 *         return arr_add_arr(dateD, delta, weeks * 7 + days - 1, False)             # <<<<<<<<<<<<<<
 *     # Weeks/Days -> int64[D]
 *     else:
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.offset = (((__pyx_v_weeks * 7) + __pyx_v_days) - 1);
    __pyx_t_12.copy = 0;
    __pyx_t_10 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_12)); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 9982, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = ((PyArrayObject *)__pyx_t_10);
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9970
 *     cdef np.ndarray dateM, dateD, delta
 *     # Year/Quarter/Month -> int64[M] -> int64[D]
 *     if years != 0 or quarters != 0 or months != 0:             # <<<<<<<<<<<<<<
 *         #: convert to int64[M]
 *         dateM = dt64arr_as_int64_M(arr, arr_reso, 0, True)
*/
  }

  /* "utils.pxd":9986
 *     else:
 *         #: convert to int64[D]
 *         dateD = dt64arr_as_int64_D(arr, arr_reso, 0, True)             # <<<<<<<<<<<<<<
 *         #: add weeks/days delta
 *         return arr_add(dateD, weeks * 7 + days, False)
*/
  /*else*/ {
    __pyx_t_8.__pyx_n = 3;
    __pyx_t_8.arr_reso = __pyx_v_arr_reso;
    __pyx_t_8.offset = 0;
    __pyx_t_8.copy = 1;
    __pyx_t_10 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 9986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "utils.pxd":9988
 *         dateD = dt64arr_as_int64_D(arr, arr_reso, 0, True)
 *         #: add weeks/days delta
 *         return arr_add(dateD, weeks * 7 + days, False)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray _dt64arr_ns_add_delta(np.ndarray arr,
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.copy = 0;
    __pyx_t_10 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_dateD, ((__pyx_v_weeks * 7) + __pyx_v_days), &__pyx_t_6)); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 9988, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = ((PyArrayObject *)__pyx_t_10);
    __pyx_t_10 = 0;
    goto __pyx_L0;
  }

  /* "utils.pxd":9925
 *     )
 * 
 * cdef inline np.ndarray _dt64arr_add_delta_date(np.ndarray arr, np.npy_int64 years, np.npy_int64 quarters, np.npy_int64 months, np.npy_int64 weeks, np.npy_int64 days, int arr_reso=-1):             # <<<<<<<<<<<<<<
 *     """(internal) Apply only the calendar delta (Y/Q/M/W/D) to an ndarray[datetime64]
 *     and return `int64` day ticks `<'ndarray[int64]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cytimes.utils._dt64arr_add_delta_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dateM);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateD);
  __Pyx_XDECREF((PyObject *)__pyx_v_delta);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9990
 *         return arr_add(dateD, weeks * 7 + days, False)
 * 
 * cdef inline np.ndarray _dt64arr_ns_add_delta(np.ndarray arr,             # <<<<<<<<<<<<<<
 *     np.npy_int64 years, np.npy_int64 quarters, np.npy_int64 months, np.npy_int64 weeks, np.npy_int64 days,
 *     np.npy_int64 hours, np.npy_int64 minutes, np.npy_int64 seconds, np.npy_int64 milliseconds,
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__dt64arr_ns_add_delta(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_years, npy_int64 __pyx_v_quarters, npy_int64 __pyx_v_months, npy_int64 __pyx_v_weeks, npy_int64 __pyx_v_days, npy_int64 __pyx_v_hours, npy_int64 __pyx_v_minutes, npy_int64 __pyx_v_seconds, npy_int64 __pyx_v_milliseconds, npy_int64 __pyx_v_microseconds, npy_int64 __pyx_v_nanoseconds) {
  PyArrayObject *__pyx_v_dates = 0;
  PyArrayObject *__pyx_v_times = 0;
  npy_int64 *__pyx_v_dates_ptr;
  npy_int64 *__pyx_v_times_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_delta;
  npy_int64 __pyx_v_d;
  npy_int64 __pyx_v_t;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_add_delta_date __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_times __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  npy_intp __pyx_t_6;
  npy_intp __pyx_t_7;
  npy_intp __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_14;
  size_t __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_dt64arr_ns_add_delta", 0);

  /* "utils.pxd":10025
 *     """
 *     # Adjust dates -> int64[D]
 *     cdef np.ndarray dates = _dt64arr_add_delta_date(arr, years, quarters, months, weeks, days, np.NPY_DATETIMEUNIT.NPY_FR_ns)             # <<<<<<<<<<<<<<
 * 
 *     # Adjust times -> int64[ns]
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.arr_reso = NPY_FR_ns;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_add_delta_date(__pyx_v_arr, __pyx_v_years, __pyx_v_quarters, __pyx_v_months, __pyx_v_weeks, __pyx_v_days, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_dates = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":10029
 *     # Adjust times -> int64[ns]
 *     cdef:
 *         np.ndarray times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns, 0, True)             # <<<<<<<<<<<<<<
 *         np.npy_int64* dates_ptr
 *         np.npy_int64* times_ptr
*/
  __pyx_t_3.__pyx_n = 3;
  __pyx_t_3.arr_reso = NPY_FR_ns;
  __pyx_t_3.offset = 0;
  __pyx_t_3.copy = 1;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_times = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":10034
 *         np.npy_intp size, i
 *         np.npy_int64 delta, d, t, q, r
 *     if hours != 0 or minutes != 0 or seconds != 0 or milliseconds != 0 or microseconds != 0 or nanoseconds != 0:             # <<<<<<<<<<<<<<
 *         delta = (
 *             (hours * 3600 + minutes * 60 + seconds) * NS_SECOND
*/
  __pyx_t_5 = (__pyx_v_hours != 0);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_minutes != 0);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_seconds != 0);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_milliseconds != 0);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_microseconds != 0);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_nanoseconds != 0);
  __pyx_t_4 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_4) {

    /* "utils.pxd":10039
 *             + milliseconds * NS_MILLISECOND
 *             + microseconds * NS_MICROSECOND
 *             + nanoseconds             # <<<<<<<<<<<<<<
 *         )
 *         dates_ptr = <np.npy_int64*> np.PyArray_DATA(dates)
*/
    __pyx_v_delta = (((((((__pyx_v_hours * 0xE10) + (__pyx_v_minutes * 60)) + __pyx_v_seconds) * __pyx_v_7cytimes_5utils_NS_SECOND) + (__pyx_v_milliseconds * __pyx_v_7cytimes_5utils_NS_MILLISECOND)) + (__pyx_v_microseconds * __pyx_v_7cytimes_5utils_NS_MICROSECOND)) + __pyx_v_nanoseconds);

    /* "utils.pxd":10041
 *             + nanoseconds
 *         )
 *         dates_ptr = <np.npy_int64*> np.PyArray_DATA(dates)             # <<<<<<<<<<<<<<
 *         times_ptr = <np.npy_int64*> np.PyArray_DATA(times)
 *         size = arr.shape[0]
*/
    __pyx_v_dates_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_dates));

    /* "utils.pxd":10042
 *         )
 *         dates_ptr = <np.npy_int64*> np.PyArray_DATA(dates)
 *         times_ptr = <np.npy_int64*> np.PyArray_DATA(times)             # <<<<<<<<<<<<<<
 *         size = arr.shape[0]
 *         for i in range(size):
*/
    __pyx_v_times_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_times));

    /* "utils.pxd":10043
 *         dates_ptr = <np.npy_int64*> np.PyArray_DATA(dates)
 *         times_ptr = <np.npy_int64*> np.PyArray_DATA(times)
 *         size = arr.shape[0]             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             # Preserve NaT
*/
    __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]);

    /* "utils.pxd":10044
 *         times_ptr = <np.npy_int64*> np.PyArray_DATA(times)
 *         size = arr.shape[0]
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             # Preserve NaT
 *             d = dates_ptr[i]
*/
    __pyx_t_6 = __pyx_v_size;
    __pyx_t_7 = __pyx_t_6;
    for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
      __pyx_v_i = __pyx_t_8;

      /* "utils.pxd":10046
 *         for i in range(size):
 *             # Preserve NaT
 *             d = dates_ptr[i]             # <<<<<<<<<<<<<<
 *             if d == LLONG_MIN:
 *                 continue
*/
      __pyx_v_d = (__pyx_v_dates_ptr[__pyx_v_i]);

      /* "utils.pxd":10047
 *             # Preserve NaT
 *             d = dates_ptr[i]
 *             if d == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             t = times_ptr[i]
*/
      __pyx_t_4 = (__pyx_v_d == LLONG_MIN);
      if (__pyx_t_4) {

        /* "utils.pxd":10048
 *             d = dates_ptr[i]
 *             if d == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             t = times_ptr[i]
 *             if t == LLONG_MIN:
*/
        goto __pyx_L10_continue;

        /* "utils.pxd":10047
 *             # Preserve NaT
 *             d = dates_ptr[i]
 *             if d == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             t = times_ptr[i]
*/
      }

      /* "utils.pxd":10049
 *             if d == LLONG_MIN:
 *                 continue
 *             t = times_ptr[i]             # <<<<<<<<<<<<<<
 *             if t == LLONG_MIN:
 *                 continue
*/
      __pyx_v_t = (__pyx_v_times_ptr[__pyx_v_i]);

      /* "utils.pxd":10050
 *                 continue
 *             t = times_ptr[i]
 *             if t == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Add delta & Normalize time
*/
      __pyx_t_4 = (__pyx_v_t == LLONG_MIN);
      if (__pyx_t_4) {

        /* "utils.pxd":10051
 *             t = times_ptr[i]
 *             if t == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Add delta & Normalize time
 *             t += delta
*/
        goto __pyx_L10_continue;

        /* "utils.pxd":10050
 *                 continue
 *             t = times_ptr[i]
 *             if t == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Add delta & Normalize time
*/
      }

      /* "utils.pxd":10053
 *                 continue
 *             # Add delta & Normalize time
 *             t += delta             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = t / NS_DAY; r = t % NS_DAY
*/
      __pyx_v_t = (__pyx_v_t + __pyx_v_delta);

      /* "utils.pxd":10055
 *             t += delta
 *             with cython.cdivision(True):
 *                 q = t / NS_DAY; r = t % NS_DAY             # <<<<<<<<<<<<<<
 *                 if r < 0:
 *                     q -= 1; r += NS_DAY
*/
      __pyx_v_q = (__pyx_v_t / ((npy_int64)__pyx_v_7cytimes_5utils_NS_DAY));
      __pyx_v_r = (__pyx_v_t % __pyx_v_7cytimes_5utils_NS_DAY);

      /* "utils.pxd":10056
 *             with cython.cdivision(True):
 *                 q = t / NS_DAY; r = t % NS_DAY
 *                 if r < 0:             # <<<<<<<<<<<<<<
 *                     q -= 1; r += NS_DAY
 *             dates_ptr[i] = d + q
*/
      __pyx_t_4 = (__pyx_v_r < 0);
      if (__pyx_t_4) {

        /* "utils.pxd":10057
 *                 q = t / NS_DAY; r = t % NS_DAY
 *                 if r < 0:
 *                     q -= 1; r += NS_DAY             # <<<<<<<<<<<<<<
 *             dates_ptr[i] = d + q
 *             times_ptr[i] = r
*/
        __pyx_v_q = (__pyx_v_q - 1);
        __pyx_v_r = (__pyx_v_r + __pyx_v_7cytimes_5utils_NS_DAY);

        /* "utils.pxd":10056
 *             with cython.cdivision(True):
 *                 q = t / NS_DAY; r = t % NS_DAY
 *                 if r < 0:             # <<<<<<<<<<<<<<
 *                     q -= 1; r += NS_DAY
 *             dates_ptr[i] = d + q
*/
      }

      /* "utils.pxd":10058
 *                 if r < 0:
 *                     q -= 1; r += NS_DAY
 *             dates_ptr[i] = d + q             # <<<<<<<<<<<<<<
 *             times_ptr[i] = r
 * 
*/
      (__pyx_v_dates_ptr[__pyx_v_i]) = (__pyx_v_d + __pyx_v_q);

      /* "utils.pxd":10059
 *                     q -= 1; r += NS_DAY
 *             dates_ptr[i] = d + q
 *             times_ptr[i] = r             # <<<<<<<<<<<<<<
 * 
 *     # If out of 'ns' range, down-convert to 'us'
*/
      (__pyx_v_times_ptr[__pyx_v_i]) = __pyx_v_r;
      __pyx_L10_continue:;
    }

    /* "utils.pxd":10034
 *         np.npy_intp size, i
 *         np.npy_int64 delta, d, t, q, r
 *     if hours != 0 or minutes != 0 or seconds != 0 or milliseconds != 0 or microseconds != 0 or nanoseconds != 0:             # <<<<<<<<<<<<<<
 *         delta = (
 *             (hours * 3600 + minutes * 60 + seconds) * NS_SECOND
*/
  }

  /* "utils.pxd":10062
 * 
 *     # If out of 'ns' range, down-convert to 'us'
 *     if not is_dt64arr_ns_safe(dates, np.NPY_DATETIMEUNIT.NPY_FR_D):             # <<<<<<<<<<<<<<
 *         dates = arr_mul(dates, US_DAY, 0, False)
 *         times = arr_div_floor(times, NS_MICROSECOND, 0, False)
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.arr_reso = NPY_FR_D;
  __pyx_t_4 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_dates, &__pyx_t_9); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(5, 10062, __pyx_L1_error)
  __pyx_t_5 = (!__pyx_t_4);
  if (__pyx_t_5) {

    /* "utils.pxd":10063
 *     # If out of 'ns' range, down-convert to 'us'
 *     if not is_dt64arr_ns_safe(dates, np.NPY_DATETIMEUNIT.NPY_FR_D):
 *         dates = arr_mul(dates, US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *         times = arr_div_floor(times, NS_MICROSECOND, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_US)
*/
    __pyx_t_10.__pyx_n = 2;
    __pyx_t_10.offset = 0;
    __pyx_t_10.copy = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dates, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_dates, ((PyArrayObject *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "utils.pxd":10064
 *     if not is_dt64arr_ns_safe(dates, np.NPY_DATETIMEUNIT.NPY_FR_D):
 *         dates = arr_mul(dates, US_DAY, 0, False)
 *         times = arr_div_floor(times, NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_US)
 *     else:
*/
    __pyx_t_11.__pyx_n = 2;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_times, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10064, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "utils.pxd":10065
 *         dates = arr_mul(dates, US_DAY, 0, False)
 *         times = arr_div_floor(times, NS_MICROSECOND, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *     else:
 *         dates = arr_mul(dates, NS_DAY, 0, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_14.__pyx_n = 2;
    __pyx_t_14.offset = 0;
    __pyx_t_14.copy = 0;
    __pyx_t_13 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_14)); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 10065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_12 = __pyx_t_13;
    __Pyx_INCREF(__pyx_t_12);
    __pyx_t_15 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10065, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10065, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10062
 * 
 *     # If out of 'ns' range, down-convert to 'us'
 *     if not is_dt64arr_ns_safe(dates, np.NPY_DATETIMEUNIT.NPY_FR_D):             # <<<<<<<<<<<<<<
 *         dates = arr_mul(dates, US_DAY, 0, False)
 *         times = arr_div_floor(times, NS_MICROSECOND, 0, False)
*/
  }

  /* "utils.pxd":10067
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_US)
 *     else:
 *         dates = arr_mul(dates, NS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_NS)
 * 
*/
  /*else*/ {
    __pyx_t_10.__pyx_n = 2;
    __pyx_t_10.offset = 0;
    __pyx_t_10.copy = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dates, __pyx_v_7cytimes_5utils_NS_DAY, &__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10067, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_dates, ((PyArrayObject *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "utils.pxd":10068
 *     else:
 *         dates = arr_mul(dates, NS_DAY, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_replace_dates(np.ndarray arr, np.npy_int64 year, np.npy_int64 month, np.npy_int64 day, int arr_reso=-1):
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_14.__pyx_n = 2;
    __pyx_t_14.offset = 0;
    __pyx_t_14.copy = 0;
    __pyx_t_12 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_14)); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 10068, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_13 = __pyx_t_12;
    __Pyx_INCREF(__pyx_t_13);
    __pyx_t_15 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10068, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10068, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "utils.pxd":9990
 *         return arr_add(dateD, weeks * 7 + days, False)
 * 
 * cdef inline np.ndarray _dt64arr_ns_add_delta(np.ndarray arr,             # <<<<<<<<<<<<<<
 *     np.npy_int64 years, np.npy_int64 quarters, np.npy_int64 months, np.npy_int64 weeks, np.npy_int64 days,
 *     np.npy_int64 hours, np.npy_int64 minutes, np.npy_int64 seconds, np.npy_int64 milliseconds,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cytimes.utils._dt64arr_ns_add_delta", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dates);
  __Pyx_XDECREF((PyObject *)__pyx_v_times);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10070
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_NS)
 * 
 * cdef inline np.ndarray dt64arr_replace_dates(np.ndarray arr, np.npy_int64 year, np.npy_int64 month, np.npy_int64 day, int arr_reso=-1):             # <<<<<<<<<<<<<<
 *     """Replace the Y/M/D components of an ndarray[datetime64] and return `int64` day ticks `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_replace_dates(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_year, npy_int64 __pyx_v_month, npy_int64 __pyx_v_day, struct __pyx_opt_args_7cytimes_5utils_dt64arr_replace_dates *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  PyArrayObject *__pyx_v_dateY = 0;
  PyArrayObject *__pyx_v_dateM = 0;
  PyArrayObject *__pyx_v_dateD = 0;
  PyArrayObject *__pyx_v_delta = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_5;
  long __pyx_t_6;
  npy_int64 __pyx_t_7;
  npy_int64 __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_month __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_month __pyx_t_13;
  struct __pyx_opt_args_7cytimes_5utils_arr_min __pyx_t_14;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_day __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_min_arr __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_replace_dates", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
    }
  }

  /* "utils.pxd":10099
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10100
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":10101
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10101, __pyx_L1_error)

      /* "utils.pxd":10100
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":10102
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Year replacement -> int64[M] YYYY-01
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 10102, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":10099
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":10107
 *     cdef np.ndarray dateY, dateM, dateD, delta
 *     # . set to specific year
 *     if year > 0:             # <<<<<<<<<<<<<<
 *         assure_1dim_arr(arr)
 *         dateM = arr_fill_int64((year - EPOCH_YEAR) * 12, arr.shape[0])
*/
  __pyx_t_1 = (__pyx_v_year > 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10108
 *     # . set to specific year
 *     if year > 0:
 *         assure_1dim_arr(arr)             # <<<<<<<<<<<<<<
 *         dateM = arr_fill_int64((year - EPOCH_YEAR) * 12, arr.shape[0])
 *     # . retain original year
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_assure_1dim_arr(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10108, __pyx_L1_error)

    /* "utils.pxd":10109
 *     if year > 0:
 *         assure_1dim_arr(arr)
 *         dateM = arr_fill_int64((year - EPOCH_YEAR) * 12, arr.shape[0])             # <<<<<<<<<<<<<<
 *     # . retain original year
 *     else:
*/
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_fill_int64(((__pyx_v_year - __pyx_v_7cytimes_5utils_EPOCH_YEAR) * 12), (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_dateM = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":10107
 *     cdef np.ndarray dateY, dateM, dateD, delta
 *     # . set to specific year
 *     if year > 0:             # <<<<<<<<<<<<<<
 *         assure_1dim_arr(arr)
 *         dateM = arr_fill_int64((year - EPOCH_YEAR) * 12, arr.shape[0])
*/
    goto __pyx_L5;
  }

  /* "utils.pxd":10112
 *     # . retain original year
 *     else:
 *         dateY = dt64arr_as_int64_Y(arr, arr_reso, 0, True)             # <<<<<<<<<<<<<<
 *         dateM = arr_mul(dateY, 12, 0, False)
 * 
*/
  /*else*/ {
    __pyx_t_4.__pyx_n = 3;
    __pyx_t_4.arr_reso = __pyx_v_arr_reso;
    __pyx_t_4.offset = 0;
    __pyx_t_4.copy = 1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_dateY = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":10113
 *     else:
 *         dateY = dt64arr_as_int64_Y(arr, arr_reso, 0, True)
 *         dateM = arr_mul(dateY, 12, 0, False)             # <<<<<<<<<<<<<<
 * 
 *     # Month replacement -> int64[M] YYYY-MM
*/
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = 0;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateY, 12, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_dateM = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
  }
  __pyx_L5:;

  /* "utils.pxd":10117
 *     # Month replacement -> int64[M] YYYY-MM
 *     # . set to specific month
 *     if month > 0:             # <<<<<<<<<<<<<<
 *         dateM = arr_add(dateM, min(month, 12) - 1, False)
 *     # . retain original month
*/
  __pyx_t_1 = (__pyx_v_month > 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10118
 *     # . set to specific month
 *     if month > 0:
 *         dateM = arr_add(dateM, min(month, 12) - 1, False)             # <<<<<<<<<<<<<<
 *     # . retain original month
 *     else:
*/
    __pyx_t_6 = 12;
    __pyx_t_7 = __pyx_v_month;
    __pyx_t_1 = (__pyx_t_6 < __pyx_t_7);
    if (__pyx_t_1) {
      __pyx_t_8 = __pyx_t_6;
    } else {
      __pyx_t_8 = __pyx_t_7;
    }
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_dateM, (__pyx_t_8 - 1), &__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_dateM, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":10117
 *     # Month replacement -> int64[M] YYYY-MM
 *     # . set to specific month
 *     if month > 0:             # <<<<<<<<<<<<<<
 *         dateM = arr_add(dateM, min(month, 12) - 1, False)
 *     # . retain original month
*/
    goto __pyx_L6;
  }

  /* "utils.pxd":10121
 *     # . retain original month
 *     else:
 *         delta = dt64arr_month(arr, arr_reso, 0, True)             # <<<<<<<<<<<<<<
 *         dateM = arr_add_arr(dateM, delta, -1, False)
 * 
*/
  /*else*/ {
    __pyx_t_10.__pyx_n = 3;
    __pyx_t_10.arr_reso = __pyx_v_arr_reso;
    __pyx_t_10.offset = 0;
    __pyx_t_10.copy = 1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_month(__pyx_v_arr, &__pyx_t_10)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":10122
 *     else:
 *         delta = dt64arr_month(arr, arr_reso, 0, True)
 *         dateM = arr_add_arr(dateM, delta, -1, False)             # <<<<<<<<<<<<<<
 * 
 *     # Day replacement -> int64[D] YYYY-MM-DD
*/
    __pyx_t_11.__pyx_n = 2;
    __pyx_t_11.offset = -1LL;
    __pyx_t_11.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateM, __pyx_v_delta, &__pyx_t_11)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_dateM, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;
  }
  __pyx_L6:;

  /* "utils.pxd":10125
 * 
 *     # Day replacement -> int64[D] YYYY-MM-DD
 *     dateD = dt64arr_as_int64_D(dateM, np.NPY_DATETIMEUNIT.NPY_FR_M, 0, True)             # <<<<<<<<<<<<<<
 *     delta = dt64arr_days_in_month(dateM, np.NPY_DATETIMEUNIT.NPY_FR_M, False)
 * 
*/
  __pyx_t_12.__pyx_n = 3;
  __pyx_t_12.arr_reso = NPY_FR_M;
  __pyx_t_12.offset = 0;
  __pyx_t_12.copy = 1;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_dateD = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "utils.pxd":10126
 *     # Day replacement -> int64[D] YYYY-MM-DD
 *     dateD = dt64arr_as_int64_D(dateM, np.NPY_DATETIMEUNIT.NPY_FR_M, 0, True)
 *     delta = dt64arr_days_in_month(dateM, np.NPY_DATETIMEUNIT.NPY_FR_M, False)             # <<<<<<<<<<<<<<
 * 
 *     # . set to specific day (clamp to maximum days in month)
*/
  __pyx_t_13.__pyx_n = 2;
  __pyx_t_13.arr_reso = NPY_FR_M;
  __pyx_t_13.copy = 0;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_month(__pyx_v_dateM, &__pyx_t_13)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_XDECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":10129
 * 
 *     # . set to specific day (clamp to maximum days in month)
 *     if day > 0:             # <<<<<<<<<<<<<<
 *         delta = arr_min(delta, day, 0, False)
 *     # . retain original day (clamp to maximum days in month)
*/
  __pyx_t_1 = (__pyx_v_day > 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10130
 *     # . set to specific day (clamp to maximum days in month)
 *     if day > 0:
 *         delta = arr_min(delta, day, 0, False)             # <<<<<<<<<<<<<<
 *     # . retain original day (clamp to maximum days in month)
 *     else:
*/
    __pyx_t_14.__pyx_n = 2;
    __pyx_t_14.offset = 0;
    __pyx_t_14.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_min(__pyx_v_delta, __pyx_v_day, &__pyx_t_14)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":10129
 * 
 *     # . set to specific day (clamp to maximum days in month)
 *     if day > 0:             # <<<<<<<<<<<<<<
 *         delta = arr_min(delta, day, 0, False)
 *     # . retain original day (clamp to maximum days in month)
*/
    goto __pyx_L7;
  }

  /* "utils.pxd":10133
 *     # . retain original day (clamp to maximum days in month)
 *     else:
 *         delta = arr_min_arr(delta, dt64arr_day(arr, arr_reso, 0, True), 0, False)             # <<<<<<<<<<<<<<
 *     dateD = arr_add_arr(dateD, delta, -1, False)
 * 
*/
  /*else*/ {
    __pyx_t_15.__pyx_n = 3;
    __pyx_t_15.arr_reso = __pyx_v_arr_reso;
    __pyx_t_15.offset = 0;
    __pyx_t_15.copy = 1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_day(__pyx_v_arr, &__pyx_t_15)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_17.__pyx_n = 2;
    __pyx_t_17.offset = 0;
    __pyx_t_17.copy = 0;
    __pyx_t_16 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_min_arr(__pyx_v_delta, ((PyArrayObject *)__pyx_t_3), &__pyx_t_17)); if (unlikely(!__pyx_t_16)) __PYX_ERR(5, 10133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_16));
    __pyx_t_16 = 0;
  }
  __pyx_L7:;

  /* "utils.pxd":10134
 *     else:
 *         delta = arr_min_arr(delta, dt64arr_day(arr, arr_reso, 0, True), 0, False)
 *     dateD = arr_add_arr(dateD, delta, -1, False)             # <<<<<<<<<<<<<<
 * 
 *     # Return the date part: int64[D]
*/
  __pyx_t_11.__pyx_n = 2;
  __pyx_t_11.offset = -1LL;
  __pyx_t_11.copy = 0;
  __pyx_t_16 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_11)); if (unlikely(!__pyx_t_16)) __PYX_ERR(5, 10134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_16));
  __pyx_t_16 = 0;

  /* "utils.pxd":10137
 * 
 *     # Return the date part: int64[D]
 *     return dateD             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_replace_times(np.ndarray arr, np.npy_int64 hour, np.npy_int64 minute, np.npy_int64 second, np.npy_int64 microsecond, np.npy_int64 nanosecond, int arr_reso=-1):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_dateD);
  __pyx_r = __pyx_v_dateD;
  goto __pyx_L0;

  /* "utils.pxd":10070
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_NS)
 * 
 * cdef inline np.ndarray dt64arr_replace_dates(np.ndarray arr, np.npy_int64 year, np.npy_int64 month, np.npy_int64 day, int arr_reso=-1):             # <<<<<<<<<<<<<<
 *     """Replace the Y/M/D components of an ndarray[datetime64] and return `int64` day ticks `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_replace_dates", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dateY);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateM);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateD);
  __Pyx_XDECREF((PyObject *)__pyx_v_delta);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10139
 *     return dateD
 * 
 * cdef inline np.ndarray dt64arr_replace_times(np.ndarray arr, np.npy_int64 hour, np.npy_int64 minute, np.npy_int64 second, np.npy_int64 microsecond, np.npy_int64 nanosecond, int arr_reso=-1):             # <<<<<<<<<<<<<<
 *     """Replace the h/m/s/us/ns components of an ndarray[datetime64] and return the
 *     time components `int64` ticks in the original resolution `<'ndarray[int64]'>`.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_replace_times(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_hour, npy_int64 __pyx_v_minute, npy_int64 __pyx_v_second, npy_int64 __pyx_v_microsecond, npy_int64 __pyx_v_nanosecond, struct __pyx_opt_args_7cytimes_5utils_dt64arr_replace_times *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_hh_f;
  npy_int64 __pyx_v_mi_f;
  npy_int64 __pyx_v_ss_f;
  npy_int64 __pyx_v_us_f;
  PyArrayObject *__pyx_v_times = 0;
  PyArrayObject *__pyx_v_delta = 0;
  npy_int64 __pyx_v_millisecond;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  long __pyx_t_8;
  npy_int64 __pyx_t_9;
  npy_int64 __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_hour __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_13;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_minute __pyx_t_14;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_15;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_second __pyx_t_16;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_millisecond __pyx_t_17;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_microsecond __pyx_t_18;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_nanosecond __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_replace_times", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
    }
  }

  /* "utils.pxd":10175
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10176
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":10177
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10177, __pyx_L1_error)

      /* "utils.pxd":10176
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":10178
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Get conversion factors
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 10178, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":10175
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":10182
 *     # Get conversion factors
 *     cdef np.npy_int64 hh_f, mi_f, ss_f, us_f
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         hh_f = NS_HOUR; mi_f = NS_MINUTE; ss_f = NS_SECOND; us_f = NS_MICROSECOND
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
  switch (__pyx_v_arr_reso) {
    case NPY_FR_ns:

    /* "utils.pxd":10183
 *     cdef np.npy_int64 hh_f, mi_f, ss_f, us_f
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         hh_f = NS_HOUR; mi_f = NS_MINUTE; ss_f = NS_SECOND; us_f = NS_MICROSECOND             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         hh_f = US_HOUR; mi_f = US_MINUTE; ss_f = US_SECOND; us_f = 1
*/
    __pyx_v_hh_f = __pyx_v_7cytimes_5utils_NS_HOUR;
    __pyx_v_mi_f = __pyx_v_7cytimes_5utils_NS_MINUTE;
    __pyx_v_ss_f = __pyx_v_7cytimes_5utils_NS_SECOND;
    __pyx_v_us_f = __pyx_v_7cytimes_5utils_NS_MICROSECOND;

    /* "utils.pxd":10182
 *     # Get conversion factors
 *     cdef np.npy_int64 hh_f, mi_f, ss_f, us_f
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         hh_f = NS_HOUR; mi_f = NS_MINUTE; ss_f = NS_SECOND; us_f = NS_MICROSECOND
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
    break;
    case NPY_FR_us:

    /* "utils.pxd":10185
 *         hh_f = NS_HOUR; mi_f = NS_MINUTE; ss_f = NS_SECOND; us_f = NS_MICROSECOND
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         hh_f = US_HOUR; mi_f = US_MINUTE; ss_f = US_SECOND; us_f = 1             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         hh_f = MS_HOUR; mi_f = MS_MINUTE; ss_f = MS_SECOND; us_f = 1
*/
    __pyx_v_hh_f = __pyx_v_7cytimes_5utils_US_HOUR;
    __pyx_v_mi_f = __pyx_v_7cytimes_5utils_US_MINUTE;
    __pyx_v_ss_f = __pyx_v_7cytimes_5utils_US_SECOND;
    __pyx_v_us_f = 1;

    /* "utils.pxd":10184
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         hh_f = NS_HOUR; mi_f = NS_MINUTE; ss_f = NS_SECOND; us_f = NS_MICROSECOND
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         hh_f = US_HOUR; mi_f = US_MINUTE; ss_f = US_SECOND; us_f = 1
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
    break;
    case NPY_FR_ms:

    /* "utils.pxd":10187
 *         hh_f = US_HOUR; mi_f = US_MINUTE; ss_f = US_SECOND; us_f = 1
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         hh_f = MS_HOUR; mi_f = MS_MINUTE; ss_f = MS_SECOND; us_f = 1             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         hh_f = SS_HOUR; mi_f = SS_MINUTE; ss_f = 1;         us_f = 0
*/
    __pyx_v_hh_f = __pyx_v_7cytimes_5utils_MS_HOUR;
    __pyx_v_mi_f = __pyx_v_7cytimes_5utils_MS_MINUTE;
    __pyx_v_ss_f = __pyx_v_7cytimes_5utils_MS_SECOND;
    __pyx_v_us_f = 1;

    /* "utils.pxd":10186
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         hh_f = US_HOUR; mi_f = US_MINUTE; ss_f = US_SECOND; us_f = 1
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         hh_f = MS_HOUR; mi_f = MS_MINUTE; ss_f = MS_SECOND; us_f = 1
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
    break;
    case NPY_FR_s:

    /* "utils.pxd":10189
 *         hh_f = MS_HOUR; mi_f = MS_MINUTE; ss_f = MS_SECOND; us_f = 1
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         hh_f = SS_HOUR; mi_f = SS_MINUTE; ss_f = 1;         us_f = 0             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError(
*/
    __pyx_v_hh_f = __pyx_v_7cytimes_5utils_SS_HOUR;
    __pyx_v_mi_f = __pyx_v_7cytimes_5utils_SS_MINUTE;
    __pyx_v_ss_f = 1;
    __pyx_v_us_f = 0;

    /* "utils.pxd":10188
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         hh_f = MS_HOUR; mi_f = MS_MINUTE; ss_f = MS_SECOND; us_f = 1
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         hh_f = SS_HOUR; mi_f = SS_MINUTE; ss_f = 1;         us_f = 0
 *     else:
*/
    break;
    default:

    /* "utils.pxd":10191
 *         hh_f = SS_HOUR; mi_f = SS_MINUTE; ss_f = 1;         us_f = 0
 *     else:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Only supports arrays with units in ['ns', 'us', 'ms', 's'], "
 *             "instead got '%s'." % nptime_unit_int2str(arr_reso)
*/
    __pyx_t_4 = NULL;

    /* "utils.pxd":10193
 *         raise ValueError(
 *             "Only supports arrays with units in ['ns', 'us', 'ms', 's'], "
 *             "instead got '%s'." % nptime_unit_int2str(arr_reso)             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_5 = __pyx_f_7cytimes_5utils_nptime_unit_int2str(__pyx_v_arr_reso); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 10193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Only_supports_arrays_with_units, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 10193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10191, __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_ERR(5, 10191, __pyx_L1_error)
    break;
  }

  /* "utils.pxd":10200
 *     cdef np.npy_int64 millisecond
 *     # . set to specific hour
 *     if hour >= 0:             # <<<<<<<<<<<<<<
 *         assure_1dim_arr(arr)
 *         times = arr_fill_int64(min(hour, 23) * hh_f, arr.shape[0])
*/
  __pyx_t_1 = (__pyx_v_hour >= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10201
 *     # . set to specific hour
 *     if hour >= 0:
 *         assure_1dim_arr(arr)             # <<<<<<<<<<<<<<
 *         times = arr_fill_int64(min(hour, 23) * hh_f, arr.shape[0])
 *     # . retain original hour
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_assure_1dim_arr(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10201, __pyx_L1_error)

    /* "utils.pxd":10202
 *     if hour >= 0:
 *         assure_1dim_arr(arr)
 *         times = arr_fill_int64(min(hour, 23) * hh_f, arr.shape[0])             # <<<<<<<<<<<<<<
 *     # . retain original hour
 *     else:
*/
    __pyx_t_8 = 23;
    __pyx_t_9 = __pyx_v_hour;
    __pyx_t_1 = (__pyx_t_8 < __pyx_t_9);
    if (__pyx_t_1) {
      __pyx_t_10 = __pyx_t_8;
    } else {
      __pyx_t_10 = __pyx_t_9;
    }
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_fill_int64((__pyx_t_10 * __pyx_v_hh_f), (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_times = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":10200
 *     cdef np.npy_int64 millisecond
 *     # . set to specific hour
 *     if hour >= 0:             # <<<<<<<<<<<<<<
 *         assure_1dim_arr(arr)
 *         times = arr_fill_int64(min(hour, 23) * hh_f, arr.shape[0])
*/
    goto __pyx_L5;
  }

  /* "utils.pxd":10205
 *     # . retain original hour
 *     else:
 *         delta = dt64arr_hour(arr, arr_reso, 0, True)             # <<<<<<<<<<<<<<
 *         times = arr_mul(delta, hh_f, 0, False)
 * 
*/
  /*else*/ {
    __pyx_t_11.__pyx_n = 3;
    __pyx_t_11.arr_reso = __pyx_v_arr_reso;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_hour(__pyx_v_arr, &__pyx_t_11)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":10206
 *     else:
 *         delta = dt64arr_hour(arr, arr_reso, 0, True)
 *         times = arr_mul(delta, hh_f, 0, False)             # <<<<<<<<<<<<<<
 * 
 *     # Minute replacement -> int64[ns] hh:mm:00.000000000
*/
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.offset = 0;
    __pyx_t_12.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_delta, __pyx_v_hh_f, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_times = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
  }
  __pyx_L5:;

  /* "utils.pxd":10210
 *     # Minute replacement -> int64[ns] hh:mm:00.000000000
 *     # . set to specific minute
 *     if minute >= 0:             # <<<<<<<<<<<<<<
 *         times = arr_add(times, min(minute, 59) * mi_f, False)
 *     # . retain original minute
*/
  __pyx_t_1 = (__pyx_v_minute >= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10211
 *     # . set to specific minute
 *     if minute >= 0:
 *         times = arr_add(times, min(minute, 59) * mi_f, False)             # <<<<<<<<<<<<<<
 *     # . retain original minute
 *     else:
*/
    __pyx_t_8 = 59;
    __pyx_t_10 = __pyx_v_minute;
    __pyx_t_1 = (__pyx_t_8 < __pyx_t_10);
    if (__pyx_t_1) {
      __pyx_t_9 = __pyx_t_8;
    } else {
      __pyx_t_9 = __pyx_t_10;
    }
    __pyx_t_13.__pyx_n = 1;
    __pyx_t_13.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_times, (__pyx_t_9 * __pyx_v_mi_f), &__pyx_t_13)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":10210
 *     # Minute replacement -> int64[ns] hh:mm:00.000000000
 *     # . set to specific minute
 *     if minute >= 0:             # <<<<<<<<<<<<<<
 *         times = arr_add(times, min(minute, 59) * mi_f, False)
 *     # . retain original minute
*/
    goto __pyx_L6;
  }

  /* "utils.pxd":10214
 *     # . retain original minute
 *     else:
 *         delta = dt64arr_minute(arr, arr_reso, 0, True)             # <<<<<<<<<<<<<<
 *         delta = arr_mul(delta, mi_f, 0, False)
 *         times = arr_add_arr(times, delta, 0, False)
*/
  /*else*/ {
    __pyx_t_14.__pyx_n = 3;
    __pyx_t_14.arr_reso = __pyx_v_arr_reso;
    __pyx_t_14.offset = 0;
    __pyx_t_14.copy = 1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_minute(__pyx_v_arr, &__pyx_t_14)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":10215
 *     else:
 *         delta = dt64arr_minute(arr, arr_reso, 0, True)
 *         delta = arr_mul(delta, mi_f, 0, False)             # <<<<<<<<<<<<<<
 *         times = arr_add_arr(times, delta, 0, False)
 * 
*/
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.offset = 0;
    __pyx_t_12.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_delta, __pyx_v_mi_f, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":10216
 *         delta = dt64arr_minute(arr, arr_reso, 0, True)
 *         delta = arr_mul(delta, mi_f, 0, False)
 *         times = arr_add_arr(times, delta, 0, False)             # <<<<<<<<<<<<<<
 * 
 *     # Second replacement -> int64[ns] hh:mm:ss.000000000
*/
    __pyx_t_15.__pyx_n = 2;
    __pyx_t_15.offset = 0;
    __pyx_t_15.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_times, __pyx_v_delta, &__pyx_t_15)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;
  }
  __pyx_L6:;

  /* "utils.pxd":10220
 *     # Second replacement -> int64[ns] hh:mm:ss.000000000
 *     # . set to specific second
 *     if second >= 0:             # <<<<<<<<<<<<<<
 *         times = arr_add(times, min(second, 59) * ss_f, False)
 *     # . retain original second
*/
  __pyx_t_1 = (__pyx_v_second >= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10221
 *     # . set to specific second
 *     if second >= 0:
 *         times = arr_add(times, min(second, 59) * ss_f, False)             # <<<<<<<<<<<<<<
 *     # . retain original second
 *     else:
*/
    __pyx_t_8 = 59;
    __pyx_t_9 = __pyx_v_second;
    __pyx_t_1 = (__pyx_t_8 < __pyx_t_9);
    if (__pyx_t_1) {
      __pyx_t_10 = __pyx_t_8;
    } else {
      __pyx_t_10 = __pyx_t_9;
    }
    __pyx_t_13.__pyx_n = 1;
    __pyx_t_13.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_times, (__pyx_t_10 * __pyx_v_ss_f), &__pyx_t_13)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":10220
 *     # Second replacement -> int64[ns] hh:mm:ss.000000000
 *     # . set to specific second
 *     if second >= 0:             # <<<<<<<<<<<<<<
 *         times = arr_add(times, min(second, 59) * ss_f, False)
 *     # . retain original second
*/
    goto __pyx_L7;
  }

  /* "utils.pxd":10224
 *     # . retain original second
 *     else:
 *         delta = dt64arr_second(arr, arr_reso, 0, True)             # <<<<<<<<<<<<<<
 *         delta = arr_mul(delta, ss_f, 0, False)
 *         times = arr_add_arr(times, delta, 0, False)
*/
  /*else*/ {
    __pyx_t_16.__pyx_n = 3;
    __pyx_t_16.arr_reso = __pyx_v_arr_reso;
    __pyx_t_16.offset = 0;
    __pyx_t_16.copy = 1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_second(__pyx_v_arr, &__pyx_t_16)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":10225
 *     else:
 *         delta = dt64arr_second(arr, arr_reso, 0, True)
 *         delta = arr_mul(delta, ss_f, 0, False)             # <<<<<<<<<<<<<<
 *         times = arr_add_arr(times, delta, 0, False)
 * 
*/
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.offset = 0;
    __pyx_t_12.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_delta, __pyx_v_ss_f, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":10226
 *         delta = dt64arr_second(arr, arr_reso, 0, True)
 *         delta = arr_mul(delta, ss_f, 0, False)
 *         times = arr_add_arr(times, delta, 0, False)             # <<<<<<<<<<<<<<
 * 
 *     # . Millisecond replacement -> int64[ns] hh:mm:ss.sss000000
*/
    __pyx_t_15.__pyx_n = 2;
    __pyx_t_15.offset = 0;
    __pyx_t_15.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_times, __pyx_v_delta, &__pyx_t_15)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;
  }
  __pyx_L7:;

  /* "utils.pxd":10229
 * 
 *     # . Millisecond replacement -> int64[ns] hh:mm:ss.sss000000
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         millisecond = 0 if microsecond < 0 else microsecond // 1000
 *         # . set to specific millisecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":10230
 *     # . Millisecond replacement -> int64[ns] hh:mm:ss.sss000000
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         millisecond = 0 if microsecond < 0 else microsecond // 1000             # <<<<<<<<<<<<<<
 *         # . set to specific millisecond
 *         if microsecond >= 0:
*/
    __pyx_t_1 = (__pyx_v_microsecond < 0);
    if (__pyx_t_1) {
      __pyx_t_10 = 0;
    } else {
      __pyx_t_10 = __Pyx_div_npy_int64(__pyx_v_microsecond, 0x3E8, 1);
    }
    __pyx_v_millisecond = __pyx_t_10;

    /* "utils.pxd":10232
 *         millisecond = 0 if microsecond < 0 else microsecond // 1000
 *         # . set to specific millisecond
 *         if microsecond >= 0:             # <<<<<<<<<<<<<<
 *             times = arr_add(times, min(millisecond, 999), False)
 *         # . retain original millisecond
*/
    __pyx_t_1 = (__pyx_v_microsecond >= 0);
    if (__pyx_t_1) {

      /* "utils.pxd":10233
 *         # . set to specific millisecond
 *         if microsecond >= 0:
 *             times = arr_add(times, min(millisecond, 999), False)             # <<<<<<<<<<<<<<
 *         # . retain original millisecond
 *         else:
*/
      __pyx_t_8 = 0x3E7;
      __pyx_t_10 = __pyx_v_millisecond;
      __pyx_t_1 = (__pyx_t_8 < __pyx_t_10);
      if (__pyx_t_1) {
        __pyx_t_9 = __pyx_t_8;
      } else {
        __pyx_t_9 = __pyx_t_10;
      }
      __pyx_t_13.__pyx_n = 1;
      __pyx_t_13.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_times, __pyx_t_9, &__pyx_t_13)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10233, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10232
 *         millisecond = 0 if microsecond < 0 else microsecond // 1000
 *         # . set to specific millisecond
 *         if microsecond >= 0:             # <<<<<<<<<<<<<<
 *             times = arr_add(times, min(millisecond, 999), False)
 *         # . retain original millisecond
*/
      goto __pyx_L9;
    }

    /* "utils.pxd":10236
 *         # . retain original millisecond
 *         else:
 *             delta = dt64arr_millisecond(arr, arr_reso, 0, True)             # <<<<<<<<<<<<<<
 *             times = arr_add_arr(times, delta, 0, False)
 * 
*/
    /*else*/ {
      __pyx_t_17.__pyx_n = 3;
      __pyx_t_17.arr_reso = __pyx_v_arr_reso;
      __pyx_t_17.offset = 0;
      __pyx_t_17.copy = 1;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_millisecond(__pyx_v_arr, &__pyx_t_17)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10236, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10237
 *         else:
 *             delta = dt64arr_millisecond(arr, arr_reso, 0, True)
 *             times = arr_add_arr(times, delta, 0, False)             # <<<<<<<<<<<<<<
 * 
 *     # Microsecond replacement -> int64[ns] hh:mm:ss.uuuuuu000
*/
      __pyx_t_15.__pyx_n = 2;
      __pyx_t_15.offset = 0;
      __pyx_t_15.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_times, __pyx_v_delta, &__pyx_t_15)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10237, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;
    }
    __pyx_L9:;

    /* "utils.pxd":10229
 * 
 *     # . Millisecond replacement -> int64[ns] hh:mm:ss.sss000000
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         millisecond = 0 if microsecond < 0 else microsecond // 1000
 *         # . set to specific millisecond
*/
    goto __pyx_L8;
  }

  /* "utils.pxd":10240
 * 
 *     # Microsecond replacement -> int64[ns] hh:mm:ss.uuuuuu000
 *     elif arr_reso != np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         # . set to specific microsecond
 *         if microsecond >= 0:
*/
  __pyx_t_1 = (__pyx_v_arr_reso != NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":10242
 *     elif arr_reso != np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         # . set to specific microsecond
 *         if microsecond >= 0:             # <<<<<<<<<<<<<<
 *             times = arr_add(times, min(microsecond, 999_999) * us_f, False)
 *         # . retain original microsecond
*/
    __pyx_t_1 = (__pyx_v_microsecond >= 0);
    if (__pyx_t_1) {

      /* "utils.pxd":10243
 *         # . set to specific microsecond
 *         if microsecond >= 0:
 *             times = arr_add(times, min(microsecond, 999_999) * us_f, False)             # <<<<<<<<<<<<<<
 *         # . retain original microsecond
 *         else:
*/
      __pyx_t_8 = 0xF423F;
      __pyx_t_9 = __pyx_v_microsecond;
      __pyx_t_1 = (__pyx_t_8 < __pyx_t_9);
      if (__pyx_t_1) {
        __pyx_t_10 = __pyx_t_8;
      } else {
        __pyx_t_10 = __pyx_t_9;
      }
      __pyx_t_13.__pyx_n = 1;
      __pyx_t_13.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_times, (__pyx_t_10 * __pyx_v_us_f), &__pyx_t_13)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10243, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10242
 *     elif arr_reso != np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         # . set to specific microsecond
 *         if microsecond >= 0:             # <<<<<<<<<<<<<<
 *             times = arr_add(times, min(microsecond, 999_999) * us_f, False)
 *         # . retain original microsecond
*/
      goto __pyx_L10;
    }

    /* "utils.pxd":10246
 *         # . retain original microsecond
 *         else:
 *             delta = dt64arr_microsecond(arr, arr_reso, 0, True)             # <<<<<<<<<<<<<<
 *             delta = arr_mul(delta, us_f, 0, False)
 *             times = arr_add_arr(times, delta, 0, False)
*/
    /*else*/ {
      __pyx_t_18.__pyx_n = 3;
      __pyx_t_18.arr_reso = __pyx_v_arr_reso;
      __pyx_t_18.offset = 0;
      __pyx_t_18.copy = 1;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_microsecond(__pyx_v_arr, &__pyx_t_18)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10246, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10247
 *         else:
 *             delta = dt64arr_microsecond(arr, arr_reso, 0, True)
 *             delta = arr_mul(delta, us_f, 0, False)             # <<<<<<<<<<<<<<
 *             times = arr_add_arr(times, delta, 0, False)
 * 
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_delta, __pyx_v_us_f, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10247, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10248
 *             delta = dt64arr_microsecond(arr, arr_reso, 0, True)
 *             delta = arr_mul(delta, us_f, 0, False)
 *             times = arr_add_arr(times, delta, 0, False)             # <<<<<<<<<<<<<<
 * 
 *     # Nanosecond replacement -> int64[ns] hh:mm:ss.uuuuuunnn
*/
      __pyx_t_15.__pyx_n = 2;
      __pyx_t_15.offset = 0;
      __pyx_t_15.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_times, __pyx_v_delta, &__pyx_t_15)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;
    }
    __pyx_L10:;

    /* "utils.pxd":10240
 * 
 *     # Microsecond replacement -> int64[ns] hh:mm:ss.uuuuuu000
 *     elif arr_reso != np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         # . set to specific microsecond
 *         if microsecond >= 0:
*/
  }
  __pyx_L8:;

  /* "utils.pxd":10251
 * 
 *     # Nanosecond replacement -> int64[ns] hh:mm:ss.uuuuuunnn
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         # . set to specific nanosecond
 *         if nanosecond >= 0:
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":10253
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         # . set to specific nanosecond
 *         if nanosecond >= 0:             # <<<<<<<<<<<<<<
 *             times = arr_add(times, min(nanosecond, 999), False)
 *         # . retain original nanosecond
*/
    __pyx_t_1 = (__pyx_v_nanosecond >= 0);
    if (__pyx_t_1) {

      /* "utils.pxd":10254
 *         # . set to specific nanosecond
 *         if nanosecond >= 0:
 *             times = arr_add(times, min(nanosecond, 999), False)             # <<<<<<<<<<<<<<
 *         # . retain original nanosecond
 *         else:
*/
      __pyx_t_8 = 0x3E7;
      __pyx_t_10 = __pyx_v_nanosecond;
      __pyx_t_1 = (__pyx_t_8 < __pyx_t_10);
      if (__pyx_t_1) {
        __pyx_t_9 = __pyx_t_8;
      } else {
        __pyx_t_9 = __pyx_t_10;
      }
      __pyx_t_13.__pyx_n = 1;
      __pyx_t_13.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_times, __pyx_t_9, &__pyx_t_13)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10254, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10253
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         # . set to specific nanosecond
 *         if nanosecond >= 0:             # <<<<<<<<<<<<<<
 *             times = arr_add(times, min(nanosecond, 999), False)
 *         # . retain original nanosecond
*/
      goto __pyx_L12;
    }

    /* "utils.pxd":10257
 *         # . retain original nanosecond
 *         else:
 *             delta = dt64arr_nanosecond(arr, arr_reso, 0, True)             # <<<<<<<<<<<<<<
 *             times = arr_add_arr(times, delta, 0, False)
 * 
*/
    /*else*/ {
      __pyx_t_19.__pyx_n = 3;
      __pyx_t_19.arr_reso = __pyx_v_arr_reso;
      __pyx_t_19.offset = 0;
      __pyx_t_19.copy = 1;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_nanosecond(__pyx_v_arr, &__pyx_t_19)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10257, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10258
 *         else:
 *             delta = dt64arr_nanosecond(arr, arr_reso, 0, True)
 *             times = arr_add_arr(times, delta, 0, False)             # <<<<<<<<<<<<<<
 * 
 *     # Return the time part: int64[arr_reso]
*/
      __pyx_t_15.__pyx_n = 2;
      __pyx_t_15.offset = 0;
      __pyx_t_15.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_times, __pyx_v_delta, &__pyx_t_15)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10258, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;
    }
    __pyx_L12:;

    /* "utils.pxd":10251
 * 
 *     # Nanosecond replacement -> int64[ns] hh:mm:ss.uuuuuunnn
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         # . set to specific nanosecond
 *         if nanosecond >= 0:
*/
  }

  /* "utils.pxd":10261
 * 
 *     # Return the time part: int64[arr_reso]
 *     return times             # <<<<<<<<<<<<<<
 * 
 * # . arithmetic
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_times);
  __pyx_r = __pyx_v_times;
  goto __pyx_L0;

  /* "utils.pxd":10139
 *     return dateD
 * 
 * cdef inline np.ndarray dt64arr_replace_times(np.ndarray arr, np.npy_int64 hour, np.npy_int64 minute, np.npy_int64 second, np.npy_int64 microsecond, np.npy_int64 nanosecond, int arr_reso=-1):             # <<<<<<<<<<<<<<
 *     """Replace the h/m/s/us/ns components of an ndarray[datetime64] and return the
 *     time components `int64` ticks in the original resolution `<'ndarray[int64]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_replace_times", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_times);
  __Pyx_XDECREF((PyObject *)__pyx_v_delta);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10264
 * 
 * # . arithmetic
 * cdef inline np.ndarray dt64arr_round(np.ndarray arr, str to_unit, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Round a 1-D datetime64 array to the nearest multiple of `to_unit` (ties-to-even) `<'ndarray[datetime64]'>`
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_round(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_to_unit, struct __pyx_opt_args_7cytimes_5utils_dt64arr_round *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  int __pyx_v_is_dt64;
  int __pyx_v_to_reso;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_9;
  int __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_even __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_even_mul __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_round", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":10290
 *     """
 *     # Guard
 *     if to_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(to_unit)
 * 
*/
  __pyx_t_1 = (__pyx_v_to_unit == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":10291
 *     # Guard
 *     if to_unit is None:
 *         _raise_invalid_nptime_str_unit_error(to_unit)             # <<<<<<<<<<<<<<
 * 
 *     # Get array resolution
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(__pyx_v_to_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10291, __pyx_L1_error)

    /* "utils.pxd":10290
 *     """
 *     # Guard
 *     if to_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(to_unit)
 * 
*/
  }

  /* "utils.pxd":10294
 * 
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME             # <<<<<<<<<<<<<<
 *     if arr_reso < 0:
 *         if not is_dt64:
*/
  __pyx_v_is_dt64 = (PyArray_TYPE(__pyx_v_arr) == NPY_DATETIME);

  /* "utils.pxd":10295
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10296
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:
 *         if not is_dt64:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (!__pyx_v_is_dt64);
    if (__pyx_t_1) {

      /* "utils.pxd":10297
 *     if arr_reso < 0:
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10297, __pyx_L1_error)

      /* "utils.pxd":10296
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:
 *         if not is_dt64:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":10298
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Parse target resolution
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 10298, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":10295
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":10301
 * 
 *     # Parse target resolution
 *     cdef int to_reso = nptime_unit_str2int(to_unit)             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path
*/
  __pyx_t_2 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_to_unit); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 10301, __pyx_L1_error)
  __pyx_v_to_reso = __pyx_t_2;

  /* "utils.pxd":10305
 *     # Fast-path
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:             # <<<<<<<<<<<<<<
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
*/
  __pyx_t_1 = (__pyx_v_arr_reso <= __pyx_v_to_reso);
  if (__pyx_t_1) {

    /* "utils.pxd":10306
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:
 *         if is_dt64:             # <<<<<<<<<<<<<<
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
*/
    if (__pyx_v_is_dt64) {

      /* "utils.pxd":10307
 *     if arr_reso <= to_reso:
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag             # <<<<<<<<<<<<<<
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_4.__pyx_n = 1;
      __pyx_t_4.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, 0, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10307, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10306
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:
 *         if is_dt64:             # <<<<<<<<<<<<<<
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
*/
    }

    /* "utils.pxd":10308
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))             # <<<<<<<<<<<<<<
 * 
 *     #: Convert to int64
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = __pyx_f_7cytimes_5utils_nptime_unit_int2dt64(__pyx_v_arr_reso); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 10308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10308, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10308, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10305
 *     # Fast-path
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:             # <<<<<<<<<<<<<<
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
*/
  }

  /* "utils.pxd":10311
 * 
 *     #: Convert to int64
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 * 
 *     # To microsecond [us]
*/
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":10314
 * 
 *     # To microsecond [us]
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
  switch (__pyx_v_to_reso) {
    case NPY_FR_us:

    /* "utils.pxd":10316
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even(arr, NS_MICROSECOND, 0, copy)
*/
    __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
    if (__pyx_t_1) {

      /* "utils.pxd":10317
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even(arr, NS_MICROSECOND, 0, copy)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10317, __pyx_L1_error)
      __pyx_t_10 = (!__pyx_t_1);
      if (__pyx_t_10) {

        /* "utils.pxd":10318
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even(arr, NS_MICROSECOND, 0, copy)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_11.__pyx_n = 2;
        __pyx_t_11.offset = 0;
        __pyx_t_11.copy = __pyx_v_copy;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_11)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10318, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10319
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even(arr, NS_MICROSECOND, 0, copy)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_MICROSECOND, NS_MICROSECOND, 0, copy)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10319, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10319, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10317
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even(arr, NS_MICROSECOND, 0, copy)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10321
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_MICROSECOND, NS_MICROSECOND, 0, copy)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # Coarser/equal units are handled by fast-path.
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = __pyx_v_copy;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MICROSECOND, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10321, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10322
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_MICROSECOND, NS_MICROSECOND, 0, copy)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10322, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10322, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10316
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even(arr, NS_MICROSECOND, 0, copy)
*/
    }

    /* "utils.pxd":10314
 * 
 *     # To microsecond [us]
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_ms:

    /* "utils.pxd":10328
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10329
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_10 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 10329, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_10);
      if (__pyx_t_1) {

        /* "utils.pxd":10330
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MILLISECOND, __pyx_v_7cytimes_5utils_US_MILLISECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10330, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10331
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_MILLISECOND, NS_MILLISECOND, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10331, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10331, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10329
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10333
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_MILLISECOND, NS_MILLISECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [ms]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MILLISECOND, __pyx_v_7cytimes_5utils_NS_MILLISECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10333, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10334
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_MILLISECOND, NS_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [ms]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10334, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10334, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10328
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10337
 *         # my_unit [us] -> [ms]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_even_mul(arr, US_MILLISECOND, US_MILLISECOND, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MILLISECOND, __pyx_v_7cytimes_5utils_US_MILLISECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10337, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10338
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_even_mul(arr, US_MILLISECOND, US_MILLISECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10338, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10338, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10336
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [ms]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, US_MILLISECOND, US_MILLISECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10326
 * 
 *     # To millisecond [ms]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_s:

    /* "utils.pxd":10344
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_SECOND, US_SECOND, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10345
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even_mul(arr, NS_SECOND, US_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10345, __pyx_L1_error)
      __pyx_t_10 = (!__pyx_t_1);
      if (__pyx_t_10) {

        /* "utils.pxd":10346
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_SECOND, US_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_SECOND, __pyx_v_7cytimes_5utils_US_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10346, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10347
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_SECOND, US_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_SECOND, NS_SECOND, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10347, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10347, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10345
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even_mul(arr, NS_SECOND, US_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10349
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_SECOND, NS_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [s]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_SECOND, __pyx_v_7cytimes_5utils_NS_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10349, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10350
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_SECOND, NS_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10350, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10350, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10344
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_SECOND, US_SECOND, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10353
 *         # my_unit [us] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_even_mul(arr, US_SECOND, US_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [s]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_SECOND, __pyx_v_7cytimes_5utils_US_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10354
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_even_mul(arr, US_SECOND, US_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10354, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10354, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10352
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, US_SECOND, US_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10357
 *         # my_unit [ms] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_even_mul(arr, MS_SECOND, MS_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_SECOND, __pyx_v_7cytimes_5utils_MS_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10357, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10358
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_even_mul(arr, MS_SECOND, MS_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10358, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10358, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10356
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, MS_SECOND, MS_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10342
 * 
 *     # To second [s]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_m:

    /* "utils.pxd":10364
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10365
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_10 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 10365, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_10);
      if (__pyx_t_1) {

        /* "utils.pxd":10366
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_MINUTE, US_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MINUTE, __pyx_v_7cytimes_5utils_US_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10366, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10367
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_MINUTE, NS_MINUTE, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10367, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10367, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10365
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10369
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_MINUTE, NS_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [m]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MINUTE, __pyx_v_7cytimes_5utils_NS_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10369, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10370
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_MINUTE, NS_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10370, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10370, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10364
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10373
 *         # my_unit [us] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_even_mul(arr, US_MINUTE, US_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [m]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MINUTE, __pyx_v_7cytimes_5utils_US_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10373, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10374
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_even_mul(arr, US_MINUTE, US_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10374, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10374, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10372
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, US_MINUTE, US_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10377
 *         # my_unit [ms] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_even_mul(arr, MS_MINUTE, MS_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [m]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_MINUTE, __pyx_v_7cytimes_5utils_MS_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10378
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_even_mul(arr, MS_MINUTE, MS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # my_unit [s] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10378, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10378, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10376
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, MS_MINUTE, MS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      case NPY_FR_s:

      /* "utils.pxd":10381
 *         # my_unit [s] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_even_mul(arr, SS_MINUTE, SS_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_SS)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_MINUTE, __pyx_v_7cytimes_5utils_SS_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10381, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10382
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_even_mul(arr, SS_MINUTE, SS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10382, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10382, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10380
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, SS_MINUTE, SS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10362
 * 
 *     # To minute [m]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_h:

    /* "utils.pxd":10388
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_HOUR, US_HOUR, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10389
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even_mul(arr, NS_HOUR, US_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10389, __pyx_L1_error)
      __pyx_t_10 = (!__pyx_t_1);
      if (__pyx_t_10) {

        /* "utils.pxd":10390
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_HOUR, US_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_HOUR, __pyx_v_7cytimes_5utils_US_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10390, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10391
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_HOUR, US_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_HOUR, NS_HOUR, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10391, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10391, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10389
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even_mul(arr, NS_HOUR, US_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10393
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_HOUR, NS_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [h]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_HOUR, __pyx_v_7cytimes_5utils_NS_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10393, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10394
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_HOUR, NS_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10394, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10394, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10388
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_HOUR, US_HOUR, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10397
 *         # my_unit [us] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_even_mul(arr, US_HOUR, US_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [h]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_HOUR, __pyx_v_7cytimes_5utils_US_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10397, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10398
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_even_mul(arr, US_HOUR, US_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10398, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10398, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10396
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, US_HOUR, US_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10401
 *         # my_unit [ms] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_even_mul(arr, MS_HOUR, MS_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [h]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_HOUR, __pyx_v_7cytimes_5utils_MS_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10401, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10402
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_even_mul(arr, MS_HOUR, MS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # my_unit [s] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10402, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10402, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10400
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, MS_HOUR, MS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      case NPY_FR_s:

      /* "utils.pxd":10405
 *         # my_unit [s] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_even_mul(arr, SS_HOUR, SS_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [h]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_HOUR, __pyx_v_7cytimes_5utils_SS_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10405, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10406
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_even_mul(arr, SS_HOUR, SS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 *         # my_unit [m] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10406, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10406, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10404
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, SS_HOUR, SS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)
*/
      break;
      case NPY_FR_m:

      /* "utils.pxd":10409
 *         # my_unit [m] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_even_mul(arr, 60, 60, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MI)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, 60, 60, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10409, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10410
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_even_mul(arr, 60, 60, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MI};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10410, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10410, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10408
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, 60, 60, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10386
 * 
 *     # To hour [h]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_D:

    /* "utils.pxd":10416
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_DAY, US_DAY, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10417
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even_mul(arr, NS_DAY, US_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_10 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 10417, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_10);
      if (__pyx_t_1) {

        /* "utils.pxd":10418
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_DAY, US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_DAY, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10418, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10419
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_DAY, US_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_DAY, NS_DAY, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10419, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10419, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10417
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even_mul(arr, NS_DAY, US_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10421
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_DAY, NS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [D]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_DAY, __pyx_v_7cytimes_5utils_NS_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10421, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10422
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_DAY, NS_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10422, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10422, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10416
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_DAY, US_DAY, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10425
 *         # my_unit [us] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_even_mul(arr, US_DAY, US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_DAY, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10425, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10426
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_even_mul(arr, US_DAY, US_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10426, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10426, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10424
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, US_DAY, US_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10429
 *         # my_unit [ms] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_even_mul(arr, MS_DAY, MS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_DAY, __pyx_v_7cytimes_5utils_MS_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10429, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10430
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_even_mul(arr, MS_DAY, MS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # my_unit [s] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10430, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10430, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10428
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, MS_DAY, MS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      case NPY_FR_s:

      /* "utils.pxd":10433
 *         # my_unit [s] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_even_mul(arr, SS_DAY, SS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_DAY, __pyx_v_7cytimes_5utils_SS_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10433, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10434
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_even_mul(arr, SS_DAY, SS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 *         # my_unit [m] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10434, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10434, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10432
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, SS_DAY, SS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)
*/
      break;
      case NPY_FR_m:

      /* "utils.pxd":10437
 *         # my_unit [m] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_even_mul(arr, 1440, 1440, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MI)
 *         # my_unit [h] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, 0x5A0, 0x5A0, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10437, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10438
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_even_mul(arr, 1440, 1440, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)             # <<<<<<<<<<<<<<
 *         # my_unit [h] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MI};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10438, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10438, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10436
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, 1440, 1440, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)
*/
      break;
      case NPY_FR_h:

      /* "utils.pxd":10441
 *         # my_unit [h] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *             arr = arr_div_even_mul(arr, 24, 24, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_HH)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, 24, 24, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10441, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10442
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *             arr = arr_div_even_mul(arr, 24, 24, 0, False)
 *             return arr.astype(DT64_DTYPE_HH)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_HH};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10442, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10442, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10440
 *             return arr.astype(DT64_DTYPE_MI)
 *         # my_unit [h] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, 24, 24, 0, False)
 *             return arr.astype(DT64_DTYPE_HH)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10414
 * 
 *     # To day [D]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    default: break;
  }

  /* "utils.pxd":10446
 * 
 *     # Invalid unit
 *     _raise_arr_dt64_rcl_error("round", arr_reso, to_unit)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_ceil(np.ndarray arr, str to_unit, int arr_reso=-1, bint copy=True):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_arr_dt64_rcl_error(__pyx_mstate_global->__pyx_n_u_round, __pyx_v_arr_reso, __pyx_v_to_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10446, __pyx_L1_error)

  /* "utils.pxd":10264
 * 
 * # . arithmetic
 * cdef inline np.ndarray dt64arr_round(np.ndarray arr, str to_unit, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Round a 1-D datetime64 array to the nearest multiple of `to_unit` (ties-to-even) `<'ndarray[datetime64]'>`
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_round", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10448
 *     _raise_arr_dt64_rcl_error("round", arr_reso, to_unit)
 * 
 * cdef inline np.ndarray dt64arr_ceil(np.ndarray arr, str to_unit, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ceil a 1-D datetime64 array to the nearest multiple of `to_unit` `<'ndarray[datetime64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_ceil(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_to_unit, struct __pyx_opt_args_7cytimes_5utils_dt64arr_ceil *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  int __pyx_v_is_dt64;
  int __pyx_v_to_reso;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_9;
  int __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_ceil __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_ceil_mul __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_ceil", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":10474
 *     """
 *     # Guard
 *     if to_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(to_unit)
 * 
*/
  __pyx_t_1 = (__pyx_v_to_unit == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":10475
 *     # Guard
 *     if to_unit is None:
 *         _raise_invalid_nptime_str_unit_error(to_unit)             # <<<<<<<<<<<<<<
 * 
 *     # Get array resolution
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(__pyx_v_to_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10475, __pyx_L1_error)

    /* "utils.pxd":10474
 *     """
 *     # Guard
 *     if to_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(to_unit)
 * 
*/
  }

  /* "utils.pxd":10478
 * 
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME             # <<<<<<<<<<<<<<
 *     if arr_reso < 0:
 *         if not is_dt64:
*/
  __pyx_v_is_dt64 = (PyArray_TYPE(__pyx_v_arr) == NPY_DATETIME);

  /* "utils.pxd":10479
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10480
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:
 *         if not is_dt64:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (!__pyx_v_is_dt64);
    if (__pyx_t_1) {

      /* "utils.pxd":10481
 *     if arr_reso < 0:
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10481, __pyx_L1_error)

      /* "utils.pxd":10480
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:
 *         if not is_dt64:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":10482
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Parse target resolution
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 10482, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":10479
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":10485
 * 
 *     # Parse target resolution
 *     cdef int to_reso = nptime_unit_str2int(to_unit)             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path
*/
  __pyx_t_2 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_to_unit); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 10485, __pyx_L1_error)
  __pyx_v_to_reso = __pyx_t_2;

  /* "utils.pxd":10489
 *     # Fast-path
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:             # <<<<<<<<<<<<<<
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
*/
  __pyx_t_1 = (__pyx_v_arr_reso <= __pyx_v_to_reso);
  if (__pyx_t_1) {

    /* "utils.pxd":10490
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:
 *         if is_dt64:             # <<<<<<<<<<<<<<
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
*/
    if (__pyx_v_is_dt64) {

      /* "utils.pxd":10491
 *     if arr_reso <= to_reso:
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag             # <<<<<<<<<<<<<<
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_4.__pyx_n = 1;
      __pyx_t_4.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, 0, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10491, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10490
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:
 *         if is_dt64:             # <<<<<<<<<<<<<<
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
*/
    }

    /* "utils.pxd":10492
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))             # <<<<<<<<<<<<<<
 * 
 *     #: Convert to int64
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = __pyx_f_7cytimes_5utils_nptime_unit_int2dt64(__pyx_v_arr_reso); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 10492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10492, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10492, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10489
 *     # Fast-path
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:             # <<<<<<<<<<<<<<
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
*/
  }

  /* "utils.pxd":10495
 * 
 *     #: Convert to int64
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 * 
 *     # To microsecond [us]
*/
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":10498
 * 
 *     # To microsecond [us]
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
  switch (__pyx_v_to_reso) {
    case NPY_FR_us:

    /* "utils.pxd":10500
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil(arr, NS_MICROSECOND, 0, False)
*/
    __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
    if (__pyx_t_1) {

      /* "utils.pxd":10501
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil(arr, NS_MICROSECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10501, __pyx_L1_error)
      __pyx_t_10 = (!__pyx_t_1);
      if (__pyx_t_10) {

        /* "utils.pxd":10502
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil(arr, NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_11.__pyx_n = 2;
        __pyx_t_11.offset = 0;
        __pyx_t_11.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_11)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10502, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10503
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil(arr, NS_MICROSECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_MICROSECOND, NS_MICROSECOND, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10503, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10503, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10501
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil(arr, NS_MICROSECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10505
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_MICROSECOND, NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # Coarser/equal units are handled by fast-path.
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MICROSECOND, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10505, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10506
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_MICROSECOND, NS_MICROSECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10506, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10506, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10500
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil(arr, NS_MICROSECOND, 0, False)
*/
    }

    /* "utils.pxd":10498
 * 
 *     # To microsecond [us]
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_ms:

    /* "utils.pxd":10512
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10513
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_10 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 10513, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_10);
      if (__pyx_t_1) {

        /* "utils.pxd":10514
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MILLISECOND, __pyx_v_7cytimes_5utils_US_MILLISECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10514, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10515
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_MILLISECOND, NS_MILLISECOND, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10515, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10515, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10513
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10517
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_MILLISECOND, NS_MILLISECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [ms]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MILLISECOND, __pyx_v_7cytimes_5utils_NS_MILLISECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10517, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10518
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_MILLISECOND, NS_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [ms]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10518, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10518, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10512
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10521
 *         # my_unit [us] -> [ms]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_ceil_mul(arr, US_MILLISECOND, US_MILLISECOND, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MILLISECOND, __pyx_v_7cytimes_5utils_US_MILLISECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10521, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10522
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_ceil_mul(arr, US_MILLISECOND, US_MILLISECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10522, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10522, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10520
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [ms]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, US_MILLISECOND, US_MILLISECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10510
 * 
 *     # To millisecond [ms]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_s:

    /* "utils.pxd":10528
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_SECOND, US_SECOND, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10529
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil_mul(arr, NS_SECOND, US_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10529, __pyx_L1_error)
      __pyx_t_10 = (!__pyx_t_1);
      if (__pyx_t_10) {

        /* "utils.pxd":10530
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_SECOND, US_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_SECOND, __pyx_v_7cytimes_5utils_US_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10530, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10531
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_SECOND, US_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_SECOND, NS_SECOND, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10531, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10531, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10529
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil_mul(arr, NS_SECOND, US_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10533
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_SECOND, NS_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [s]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_SECOND, __pyx_v_7cytimes_5utils_NS_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10533, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10534
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_SECOND, NS_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10534, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10534, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10528
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_SECOND, US_SECOND, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10537
 *         # my_unit [us] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_ceil_mul(arr, US_SECOND, US_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [s]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_SECOND, __pyx_v_7cytimes_5utils_US_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10537, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10538
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_ceil_mul(arr, US_SECOND, US_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10538, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10538, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10536
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, US_SECOND, US_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10541
 *         # my_unit [ms] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_ceil_mul(arr, MS_SECOND, MS_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_SECOND, __pyx_v_7cytimes_5utils_MS_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10541, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10542
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_ceil_mul(arr, MS_SECOND, MS_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10542, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10542, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10540
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, MS_SECOND, MS_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10526
 * 
 *     # To second [s]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_m:

    /* "utils.pxd":10548
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10549
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_10 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 10549, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_10);
      if (__pyx_t_1) {

        /* "utils.pxd":10550
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_MINUTE, US_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MINUTE, __pyx_v_7cytimes_5utils_US_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10550, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10551
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_MINUTE, NS_MINUTE, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10551, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10551, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10549
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10553
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_MINUTE, NS_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [m]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MINUTE, __pyx_v_7cytimes_5utils_NS_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10553, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10554
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_MINUTE, NS_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10554, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10554, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10548
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10557
 *         # my_unit [us] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_ceil_mul(arr, US_MINUTE, US_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [m]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MINUTE, __pyx_v_7cytimes_5utils_US_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10557, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10558
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_ceil_mul(arr, US_MINUTE, US_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10558, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10558, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10556
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, US_MINUTE, US_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10561
 *         # my_unit [ms] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_ceil_mul(arr, MS_MINUTE, MS_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [m]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_MINUTE, __pyx_v_7cytimes_5utils_MS_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10561, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10562
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_ceil_mul(arr, MS_MINUTE, MS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # my_unit [s] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10562, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10562, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10560
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, MS_MINUTE, MS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      case NPY_FR_s:

      /* "utils.pxd":10565
 *         # my_unit [s] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_ceil_mul(arr, SS_MINUTE, SS_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_SS)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_MINUTE, __pyx_v_7cytimes_5utils_SS_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10565, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10566
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_ceil_mul(arr, SS_MINUTE, SS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10566, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10566, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10564
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, SS_MINUTE, SS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10546
 * 
 *     # To minute [m]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_h:

    /* "utils.pxd":10572
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_HOUR, US_HOUR, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10573
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil_mul(arr, NS_HOUR, US_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10573, __pyx_L1_error)
      __pyx_t_10 = (!__pyx_t_1);
      if (__pyx_t_10) {

        /* "utils.pxd":10574
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_HOUR, US_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_HOUR, __pyx_v_7cytimes_5utils_US_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10574, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10575
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_HOUR, US_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_HOUR, NS_HOUR, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10575, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10575, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10573
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil_mul(arr, NS_HOUR, US_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10577
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_HOUR, NS_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [h]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_HOUR, __pyx_v_7cytimes_5utils_NS_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10577, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10578
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_HOUR, NS_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10578, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10578, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10572
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_HOUR, US_HOUR, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10581
 *         # my_unit [us] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_ceil_mul(arr, US_HOUR, US_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [h]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_HOUR, __pyx_v_7cytimes_5utils_US_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10581, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10582
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_ceil_mul(arr, US_HOUR, US_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10582, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10582, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10580
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, US_HOUR, US_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10585
 *         # my_unit [ms] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_ceil_mul(arr, MS_HOUR, MS_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [h]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_HOUR, __pyx_v_7cytimes_5utils_MS_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10585, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10586
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_ceil_mul(arr, MS_HOUR, MS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # my_unit [s] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10586, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10586, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10584
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, MS_HOUR, MS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      case NPY_FR_s:

      /* "utils.pxd":10589
 *         # my_unit [s] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_ceil_mul(arr, SS_HOUR, SS_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [h]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_HOUR, __pyx_v_7cytimes_5utils_SS_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10589, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10590
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_ceil_mul(arr, SS_HOUR, SS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 *         # my_unit [m] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10590, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10590, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10588
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, SS_HOUR, SS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)
*/
      break;
      case NPY_FR_m:

      /* "utils.pxd":10593
 *         # my_unit [m] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_ceil_mul(arr, 60, 60, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MI)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, 60, 60, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10593, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10594
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_ceil_mul(arr, 60, 60, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MI};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10594, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10594, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10592
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, 60, 60, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10570
 * 
 *     # To hour [h]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_D:

    /* "utils.pxd":10600
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_DAY, US_DAY, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10601
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil_mul(arr, NS_DAY, US_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_10 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 10601, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_10);
      if (__pyx_t_1) {

        /* "utils.pxd":10602
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_DAY, US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_DAY, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10602, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10603
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_DAY, US_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_DAY, NS_DAY, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10603, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10603, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10601
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil_mul(arr, NS_DAY, US_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10605
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_DAY, NS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [D]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_DAY, __pyx_v_7cytimes_5utils_NS_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10605, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10606
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_DAY, NS_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10606, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10606, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10600
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_DAY, US_DAY, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10609
 *         # my_unit [us] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_ceil_mul(arr, US_DAY, US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_DAY, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10610
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_ceil_mul(arr, US_DAY, US_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10610, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10610, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10608
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, US_DAY, US_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10613
 *         # my_unit [ms] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_ceil_mul(arr, MS_DAY, MS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_DAY, __pyx_v_7cytimes_5utils_MS_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10613, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10614
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_ceil_mul(arr, MS_DAY, MS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # my_unit [s] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10614, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10614, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10612
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, MS_DAY, MS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      case NPY_FR_s:

      /* "utils.pxd":10617
 *         # my_unit [s] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_ceil_mul(arr, SS_DAY, SS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_DAY, __pyx_v_7cytimes_5utils_SS_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10617, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10618
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_ceil_mul(arr, SS_DAY, SS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 *         # my_unit [m] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10618, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10618, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10616
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, SS_DAY, SS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)
*/
      break;
      case NPY_FR_m:

      /* "utils.pxd":10621
 *         # my_unit [m] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_ceil_mul(arr, 1440, 1440, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MI)
 *         # my_unit [h] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, 0x5A0, 0x5A0, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10622
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_ceil_mul(arr, 1440, 1440, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)             # <<<<<<<<<<<<<<
 *         # my_unit [h] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MI};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10622, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10622, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10620
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, 1440, 1440, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)
*/
      break;
      case NPY_FR_h:

      /* "utils.pxd":10625
 *         # my_unit [h] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *             arr = arr_div_ceil_mul(arr, 24, 24, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_HH)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, 24, 24, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10625, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10626
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *             arr = arr_div_ceil_mul(arr, 24, 24, 0, False)
 *             return arr.astype(DT64_DTYPE_HH)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_HH};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10626, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10626, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10624
 *             return arr.astype(DT64_DTYPE_MI)
 *         # my_unit [h] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, 24, 24, 0, False)
 *             return arr.astype(DT64_DTYPE_HH)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10598
 * 
 *     # To day [D]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    default: break;
  }

  /* "utils.pxd":10630
 * 
 *     # Invalid unit
 *     _raise_arr_dt64_rcl_error("ceil", arr_reso, to_unit)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_floor(np.ndarray arr, str to_unit, int arr_reso=-1, bint copy=True):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_arr_dt64_rcl_error(__pyx_mstate_global->__pyx_n_u_ceil, __pyx_v_arr_reso, __pyx_v_to_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10630, __pyx_L1_error)

  /* "utils.pxd":10448
 *     _raise_arr_dt64_rcl_error("round", arr_reso, to_unit)
 * 
 * cdef inline np.ndarray dt64arr_ceil(np.ndarray arr, str to_unit, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ceil a 1-D datetime64 array to the nearest multiple of `to_unit` `<'ndarray[datetime64]'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_ceil", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10632
 *     _raise_arr_dt64_rcl_error("ceil", arr_reso, to_unit)
 * 
 * cdef inline np.ndarray dt64arr_floor(np.ndarray arr, str to_unit, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Floor a 1-D datetime64 array to the nearest multiple of `to_unit` `<'ndarray[datetime64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_floor(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_to_unit, struct __pyx_opt_args_7cytimes_5utils_dt64arr_floor *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  int __pyx_v_is_dt64;
  int __pyx_v_to_reso;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_9;
  int __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor_mul __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_floor", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":10658
 *     """
 *     # Guard
 *     if to_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(to_unit)
 * 
*/
  __pyx_t_1 = (__pyx_v_to_unit == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":10659
 *     # Guard
 *     if to_unit is None:
 *         _raise_invalid_nptime_str_unit_error(to_unit)             # <<<<<<<<<<<<<<
 * 
 *     # Get array resolution
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(__pyx_v_to_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10659, __pyx_L1_error)

    /* "utils.pxd":10658
 *     """
 *     # Guard
 *     if to_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(to_unit)
 * 
*/
  }

  /* "utils.pxd":10662
 * 
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME             # <<<<<<<<<<<<<<
 *     if arr_reso < 0:
 *         if not is_dt64:
*/
  __pyx_v_is_dt64 = (PyArray_TYPE(__pyx_v_arr) == NPY_DATETIME);

  /* "utils.pxd":10663
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10664
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:
 *         if not is_dt64:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (!__pyx_v_is_dt64);
    if (__pyx_t_1) {

      /* "utils.pxd":10665
 *     if arr_reso < 0:
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10665, __pyx_L1_error)

      /* "utils.pxd":10664
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:
 *         if not is_dt64:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":10666
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Parse target resolution
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 10666, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":10663
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":10669
 * 
 *     # Parse target resolution
 *     cdef int to_reso = nptime_unit_str2int(to_unit)             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path
*/
  __pyx_t_2 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_to_unit); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 10669, __pyx_L1_error)
  __pyx_v_to_reso = __pyx_t_2;

  /* "utils.pxd":10673
 *     # Fast-path
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:             # <<<<<<<<<<<<<<
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
*/
  __pyx_t_1 = (__pyx_v_arr_reso <= __pyx_v_to_reso);
  if (__pyx_t_1) {

    /* "utils.pxd":10674
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:
 *         if is_dt64:             # <<<<<<<<<<<<<<
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
*/
    if (__pyx_v_is_dt64) {

      /* "utils.pxd":10675
 *     if arr_reso <= to_reso:
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag             # <<<<<<<<<<<<<<
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_4.__pyx_n = 1;
      __pyx_t_4.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, 0, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10675, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10674
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:
 *         if is_dt64:             # <<<<<<<<<<<<<<
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
*/
    }

    /* "utils.pxd":10676
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))             # <<<<<<<<<<<<<<
 * 
 *     #: Convert to int64
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = __pyx_f_7cytimes_5utils_nptime_unit_int2dt64(__pyx_v_arr_reso); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 10676, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10676, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10676, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10673
 *     # Fast-path
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:             # <<<<<<<<<<<<<<
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
*/
  }

  /* "utils.pxd":10679
 * 
 *     #: Convert to int64
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 * 
 *     # To microsecond [us]
*/
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":10682
 * 
 *     # To microsecond [us]
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
  switch (__pyx_v_to_reso) {
    case NPY_FR_us:

    /* "utils.pxd":10684
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor(arr, NS_MICROSECOND, 0, False)
*/
    __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
    if (__pyx_t_1) {

      /* "utils.pxd":10685
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor(arr, NS_MICROSECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10685, __pyx_L1_error)
      __pyx_t_10 = (!__pyx_t_1);
      if (__pyx_t_10) {

        /* "utils.pxd":10686
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor(arr, NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_11.__pyx_n = 2;
        __pyx_t_11.offset = 0;
        __pyx_t_11.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_11)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10686, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10687
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor(arr, NS_MICROSECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_MICROSECOND, NS_MICROSECOND, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10687, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10687, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10685
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor(arr, NS_MICROSECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10689
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_MICROSECOND, NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # Coarser/equal units are handled by fast-path.
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MICROSECOND, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10689, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10690
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_MICROSECOND, NS_MICROSECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10690, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10690, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10684
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor(arr, NS_MICROSECOND, 0, False)
*/
    }

    /* "utils.pxd":10682
 * 
 *     # To microsecond [us]
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_ms:

    /* "utils.pxd":10696
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10697
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_10 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 10697, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_10);
      if (__pyx_t_1) {

        /* "utils.pxd":10698
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MILLISECOND, __pyx_v_7cytimes_5utils_US_MILLISECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10698, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10699
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_MILLISECOND, NS_MILLISECOND, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10699, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10699, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10697
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10701
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_MILLISECOND, NS_MILLISECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [ms]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MILLISECOND, __pyx_v_7cytimes_5utils_NS_MILLISECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10701, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10702
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_MILLISECOND, NS_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [ms]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10702, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10702, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10696
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10705
 *         # my_unit [us] -> [ms]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_floor_mul(arr, US_MILLISECOND, US_MILLISECOND, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MILLISECOND, __pyx_v_7cytimes_5utils_US_MILLISECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10705, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10706
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_floor_mul(arr, US_MILLISECOND, US_MILLISECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10706, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10706, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10704
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [ms]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, US_MILLISECOND, US_MILLISECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10694
 * 
 *     # To millisecond [ms]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_s:

    /* "utils.pxd":10712
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_SECOND, US_SECOND, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10713
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor_mul(arr, NS_SECOND, US_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10713, __pyx_L1_error)
      __pyx_t_10 = (!__pyx_t_1);
      if (__pyx_t_10) {

        /* "utils.pxd":10714
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_SECOND, US_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_SECOND, __pyx_v_7cytimes_5utils_US_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10714, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10715
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_SECOND, US_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_SECOND, NS_SECOND, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10715, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10715, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10713
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor_mul(arr, NS_SECOND, US_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10717
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_SECOND, NS_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [s]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_SECOND, __pyx_v_7cytimes_5utils_NS_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10717, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10718
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_SECOND, NS_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10718, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10718, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10712
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_SECOND, US_SECOND, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10721
 *         # my_unit [us] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_floor_mul(arr, US_SECOND, US_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [s]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_SECOND, __pyx_v_7cytimes_5utils_US_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10721, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10722
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_floor_mul(arr, US_SECOND, US_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10722, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10722, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10720
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, US_SECOND, US_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10725
 *         # my_unit [ms] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_floor_mul(arr, MS_SECOND, MS_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_SECOND, __pyx_v_7cytimes_5utils_MS_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10726
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_floor_mul(arr, MS_SECOND, MS_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10726, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10726, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10724
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, MS_SECOND, MS_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10710
 * 
 *     # To second [s]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_m:

    /* "utils.pxd":10732
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10733
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_10 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 10733, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_10);
      if (__pyx_t_1) {

        /* "utils.pxd":10734
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_MINUTE, US_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MINUTE, __pyx_v_7cytimes_5utils_US_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10734, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10735
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_MINUTE, NS_MINUTE, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10735, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10735, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10733
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10737
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_MINUTE, NS_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [m]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MINUTE, __pyx_v_7cytimes_5utils_NS_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10737, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10738
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_MINUTE, NS_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10738, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10738, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10732
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10741
 *         # my_unit [us] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_floor_mul(arr, US_MINUTE, US_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [m]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MINUTE, __pyx_v_7cytimes_5utils_US_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10741, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10742
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_floor_mul(arr, US_MINUTE, US_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10742, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10742, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10740
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, US_MINUTE, US_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10745
 *         # my_unit [ms] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_floor_mul(arr, MS_MINUTE, MS_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [m]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_MINUTE, __pyx_v_7cytimes_5utils_MS_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10745, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10746
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_floor_mul(arr, MS_MINUTE, MS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # my_unit [s] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10746, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10746, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10744
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, MS_MINUTE, MS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      case NPY_FR_s:

      /* "utils.pxd":10749
 *         # my_unit [s] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_floor_mul(arr, SS_MINUTE, SS_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_SS)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_MINUTE, __pyx_v_7cytimes_5utils_SS_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10749, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10750
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_floor_mul(arr, SS_MINUTE, SS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10750, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10750, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10748
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, SS_MINUTE, SS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10730
 * 
 *     # To minute [m]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_h:

    /* "utils.pxd":10756
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_HOUR, US_HOUR, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10757
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor_mul(arr, NS_HOUR, US_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10757, __pyx_L1_error)
      __pyx_t_10 = (!__pyx_t_1);
      if (__pyx_t_10) {

        /* "utils.pxd":10758
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_HOUR, US_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_HOUR, __pyx_v_7cytimes_5utils_US_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10758, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10759
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_HOUR, US_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_HOUR, NS_HOUR, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10759, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10759, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10757
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor_mul(arr, NS_HOUR, US_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10761
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_HOUR, NS_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [h]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_HOUR, __pyx_v_7cytimes_5utils_NS_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10761, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10762
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_HOUR, NS_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10762, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10762, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10756
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_HOUR, US_HOUR, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10765
 *         # my_unit [us] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_floor_mul(arr, US_HOUR, US_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [h]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_HOUR, __pyx_v_7cytimes_5utils_US_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10765, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10766
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_floor_mul(arr, US_HOUR, US_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10766, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10766, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10764
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, US_HOUR, US_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10769
 *         # my_unit [ms] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_floor_mul(arr, MS_HOUR, MS_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [h]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_HOUR, __pyx_v_7cytimes_5utils_MS_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10770
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_floor_mul(arr, MS_HOUR, MS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # my_unit [s] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10770, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10770, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10768
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, MS_HOUR, MS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      case NPY_FR_s:

      /* "utils.pxd":10773
 *         # my_unit [s] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_floor_mul(arr, SS_HOUR, SS_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [h]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_HOUR, __pyx_v_7cytimes_5utils_SS_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10773, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10774
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_floor_mul(arr, SS_HOUR, SS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 *         # my_unit [m] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10774, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10774, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10772
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, SS_HOUR, SS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)
*/
      break;
      case NPY_FR_m:

      /* "utils.pxd":10777
 *         # my_unit [m] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_floor_mul(arr, 60, 60, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MI)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, 60, 60, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10777, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10778
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_floor_mul(arr, 60, 60, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MI};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10778, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10778, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10776
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, 60, 60, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10754
 * 
 *     # To hour [h]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_D:

    /* "utils.pxd":10784
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_DAY, US_DAY, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10785
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor_mul(arr, NS_DAY, US_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_10 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 10785, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_10);
      if (__pyx_t_1) {

        /* "utils.pxd":10786
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_DAY, US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_DAY, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10786, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10787
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_DAY, US_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_DAY, NS_DAY, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10787, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10787, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10785
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor_mul(arr, NS_DAY, US_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10789
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_DAY, NS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [D]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_DAY, __pyx_v_7cytimes_5utils_NS_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10789, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10790
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_DAY, NS_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10790, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10790, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10784
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_DAY, US_DAY, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10793
 *         # my_unit [us] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_floor_mul(arr, US_DAY, US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_DAY, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10793, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10794
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_floor_mul(arr, US_DAY, US_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10794, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10794, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10792
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, US_DAY, US_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10797
 *         # my_unit [ms] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_floor_mul(arr, MS_DAY, MS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_DAY, __pyx_v_7cytimes_5utils_MS_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10797, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10798
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_floor_mul(arr, MS_DAY, MS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # my_unit [s] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10798, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10798, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10796
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, MS_DAY, MS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      case NPY_FR_s:

      /* "utils.pxd":10801
 *         # my_unit [s] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_floor_mul(arr, SS_DAY, SS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_DAY, __pyx_v_7cytimes_5utils_SS_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10801, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10802
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_floor_mul(arr, SS_DAY, SS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 *         # my_unit [m] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10802, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10802, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10800
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, SS_DAY, SS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)
*/
      break;
      case NPY_FR_m:

      /* "utils.pxd":10805
 *         # my_unit [m] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_floor_mul(arr, 1440, 1440, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MI)
 *         # my_unit [h] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, 0x5A0, 0x5A0, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10805, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10806
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_floor_mul(arr, 1440, 1440, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)             # <<<<<<<<<<<<<<
 *         # my_unit [h] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MI};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10806, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10806, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10804
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, 1440, 1440, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)
*/
      break;
      case NPY_FR_h:

      /* "utils.pxd":10809
 *         # my_unit [h] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *             arr = arr_div_floor_mul(arr, 24, 24, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_HH)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, 24, 24, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10809, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10810
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *             arr = arr_div_floor_mul(arr, 24, 24, 0, False)
 *             return arr.astype(DT64_DTYPE_HH)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_HH};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10810, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10810, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10808
 *             return arr.astype(DT64_DTYPE_MI)
 *         # my_unit [h] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, 24, 24, 0, False)
 *             return arr.astype(DT64_DTYPE_HH)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10782
 * 
 *     # To day [D]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    default: break;
  }

  /* "utils.pxd":10814
 * 
 *     # Invalid unit
 *     _raise_arr_dt64_rcl_error("floor", arr_reso, to_unit)             # <<<<<<<<<<<<<<
 * 
 * # . errors
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_arr_dt64_rcl_error(__pyx_mstate_global->__pyx_n_u_floor, __pyx_v_arr_reso, __pyx_v_to_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10814, __pyx_L1_error)

  /* "utils.pxd":10632
 *     _raise_arr_dt64_rcl_error("ceil", arr_reso, to_unit)
 * 
 * cdef inline np.ndarray dt64arr_floor(np.ndarray arr, str to_unit, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Floor a 1-D datetime64 array to the nearest multiple of `to_unit` `<'ndarray[datetime64]'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_floor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10817
 * 
 * # . errors
 * cdef inline bint _raise_missing_arr_reso_error(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for array missing resolution information.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(PyArrayObject *__pyx_v_arr) {
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_raise_missing_arr_reso_error", 0);

  /* "utils.pxd":10822
 *     :param arr `<'np.ndarray'>`: The array missing resolution information.
 *     """
 *     raise ValueError(             # <<<<<<<<<<<<<<
 *         "missing time resolution for <ndarray[%s]>. "
 *         "Pleae provide the `arr_reso` (NPY_DATETIMEUNIT enum) of the array." % arr.dtype
*/
  __pyx_t_2 = NULL;

  /* "utils.pxd":10824
 *     raise ValueError(
 *         "missing time resolution for <ndarray[%s]>. "
 *         "Pleae provide the `arr_reso` (NPY_DATETIMEUNIT enum) of the array." % arr.dtype             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_missing_time_resolution_for_ndar, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 10824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10822, __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_ERR(5, 10822, __pyx_L1_error)

  /* "utils.pxd":10817
 * 
 * # . errors
 * cdef inline bint _raise_missing_arr_reso_error(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for array missing resolution information.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.utils._raise_missing_arr_reso_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10827
 *     )
 * 
 * cdef inline bint _raise_dt64arr_to_reso_error(np.ndarray arr, int arr_reso, str to_unit) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for unsupported conversion unit for datetime-like array.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_dt64arr_to_reso_error(PyArrayObject *__pyx_v_arr, int __pyx_v_arr_reso, PyObject *__pyx_v_to_unit) {
  PyObject *__pyx_v_dtype_str = 0;
  PyObject *__pyx_v_arr_reso_str = 0;
  PyObject *__pyx_v_err = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8[7];
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __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;
  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[27];
  PyObject *__pyx_t_25 = NULL;
  int __pyx_t_26;
  char const *__pyx_t_27;
  PyObject *__pyx_t_28 = NULL;
  PyObject *__pyx_t_29 = NULL;
  PyObject *__pyx_t_30 = NULL;
  PyObject *__pyx_t_31 = NULL;
  PyObject *__pyx_t_32 = NULL;
  PyObject *__pyx_t_33 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_raise_dt64arr_to_reso_error", 0);

  /* "utils.pxd":10834
 *     :param to_unit `<'str'>`: The target conversion numpy unit.
 *     """
 *     cdef str dtype_str = str(arr.dtype)             # <<<<<<<<<<<<<<
 *     cdef str arr_reso_str
 *     try:
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 10834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dtype_str = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":10836
 *     cdef str dtype_str = str(arr.dtype)
 *     cdef str arr_reso_str
 *     try:             # <<<<<<<<<<<<<<
 *         arr_reso_str = nptime_unit_int2str(arr_reso)
 *     except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "utils.pxd":10837
 *     cdef str arr_reso_str
 *     try:
 *         arr_reso_str = nptime_unit_int2str(arr_reso)             # <<<<<<<<<<<<<<
 *     except Exception as err:
 *         raise ValueError(
*/
      __pyx_t_2 = __pyx_f_7cytimes_5utils_nptime_unit_int2str(__pyx_v_arr_reso); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 10837, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_arr_reso_str = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "utils.pxd":10836
 *     cdef str dtype_str = str(arr.dtype)
 *     cdef str arr_reso_str
 *     try:             # <<<<<<<<<<<<<<
 *         arr_reso_str = nptime_unit_int2str(arr_reso)
 *     except Exception as err:
*/
    }

    /* "utils.pxd":10859
 *         ) from err
 *     else:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot convert ndarray[%s[%s]] to int64 '%s' ticks.\n"
 *             "Supported resolution: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'"
*/
    /*else:*/ {
      __pyx_t_1 = NULL;

      /* "utils.pxd":10862
 *             "Cannot convert ndarray[%s[%s]] to int64 '%s' ticks.\n"
 *             "Supported resolution: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'"
 *             % (dtype_str, arr_reso_str, to_unit)             # <<<<<<<<<<<<<<
 *         )
 * 
*/
      __pyx_t_6 = __Pyx_PyUnicode_Unicode(__pyx_v_arr_reso_str); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 10862, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyUnicode_Unicode(__pyx_v_to_unit); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 10862, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_convert_ndarray;
      __pyx_t_8[1] = __pyx_v_dtype_str;
      __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u__10;
      __pyx_t_8[3] = __pyx_t_6;
      __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u_to_int64_2;
      __pyx_t_8[5] = __pyx_t_7;
      __pyx_t_8[6] = __pyx_mstate_global->__pyx_kp_u_ticks_Supported_resolution_Y_M;

      /* "utils.pxd":10860
 *     else:
 *         raise ValueError(
 *             "Cannot convert ndarray[%s[%s]] to int64 '%s' ticks.\n"             # <<<<<<<<<<<<<<
 *             "Supported resolution: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'"
 *             % (dtype_str, arr_reso_str, to_unit)
*/
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 7, 23 + __Pyx_PyUnicode_GET_LENGTH(__pyx_v_dtype_str) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 13 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 82, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_dtype_str) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
      if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 10860, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_10 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_9};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 10859, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(5, 10859, __pyx_L5_except_error)
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "utils.pxd":10838
 *     try:
 *         arr_reso_str = nptime_unit_int2str(arr_reso)
 *     except Exception as err:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot convert ndarray[%s] from '%d' unit to int64 '%s' ticks.\n"
*/
    __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_11) {
      __Pyx_AddTraceback("cytimes.utils._raise_dt64arr_to_reso_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_9, &__pyx_t_1) < 0) __PYX_ERR(5, 10838, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_9);
      __pyx_v_err = __pyx_t_9;
      /*try:*/ {

        /* "utils.pxd":10839
 *         arr_reso_str = nptime_unit_int2str(arr_reso)
 *     except Exception as err:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot convert ndarray[%s] from '%d' unit to int64 '%s' ticks.\n"
 *             "Supported units: %d'Y', %d'M', %d'W', %d'D', %d'h', %d'm', "
*/
        __pyx_t_6 = NULL;

        /* "utils.pxd":10844
 *             "%d's', %d'ms', %d'us', %d'ns'" % (
 *                 dtype_str,
 *                 arr_reso,             # <<<<<<<<<<<<<<
 *                 to_unit,
 *                 DT_NPY_UNIT_YY,
*/
        __pyx_t_12 = __Pyx_PyUnicode_From_int(__pyx_v_arr_reso, 0, ' ', 'd'); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 10844, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_12);

        /* "utils.pxd":10845
 *                 dtype_str,
 *                 arr_reso,
 *                 to_unit,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_YY,
 *                 DT_NPY_UNIT_MM,
*/
        __pyx_t_13 = __Pyx_PyUnicode_Unicode(__pyx_v_to_unit); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 10845, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_13);

        /* "utils.pxd":10846
 *                 arr_reso,
 *                 to_unit,
 *                 DT_NPY_UNIT_YY,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_MM,
 *                 DT_NPY_UNIT_WW,
*/
        __pyx_t_14 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_YY, 0, ' ', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 10846, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_14);

        /* "utils.pxd":10847
 *                 to_unit,
 *                 DT_NPY_UNIT_YY,
 *                 DT_NPY_UNIT_MM,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_WW,
 *                 DT_NPY_UNIT_DD,
*/
        __pyx_t_15 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM, 0, ' ', 'd'); if (unlikely(!__pyx_t_15)) __PYX_ERR(5, 10847, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_15);

        /* "utils.pxd":10848
 *                 DT_NPY_UNIT_YY,
 *                 DT_NPY_UNIT_MM,
 *                 DT_NPY_UNIT_WW,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_DD,
 *                 DT_NPY_UNIT_HH,
*/
        __pyx_t_16 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_WW, 0, ' ', 'd'); if (unlikely(!__pyx_t_16)) __PYX_ERR(5, 10848, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_16);

        /* "utils.pxd":10849
 *                 DT_NPY_UNIT_MM,
 *                 DT_NPY_UNIT_WW,
 *                 DT_NPY_UNIT_DD,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_HH,
 *                 DT_NPY_UNIT_MI,
*/
        __pyx_t_17 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD, 0, ' ', 'd'); if (unlikely(!__pyx_t_17)) __PYX_ERR(5, 10849, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_17);

        /* "utils.pxd":10850
 *                 DT_NPY_UNIT_WW,
 *                 DT_NPY_UNIT_DD,
 *                 DT_NPY_UNIT_HH,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_MI,
 *                 DT_NPY_UNIT_SS,
*/
        __pyx_t_18 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_HH, 0, ' ', 'd'); if (unlikely(!__pyx_t_18)) __PYX_ERR(5, 10850, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_18);

        /* "utils.pxd":10851
 *                 DT_NPY_UNIT_DD,
 *                 DT_NPY_UNIT_HH,
 *                 DT_NPY_UNIT_MI,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_SS,
 *                 DT_NPY_UNIT_MS,
*/
        __pyx_t_19 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_MI, 0, ' ', 'd'); if (unlikely(!__pyx_t_19)) __PYX_ERR(5, 10851, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_19);

        /* "utils.pxd":10852
 *                 DT_NPY_UNIT_HH,
 *                 DT_NPY_UNIT_MI,
 *                 DT_NPY_UNIT_SS,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_MS,
 *                 DT_NPY_UNIT_US,
*/
        __pyx_t_20 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_SS, 0, ' ', 'd'); if (unlikely(!__pyx_t_20)) __PYX_ERR(5, 10852, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_20);

        /* "utils.pxd":10853
 *                 DT_NPY_UNIT_MI,
 *                 DT_NPY_UNIT_SS,
 *                 DT_NPY_UNIT_MS,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_US,
 *                 DT_NPY_UNIT_NS,
*/
        __pyx_t_21 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_MS, 0, ' ', 'd'); if (unlikely(!__pyx_t_21)) __PYX_ERR(5, 10853, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_21);

        /* "utils.pxd":10854
 *                 DT_NPY_UNIT_SS,
 *                 DT_NPY_UNIT_MS,
 *                 DT_NPY_UNIT_US,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_NS,
 *             )
*/
        __pyx_t_22 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_US, 0, ' ', 'd'); if (unlikely(!__pyx_t_22)) __PYX_ERR(5, 10854, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_22);

        /* "utils.pxd":10855
 *                 DT_NPY_UNIT_MS,
 *                 DT_NPY_UNIT_US,
 *                 DT_NPY_UNIT_NS,             # <<<<<<<<<<<<<<
 *             )
 *         ) from err
*/
        __pyx_t_23 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS, 0, ' ', 'd'); if (unlikely(!__pyx_t_23)) __PYX_ERR(5, 10855, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_23);
        __pyx_t_24[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_convert_ndarray;
        __pyx_t_24[1] = __pyx_v_dtype_str;
        __pyx_t_24[2] = __pyx_mstate_global->__pyx_kp_u_from_2;
        __pyx_t_24[3] = __pyx_t_12;
        __pyx_t_24[4] = __pyx_mstate_global->__pyx_kp_u_unit_to_int64;
        __pyx_t_24[5] = __pyx_t_13;
        __pyx_t_24[6] = __pyx_mstate_global->__pyx_kp_u_ticks_Supported_units;
        __pyx_t_24[7] = __pyx_t_14;
        __pyx_t_24[8] = __pyx_mstate_global->__pyx_kp_u_Y_2;
        __pyx_t_24[9] = __pyx_t_15;
        __pyx_t_24[10] = __pyx_mstate_global->__pyx_kp_u_M_2;
        __pyx_t_24[11] = __pyx_t_16;
        __pyx_t_24[12] = __pyx_mstate_global->__pyx_kp_u_W_2;
        __pyx_t_24[13] = __pyx_t_17;
        __pyx_t_24[14] = __pyx_mstate_global->__pyx_kp_u_D_2;
        __pyx_t_24[15] = __pyx_t_18;
        __pyx_t_24[16] = __pyx_mstate_global->__pyx_kp_u_h_2;
        __pyx_t_24[17] = __pyx_t_19;
        __pyx_t_24[18] = __pyx_mstate_global->__pyx_kp_u_m_2;
        __pyx_t_24[19] = __pyx_t_20;
        __pyx_t_24[20] = __pyx_mstate_global->__pyx_kp_u_s_2;
        __pyx_t_24[21] = __pyx_t_21;
        __pyx_t_24[22] = __pyx_mstate_global->__pyx_kp_u_ms_2;
        __pyx_t_24[23] = __pyx_t_22;
        __pyx_t_24[24] = __pyx_mstate_global->__pyx_kp_u_us_2;
        __pyx_t_24[25] = __pyx_t_23;
        __pyx_t_24[26] = __pyx_mstate_global->__pyx_kp_u_ns_2;

        /* "utils.pxd":10840
 *     except Exception as err:
 *         raise ValueError(
 *             "Cannot convert ndarray[%s] from '%d' unit to int64 '%s' ticks.\n"             # <<<<<<<<<<<<<<
 *             "Supported units: %d'Y', %d'M', %d'W', %d'D', %d'h', %d'm', "
 *             "%d's', %d'ms', %d'us', %d'ns'" % (
*/
        __pyx_t_25 = __Pyx_PyUnicode_Join(__pyx_t_24, 27, 23 + __Pyx_PyUnicode_GET_LENGTH(__pyx_v_dtype_str) + 8 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 26 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 6 * 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_19) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_20) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_21) + 7 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_22) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_23) + 5, 65535 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_dtype_str) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13));
        if (unlikely(!__pyx_t_25)) __PYX_ERR(5, 10840, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_25);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
        __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
        __pyx_t_10 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_25};
          __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 10839, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_7);
        }

        /* "utils.pxd":10857
 *                 DT_NPY_UNIT_NS,
 *             )
 *         ) from err             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError(
*/
        __Pyx_Raise(__pyx_t_7, 0, 0, __pyx_v_err);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __PYX_ERR(5, 10839, __pyx_L14_error)
      }

      /* "utils.pxd":10838
 *     try:
 *         arr_reso_str = nptime_unit_int2str(arr_reso)
 *     except Exception as err:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot convert ndarray[%s] from '%d' unit to int64 '%s' ticks.\n"
*/
      /*finally:*/ {
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_28 = 0; __pyx_t_29 = 0; __pyx_t_30 = 0; __pyx_t_31 = 0; __pyx_t_32 = 0; __pyx_t_33 = 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;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 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;
          __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
          __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_31, &__pyx_t_32, &__pyx_t_33);
          if ( unlikely(__Pyx_GetException(&__pyx_t_28, &__pyx_t_29, &__pyx_t_30) < 0)) __Pyx_ErrFetch(&__pyx_t_28, &__pyx_t_29, &__pyx_t_30);
          __Pyx_XGOTREF(__pyx_t_28);
          __Pyx_XGOTREF(__pyx_t_29);
          __Pyx_XGOTREF(__pyx_t_30);
          __Pyx_XGOTREF(__pyx_t_31);
          __Pyx_XGOTREF(__pyx_t_32);
          __Pyx_XGOTREF(__pyx_t_33);
          __pyx_t_11 = __pyx_lineno; __pyx_t_26 = __pyx_clineno; __pyx_t_27 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_31);
          __Pyx_XGIVEREF(__pyx_t_32);
          __Pyx_XGIVEREF(__pyx_t_33);
          __Pyx_ExceptionReset(__pyx_t_31, __pyx_t_32, __pyx_t_33);
          __Pyx_XGIVEREF(__pyx_t_28);
          __Pyx_XGIVEREF(__pyx_t_29);
          __Pyx_XGIVEREF(__pyx_t_30);
          __Pyx_ErrRestore(__pyx_t_28, __pyx_t_29, __pyx_t_30);
          __pyx_t_28 = 0; __pyx_t_29 = 0; __pyx_t_30 = 0; __pyx_t_31 = 0; __pyx_t_32 = 0; __pyx_t_33 = 0;
          __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_26; __pyx_filename = __pyx_t_27;
          goto __pyx_L5_except_error;
        }
      }
    }
    goto __pyx_L5_except_error;

    /* "utils.pxd":10836
 *     cdef str dtype_str = str(arr.dtype)
 *     cdef str arr_reso_str
 *     try:             # <<<<<<<<<<<<<<
 *         arr_reso_str = nptime_unit_int2str(arr_reso)
 *     except Exception as err:
*/
    __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;
  }

  /* "utils.pxd":10827
 *     )
 * 
 * cdef inline bint _raise_dt64arr_to_reso_error(np.ndarray arr, int arr_reso, str to_unit) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for unsupported conversion unit for datetime-like array.
 * 
*/

  /* function exit code */
  __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_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);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_XDECREF(__pyx_t_23);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_AddTraceback("cytimes.utils._raise_dt64arr_to_reso_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_XDECREF(__pyx_v_dtype_str);
  __Pyx_XDECREF(__pyx_v_arr_reso_str);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10865
 *         )
 * 
 * cdef inline bint _raise_arr_dt64_rcl_error(str ops, int arr_reso, str to_unit) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for unsupported unit for 'dt64arr_round/ceil/floor()' functions.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_arr_dt64_rcl_error(PyObject *__pyx_v_ops, int __pyx_v_arr_reso, PyObject *__pyx_v_to_unit) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6[7];
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_raise_arr_dt64_rcl_error", 0);

  /* "utils.pxd":10872
 *     :param to_unit `<'str'>`: The target round/ceil/floor numpy unit.
 *     """
 *     raise ValueError(             # <<<<<<<<<<<<<<
 *         "Failed: <'ndarray[datetime64[%s]]'> %s to '%s' resolution is not supported."
 *         % (nptime_unit_int2str(arr_reso), ops, to_unit)
*/
  __pyx_t_2 = NULL;

  /* "utils.pxd":10874
 *     raise ValueError(
 *         "Failed: <'ndarray[datetime64[%s]]'> %s to '%s' resolution is not supported."
 *         % (nptime_unit_int2str(arr_reso), ops, to_unit)             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_3 = __pyx_f_7cytimes_5utils_nptime_unit_int2str(__pyx_v_arr_reso); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyUnicode_Unicode(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 10874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyUnicode_Unicode(__pyx_v_ops); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyUnicode_Unicode(__pyx_v_to_unit); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 10874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Failed_ndarray_datetime64;
  __pyx_t_6[1] = __pyx_t_4;
  __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u__11;
  __pyx_t_6[3] = __pyx_t_3;
  __pyx_t_6[4] = __pyx_mstate_global->__pyx_kp_u_to;
  __pyx_t_6[5] = __pyx_t_5;
  __pyx_t_6[6] = __pyx_mstate_global->__pyx_kp_u_resolution_is_not_supported;

  /* "utils.pxd":10873
 *     """
 *     raise ValueError(
 *         "Failed: <'ndarray[datetime64[%s]]'> %s to '%s' resolution is not supported."             # <<<<<<<<<<<<<<
 *         % (nptime_unit_int2str(arr_reso), ops, to_unit)
 *     )
*/
  __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 7, 29 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 5 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 30, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
  if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 10873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __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;
  __pyx_t_8 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10872, __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_ERR(5, 10872, __pyx_L1_error)

  /* "utils.pxd":10865
 *         )
 * 
 * cdef inline bint _raise_arr_dt64_rcl_error(str ops, int arr_reso, str to_unit) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for unsupported unit for 'dt64arr_round/ceil/floor()' functions.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.utils._raise_arr_dt64_rcl_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10879
 * # NumPy: ndarray[timedelta64] --------------------------------------------------------------------------
 * # . type check
 * cdef inline bint is_td64arr(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Check if the array is dtype of 'timedelta64[*]' `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_td64arr(PyArrayObject *__pyx_v_arr) {
  int __pyx_r;

  /* "utils.pxd":10885
 *     >>> isinstance(arr.dtype, np.dtypes.TimeDelta64DType)
 *     """
 *     return np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_TIMEDELTA             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint assure_td64arr(np.ndarray arr) except -1:
*/
  __pyx_r = (PyArray_TYPE(__pyx_v_arr) == NPY_TIMEDELTA);
  goto __pyx_L0;

  /* "utils.pxd":10879
 * # NumPy: ndarray[timedelta64] --------------------------------------------------------------------------
 * # . type check
 * cdef inline bint is_td64arr(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Check if the array is dtype of 'timedelta64[*]' `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":10887
 *     return np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_TIMEDELTA
 * 
 * cdef inline bint assure_td64arr(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Assure the array is dtype of 'timedelta64[*]'."""
 *     if not is_td64arr(arr):
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_assure_td64arr(PyArrayObject *__pyx_v_arr) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("assure_td64arr", 0);

  /* "utils.pxd":10889
 * cdef inline bint assure_td64arr(np.ndarray arr) except -1:
 *     """Assure the array is dtype of 'timedelta64[*]'."""
 *     if not is_td64arr(arr):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Expects instance of 'np.ndarray[timedelta64[*]]', "
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_is_td64arr(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10889, __pyx_L1_error)
  __pyx_t_2 = (!__pyx_t_1);
  if (unlikely(__pyx_t_2)) {

    /* "utils.pxd":10890
 *     """Assure the array is dtype of 'timedelta64[*]'."""
 *     if not is_td64arr(arr):
 *         raise TypeError(             # <<<<<<<<<<<<<<
 *             "Expects instance of 'np.ndarray[timedelta64[*]]', "
 *             "instead got 'np.ndarray[%s]'." % arr.dtype
*/
    __pyx_t_4 = NULL;

    /* "utils.pxd":10892
 *         raise TypeError(
 *             "Expects instance of 'np.ndarray[timedelta64[*]]', "
 *             "instead got 'np.ndarray[%s]'." % arr.dtype             # <<<<<<<<<<<<<<
 *         )
 *     return True
*/
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 10892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Expects_instance_of_np_ndarray_t, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 10892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10890, __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_ERR(5, 10890, __pyx_L1_error)

    /* "utils.pxd":10889
 * cdef inline bint assure_td64arr(np.ndarray arr) except -1:
 *     """Assure the array is dtype of 'timedelta64[*]'."""
 *     if not is_td64arr(arr):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Expects instance of 'np.ndarray[timedelta64[*]]', "
*/
  }

  /* "utils.pxd":10894
 *             "instead got 'np.ndarray[%s]'." % arr.dtype
 *         )
 *     return True             # <<<<<<<<<<<<<<
 * 
 * # . conversion
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "utils.pxd":10887
 *     return np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_TIMEDELTA
 * 
 * cdef inline bint assure_td64arr(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Assure the array is dtype of 'timedelta64[*]'."""
 *     if not is_td64arr(arr):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytimes.utils.assure_td64arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10897
 * 
 * # . conversion
 * cdef inline np.ndarray td64arr_as_int64_us(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[timedelta64[*]] to int64 microsecond ticks (us) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_td64arr_as_int64_us(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_td64arr_as_int64_us *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils__td64arr_M_as_int64_D __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils__td64arr_Y_as_int64_D __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("td64arr_as_int64_us", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":10920
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_TIMEDELTA:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10921
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_TIMEDELTA:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_TIMEDELTA);
    if (__pyx_t_1) {

      /* "utils.pxd":10922
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_TIMEDELTA:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10922, __pyx_L1_error)

      /* "utils.pxd":10921
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_TIMEDELTA:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":10923
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_TIMEDELTA:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Conversion
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 10923, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":10920
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_TIMEDELTA:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":10926
 * 
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:   # nanosecond
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
*/
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":10927
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:   # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":10928
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:   # nanosecond
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond
 *         return arr_add(arr, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10927
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:   # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond
*/
  }

  /* "utils.pxd":10929
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:   # nanosecond
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":10930
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond
 *         return arr_add(arr, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10930, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10929
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:   # nanosecond
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
*/
  }

  /* "utils.pxd":10931
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":10932
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
 *         return arr_mul(arr, US_MILLISECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
 *         return arr_mul(arr, US_SECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MILLISECOND, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10931
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
*/
  }

  /* "utils.pxd":10933
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":10934
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
 *         return arr_mul(arr, US_SECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
 *         return arr_mul(arr, US_MINUTE, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_SECOND, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10934, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10933
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
*/
  }

  /* "utils.pxd":10935
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
 *         return arr_mul(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":10936
 *         return arr_mul(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
 *         return arr_mul(arr, US_MINUTE, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
 *         return arr_mul(arr, US_HOUR, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MINUTE, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10935
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
 *         return arr_mul(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
*/
  }

  /* "utils.pxd":10937
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
 *         return arr_mul(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":10938
 *         return arr_mul(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
 *         return arr_mul(arr, US_HOUR, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
 *         return arr_mul(arr, US_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_HOUR, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10937
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
 *         return arr_mul(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
*/
  }

  /* "utils.pxd":10939
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
 *         return arr_mul(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":10940
 *         return arr_mul(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
 *         return arr_mul(arr, US_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
 *         return arr_mul(arr, US_DAY * 7, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10939
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
 *         return arr_mul(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
*/
  }

  /* "utils.pxd":10941
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
 *         return arr_mul(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":10942
 *         return arr_mul(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
 *         return arr_mul(arr, US_DAY * 7, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
 *         return _td64arr_M_as_int64_D(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, (__pyx_v_7cytimes_5utils_US_DAY * 7), &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10941
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
 *         return arr_mul(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
*/
  }

  /* "utils.pxd":10943
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
 *         return arr_mul(arr, US_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month             # <<<<<<<<<<<<<<
 *         return _td64arr_M_as_int64_D(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":10944
 *         return arr_mul(arr, US_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
 *         return _td64arr_M_as_int64_D(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year
 *         return _td64arr_Y_as_int64_D(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_8.__pyx_n = 2;
    __pyx_t_8.offset = __pyx_v_offset;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__td64arr_M_as_int64_D(__pyx_v_arr, NPY_FR_us, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10943
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
 *         return arr_mul(arr, US_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month             # <<<<<<<<<<<<<<
 *         return _td64arr_M_as_int64_D(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year
*/
  }

  /* "utils.pxd":10945
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
 *         return _td64arr_M_as_int64_D(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year             # <<<<<<<<<<<<<<
 *         return _td64arr_Y_as_int64_D(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, offset, False)
 * 
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":10946
 *         return _td64arr_M_as_int64_D(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year
 *         return _td64arr_Y_as_int64_D(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported array resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_9.__pyx_n = 2;
    __pyx_t_9.offset = __pyx_v_offset;
    __pyx_t_9.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__td64arr_Y_as_int64_D(__pyx_v_arr, NPY_FR_us, &__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10946, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10945
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
 *         return _td64arr_M_as_int64_D(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year             # <<<<<<<<<<<<<<
 *         return _td64arr_Y_as_int64_D(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, offset, False)
 * 
*/
  }

  /* "utils.pxd":10949
 * 
 *     # Unsupported array resolution
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "us")             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray _td64arr_Y_as_int64_D(np.ndarray arr, int to_reso, np.npy_int64 offset=0, bint copy=True):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_dt64arr_to_reso_error(__pyx_v_arr, __pyx_v_arr_reso, __pyx_mstate_global->__pyx_n_u_us); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10949, __pyx_L1_error)

  /* "utils.pxd":10897
 * 
 * # . conversion
 * cdef inline np.ndarray td64arr_as_int64_us(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[timedelta64[*]] to int64 microsecond ticks (us) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.td64arr_as_int64_us", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10951
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "us")
 * 
 * cdef inline np.ndarray _td64arr_Y_as_int64_D(np.ndarray arr, int to_reso, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert a 1-D ndarray[timedelta64[Y]] to int64 day ticks using an
 *     average year (365.2425 D), then further adjust the resolution by `to_reso` and
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__td64arr_Y_as_int64_D(PyArrayObject *__pyx_v_arr, int __pyx_v_to_reso, struct __pyx_opt_args_7cytimes_5utils__td64arr_Y_as_int64_D *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_2;
  int __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_td64arr_Y_as_int64_D", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":10968
 *     #   8,765.82 h  = 24 * 365.2425     = 438,291 / 50
 *     #   525,949.2 m = 1440 * 365.2425   = 2,629,746 / 5
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 400, offset, False)
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "utils.pxd":10969
 *     #   525,949.2 m = 1440 * 365.2425   = 2,629,746 / 5
 *     arr = arr_assure_int64(arr, copy)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 400, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_D);
  if (__pyx_t_3) {

    /* "utils.pxd":10970
 *     arr = arr_assure_int64(arr, copy)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 400, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 50, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = 0;
    __pyx_t_4.copy = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0x23AB1, &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(((PyArrayObject *)__pyx_t_1), 0x190, &__pyx_t_6)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 10970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10969
 *     #   525,949.2 m = 1440 * 365.2425   = 2,629,746 / 5
 *     arr = arr_assure_int64(arr, copy)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 400, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
*/
  }

  /* "utils.pxd":10971
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 400, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 50, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_h);
  if (__pyx_t_3) {

    /* "utils.pxd":10972
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 400, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 50, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_div_floor(arr_mul(arr, 2_629_746, 0, False), 5, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = 0;
    __pyx_t_4.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0x6B013, &__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 10972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(((PyArrayObject *)__pyx_t_5), 50, &__pyx_t_6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10971
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 400, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 50, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
*/
  }

  /* "utils.pxd":10973
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 50, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 2_629_746, 0, False), 5, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_m);
  if (__pyx_t_3) {

    /* "utils.pxd":10974
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 50, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_div_floor(arr_mul(arr, 2_629_746, 0, False), 5, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mul(arr, TD64_YY_SECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = 0;
    __pyx_t_4.copy = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0x282072, &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(((PyArrayObject *)__pyx_t_1), 5, &__pyx_t_6)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 10974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10973
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 50, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 2_629_746, 0, False), 5, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
*/
  }

  /* "utils.pxd":10975
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_div_floor(arr_mul(arr, 2_629_746, 0, False), 5, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_YY_SECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_s);
  if (__pyx_t_3) {

    /* "utils.pxd":10976
 *         return arr_div_floor(arr_mul(arr, 2_629_746, 0, False), 5, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mul(arr, TD64_YY_SECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, TD64_YY_MILLISECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_TD64_YY_SECOND, &__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 10976, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10975
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_div_floor(arr_mul(arr, 2_629_746, 0, False), 5, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_YY_SECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":10977
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mul(arr, TD64_YY_SECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_YY_MILLISECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_ms);
  if (__pyx_t_3) {

    /* "utils.pxd":10978
 *         return arr_mul(arr, TD64_YY_SECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, TD64_YY_MILLISECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, TD64_YY_MICROSECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_TD64_YY_MILLISECOND, &__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 10978, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10977
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mul(arr, TD64_YY_SECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_YY_MILLISECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":10979
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, TD64_YY_MILLISECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_YY_MICROSECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_us);
  if (__pyx_t_3) {

    /* "utils.pxd":10980
 *         return arr_mul(arr, TD64_YY_MILLISECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, TD64_YY_MICROSECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_mul(arr, TD64_YY_NANOSECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_TD64_YY_MICROSECOND, &__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 10980, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10979
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, TD64_YY_MILLISECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_YY_MICROSECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
*/
  }

  /* "utils.pxd":10981
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, TD64_YY_MICROSECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_YY_NANOSECOND, offset, False)
 * 
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_ns);
  if (__pyx_t_3) {

    /* "utils.pxd":10982
 *         return arr_mul(arr, TD64_YY_MICROSECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_mul(arr, TD64_YY_NANOSECOND, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported conversion resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_TD64_YY_NANOSECOND, &__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 10982, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10981
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, TD64_YY_MICROSECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_YY_NANOSECOND, offset, False)
 * 
*/
  }

  /* "utils.pxd":10985
 * 
 *     # Unsupported conversion resolution
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64 array." % to_reso)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray _td64arr_M_as_int64_D(np.ndarray arr, int to_reso, np.npy_int64 offset=0, bint copy=True):
*/
  __pyx_t_1 = NULL;
  __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_to_reso); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 10985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Unsupported_conversion_unit_d_fo_2, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 10985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_9 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_8};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_AssertionError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 10985, __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_ERR(5, 10985, __pyx_L1_error)

  /* "utils.pxd":10951
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "us")
 * 
 * cdef inline np.ndarray _td64arr_Y_as_int64_D(np.ndarray arr, int to_reso, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert a 1-D ndarray[timedelta64[Y]] to int64 day ticks using an
 *     average year (365.2425 D), then further adjust the resolution by `to_reso` and
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cytimes.utils._td64arr_Y_as_int64_D", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10987
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64 array." % to_reso)
 * 
 * cdef inline np.ndarray _td64arr_M_as_int64_D(np.ndarray arr, int to_reso, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert a 1-D ndarray[timedelta64[M]] to int64 day ticks using an
 *     average month (365.2425 / 12 = 30.436875 D), then further adjust the resolution
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__td64arr_M_as_int64_D(PyArrayObject *__pyx_v_arr, int __pyx_v_to_reso, struct __pyx_opt_args_7cytimes_5utils__td64arr_M_as_int64_D *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_2;
  int __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_td64arr_M_as_int64_D", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":11004
 *     #   730.485 h   = 24 * 30.436875    = 146097 / 200
 *     #   43,829.1 m  = 1440 * 30.436875  = 438291 / 10
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day
 *         return arr_div_floor(arr_mul(arr, 48_699, 0, False), 1_600, offset, False)
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 11004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "utils.pxd":11005
 *     #   43,829.1 m  = 1440 * 30.436875  = 438291 / 10
 *     arr = arr_assure_int64(arr, copy)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 48_699, 0, False), 1_600, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_D);
  if (__pyx_t_3) {

    /* "utils.pxd":11006
 *     arr = arr_assure_int64(arr, copy)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day
 *         return arr_div_floor(arr_mul(arr, 48_699, 0, False), 1_600, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 200, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = 0;
    __pyx_t_4.copy = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0xBE3B, &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 11006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(((PyArrayObject *)__pyx_t_1), 0x640, &__pyx_t_6)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 11006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":11005
 *     #   43,829.1 m  = 1440 * 30.436875  = 438291 / 10
 *     arr = arr_assure_int64(arr, copy)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 48_699, 0, False), 1_600, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
*/
  }

  /* "utils.pxd":11007
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day
 *         return arr_div_floor(arr_mul(arr, 48_699, 0, False), 1_600, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 200, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_h);
  if (__pyx_t_3) {

    /* "utils.pxd":11008
 *         return arr_div_floor(arr_mul(arr, 48_699, 0, False), 1_600, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 200, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 10, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = 0;
    __pyx_t_4.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0x23AB1, &__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 11008, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(((PyArrayObject *)__pyx_t_5), 0xC8, &__pyx_t_6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 11008, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "utils.pxd":11007
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day
 *         return arr_div_floor(arr_mul(arr, 48_699, 0, False), 1_600, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 200, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
*/
  }

  /* "utils.pxd":11009
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 200, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 10, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_m);
  if (__pyx_t_3) {

    /* "utils.pxd":11010
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 200, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 10, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mul(arr, TD64_MM_SECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = 0;
    __pyx_t_4.copy = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0x6B013, &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 11010, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(((PyArrayObject *)__pyx_t_1), 10, &__pyx_t_6)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 11010, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":11009
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 200, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 10, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
*/
  }

  /* "utils.pxd":11011
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 10, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_MM_SECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_s);
  if (__pyx_t_3) {

    /* "utils.pxd":11012
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 10, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mul(arr, TD64_MM_SECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, TD64_MM_MILLISECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_TD64_MM_SECOND, &__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 11012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":11011
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 10, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_MM_SECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":11013
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mul(arr, TD64_MM_SECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_MM_MILLISECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_ms);
  if (__pyx_t_3) {

    /* "utils.pxd":11014
 *         return arr_mul(arr, TD64_MM_SECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, TD64_MM_MILLISECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, TD64_MM_MICROSECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_TD64_MM_MILLISECOND, &__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 11014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":11013
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mul(arr, TD64_MM_SECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_MM_MILLISECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":11015
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, TD64_MM_MILLISECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_MM_MICROSECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_us);
  if (__pyx_t_3) {

    /* "utils.pxd":11016
 *         return arr_mul(arr, TD64_MM_MILLISECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, TD64_MM_MICROSECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_mul(arr, TD64_MM_NANOSECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_TD64_MM_MICROSECOND, &__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 11016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":11015
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, TD64_MM_MILLISECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_MM_MICROSECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
*/
  }

  /* "utils.pxd":11017
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, TD64_MM_MICROSECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_MM_NANOSECOND, offset, False)
 * 
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_ns);
  if (__pyx_t_3) {

    /* "utils.pxd":11018
 *         return arr_mul(arr, TD64_MM_MICROSECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_mul(arr, TD64_MM_NANOSECOND, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported conversion resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_TD64_MM_NANOSECOND, &__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 11018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":11017
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, TD64_MM_MICROSECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_MM_NANOSECOND, offset, False)
 * 
*/
  }

  /* "utils.pxd":11021
 * 
 *     # Unsupported conversion resolution
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64 array." % to_reso)             # <<<<<<<<<<<<<<
*/
  __pyx_t_1 = NULL;
  __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_to_reso); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 11021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Unsupported_conversion_unit_d_fo_2, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 11021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_9 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_8};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_AssertionError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 11021, __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_ERR(5, 11021, __pyx_L1_error)

  /* "utils.pxd":10987
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64 array." % to_reso)
 * 
 * cdef inline np.ndarray _td64arr_M_as_int64_D(np.ndarray arr, int to_reso, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert a 1-D ndarray[timedelta64[M]] to int64 day ticks using an
 *     average month (365.2425 / 12 = 30.436875 D), then further adjust the resolution
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cytimes.utils._td64arr_M_as_int64_D", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/parser.pxd":20
 *     ALPHA_DOT = 4
 * 
 * cdef inline list _timelex(str data, Py_ssize_t pos, Py_ssize_t length=0):             # <<<<<<<<<<<<<<
 *     """Tokenize a datetime-like string into lexical units (tokens).
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_6parser__timelex(PyObject *__pyx_v_data, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_6parser__timelex *__pyx_optional_args) {
  Py_ssize_t __pyx_v_length = ((Py_ssize_t)0);
  __pyx_t_7cytimes_6parser_State __pyx_v_state;
  PyObject *__pyx_v_tokens = 0;
  PyObject *__pyx_v_token = 0;
  PyObject *__pyx_v_sub_token = 0;
  Py_UCS4 __pyx_v_ch;
  Py_UCS4 __pyx_v_ch_cache;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_dot_count;
  Py_ssize_t __pyx_v_com_count;
  int __pyx_v_is_dot_end;
  int __pyx_v_is_com_end;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_timelex", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_length = __pyx_optional_args->length;
    }
  }

  /* "cytimes/parser.pxd":40
 *     """
 *     # Validate bounds
 *     if length <= 0:             # <<<<<<<<<<<<<<
 *         length = str_len(data)
 *     if pos < 0:
*/
  __pyx_t_1 = (__pyx_v_length <= 0);
  if (__pyx_t_1) {

    /* "cytimes/parser.pxd":41
 *     # Validate bounds
 *     if length <= 0:
 *         length = str_len(data)             # <<<<<<<<<<<<<<
 *     if pos < 0:
 *         pos = 0
*/
    __pyx_v_length = PyUnicode_GET_LENGTH(__pyx_v_data);

    /* "cytimes/parser.pxd":40
 *     """
 *     # Validate bounds
 *     if length <= 0:             # <<<<<<<<<<<<<<
 *         length = str_len(data)
 *     if pos < 0:
*/
  }

  /* "cytimes/parser.pxd":42
 *     if length <= 0:
 *         length = str_len(data)
 *     if pos < 0:             # <<<<<<<<<<<<<<
 *         pos = 0
 *     elif pos >= length:
*/
  __pyx_t_1 = (__pyx_v_pos < 0);
  if (__pyx_t_1) {

    /* "cytimes/parser.pxd":43
 *         length = str_len(data)
 *     if pos < 0:
 *         pos = 0             # <<<<<<<<<<<<<<
 *     elif pos >= length:
 *         return []
*/
    __pyx_v_pos = 0;

    /* "cytimes/parser.pxd":42
 *     if length <= 0:
 *         length = str_len(data)
 *     if pos < 0:             # <<<<<<<<<<<<<<
 *         pos = 0
 *     elif pos >= length:
*/
    goto __pyx_L4;
  }

  /* "cytimes/parser.pxd":44
 *     if pos < 0:
 *         pos = 0
 *     elif pos >= length:             # <<<<<<<<<<<<<<
 *         return []
 * 
*/
  __pyx_t_1 = (__pyx_v_pos >= __pyx_v_length);
  if (__pyx_t_1) {

    /* "cytimes/parser.pxd":45
 *         pos = 0
 *     elif pos >= length:
 *         return []             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 45, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cytimes/parser.pxd":44
 *     if pos < 0:
 *         pos = 0
 *     elif pos >= length:             # <<<<<<<<<<<<<<
 *         return []
 * 
*/
  }
  __pyx_L4:;

  /* "cytimes/parser.pxd":50
 *     cdef:
 *         State state
 *         list tokens = []             # <<<<<<<<<<<<<<
 *         str  token, sub_token
 *         Py_UCS4 ch              # current character
*/
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_tokens = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/parser.pxd":53
 *         str  token, sub_token
 *         Py_UCS4 ch              # current character
 *         Py_UCS4 ch_cache = 0    # cache character for next token             # <<<<<<<<<<<<<<
 *         Py_ssize_t i            # index for 'token'
 *         Py_ssize_t dot_count    # total 'dot' count in 'token'
*/
  __pyx_v_ch_cache = 0;

  /* "cytimes/parser.pxd":61
 * 
 *     # Skip leading control & space characters
 *     while pos < length and utils.is_ascii_ctl_or_space(str_read(data, pos)):             # <<<<<<<<<<<<<<
 *         pos += 1
 * 
*/
  while (1) {
    __pyx_t_3 = (__pyx_v_pos < __pyx_v_length);
    if (__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_3 = __pyx_f_7cytimes_5utils_is_ascii_ctl_or_space(PyUnicode_READ_CHAR(__pyx_v_data, __pyx_v_pos));
    __pyx_t_1 = __pyx_t_3;
    __pyx_L7_bool_binop_done:;
    if (!__pyx_t_1) break;

    /* "cytimes/parser.pxd":62
 *     # Skip leading control & space characters
 *     while pos < length and utils.is_ascii_ctl_or_space(str_read(data, pos)):
 *         pos += 1             # <<<<<<<<<<<<<<
 * 
 *     # Main loop: begin -------------------------------------------------------
*/
    __pyx_v_pos = (__pyx_v_pos + 1);
  }

  /* "cytimes/parser.pxd":65
 * 
 *     # Main loop: begin -------------------------------------------------------
 *     while pos < length:             # <<<<<<<<<<<<<<
 *         # Reset
 *         state = State.START
*/
  while (1) {
    __pyx_t_1 = (__pyx_v_pos < __pyx_v_length);
    if (!__pyx_t_1) break;

    /* "cytimes/parser.pxd":67
 *     while pos < length:
 *         # Reset
 *         state = State.START             # <<<<<<<<<<<<<<
 *         token = None
 *         dot_count = com_count = 0
*/
    __pyx_v_state = __pyx_e_7cytimes_6parser_START;

    /* "cytimes/parser.pxd":68
 *         # Reset
 *         state = State.START
 *         token = None             # <<<<<<<<<<<<<<
 *         dot_count = com_count = 0
 *         is_dot_end = is_com_end = False
*/
    __Pyx_INCREF(Py_None);
    __Pyx_XDECREF_SET(__pyx_v_token, ((PyObject*)Py_None));

    /* "cytimes/parser.pxd":69
 *         state = State.START
 *         token = None
 *         dot_count = com_count = 0             # <<<<<<<<<<<<<<
 *         is_dot_end = is_com_end = False
 * 
*/
    __pyx_v_dot_count = 0;
    __pyx_v_com_count = 0;

    /* "cytimes/parser.pxd":70
 *         token = None
 *         dot_count = com_count = 0
 *         is_dot_end = is_com_end = False             # <<<<<<<<<<<<<<
 * 
 *         # Nested loop: begin - - - - - - - - - - - - - - - - - - - - - - - - -
*/
    __pyx_v_is_dot_end = 0;
    __pyx_v_is_com_end = 0;

    /* "cytimes/parser.pxd":73
 * 
 *         # Nested loop: begin - - - - - - - - - - - - - - - - - - - - - - - - -
 *         while pos < length:             # <<<<<<<<<<<<<<
 *             # Read new character
 *             if ch_cache == 0:
*/
    while (1) {
      __pyx_t_1 = (__pyx_v_pos < __pyx_v_length);
      if (!__pyx_t_1) break;

      /* "cytimes/parser.pxd":75
 *         while pos < length:
 *             # Read new character
 *             if ch_cache == 0:             # <<<<<<<<<<<<<<
 *                 ch = str_read(data, pos)
 *                 # . normalize space
*/
      __pyx_t_1 = (__pyx_v_ch_cache == 0);
      if (__pyx_t_1) {

        /* "cytimes/parser.pxd":76
 *             # Read new character
 *             if ch_cache == 0:
 *                 ch = str_read(data, pos)             # <<<<<<<<<<<<<<
 *                 # . normalize space
 *                 if utils.is_ascii_ctl_or_space(ch):
*/
        __pyx_v_ch = PyUnicode_READ_CHAR(__pyx_v_data, __pyx_v_pos);

        /* "cytimes/parser.pxd":78
 *                 ch = str_read(data, pos)
 *                 # . normalize space
 *                 if utils.is_ascii_ctl_or_space(ch):             # <<<<<<<<<<<<<<
 *                     ch = 32  # 'space'
 *                     # remove adjacent spaces*
*/
        __pyx_t_1 = __pyx_f_7cytimes_5utils_is_ascii_ctl_or_space(__pyx_v_ch);
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":79
 *                 # . normalize space
 *                 if utils.is_ascii_ctl_or_space(ch):
 *                     ch = 32  # 'space'             # <<<<<<<<<<<<<<
 *                     # remove adjacent spaces*
 *                     while utils.is_ascii_ctl_or_space(str_read(data, pos + 1)):
*/
          __pyx_v_ch = 32;

          /* "cytimes/parser.pxd":81
 *                     ch = 32  # 'space'
 *                     # remove adjacent spaces*
 *                     while utils.is_ascii_ctl_or_space(str_read(data, pos + 1)):             # <<<<<<<<<<<<<<
 *                         pos += 1
 *             # Comsume cache
*/
          while (1) {
            __pyx_t_1 = __pyx_f_7cytimes_5utils_is_ascii_ctl_or_space(PyUnicode_READ_CHAR(__pyx_v_data, (__pyx_v_pos + 1)));
            if (!__pyx_t_1) break;

            /* "cytimes/parser.pxd":82
 *                     # remove adjacent spaces*
 *                     while utils.is_ascii_ctl_or_space(str_read(data, pos + 1)):
 *                         pos += 1             # <<<<<<<<<<<<<<
 *             # Comsume cache
 *             else:
*/
            __pyx_v_pos = (__pyx_v_pos + 1);
          }

          /* "cytimes/parser.pxd":78
 *                 ch = str_read(data, pos)
 *                 # . normalize space
 *                 if utils.is_ascii_ctl_or_space(ch):             # <<<<<<<<<<<<<<
 *                     ch = 32  # 'space'
 *                     # remove adjacent spaces*
*/
        }

        /* "cytimes/parser.pxd":75
 *         while pos < length:
 *             # Read new character
 *             if ch_cache == 0:             # <<<<<<<<<<<<<<
 *                 ch = str_read(data, pos)
 *                 # . normalize space
*/
        goto __pyx_L13;
      }

      /* "cytimes/parser.pxd":85
 *             # Comsume cache
 *             else:
 *                 ch = ch_cache             # <<<<<<<<<<<<<<
 *                 ch_cache = 0
 * 
*/
      /*else*/ {
        __pyx_v_ch = __pyx_v_ch_cache;

        /* "cytimes/parser.pxd":86
 *             else:
 *                 ch = ch_cache
 *                 ch_cache = 0             # <<<<<<<<<<<<<<
 * 
 *             # State: START
*/
        __pyx_v_ch_cache = 0;
      }
      __pyx_L13:;

      /* "cytimes/parser.pxd":89
 * 
 *             # State: START
 *             if state == State.START:             # <<<<<<<<<<<<<<
 *                 # . digit (e.g: 1)
 *                 if utils.is_ascii_digit(ch):
*/
      switch (__pyx_v_state) {
        case __pyx_e_7cytimes_6parser_START:

        /* "cytimes/parser.pxd":91
 *             if state == State.START:
 *                 # . digit (e.g: 1)
 *                 if utils.is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *                     token = str_chr(ch)             # collect digit
 *                     state = State.DIGIT             # set state: DIGIT
*/
        __pyx_t_1 = __pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_ch);
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":92
 *                 # . digit (e.g: 1)
 *                 if utils.is_ascii_digit(ch):
 *                     token = str_chr(ch)             # collect digit             # <<<<<<<<<<<<<<
 *                     state = State.DIGIT             # set state: DIGIT
 *                     is_dot_end = is_com_end = False
*/
          __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 92, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "cytimes/parser.pxd":93
 *                 if utils.is_ascii_digit(ch):
 *                     token = str_chr(ch)             # collect digit
 *                     state = State.DIGIT             # set state: DIGIT             # <<<<<<<<<<<<<<
 *                     is_dot_end = is_com_end = False
 *                 # . alpha (e.g: a)
*/
          __pyx_v_state = __pyx_e_7cytimes_6parser_DIGIT;

          /* "cytimes/parser.pxd":94
 *                     token = str_chr(ch)             # collect digit
 *                     state = State.DIGIT             # set state: DIGIT
 *                     is_dot_end = is_com_end = False             # <<<<<<<<<<<<<<
 *                 # . alpha (e.g: a)
 *                 elif utils.is_alpha(ch):
*/
          __pyx_v_is_dot_end = 0;
          __pyx_v_is_com_end = 0;

          /* "cytimes/parser.pxd":91
 *             if state == State.START:
 *                 # . digit (e.g: 1)
 *                 if utils.is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *                     token = str_chr(ch)             # collect digit
 *                     state = State.DIGIT             # set state: DIGIT
*/
          goto __pyx_L17;
        }

        /* "cytimes/parser.pxd":96
 *                     is_dot_end = is_com_end = False
 *                 # . alpha (e.g: a)
 *                 elif utils.is_alpha(ch):             # <<<<<<<<<<<<<<
 *                     token = str_chr(ch)             # collect alpha
 *                     state = State.ALPHA             # set state: ALPHA
*/
        __pyx_t_1 = __pyx_f_7cytimes_5utils_is_alpha(__pyx_v_ch);
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":97
 *                 # . alpha (e.g: a)
 *                 elif utils.is_alpha(ch):
 *                     token = str_chr(ch)             # collect alpha             # <<<<<<<<<<<<<<
 *                     state = State.ALPHA             # set state: ALPHA
 *                     is_dot_end = is_com_end = False
*/
          __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 97, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "cytimes/parser.pxd":98
 *                 elif utils.is_alpha(ch):
 *                     token = str_chr(ch)             # collect alpha
 *                     state = State.ALPHA             # set state: ALPHA             # <<<<<<<<<<<<<<
 *                     is_dot_end = is_com_end = False
 *                 # . emit single character token
*/
          __pyx_v_state = __pyx_e_7cytimes_6parser_ALPHA;

          /* "cytimes/parser.pxd":99
 *                     token = str_chr(ch)             # collect alpha
 *                     state = State.ALPHA             # set state: ALPHA
 *                     is_dot_end = is_com_end = False             # <<<<<<<<<<<<<<
 *                 # . emit single character token
 *                 else:
*/
          __pyx_v_is_dot_end = 0;
          __pyx_v_is_com_end = 0;

          /* "cytimes/parser.pxd":96
 *                     is_dot_end = is_com_end = False
 *                 # . alpha (e.g: a)
 *                 elif utils.is_alpha(ch):             # <<<<<<<<<<<<<<
 *                     token = str_chr(ch)             # collect alpha
 *                     state = State.ALPHA             # set state: ALPHA
*/
          goto __pyx_L17;
        }

        /* "cytimes/parser.pxd":102
 *                 # . emit single character token
 *                 else:
 *                     tokens.append(str_chr(ch))             # <<<<<<<<<<<<<<
 *                     pos += 1
 *                     break   # end token; start a new one
*/
        /*else*/ {
          __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 102, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_tokens, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 102, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "cytimes/parser.pxd":103
 *                 else:
 *                     tokens.append(str_chr(ch))
 *                     pos += 1             # <<<<<<<<<<<<<<
 *                     break   # end token; start a new one
 * 
*/
          __pyx_v_pos = (__pyx_v_pos + 1);

          /* "cytimes/parser.pxd":104
 *                     tokens.append(str_chr(ch))
 *                     pos += 1
 *                     break   # end token; start a new one             # <<<<<<<<<<<<<<
 * 
 *             # State: DIGIT
*/
          goto __pyx_L12_break;
        }
        __pyx_L17:;

        /* "cytimes/parser.pxd":89
 * 
 *             # State: START
 *             if state == State.START:             # <<<<<<<<<<<<<<
 *                 # . digit (e.g: 1)
 *                 if utils.is_ascii_digit(ch):
*/
        break;
        case __pyx_e_7cytimes_6parser_DIGIT:

        /* "cytimes/parser.pxd":109
 *             elif state == State.DIGIT:
 *                 # . digit (e.g: [X]12)
 *                 if utils.is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect digit
 *                     is_dot_end = is_com_end = False
*/
        __pyx_t_1 = __pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_ch);
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":110
 *                 # . digit (e.g: [X]12)
 *                 if utils.is_ascii_digit(ch):
 *                     token += str_chr(ch)            # collect digit             # <<<<<<<<<<<<<<
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]1.)
*/
          __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 110, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_token, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 110, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_5));
          __pyx_t_5 = 0;

          /* "cytimes/parser.pxd":111
 *                 if utils.is_ascii_digit(ch):
 *                     token += str_chr(ch)            # collect digit
 *                     is_dot_end = is_com_end = False             # <<<<<<<<<<<<<<
 *                 # . dot   (e.g: [X]1.)
 *                 elif ch == '.':
*/
          __pyx_v_is_dot_end = 0;
          __pyx_v_is_com_end = 0;

          /* "cytimes/parser.pxd":109
 *             elif state == State.DIGIT:
 *                 # . digit (e.g: [X]12)
 *                 if utils.is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect digit
 *                     is_dot_end = is_com_end = False
*/
          goto __pyx_L18;
        }

        /* "cytimes/parser.pxd":113
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]1.)
 *                 elif ch == '.':             # <<<<<<<<<<<<<<
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
*/
        __pyx_t_1 = (__pyx_v_ch == 46);
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":114
 *                 # . dot   (e.g: [X]1.)
 *                 elif ch == '.':
 *                     token += "."                    # collect dot             # <<<<<<<<<<<<<<
 *                     dot_count += 1                  # increase dot count
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT
*/
          __pyx_t_5 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_token, __pyx_mstate_global->__pyx_kp_u__2); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 114, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_5));
          __pyx_t_5 = 0;

          /* "cytimes/parser.pxd":115
 *                 elif ch == '.':
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count             # <<<<<<<<<<<<<<
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT
 *                     is_dot_end, is_com_end = True, False
*/
          __pyx_v_dot_count = (__pyx_v_dot_count + 1);

          /* "cytimes/parser.pxd":116
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT             # <<<<<<<<<<<<<<
 *                     is_dot_end, is_com_end = True, False
 *                 # . comma (e.g: [X]1,)
*/
          __pyx_v_state = __pyx_e_7cytimes_6parser_DIGIT_DOT;

          /* "cytimes/parser.pxd":117
 *                     dot_count += 1                  # increase dot count
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT
 *                     is_dot_end, is_com_end = True, False             # <<<<<<<<<<<<<<
 *                 # . comma (e.g: [X]1,)
 *                 elif ch == ',' and dot_count == 0 and com_count == 0:
*/
          __pyx_t_1 = 1;
          __pyx_t_3 = 0;
          __pyx_v_is_dot_end = __pyx_t_1;
          __pyx_v_is_com_end = __pyx_t_3;

          /* "cytimes/parser.pxd":113
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]1.)
 *                 elif ch == '.':             # <<<<<<<<<<<<<<
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
*/
          goto __pyx_L18;
        }

        /* "cytimes/parser.pxd":119
 *                     is_dot_end, is_com_end = True, False
 *                 # . comma (e.g: [X]1,)
 *                 elif ch == ',' and dot_count == 0 and com_count == 0:             # <<<<<<<<<<<<<<
 *                     token += ","                    # collect comma
 *                     com_count += 1                  # increase comma count
*/
        __pyx_t_1 = (__pyx_v_ch == 44);
        if (__pyx_t_1) {
        } else {
          __pyx_t_3 = __pyx_t_1;
          goto __pyx_L19_bool_binop_done;
        }
        __pyx_t_1 = (__pyx_v_dot_count == 0);
        if (__pyx_t_1) {
        } else {
          __pyx_t_3 = __pyx_t_1;
          goto __pyx_L19_bool_binop_done;
        }
        __pyx_t_1 = (__pyx_v_com_count == 0);
        __pyx_t_3 = __pyx_t_1;
        __pyx_L19_bool_binop_done:;
        if (__pyx_t_3) {

          /* "cytimes/parser.pxd":120
 *                 # . comma (e.g: [X]1,)
 *                 elif ch == ',' and dot_count == 0 and com_count == 0:
 *                     token += ","                    # collect comma             # <<<<<<<<<<<<<<
 *                     com_count += 1                  # increase comma count
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT
*/
          __pyx_t_5 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_token, __pyx_mstate_global->__pyx_kp_u__12); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 120, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_5));
          __pyx_t_5 = 0;

          /* "cytimes/parser.pxd":121
 *                 elif ch == ',' and dot_count == 0 and com_count == 0:
 *                     token += ","                    # collect comma
 *                     com_count += 1                  # increase comma count             # <<<<<<<<<<<<<<
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT
 *                     is_dot_end, is_com_end = False, True
*/
          __pyx_v_com_count = (__pyx_v_com_count + 1);

          /* "cytimes/parser.pxd":122
 *                     token += ","                    # collect comma
 *                     com_count += 1                  # increase comma count
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT             # <<<<<<<<<<<<<<
 *                     is_dot_end, is_com_end = False, True
 *                 # . cache for next token & stop
*/
          __pyx_v_state = __pyx_e_7cytimes_6parser_DIGIT_DOT;

          /* "cytimes/parser.pxd":123
 *                     com_count += 1                  # increase comma count
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT
 *                     is_dot_end, is_com_end = False, True             # <<<<<<<<<<<<<<
 *                 # . cache for next token & stop
 *                 else:
*/
          __pyx_t_3 = 0;
          __pyx_t_1 = 1;
          __pyx_v_is_dot_end = __pyx_t_3;
          __pyx_v_is_com_end = __pyx_t_1;

          /* "cytimes/parser.pxd":119
 *                     is_dot_end, is_com_end = True, False
 *                 # . comma (e.g: [X]1,)
 *                 elif ch == ',' and dot_count == 0 and com_count == 0:             # <<<<<<<<<<<<<<
 *                     token += ","                    # collect comma
 *                     com_count += 1                  # increase comma count
*/
          goto __pyx_L18;
        }

        /* "cytimes/parser.pxd":126
 *                 # . cache for next token & stop
 *                 else:
 *                     ch_cache = ch             # <<<<<<<<<<<<<<
 *                     break
 * 
*/
        /*else*/ {
          __pyx_v_ch_cache = __pyx_v_ch;

          /* "cytimes/parser.pxd":127
 *                 else:
 *                     ch_cache = ch
 *                     break             # <<<<<<<<<<<<<<
 * 
 *             # State: DIGIT_DOT
*/
          goto __pyx_L12_break;
        }
        __pyx_L18:;

        /* "cytimes/parser.pxd":107
 * 
 *             # State: DIGIT
 *             elif state == State.DIGIT:             # <<<<<<<<<<<<<<
 *                 # . digit (e.g: [X]12)
 *                 if utils.is_ascii_digit(ch):
*/
        break;
        case __pyx_e_7cytimes_6parser_DIGIT_DOT:

        /* "cytimes/parser.pxd":132
 *             elif state == State.DIGIT_DOT:
 *                 # . digit (e.g: [X]1.2)
 *                 if utils.is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect digit
 *                     is_dot_end = is_com_end = False
*/
        __pyx_t_1 = __pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_ch);
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":133
 *                 # . digit (e.g: [X]1.2)
 *                 if utils.is_ascii_digit(ch):
 *                     token += str_chr(ch)            # collect digit             # <<<<<<<<<<<<<<
 *                     is_dot_end = is_com_end = False
 *                 # . alpha (e.g: [X]1.a)
*/
          __pyx_t_5 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 133, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_2 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_token, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 133, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "cytimes/parser.pxd":134
 *                 if utils.is_ascii_digit(ch):
 *                     token += str_chr(ch)            # collect digit
 *                     is_dot_end = is_com_end = False             # <<<<<<<<<<<<<<
 *                 # . alpha (e.g: [X]1.a)
 *                 elif is_dot_end and utils.is_alpha(ch):
*/
          __pyx_v_is_dot_end = 0;
          __pyx_v_is_com_end = 0;

          /* "cytimes/parser.pxd":132
 *             elif state == State.DIGIT_DOT:
 *                 # . digit (e.g: [X]1.2)
 *                 if utils.is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect digit
 *                     is_dot_end = is_com_end = False
*/
          goto __pyx_L22;
        }

        /* "cytimes/parser.pxd":136
 *                     is_dot_end = is_com_end = False
 *                 # . alpha (e.g: [X]1.a)
 *                 elif is_dot_end and utils.is_alpha(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect alpha
 *                     state = State.ALPHA_DOT  # set state: ALPHA_DOT
*/
        if (__pyx_v_is_dot_end) {
        } else {
          __pyx_t_1 = __pyx_v_is_dot_end;
          goto __pyx_L23_bool_binop_done;
        }
        __pyx_t_3 = __pyx_f_7cytimes_5utils_is_alpha(__pyx_v_ch);
        __pyx_t_1 = __pyx_t_3;
        __pyx_L23_bool_binop_done:;
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":137
 *                 # . alpha (e.g: [X]1.a)
 *                 elif is_dot_end and utils.is_alpha(ch):
 *                     token += str_chr(ch)            # collect alpha             # <<<<<<<<<<<<<<
 *                     state = State.ALPHA_DOT  # set state: ALPHA_DOT
 *                     is_dot_end = is_com_end = False
*/
          __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 137, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_token, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 137, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_5));
          __pyx_t_5 = 0;

          /* "cytimes/parser.pxd":138
 *                 elif is_dot_end and utils.is_alpha(ch):
 *                     token += str_chr(ch)            # collect alpha
 *                     state = State.ALPHA_DOT  # set state: ALPHA_DOT             # <<<<<<<<<<<<<<
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]1.2.)
*/
          __pyx_v_state = __pyx_e_7cytimes_6parser_ALPHA_DOT;

          /* "cytimes/parser.pxd":139
 *                     token += str_chr(ch)            # collect alpha
 *                     state = State.ALPHA_DOT  # set state: ALPHA_DOT
 *                     is_dot_end = is_com_end = False             # <<<<<<<<<<<<<<
 *                 # . dot   (e.g: [X]1.2.)
 *                 elif ch == '.':
*/
          __pyx_v_is_dot_end = 0;
          __pyx_v_is_com_end = 0;

          /* "cytimes/parser.pxd":136
 *                     is_dot_end = is_com_end = False
 *                 # . alpha (e.g: [X]1.a)
 *                 elif is_dot_end and utils.is_alpha(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect alpha
 *                     state = State.ALPHA_DOT  # set state: ALPHA_DOT
*/
          goto __pyx_L22;
        }

        /* "cytimes/parser.pxd":141
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]1.2.)
 *                 elif ch == '.':             # <<<<<<<<<<<<<<
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
*/
        __pyx_t_1 = (__pyx_v_ch == 46);
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":142
 *                 # . dot   (e.g: [X]1.2.)
 *                 elif ch == '.':
 *                     token += "."                    # collect dot             # <<<<<<<<<<<<<<
 *                     dot_count += 1                  # increase dot count
 *                     is_dot_end, is_com_end = True, False
*/
          __pyx_t_5 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_token, __pyx_mstate_global->__pyx_kp_u__2); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 142, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_5));
          __pyx_t_5 = 0;

          /* "cytimes/parser.pxd":143
 *                 elif ch == '.':
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count             # <<<<<<<<<<<<<<
 *                     is_dot_end, is_com_end = True, False
 *                 # . cache for next token & stop
*/
          __pyx_v_dot_count = (__pyx_v_dot_count + 1);

          /* "cytimes/parser.pxd":144
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
 *                     is_dot_end, is_com_end = True, False             # <<<<<<<<<<<<<<
 *                 # . cache for next token & stop
 *                 else:
*/
          __pyx_t_1 = 1;
          __pyx_t_3 = 0;
          __pyx_v_is_dot_end = __pyx_t_1;
          __pyx_v_is_com_end = __pyx_t_3;

          /* "cytimes/parser.pxd":141
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]1.2.)
 *                 elif ch == '.':             # <<<<<<<<<<<<<<
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
*/
          goto __pyx_L22;
        }

        /* "cytimes/parser.pxd":147
 *                 # . cache for next token & stop
 *                 else:
 *                     ch_cache = ch             # <<<<<<<<<<<<<<
 *                     break
 * 
*/
        /*else*/ {
          __pyx_v_ch_cache = __pyx_v_ch;

          /* "cytimes/parser.pxd":148
 *                 else:
 *                     ch_cache = ch
 *                     break             # <<<<<<<<<<<<<<
 * 
 *             # State: ALPHA
*/
          goto __pyx_L12_break;
        }
        __pyx_L22:;

        /* "cytimes/parser.pxd":130
 * 
 *             # State: DIGIT_DOT
 *             elif state == State.DIGIT_DOT:             # <<<<<<<<<<<<<<
 *                 # . digit (e.g: [X]1.2)
 *                 if utils.is_ascii_digit(ch):
*/
        break;
        case __pyx_e_7cytimes_6parser_ALPHA:

        /* "cytimes/parser.pxd":153
 *             elif state == State.ALPHA:
 *                 # . alpha (e.g: [X]ab)
 *                 if utils.is_alpha(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect alpha
 *                     is_dot_end = is_com_end = False
*/
        __pyx_t_3 = __pyx_f_7cytimes_5utils_is_alpha(__pyx_v_ch);
        if (__pyx_t_3) {

          /* "cytimes/parser.pxd":154
 *                 # . alpha (e.g: [X]ab)
 *                 if utils.is_alpha(ch):
 *                     token += str_chr(ch)            # collect alpha             # <<<<<<<<<<<<<<
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]a.)
*/
          __pyx_t_5 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 154, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_2 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_token, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 154, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "cytimes/parser.pxd":155
 *                 if utils.is_alpha(ch):
 *                     token += str_chr(ch)            # collect alpha
 *                     is_dot_end = is_com_end = False             # <<<<<<<<<<<<<<
 *                 # . dot   (e.g: [X]a.)
 *                 elif ch == ".":
*/
          __pyx_v_is_dot_end = 0;
          __pyx_v_is_com_end = 0;

          /* "cytimes/parser.pxd":153
 *             elif state == State.ALPHA:
 *                 # . alpha (e.g: [X]ab)
 *                 if utils.is_alpha(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect alpha
 *                     is_dot_end = is_com_end = False
*/
          goto __pyx_L25;
        }

        /* "cytimes/parser.pxd":157
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]a.)
 *                 elif ch == ".":             # <<<<<<<<<<<<<<
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
*/
        __pyx_t_3 = (__pyx_v_ch == 46);
        if (__pyx_t_3) {

          /* "cytimes/parser.pxd":158
 *                 # . dot   (e.g: [X]a.)
 *                 elif ch == ".":
 *                     token += "."                    # collect dot             # <<<<<<<<<<<<<<
 *                     dot_count += 1                  # increase dot count
 *                     state = State.ALPHA_DOT         # set state: ALPHA_DOT
*/
          __pyx_t_2 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_token, __pyx_mstate_global->__pyx_kp_u__2); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 158, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "cytimes/parser.pxd":159
 *                 elif ch == ".":
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count             # <<<<<<<<<<<<<<
 *                     state = State.ALPHA_DOT         # set state: ALPHA_DOT
 *                     is_dot_end, is_com_end = True, False
*/
          __pyx_v_dot_count = (__pyx_v_dot_count + 1);

          /* "cytimes/parser.pxd":160
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
 *                     state = State.ALPHA_DOT         # set state: ALPHA_DOT             # <<<<<<<<<<<<<<
 *                     is_dot_end, is_com_end = True, False
 *                 # . cache for next token & stop
*/
          __pyx_v_state = __pyx_e_7cytimes_6parser_ALPHA_DOT;

          /* "cytimes/parser.pxd":161
 *                     dot_count += 1                  # increase dot count
 *                     state = State.ALPHA_DOT         # set state: ALPHA_DOT
 *                     is_dot_end, is_com_end = True, False             # <<<<<<<<<<<<<<
 *                 # . cache for next token & stop
 *                 else:
*/
          __pyx_t_3 = 1;
          __pyx_t_1 = 0;
          __pyx_v_is_dot_end = __pyx_t_3;
          __pyx_v_is_com_end = __pyx_t_1;

          /* "cytimes/parser.pxd":157
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]a.)
 *                 elif ch == ".":             # <<<<<<<<<<<<<<
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
*/
          goto __pyx_L25;
        }

        /* "cytimes/parser.pxd":164
 *                 # . cache for next token & stop
 *                 else:
 *                     ch_cache = ch             # <<<<<<<<<<<<<<
 *                     break
 * 
*/
        /*else*/ {
          __pyx_v_ch_cache = __pyx_v_ch;

          /* "cytimes/parser.pxd":165
 *                 else:
 *                     ch_cache = ch
 *                     break             # <<<<<<<<<<<<<<
 * 
 *             # State: ALPHA_DOT
*/
          goto __pyx_L12_break;
        }
        __pyx_L25:;

        /* "cytimes/parser.pxd":151
 * 
 *             # State: ALPHA
 *             elif state == State.ALPHA:             # <<<<<<<<<<<<<<
 *                 # . alpha (e.g: [X]ab)
 *                 if utils.is_alpha(ch):
*/
        break;
        default:

        /* "cytimes/parser.pxd":170
 *             else:
 *                 # . alpha (e.g: [X]a.b)
 *                 if utils.is_alpha(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect alpha
 *                     is_dot_end = is_com_end = False
*/
        __pyx_t_1 = __pyx_f_7cytimes_5utils_is_alpha(__pyx_v_ch);
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":171
 *                 # . alpha (e.g: [X]a.b)
 *                 if utils.is_alpha(ch):
 *                     token += str_chr(ch)            # collect alpha             # <<<<<<<<<<<<<<
 *                     is_dot_end = is_com_end = False
 *                 # . digit (e.g: [X]a.1)
*/
          __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 171, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_token, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 171, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_5));
          __pyx_t_5 = 0;

          /* "cytimes/parser.pxd":172
 *                 if utils.is_alpha(ch):
 *                     token += str_chr(ch)            # collect alpha
 *                     is_dot_end = is_com_end = False             # <<<<<<<<<<<<<<
 *                 # . digit (e.g: [X]a.1)
 *                 elif is_dot_end and utils.is_ascii_digit(ch):
*/
          __pyx_v_is_dot_end = 0;
          __pyx_v_is_com_end = 0;

          /* "cytimes/parser.pxd":170
 *             else:
 *                 # . alpha (e.g: [X]a.b)
 *                 if utils.is_alpha(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect alpha
 *                     is_dot_end = is_com_end = False
*/
          goto __pyx_L26;
        }

        /* "cytimes/parser.pxd":174
 *                     is_dot_end = is_com_end = False
 *                 # . digit (e.g: [X]a.1)
 *                 elif is_dot_end and utils.is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect digit
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT
*/
        if (__pyx_v_is_dot_end) {
        } else {
          __pyx_t_1 = __pyx_v_is_dot_end;
          goto __pyx_L27_bool_binop_done;
        }
        __pyx_t_3 = __pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_ch);
        __pyx_t_1 = __pyx_t_3;
        __pyx_L27_bool_binop_done:;
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":175
 *                 # . digit (e.g: [X]a.1)
 *                 elif is_dot_end and utils.is_ascii_digit(ch):
 *                     token += str_chr(ch)            # collect digit             # <<<<<<<<<<<<<<
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT
 *                     is_dot_end = is_com_end = False
*/
          __pyx_t_5 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 175, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_2 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_token, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 175, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "cytimes/parser.pxd":176
 *                 elif is_dot_end and utils.is_ascii_digit(ch):
 *                     token += str_chr(ch)            # collect digit
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT             # <<<<<<<<<<<<<<
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]a.b.)
*/
          __pyx_v_state = __pyx_e_7cytimes_6parser_DIGIT_DOT;

          /* "cytimes/parser.pxd":177
 *                     token += str_chr(ch)            # collect digit
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT
 *                     is_dot_end = is_com_end = False             # <<<<<<<<<<<<<<
 *                 # . dot   (e.g: [X]a.b.)
 *                 elif ch == '.':
*/
          __pyx_v_is_dot_end = 0;
          __pyx_v_is_com_end = 0;

          /* "cytimes/parser.pxd":174
 *                     is_dot_end = is_com_end = False
 *                 # . digit (e.g: [X]a.1)
 *                 elif is_dot_end and utils.is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect digit
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT
*/
          goto __pyx_L26;
        }

        /* "cytimes/parser.pxd":179
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]a.b.)
 *                 elif ch == '.':             # <<<<<<<<<<<<<<
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
*/
        __pyx_t_1 = (__pyx_v_ch == 46);
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":180
 *                 # . dot   (e.g: [X]a.b.)
 *                 elif ch == '.':
 *                     token += "."                    # collect dot             # <<<<<<<<<<<<<<
 *                     dot_count += 1                  # increase dot count
 *                     is_dot_end, is_com_end = True, False
*/
          __pyx_t_2 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_token, __pyx_mstate_global->__pyx_kp_u__2); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 180, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "cytimes/parser.pxd":181
 *                 elif ch == '.':
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count             # <<<<<<<<<<<<<<
 *                     is_dot_end, is_com_end = True, False
 *                 # . cache for next token & stop
*/
          __pyx_v_dot_count = (__pyx_v_dot_count + 1);

          /* "cytimes/parser.pxd":182
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
 *                     is_dot_end, is_com_end = True, False             # <<<<<<<<<<<<<<
 *                 # . cache for next token & stop
 *                 else:
*/
          __pyx_t_1 = 1;
          __pyx_t_3 = 0;
          __pyx_v_is_dot_end = __pyx_t_1;
          __pyx_v_is_com_end = __pyx_t_3;

          /* "cytimes/parser.pxd":179
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]a.b.)
 *                 elif ch == '.':             # <<<<<<<<<<<<<<
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
*/
          goto __pyx_L26;
        }

        /* "cytimes/parser.pxd":185
 *                 # . cache for next token & stop
 *                 else:
 *                     ch_cache = ch             # <<<<<<<<<<<<<<
 *                     break
 * 
*/
        /*else*/ {
          __pyx_v_ch_cache = __pyx_v_ch;

          /* "cytimes/parser.pxd":186
 *                 else:
 *                     ch_cache = ch
 *                     break             # <<<<<<<<<<<<<<
 * 
 *             # Next character
*/
          goto __pyx_L12_break;
        }
        __pyx_L26:;
        break;
      }

      /* "cytimes/parser.pxd":189
 * 
 *             # Next character
 *             pos += 1             # <<<<<<<<<<<<<<
 * 
 *         # Add token
*/
      __pyx_v_pos = (__pyx_v_pos + 1);
    }
    __pyx_L12_break:;

    /* "cytimes/parser.pxd":192
 * 
 *         # Add token
 *         if token is not None:             # <<<<<<<<<<<<<<
 *             # Pure alpha or digit token
 *             if state in (State.ALPHA, State.DIGIT):
*/
    __pyx_t_3 = (__pyx_v_token != ((PyObject*)Py_None));
    if (__pyx_t_3) {

      /* "cytimes/parser.pxd":194
 *         if token is not None:
 *             # Pure alpha or digit token
 *             if state in (State.ALPHA, State.DIGIT):             # <<<<<<<<<<<<<<
 *                 tokens.append(token)
 * 
*/
      switch (__pyx_v_state) {
        case __pyx_e_7cytimes_6parser_ALPHA:
        case __pyx_e_7cytimes_6parser_DIGIT:
        __pyx_t_3 = 1;
        break;
        default:
        __pyx_t_3 = 0;
        break;
      }
      __pyx_t_1 = __pyx_t_3;
      if (__pyx_t_1) {

        /* "cytimes/parser.pxd":195
 *             # Pure alpha or digit token
 *             if state in (State.ALPHA, State.DIGIT):
 *                 tokens.append(token)             # <<<<<<<<<<<<<<
 * 
 *             # Mixed token with dots/commas => split into sub-tokens
*/
        __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_tokens, __pyx_v_token); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 195, __pyx_L1_error)

        /* "cytimes/parser.pxd":194
 *         if token is not None:
 *             # Pure alpha or digit token
 *             if state in (State.ALPHA, State.DIGIT):             # <<<<<<<<<<<<<<
 *                 tokens.append(token)
 * 
*/
        goto __pyx_L30;
      }

      /* "cytimes/parser.pxd":198
 * 
 *             # Mixed token with dots/commas => split into sub-tokens
 *             elif state == State.ALPHA_DOT or is_dot_end or is_com_end or dot_count > 1 or com_count > 1:             # <<<<<<<<<<<<<<
 *                 sub_token = None
 *                 for i in range(str_len(token)):
*/
      __pyx_t_3 = (__pyx_v_state == __pyx_e_7cytimes_6parser_ALPHA_DOT);
      if (!__pyx_t_3) {
      } else {
        __pyx_t_1 = __pyx_t_3;
        goto __pyx_L31_bool_binop_done;
      }
      if (!__pyx_v_is_dot_end) {
      } else {
        __pyx_t_1 = __pyx_v_is_dot_end;
        goto __pyx_L31_bool_binop_done;
      }
      if (!__pyx_v_is_com_end) {
      } else {
        __pyx_t_1 = __pyx_v_is_com_end;
        goto __pyx_L31_bool_binop_done;
      }
      __pyx_t_3 = (__pyx_v_dot_count > 1);
      if (!__pyx_t_3) {
      } else {
        __pyx_t_1 = __pyx_t_3;
        goto __pyx_L31_bool_binop_done;
      }
      __pyx_t_3 = (__pyx_v_com_count > 1);
      __pyx_t_1 = __pyx_t_3;
      __pyx_L31_bool_binop_done:;
      if (__pyx_t_1) {

        /* "cytimes/parser.pxd":199
 *             # Mixed token with dots/commas => split into sub-tokens
 *             elif state == State.ALPHA_DOT or is_dot_end or is_com_end or dot_count > 1 or com_count > 1:
 *                 sub_token = None             # <<<<<<<<<<<<<<
 *                 for i in range(str_len(token)):
 *                     ch = str_read(token, i)
*/
        __Pyx_INCREF(Py_None);
        __Pyx_XDECREF_SET(__pyx_v_sub_token, ((PyObject*)Py_None));

        /* "cytimes/parser.pxd":200
 *             elif state == State.ALPHA_DOT or is_dot_end or is_com_end or dot_count > 1 or com_count > 1:
 *                 sub_token = None
 *                 for i in range(str_len(token)):             # <<<<<<<<<<<<<<
 *                     ch = str_read(token, i)
 *                     if ch == '.':
*/
        __pyx_t_6 = PyUnicode_GET_LENGTH(__pyx_v_token);
        __pyx_t_7 = __pyx_t_6;
        for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
          __pyx_v_i = __pyx_t_8;

          /* "cytimes/parser.pxd":201
 *                 sub_token = None
 *                 for i in range(str_len(token)):
 *                     ch = str_read(token, i)             # <<<<<<<<<<<<<<
 *                     if ch == '.':
 *                         if sub_token is not None:
*/
          __pyx_v_ch = PyUnicode_READ_CHAR(__pyx_v_token, __pyx_v_i);

          /* "cytimes/parser.pxd":202
 *                 for i in range(str_len(token)):
 *                     ch = str_read(token, i)
 *                     if ch == '.':             # <<<<<<<<<<<<<<
 *                         if sub_token is not None:
 *                             tokens.append(sub_token)
*/
          switch (__pyx_v_ch) {
            case 46:

            /* "cytimes/parser.pxd":203
 *                     ch = str_read(token, i)
 *                     if ch == '.':
 *                         if sub_token is not None:             # <<<<<<<<<<<<<<
 *                             tokens.append(sub_token)
 *                             sub_token = None
*/
            __pyx_t_1 = (__pyx_v_sub_token != ((PyObject*)Py_None));
            if (__pyx_t_1) {

              /* "cytimes/parser.pxd":204
 *                     if ch == '.':
 *                         if sub_token is not None:
 *                             tokens.append(sub_token)             # <<<<<<<<<<<<<<
 *                             sub_token = None
 *                         tokens.append(".")
*/
              __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_tokens, __pyx_v_sub_token); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 204, __pyx_L1_error)

              /* "cytimes/parser.pxd":205
 *                         if sub_token is not None:
 *                             tokens.append(sub_token)
 *                             sub_token = None             # <<<<<<<<<<<<<<
 *                         tokens.append(".")
 *                     elif ch == ',':
*/
              __Pyx_INCREF(Py_None);
              __Pyx_DECREF_SET(__pyx_v_sub_token, ((PyObject*)Py_None));

              /* "cytimes/parser.pxd":203
 *                     ch = str_read(token, i)
 *                     if ch == '.':
 *                         if sub_token is not None:             # <<<<<<<<<<<<<<
 *                             tokens.append(sub_token)
 *                             sub_token = None
*/
            }

            /* "cytimes/parser.pxd":206
 *                             tokens.append(sub_token)
 *                             sub_token = None
 *                         tokens.append(".")             # <<<<<<<<<<<<<<
 *                     elif ch == ',':
 *                         if sub_token is not None:
*/
            __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_tokens, __pyx_mstate_global->__pyx_kp_u__2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 206, __pyx_L1_error)

            /* "cytimes/parser.pxd":202
 *                 for i in range(str_len(token)):
 *                     ch = str_read(token, i)
 *                     if ch == '.':             # <<<<<<<<<<<<<<
 *                         if sub_token is not None:
 *                             tokens.append(sub_token)
*/
            break;
            case 44:

            /* "cytimes/parser.pxd":208
 *                         tokens.append(".")
 *                     elif ch == ',':
 *                         if sub_token is not None:             # <<<<<<<<<<<<<<
 *                             tokens.append(sub_token)
 *                             sub_token = None
*/
            __pyx_t_1 = (__pyx_v_sub_token != ((PyObject*)Py_None));
            if (__pyx_t_1) {

              /* "cytimes/parser.pxd":209
 *                     elif ch == ',':
 *                         if sub_token is not None:
 *                             tokens.append(sub_token)             # <<<<<<<<<<<<<<
 *                             sub_token = None
 *                         tokens.append(",")
*/
              __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_tokens, __pyx_v_sub_token); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 209, __pyx_L1_error)

              /* "cytimes/parser.pxd":210
 *                         if sub_token is not None:
 *                             tokens.append(sub_token)
 *                             sub_token = None             # <<<<<<<<<<<<<<
 *                         tokens.append(",")
 *                     else:
*/
              __Pyx_INCREF(Py_None);
              __Pyx_DECREF_SET(__pyx_v_sub_token, ((PyObject*)Py_None));

              /* "cytimes/parser.pxd":208
 *                         tokens.append(".")
 *                     elif ch == ',':
 *                         if sub_token is not None:             # <<<<<<<<<<<<<<
 *                             tokens.append(sub_token)
 *                             sub_token = None
*/
            }

            /* "cytimes/parser.pxd":211
 *                             tokens.append(sub_token)
 *                             sub_token = None
 *                         tokens.append(",")             # <<<<<<<<<<<<<<
 *                     else:
 *                         if sub_token is None:
*/
            __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_tokens, __pyx_mstate_global->__pyx_kp_u__12); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 211, __pyx_L1_error)

            /* "cytimes/parser.pxd":207
 *                             sub_token = None
 *                         tokens.append(".")
 *                     elif ch == ',':             # <<<<<<<<<<<<<<
 *                         if sub_token is not None:
 *                             tokens.append(sub_token)
*/
            break;
            default:

            /* "cytimes/parser.pxd":213
 *                         tokens.append(",")
 *                     else:
 *                         if sub_token is None:             # <<<<<<<<<<<<<<
 *                             sub_token = str_chr(ch)
 *                         else:
*/
            __pyx_t_1 = (__pyx_v_sub_token == ((PyObject*)Py_None));
            if (__pyx_t_1) {

              /* "cytimes/parser.pxd":214
 *                     else:
 *                         if sub_token is None:
 *                             sub_token = str_chr(ch)             # <<<<<<<<<<<<<<
 *                         else:
 *                             sub_token += str_chr(ch)
*/
              __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 214, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF_SET(__pyx_v_sub_token, ((PyObject*)__pyx_t_2));
              __pyx_t_2 = 0;

              /* "cytimes/parser.pxd":213
 *                         tokens.append(",")
 *                     else:
 *                         if sub_token is None:             # <<<<<<<<<<<<<<
 *                             sub_token = str_chr(ch)
 *                         else:
*/
              goto __pyx_L40;
            }

            /* "cytimes/parser.pxd":216
 *                             sub_token = str_chr(ch)
 *                         else:
 *                             sub_token += str_chr(ch)             # <<<<<<<<<<<<<<
 *                 if sub_token is not None:
 *                     tokens.append(sub_token)
*/
            /*else*/ {
              __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 216, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_5 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_sub_token, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 216, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF_SET(__pyx_v_sub_token, ((PyObject*)__pyx_t_5));
              __pyx_t_5 = 0;
            }
            __pyx_L40:;
            break;
          }
        }

        /* "cytimes/parser.pxd":217
 *                         else:
 *                             sub_token += str_chr(ch)
 *                 if sub_token is not None:             # <<<<<<<<<<<<<<
 *                     tokens.append(sub_token)
 * 
*/
        __pyx_t_1 = (__pyx_v_sub_token != ((PyObject*)Py_None));
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":218
 *                             sub_token += str_chr(ch)
 *                 if sub_token is not None:
 *                     tokens.append(sub_token)             # <<<<<<<<<<<<<<
 * 
 *             # Decimal comma normalization (e.g., '1,234' -> '1.234')
*/
          __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_tokens, __pyx_v_sub_token); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 218, __pyx_L1_error)

          /* "cytimes/parser.pxd":217
 *                         else:
 *                             sub_token += str_chr(ch)
 *                 if sub_token is not None:             # <<<<<<<<<<<<<<
 *                     tokens.append(sub_token)
 * 
*/
        }

        /* "cytimes/parser.pxd":198
 * 
 *             # Mixed token with dots/commas => split into sub-tokens
 *             elif state == State.ALPHA_DOT or is_dot_end or is_com_end or dot_count > 1 or com_count > 1:             # <<<<<<<<<<<<<<
 *                 sub_token = None
 *                 for i in range(str_len(token)):
*/
        goto __pyx_L30;
      }

      /* "cytimes/parser.pxd":221
 * 
 *             # Decimal comma normalization (e.g., '1,234' -> '1.234')
 *             elif state == State.DIGIT_DOT and com_count == 1 and dot_count == 0:             # <<<<<<<<<<<<<<
 *                 tokens.append(str_replace(token, ",", ".", -1))
 * 
*/
      __pyx_t_3 = (__pyx_v_state == __pyx_e_7cytimes_6parser_DIGIT_DOT);
      if (__pyx_t_3) {
      } else {
        __pyx_t_1 = __pyx_t_3;
        goto __pyx_L42_bool_binop_done;
      }
      __pyx_t_3 = (__pyx_v_com_count == 1);
      if (__pyx_t_3) {
      } else {
        __pyx_t_1 = __pyx_t_3;
        goto __pyx_L42_bool_binop_done;
      }
      __pyx_t_3 = (__pyx_v_dot_count == 0);
      __pyx_t_1 = __pyx_t_3;
      __pyx_L42_bool_binop_done:;
      if (__pyx_t_1) {

        /* "cytimes/parser.pxd":222
 *             # Decimal comma normalization (e.g., '1,234' -> '1.234')
 *             elif state == State.DIGIT_DOT and com_count == 1 and dot_count == 0:
 *                 tokens.append(str_replace(token, ",", ".", -1))             # <<<<<<<<<<<<<<
 * 
 *             # Other cases
*/
        __pyx_t_5 = PyUnicode_Replace(__pyx_v_token, __pyx_mstate_global->__pyx_kp_u__12, __pyx_mstate_global->__pyx_kp_u__2, -1L); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 222, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_tokens, __pyx_t_5); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 222, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "cytimes/parser.pxd":221
 * 
 *             # Decimal comma normalization (e.g., '1,234' -> '1.234')
 *             elif state == State.DIGIT_DOT and com_count == 1 and dot_count == 0:             # <<<<<<<<<<<<<<
 *                 tokens.append(str_replace(token, ",", ".", -1))
 * 
*/
        goto __pyx_L30;
      }

      /* "cytimes/parser.pxd":226
 *             # Other cases
 *             else:
 *                 tokens.append(token)             # <<<<<<<<<<<<<<
 * 
 *         # Nested loop: break - - - - - - - - - - - - - - - - - - - - - - - - -
*/
      /*else*/ {
        __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_tokens, __pyx_v_token); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 226, __pyx_L1_error)
      }
      __pyx_L30:;

      /* "cytimes/parser.pxd":192
 * 
 *         # Add token
 *         if token is not None:             # <<<<<<<<<<<<<<
 *             # Pure alpha or digit token
 *             if state in (State.ALPHA, State.DIGIT):
*/
    }
  }

  /* "cytimes/parser.pxd":231
 * 
 *     # Main loop: break -------------------------------------------------------
 *     return tokens             # <<<<<<<<<<<<<<
 * 
 * cpdef list timelex(str dtstr)
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_tokens);
  __pyx_r = __pyx_v_tokens;
  goto __pyx_L0;

  /* "cytimes/parser.pxd":20
 *     ALPHA_DOT = 4
 * 
 * cdef inline list _timelex(str data, Py_ssize_t pos, Py_ssize_t length=0):             # <<<<<<<<<<<<<<
 *     """Tokenize a datetime-like string into lexical units (tokens).
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.parser._timelex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tokens);
  __Pyx_XDECREF(__pyx_v_token);
  __Pyx_XDECREF(__pyx_v_sub_token);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":48
 * 
 * # Utils ---------------------------------------------------------------------------------------
 * @cython.cfunc             # <<<<<<<<<<<<<<
 * @cython.inline(True)
 * @cython.exceptval(-1, check=False)
*/

static Py_ssize_t __pyx_f_7cytimes_4pddt__parse_size(PyObject *__pyx_v_cls, PyObject *__pyx_v_size) {
  Py_ssize_t __pyx_v_value;
  PyObject *__pyx_v_err = NULL;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  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[5];
  PyObject *__pyx_t_14 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_15;
  int __pyx_t_16;
  char const *__pyx_t_17;
  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;
  char const *__pyx_t_24;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_parse_size", 0);

  /* "cytimes/pddt.py":63
 *     """
 *     # int
 *     if isinstance(size, int):             # <<<<<<<<<<<<<<
 *         value: cython.Py_ssize_t = size
 * 
*/
  __pyx_t_1 = PyLong_Check(__pyx_v_size); 
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":64
 *     # int
 *     if isinstance(size, int):
 *         value: cython.Py_ssize_t = size             # <<<<<<<<<<<<<<
 * 
 *     # str / float / bytes
*/
    __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_size); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 64, __pyx_L1_error)
    __pyx_v_value = __pyx_t_2;

    /* "cytimes/pddt.py":63
 *     """
 *     # int
 *     if isinstance(size, int):             # <<<<<<<<<<<<<<
 *         value: cython.Py_ssize_t = size
 * 
*/
    goto __pyx_L3;
  }

  /* "cytimes/pddt.py":67
 * 
 *     # str / float / bytes
 *     elif isinstance(size, (float, str, bytes)):             # <<<<<<<<<<<<<<
 *         try:
 *             value: cython.Py_ssize_t = int(size)
*/
  __pyx_t_3 = PyFloat_Check(__pyx_v_size); 
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = PyUnicode_Check(__pyx_v_size); 
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = PyBytes_Check(__pyx_v_size); 
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":68
 *     # str / float / bytes
 *     elif isinstance(size, (float, str, bytes)):
 *         try:             # <<<<<<<<<<<<<<
 *             value: cython.Py_ssize_t = int(size)
 *         except Exception as err:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __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:*/ {

        /* "cytimes/pddt.py":69
 *     elif isinstance(size, (float, str, bytes)):
 *         try:
 *             value: cython.Py_ssize_t = int(size)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             # fmt: off
*/
        __pyx_t_7 = __Pyx_PyNumber_Int(__pyx_v_size); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 69, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_7); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 69, __pyx_L7_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_v_value = __pyx_t_2;

        /* "cytimes/pddt.py":68
 *     # str / float / bytes
 *     elif isinstance(size, (float, str, bytes)):
 *         try:             # <<<<<<<<<<<<<<
 *             value: cython.Py_ssize_t = int(size)
 *         except Exception as err:
*/
      }
      __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_L12_try_end;
      __pyx_L7_error:;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "cytimes/pddt.py":70
 *         try:
 *             value: cython.Py_ssize_t = int(size)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             errors.raise_argument_error(cls, "size",
*/
      __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_8) {
        __Pyx_AddTraceback("cytimes.pddt._parse_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 70, __pyx_L9_except_error)
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_9);
        __pyx_v_err = __pyx_t_9;
        /*try:*/ {

          /* "cytimes/pddt.py":74
 *             errors.raise_argument_error(cls, "size",
 *                 "Cannot convert '%s' %s to integer."
 *                 % (size, type(size)), err)             # <<<<<<<<<<<<<<
 *             # fmt: on
 *             return -1  # unreachable: suppress compiler warning
*/
          __pyx_t_11 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_size), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 74, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_size))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 74, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_13[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_convert;
          __pyx_t_13[1] = __pyx_t_11;
          __pyx_t_13[2] = __pyx_mstate_global->__pyx_kp_u__9;
          __pyx_t_13[3] = __pyx_t_12;
          __pyx_t_13[4] = __pyx_mstate_global->__pyx_kp_u_to_integer;

          /* "cytimes/pddt.py":73
 *             # fmt: off
 *             errors.raise_argument_error(cls, "size",
 *                 "Cannot convert '%s' %s to integer."             # <<<<<<<<<<<<<<
 *                 % (size, type(size)), err)
 *             # fmt: on
*/
          __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_13, 5, 16 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 12, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12));
          if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 73, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

          /* "cytimes/pddt.py":72
 *         except Exception as err:
 *             # fmt: off
 *             errors.raise_argument_error(cls, "size",             # <<<<<<<<<<<<<<
 *                 "Cannot convert '%s' %s to integer."
 *                 % (size, type(size)), err)
*/
          __pyx_t_15.__pyx_n = 4;
          __pyx_t_15.cls = __pyx_v_cls;
          __pyx_t_15.input_msg = __pyx_mstate_global->__pyx_n_u_size_2;
          __pyx_t_15.error_msg = ((PyObject*)__pyx_t_14);
          __pyx_t_15.tb_exc = __pyx_v_err;
          __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_15); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 72, __pyx_L18_error)
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

          /* "cytimes/pddt.py":76
 *                 % (size, type(size)), err)
 *             # fmt: on
 *             return -1  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 * 
 *     # Array-like
*/
          __pyx_r = -1L;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          goto __pyx_L17_return;
        }

        /* "cytimes/pddt.py":70
 *         try:
 *             value: cython.Py_ssize_t = int(size)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             errors.raise_argument_error(cls, "size",
*/
        /*finally:*/ {
          __pyx_L18_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
            if ( unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_18);
            __Pyx_XGOTREF(__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_23);
            __pyx_t_8 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            }
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
            __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
            __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17;
            goto __pyx_L9_except_error;
          }
          __pyx_L17_return: {
            __pyx_t_2 = __pyx_r;
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            __pyx_r = __pyx_t_2;
            goto __pyx_L10_except_return;
          }
        }
      }
      goto __pyx_L9_except_error;

      /* "cytimes/pddt.py":68
 *     # str / float / bytes
 *     elif isinstance(size, (float, str, bytes)):
 *         try:             # <<<<<<<<<<<<<<
 *             value: cython.Py_ssize_t = int(size)
 *         except Exception as err:
*/
      __pyx_L9_except_error:;
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
      goto __pyx_L1_error;
      __pyx_L10_except_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_L12_try_end:;
    }

    /* "cytimes/pddt.py":67
 * 
 *     # str / float / bytes
 *     elif isinstance(size, (float, str, bytes)):             # <<<<<<<<<<<<<<
 *         try:
 *             value: cython.Py_ssize_t = int(size)
*/
    goto __pyx_L3;
  }

  /* "cytimes/pddt.py":80
 *     # Array-like
 *     else:
 *         try:             # <<<<<<<<<<<<<<
 *             value: cython.Py_ssize_t = len(size)
 *         except Exception as err:
*/
  /*else*/ {
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_4);
      /*try:*/ {

        /* "cytimes/pddt.py":81
 *     else:
 *         try:
 *             value: cython.Py_ssize_t = len(size)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             # fmt: off
*/
        __pyx_t_2 = PyObject_Length(__pyx_v_size); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 81, __pyx_L24_error)
        __pyx_v_value = __pyx_t_2;

        /* "cytimes/pddt.py":80
 *     # Array-like
 *     else:
 *         try:             # <<<<<<<<<<<<<<
 *             value: cython.Py_ssize_t = len(size)
 *         except Exception as err:
*/
      }
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L29_try_end;
      __pyx_L24_error:;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "cytimes/pddt.py":82
 *         try:
 *             value: cython.Py_ssize_t = len(size)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             errors.raise_argument_error(cls, "size",
*/
      __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_16) {
        __Pyx_AddTraceback("cytimes.pddt._parse_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_9, &__pyx_t_7) < 0) __PYX_ERR(0, 82, __pyx_L26_except_error)
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __pyx_v_err = __pyx_t_9;
        /*try:*/ {

          /* "cytimes/pddt.py":86
 *             errors.raise_argument_error(cls, "size",
 *                 "Cannot get the length of '%s' %s."
 *                 % (size, type(size)), err)             # <<<<<<<<<<<<<<
 *             # fmt: on
 *             return -1  # unreachable: suppress compiler warning
*/
          __pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_size), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 86, __pyx_L35_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_size))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 86, __pyx_L35_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_13[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_get_the_length_of;
          __pyx_t_13[1] = __pyx_t_14;
          __pyx_t_13[2] = __pyx_mstate_global->__pyx_kp_u__9;
          __pyx_t_13[3] = __pyx_t_12;
          __pyx_t_13[4] = __pyx_mstate_global->__pyx_kp_u__2;

          /* "cytimes/pddt.py":85
 *             # fmt: off
 *             errors.raise_argument_error(cls, "size",
 *                 "Cannot get the length of '%s' %s."             # <<<<<<<<<<<<<<
 *                 % (size, type(size)), err)
 *             # fmt: on
*/
          __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_13, 5, 26 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12));
          if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 85, __pyx_L35_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

          /* "cytimes/pddt.py":84
 *         except Exception as err:
 *             # fmt: off
 *             errors.raise_argument_error(cls, "size",             # <<<<<<<<<<<<<<
 *                 "Cannot get the length of '%s' %s."
 *                 % (size, type(size)), err)
*/
          __pyx_t_15.__pyx_n = 4;
          __pyx_t_15.cls = __pyx_v_cls;
          __pyx_t_15.input_msg = __pyx_mstate_global->__pyx_n_u_size_2;
          __pyx_t_15.error_msg = ((PyObject*)__pyx_t_11);
          __pyx_t_15.tb_exc = __pyx_v_err;
          __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_15); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 84, __pyx_L35_error)
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

          /* "cytimes/pddt.py":88
 *                 % (size, type(size)), err)
 *             # fmt: on
 *             return -1  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 * 
 *     # Non-negative check
*/
          __pyx_r = -1L;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          goto __pyx_L34_return;
        }

        /* "cytimes/pddt.py":82
 *         try:
 *             value: cython.Py_ssize_t = len(size)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             errors.raise_argument_error(cls, "size",
*/
        /*finally:*/ {
          __pyx_L35_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18);
            if ( unlikely(__Pyx_GetException(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_23);
            __Pyx_XGOTREF(__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_18);
            __pyx_t_16 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_24 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            }
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_19, __pyx_t_18);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_ErrRestore(__pyx_t_23, __pyx_t_22, __pyx_t_21);
            __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
            __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_24;
            goto __pyx_L26_except_error;
          }
          __pyx_L34_return: {
            __pyx_t_2 = __pyx_r;
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            __pyx_r = __pyx_t_2;
            goto __pyx_L27_except_return;
          }
        }
      }
      goto __pyx_L26_except_error;

      /* "cytimes/pddt.py":80
 *     # Array-like
 *     else:
 *         try:             # <<<<<<<<<<<<<<
 *             value: cython.Py_ssize_t = len(size)
 *         except Exception as err:
*/
      __pyx_L26_except_error:;
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4);
      goto __pyx_L1_error;
      __pyx_L27_except_return:;
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4);
      goto __pyx_L0;
      __pyx_L29_try_end:;
    }
  }
  __pyx_L3:;

  /* "cytimes/pddt.py":91
 * 
 *     # Non-negative check
 *     if value < 1:             # <<<<<<<<<<<<<<
 *         # fmt: off
 *         errors.raise_argument_error(cls, "size",
*/
  __pyx_t_1 = (__pyx_v_value < 1);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":94
 *         # fmt: off
 *         errors.raise_argument_error(cls, "size",
 *             "Array size must be greater than 0, instead got %d." % value)             # <<<<<<<<<<<<<<
 *         # fmt: on
 *     return value
*/
    __pyx_t_7 = PyLong_FromSsize_t(__pyx_v_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 94, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Array_size_must_be_greater_than, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 94, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "cytimes/pddt.py":93
 *     if value < 1:
 *         # fmt: off
 *         errors.raise_argument_error(cls, "size",             # <<<<<<<<<<<<<<
 *             "Array size must be greater than 0, instead got %d." % value)
 *         # fmt: on
*/
    __pyx_t_15.__pyx_n = 3;
    __pyx_t_15.cls = __pyx_v_cls;
    __pyx_t_15.input_msg = __pyx_mstate_global->__pyx_n_u_size_2;
    __pyx_t_15.error_msg = ((PyObject*)__pyx_t_9);
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_15); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 93, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cytimes/pddt.py":91
 * 
 *     # Non-negative check
 *     if value < 1:             # <<<<<<<<<<<<<<
 *         # fmt: off
 *         errors.raise_argument_error(cls, "size",
*/
  }

  /* "cytimes/pddt.py":96
 *             "Array size must be greater than 0, instead got %d." % value)
 *         # fmt: on
 *     return value             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = __pyx_v_value;
  goto __pyx_L0;

  /* "cytimes/pddt.py":48
 * 
 * # Utils ---------------------------------------------------------------------------------------
 * @cython.cfunc             # <<<<<<<<<<<<<<
 * @cython.inline(True)
 * @cython.exceptval(-1, check=False)
*/

  /* function exit code */
  __pyx_L1_error:;
  __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_14);
  __Pyx_AddTraceback("cytimes.pddt._parse_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":99
 * 
 * 
 * @cython.cfunc             # <<<<<<<<<<<<<<
 * @cython.inline(True)
 * def _parse_freq(freq: object) -> object:
*/

static PyObject *__pyx_f_7cytimes_4pddt__parse_freq(PyObject *__pyx_v_freq) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("_parse_freq", 0);

  /* "cytimes/pddt.py":113
 *     - 'm' -> 'min'
 *     """
 *     if isinstance(freq, str) and str_len(freq) == 1 and str_read(freq, 0) == "m":             # <<<<<<<<<<<<<<
 *         return "min"
 *     else:
*/
  __pyx_t_2 = PyUnicode_Check(__pyx_v_freq); 
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (PyUnicode_GET_LENGTH(__pyx_v_freq) == 1);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (PyUnicode_READ_CHAR(__pyx_v_freq, 0) == 0x6D);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":114
 *     """
 *     if isinstance(freq, str) and str_len(freq) == 1 and str_read(freq, 0) == "m":
 *         return "min"             # <<<<<<<<<<<<<<
 *     else:
 *         return freq
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_min);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_min;
    goto __pyx_L0;

    /* "cytimes/pddt.py":113
 *     - 'm' -> 'min'
 *     """
 *     if isinstance(freq, str) and str_len(freq) == 1 and str_read(freq, 0) == "m":             # <<<<<<<<<<<<<<
 *         return "min"
 *     else:
*/
  }

  /* "cytimes/pddt.py":116
 *         return "min"
 *     else:
 *         return freq             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_freq);
    __pyx_r = __pyx_v_freq;
    goto __pyx_L0;
  }

  /* "cytimes/pddt.py":99
 * 
 * 
 * @cython.cfunc             # <<<<<<<<<<<<<<
 * @cython.inline(True)
 * def _parse_freq(freq: object) -> object:
*/

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

/* "cytimes/pddt.py":119
 * 
 * 
 * @cython.cfunc             # <<<<<<<<<<<<<<
 * @cython.inline(True)
 * def _parse_us_from_iso_dict(cls: object, iso: dict) -> cython.longlong:
*/

static PY_LONG_LONG __pyx_f_7cytimes_4pddt__parse_us_from_iso_dict(PyObject *__pyx_v_cls, PyObject *__pyx_v_iso) {
  PyObject *__pyx_v_year = NULL;
  PyObject *__pyx_v_week = NULL;
  PyObject *__pyx_v_weekday = NULL;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PY_LONG_LONG __pyx_v_value;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6[5];
  PyObject *__pyx_t_7 = NULL;
  PY_LONG_LONG __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_parse_us_from_iso_dict", 0);

  /* "cytimes/pddt.py":129
 *     """
 *     # Year
 *     year = iso.get("year", None)             # <<<<<<<<<<<<<<
 *     if not isinstance(year, int):
 *         if year is None:
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_iso, __pyx_mstate_global->__pyx_n_u_year, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_year = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":130
 *     # Year
 *     year = iso.get("year", None)
 *     if not isinstance(year, int):             # <<<<<<<<<<<<<<
 *         if year is None:
 *             # fmt: off
*/
  __pyx_t_2 = PyLong_Check(__pyx_v_year); 
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "cytimes/pddt.py":131
 *     year = iso.get("year", None)
 *     if not isinstance(year, int):
 *         if year is None:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",
*/
    __pyx_t_3 = (__pyx_v_year == Py_None);
    if (__pyx_t_3) {

      /* "cytimes/pddt.py":133
 *         if year is None:
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",             # <<<<<<<<<<<<<<
 *                 "Dictionary must contain 'year' key for ISO year value.")
 *             # fmt: on
*/
      __pyx_t_4.__pyx_n = 3;
      __pyx_t_4.cls = __pyx_v_cls;
      __pyx_t_4.input_msg = __pyx_mstate_global->__pyx_n_u_iso;
      __pyx_t_4.error_msg = __pyx_mstate_global->__pyx_kp_u_Dictionary_must_contain_year_key;
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L1_error)

      /* "cytimes/pddt.py":131
 *     year = iso.get("year", None)
 *     if not isinstance(year, int):
 *         if year is None:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",
*/
      goto __pyx_L4;
    }

    /* "cytimes/pddt.py":138
 *         else:
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",             # <<<<<<<<<<<<<<
 *                 "Value for 'year' must be an integer, instead got %s %s."
 *                 % (year, type(year)))
*/
    /*else*/ {

      /* "cytimes/pddt.py":140
 *             errors.raise_argument_error(cls, "iso",
 *                 "Value for 'year' must be an integer, instead got %s %s."
 *                 % (year, type(year)))             # <<<<<<<<<<<<<<
 *             # fmt: on
 * 
*/
      __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_year), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_year))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Value_for_year_must_be_an_intege;
      __pyx_t_6[1] = __pyx_t_1;
      __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u__8;
      __pyx_t_6[3] = __pyx_t_5;
      __pyx_t_6[4] = __pyx_mstate_global->__pyx_kp_u__2;

      /* "cytimes/pddt.py":139
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",
 *                 "Value for 'year' must be an integer, instead got %s %s."             # <<<<<<<<<<<<<<
 *                 % (year, type(year)))
 *             # fmt: on
*/
      __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, 49 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 139, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "cytimes/pddt.py":138
 *         else:
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",             # <<<<<<<<<<<<<<
 *                 "Value for 'year' must be an integer, instead got %s %s."
 *                 % (year, type(year)))
*/
      __pyx_t_4.__pyx_n = 3;
      __pyx_t_4.cls = __pyx_v_cls;
      __pyx_t_4.input_msg = __pyx_mstate_global->__pyx_n_u_iso;
      __pyx_t_4.error_msg = ((PyObject*)__pyx_t_7);
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_L4:;

    /* "cytimes/pddt.py":130
 *     # Year
 *     year = iso.get("year", None)
 *     if not isinstance(year, int):             # <<<<<<<<<<<<<<
 *         if year is None:
 *             # fmt: off
*/
  }

  /* "cytimes/pddt.py":144
 * 
 *     # Week
 *     week = iso.get("week", None)             # <<<<<<<<<<<<<<
 *     if not isinstance(week, int):
 *         if week is None:
*/
  __pyx_t_7 = __Pyx_PyDict_GetItemDefault(__pyx_v_iso, __pyx_mstate_global->__pyx_n_u_week, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_v_week = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "cytimes/pddt.py":145
 *     # Week
 *     week = iso.get("week", None)
 *     if not isinstance(week, int):             # <<<<<<<<<<<<<<
 *         if week is None:
 *             # fmt: off
*/
  __pyx_t_3 = PyLong_Check(__pyx_v_week); 
  __pyx_t_2 = (!__pyx_t_3);
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":146
 *     week = iso.get("week", None)
 *     if not isinstance(week, int):
 *         if week is None:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",
*/
    __pyx_t_2 = (__pyx_v_week == Py_None);
    if (__pyx_t_2) {

      /* "cytimes/pddt.py":148
 *         if week is None:
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",             # <<<<<<<<<<<<<<
 *                 "Dictionary must contain 'week' key for ISO week value.")
 *             # fmt: on
*/
      __pyx_t_4.__pyx_n = 3;
      __pyx_t_4.cls = __pyx_v_cls;
      __pyx_t_4.input_msg = __pyx_mstate_global->__pyx_n_u_iso;
      __pyx_t_4.error_msg = __pyx_mstate_global->__pyx_kp_u_Dictionary_must_contain_week_key;
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 148, __pyx_L1_error)

      /* "cytimes/pddt.py":146
 *     week = iso.get("week", None)
 *     if not isinstance(week, int):
 *         if week is None:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",
*/
      goto __pyx_L6;
    }

    /* "cytimes/pddt.py":153
 *         else:
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",             # <<<<<<<<<<<<<<
 *                 "Value for 'week' must be an integer, instead got %s %s."
 *                 % (week, type(week)))
*/
    /*else*/ {

      /* "cytimes/pddt.py":155
 *             errors.raise_argument_error(cls, "iso",
 *                 "Value for 'week' must be an integer, instead got %s %s."
 *                 % (week, type(week)))             # <<<<<<<<<<<<<<
 *             # fmt: on
 * 
*/
      __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_week), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 155, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_week))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 155, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Value_for_week_must_be_an_intege;
      __pyx_t_6[1] = __pyx_t_7;
      __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u__8;
      __pyx_t_6[3] = __pyx_t_5;
      __pyx_t_6[4] = __pyx_mstate_global->__pyx_kp_u__2;

      /* "cytimes/pddt.py":154
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",
 *                 "Value for 'week' must be an integer, instead got %s %s."             # <<<<<<<<<<<<<<
 *                 % (week, type(week)))
 *             # fmt: on
*/
      __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, 49 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "cytimes/pddt.py":153
 *         else:
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",             # <<<<<<<<<<<<<<
 *                 "Value for 'week' must be an integer, instead got %s %s."
 *                 % (week, type(week)))
*/
      __pyx_t_4.__pyx_n = 3;
      __pyx_t_4.cls = __pyx_v_cls;
      __pyx_t_4.input_msg = __pyx_mstate_global->__pyx_n_u_iso;
      __pyx_t_4.error_msg = ((PyObject*)__pyx_t_1);
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 153, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_L6:;

    /* "cytimes/pddt.py":145
 *     # Week
 *     week = iso.get("week", None)
 *     if not isinstance(week, int):             # <<<<<<<<<<<<<<
 *         if week is None:
 *             # fmt: off
*/
  }

  /* "cytimes/pddt.py":159
 * 
 *     # Weekday
 *     weekday = iso.get("weekday", iso.get("day", None))             # <<<<<<<<<<<<<<
 *     if not isinstance(weekday, int):
 *         if weekday is None:
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_iso, __pyx_mstate_global->__pyx_n_u_day, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyDict_GetItemDefault(__pyx_v_iso, __pyx_mstate_global->__pyx_n_u_weekday, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_weekday = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "cytimes/pddt.py":160
 *     # Weekday
 *     weekday = iso.get("weekday", iso.get("day", None))
 *     if not isinstance(weekday, int):             # <<<<<<<<<<<<<<
 *         if weekday is None:
 *             # fmt: off
*/
  __pyx_t_2 = PyLong_Check(__pyx_v_weekday); 
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "cytimes/pddt.py":161
 *     weekday = iso.get("weekday", iso.get("day", None))
 *     if not isinstance(weekday, int):
 *         if weekday is None:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",
*/
    __pyx_t_3 = (__pyx_v_weekday == Py_None);
    if (__pyx_t_3) {

      /* "cytimes/pddt.py":163
 *         if weekday is None:
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",             # <<<<<<<<<<<<<<
 *                 "Dictionary must contain 'weekday' key for ISO weekday value.")
 *             # fmt: on
*/
      __pyx_t_4.__pyx_n = 3;
      __pyx_t_4.cls = __pyx_v_cls;
      __pyx_t_4.input_msg = __pyx_mstate_global->__pyx_n_u_iso;
      __pyx_t_4.error_msg = __pyx_mstate_global->__pyx_kp_u_Dictionary_must_contain_weekday;
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 163, __pyx_L1_error)

      /* "cytimes/pddt.py":161
 *     weekday = iso.get("weekday", iso.get("day", None))
 *     if not isinstance(weekday, int):
 *         if weekday is None:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",
*/
      goto __pyx_L8;
    }

    /* "cytimes/pddt.py":168
 *         else:
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",             # <<<<<<<<<<<<<<
 *                 "Value for 'weekday' must be an integer, instead got %s %s."
 *                 % (weekday, type(weekday)))
*/
    /*else*/ {

      /* "cytimes/pddt.py":170
 *             errors.raise_argument_error(cls, "iso",
 *                 "Value for 'weekday' must be an integer, instead got %s %s."
 *                 % (weekday, type(weekday)))             # <<<<<<<<<<<<<<
 *             # fmt: on
 * 
*/
      __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_weekday), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 170, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_weekday))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Value_for_weekday_must_be_an_int;
      __pyx_t_6[1] = __pyx_t_5;
      __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u__8;
      __pyx_t_6[3] = __pyx_t_1;
      __pyx_t_6[4] = __pyx_mstate_global->__pyx_kp_u__2;

      /* "cytimes/pddt.py":169
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",
 *                 "Value for 'weekday' must be an integer, instead got %s %s."             # <<<<<<<<<<<<<<
 *                 % (weekday, type(weekday)))
 *             # fmt: on
*/
      __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, 52 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1));
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "cytimes/pddt.py":168
 *         else:
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",             # <<<<<<<<<<<<<<
 *                 "Value for 'weekday' must be an integer, instead got %s %s."
 *                 % (weekday, type(weekday)))
*/
      __pyx_t_4.__pyx_n = 3;
      __pyx_t_4.cls = __pyx_v_cls;
      __pyx_t_4.input_msg = __pyx_mstate_global->__pyx_n_u_iso;
      __pyx_t_4.error_msg = ((PyObject*)__pyx_t_7);
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 168, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_L8:;

    /* "cytimes/pddt.py":160
 *     # Weekday
 *     weekday = iso.get("weekday", iso.get("day", None))
 *     if not isinstance(weekday, int):             # <<<<<<<<<<<<<<
 *         if weekday is None:
 *             # fmt: off
*/
  }

  /* "cytimes/pddt.py":174
 * 
 *     # Compute microseconds (since Unix Epoch)
 *     _ymd = utils.ymd_fr_iso(year, week, weekday)             # <<<<<<<<<<<<<<
 *     value: cython.longlong = utils.ymd_to_ord(_ymd.year, _ymd.month, _ymd.day)
 *     return (value - utils.EPOCH_DAY) * utils.US_DAY
*/
  __pyx_t_8 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_v_year); if (unlikely((__pyx_t_8 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyLong_As_int(__pyx_v_week); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyLong_As_int(__pyx_v_weekday); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L1_error)
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_iso(__pyx_t_8, __pyx_t_9, __pyx_t_10);

  /* "cytimes/pddt.py":175
 *     # Compute microseconds (since Unix Epoch)
 *     _ymd = utils.ymd_fr_iso(year, week, weekday)
 *     value: cython.longlong = utils.ymd_to_ord(_ymd.year, _ymd.month, _ymd.day)             # <<<<<<<<<<<<<<
 *     return (value - utils.EPOCH_DAY) * utils.US_DAY
 * 
*/
  __pyx_v_value = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v__ymd.year, __pyx_v__ymd.month, __pyx_v__ymd.day);

  /* "cytimes/pddt.py":176
 *     _ymd = utils.ymd_fr_iso(year, week, weekday)
 *     value: cython.longlong = utils.ymd_to_ord(_ymd.year, _ymd.month, _ymd.day)
 *     return (value - utils.EPOCH_DAY) * utils.US_DAY             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = ((__pyx_v_value - __pyx_v_7cytimes_5utils_EPOCH_DAY) * __pyx_v_7cytimes_5utils_US_DAY);
  goto __pyx_L0;

  /* "cytimes/pddt.py":119
 * 
 * 
 * @cython.cfunc             # <<<<<<<<<<<<<<
 * @cython.inline(True)
 * def _parse_us_from_iso_dict(cls: object, iso: dict) -> cython.longlong:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.pddt._parse_us_from_iso_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_year);
  __Pyx_XDECREF(__pyx_v_week);
  __Pyx_XDECREF(__pyx_v_weekday);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":179
 * 
 * 
 * @cython.cfunc             # <<<<<<<<<<<<<<
 * @cython.inline(True)
 * def _parse_us_from_doy_dict(cls: object, doy: dict) -> cython.longlong:
*/

static PY_LONG_LONG __pyx_f_7cytimes_4pddt__parse_us_from_doy_dict(PyObject *__pyx_v_cls, PyObject *__pyx_v_doy) {
  PyObject *__pyx_v_year = NULL;
  PyObject *__pyx_v_day_of_year = NULL;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PY_LONG_LONG __pyx_v_value;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6[5];
  PyObject *__pyx_t_7 = NULL;
  PY_LONG_LONG __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_parse_us_from_doy_dict", 0);

  /* "cytimes/pddt.py":189
 *     """
 *     # Year
 *     year = doy.get("year", None)             # <<<<<<<<<<<<<<
 *     if not isinstance(year, int):
 *         if year is None:
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_doy, __pyx_mstate_global->__pyx_n_u_year, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_year = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":190
 *     # Year
 *     year = doy.get("year", None)
 *     if not isinstance(year, int):             # <<<<<<<<<<<<<<
 *         if year is None:
 *             # fmt: off
*/
  __pyx_t_2 = PyLong_Check(__pyx_v_year); 
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "cytimes/pddt.py":191
 *     year = doy.get("year", None)
 *     if not isinstance(year, int):
 *         if year is None:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",
*/
    __pyx_t_3 = (__pyx_v_year == Py_None);
    if (__pyx_t_3) {

      /* "cytimes/pddt.py":193
 *         if year is None:
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",             # <<<<<<<<<<<<<<
 *                 "Dictionary must contain 'year' key for day-of-year value.")
 *             # fmt: on
*/
      __pyx_t_4.__pyx_n = 3;
      __pyx_t_4.cls = __pyx_v_cls;
      __pyx_t_4.input_msg = __pyx_mstate_global->__pyx_n_u_iso;
      __pyx_t_4.error_msg = __pyx_mstate_global->__pyx_kp_u_Dictionary_must_contain_year_key_2;
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 193, __pyx_L1_error)

      /* "cytimes/pddt.py":191
 *     year = doy.get("year", None)
 *     if not isinstance(year, int):
 *         if year is None:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",
*/
      goto __pyx_L4;
    }

    /* "cytimes/pddt.py":198
 *         else:
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",             # <<<<<<<<<<<<<<
 *                 "Value for 'year' must be an integer, instead got %s %s."
 *                 % (year, type(year)))
*/
    /*else*/ {

      /* "cytimes/pddt.py":200
 *             errors.raise_argument_error(cls, "iso",
 *                 "Value for 'year' must be an integer, instead got %s %s."
 *                 % (year, type(year)))             # <<<<<<<<<<<<<<
 *             # fmt: on
 * 
*/
      __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_year), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_year))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 200, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Value_for_year_must_be_an_intege;
      __pyx_t_6[1] = __pyx_t_1;
      __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u__8;
      __pyx_t_6[3] = __pyx_t_5;
      __pyx_t_6[4] = __pyx_mstate_global->__pyx_kp_u__2;

      /* "cytimes/pddt.py":199
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",
 *                 "Value for 'year' must be an integer, instead got %s %s."             # <<<<<<<<<<<<<<
 *                 % (year, type(year)))
 *             # fmt: on
*/
      __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, 49 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 199, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "cytimes/pddt.py":198
 *         else:
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",             # <<<<<<<<<<<<<<
 *                 "Value for 'year' must be an integer, instead got %s %s."
 *                 % (year, type(year)))
*/
      __pyx_t_4.__pyx_n = 3;
      __pyx_t_4.cls = __pyx_v_cls;
      __pyx_t_4.input_msg = __pyx_mstate_global->__pyx_n_u_iso;
      __pyx_t_4.error_msg = ((PyObject*)__pyx_t_7);
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 198, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_L4:;

    /* "cytimes/pddt.py":190
 *     # Year
 *     year = doy.get("year", None)
 *     if not isinstance(year, int):             # <<<<<<<<<<<<<<
 *         if year is None:
 *             # fmt: off
*/
  }

  /* "cytimes/pddt.py":204
 * 
 *     # Day-of-year
 *     day_of_year = doy.get("doy", doy.get("day", None))             # <<<<<<<<<<<<<<
 *     if not isinstance(day_of_year, int):
 *         if day_of_year is None:
*/
  __pyx_t_7 = __Pyx_PyDict_GetItemDefault(__pyx_v_doy, __pyx_mstate_global->__pyx_n_u_day, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyDict_GetItemDefault(__pyx_v_doy, __pyx_mstate_global->__pyx_n_u_doy, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_day_of_year = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "cytimes/pddt.py":205
 *     # Day-of-year
 *     day_of_year = doy.get("doy", doy.get("day", None))
 *     if not isinstance(day_of_year, int):             # <<<<<<<<<<<<<<
 *         if day_of_year is None:
 *             # fmt: off
*/
  __pyx_t_3 = PyLong_Check(__pyx_v_day_of_year); 
  __pyx_t_2 = (!__pyx_t_3);
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":206
 *     day_of_year = doy.get("doy", doy.get("day", None))
 *     if not isinstance(day_of_year, int):
 *         if day_of_year is None:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",
*/
    __pyx_t_2 = (__pyx_v_day_of_year == Py_None);
    if (__pyx_t_2) {

      /* "cytimes/pddt.py":208
 *         if day_of_year is None:
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",             # <<<<<<<<<<<<<<
 *                 "Dictionary must contain 'doy' key for day-of-year value.")
 *             # fmt: on
*/
      __pyx_t_4.__pyx_n = 3;
      __pyx_t_4.cls = __pyx_v_cls;
      __pyx_t_4.input_msg = __pyx_mstate_global->__pyx_n_u_iso;
      __pyx_t_4.error_msg = __pyx_mstate_global->__pyx_kp_u_Dictionary_must_contain_doy_key;
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 208, __pyx_L1_error)

      /* "cytimes/pddt.py":206
 *     day_of_year = doy.get("doy", doy.get("day", None))
 *     if not isinstance(day_of_year, int):
 *         if day_of_year is None:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",
*/
      goto __pyx_L6;
    }

    /* "cytimes/pddt.py":213
 *         else:
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",             # <<<<<<<<<<<<<<
 *                 "Value for 'doy' must be an integer, instead got %s %s."
 *                 % (day_of_year, type(day_of_year)))
*/
    /*else*/ {

      /* "cytimes/pddt.py":215
 *             errors.raise_argument_error(cls, "iso",
 *                 "Value for 'doy' must be an integer, instead got %s %s."
 *                 % (day_of_year, type(day_of_year)))             # <<<<<<<<<<<<<<
 *             # fmt: on
 * 
*/
      __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_day_of_year), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 215, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_day_of_year))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 215, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Value_for_doy_must_be_an_integer;
      __pyx_t_6[1] = __pyx_t_5;
      __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u__8;
      __pyx_t_6[3] = __pyx_t_7;
      __pyx_t_6[4] = __pyx_mstate_global->__pyx_kp_u__2;

      /* "cytimes/pddt.py":214
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",
 *                 "Value for 'doy' must be an integer, instead got %s %s."             # <<<<<<<<<<<<<<
 *                 % (day_of_year, type(day_of_year)))
 *             # fmt: on
*/
      __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, 48 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "cytimes/pddt.py":213
 *         else:
 *             # fmt: off
 *             errors.raise_argument_error(cls, "iso",             # <<<<<<<<<<<<<<
 *                 "Value for 'doy' must be an integer, instead got %s %s."
 *                 % (day_of_year, type(day_of_year)))
*/
      __pyx_t_4.__pyx_n = 3;
      __pyx_t_4.cls = __pyx_v_cls;
      __pyx_t_4.input_msg = __pyx_mstate_global->__pyx_n_u_iso;
      __pyx_t_4.error_msg = ((PyObject*)__pyx_t_1);
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_L6:;

    /* "cytimes/pddt.py":205
 *     # Day-of-year
 *     day_of_year = doy.get("doy", doy.get("day", None))
 *     if not isinstance(day_of_year, int):             # <<<<<<<<<<<<<<
 *         if day_of_year is None:
 *             # fmt: off
*/
  }

  /* "cytimes/pddt.py":219
 * 
 *     # Compute microseconds (since Unix Epoch)
 *     _ymd = utils.ymd_fr_doy(year, day_of_year)             # <<<<<<<<<<<<<<
 *     value: cython.longlong = utils.ymd_to_ord(_ymd.year, _ymd.month, _ymd.day)
 *     return (value - utils.EPOCH_DAY) * utils.US_DAY
*/
  __pyx_t_8 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_v_year); if (unlikely((__pyx_t_8 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 219, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyLong_As_int(__pyx_v_day_of_year); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 219, __pyx_L1_error)
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_doy(__pyx_t_8, __pyx_t_9);

  /* "cytimes/pddt.py":220
 *     # Compute microseconds (since Unix Epoch)
 *     _ymd = utils.ymd_fr_doy(year, day_of_year)
 *     value: cython.longlong = utils.ymd_to_ord(_ymd.year, _ymd.month, _ymd.day)             # <<<<<<<<<<<<<<
 *     return (value - utils.EPOCH_DAY) * utils.US_DAY
 * 
*/
  __pyx_v_value = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v__ymd.year, __pyx_v__ymd.month, __pyx_v__ymd.day);

  /* "cytimes/pddt.py":221
 *     _ymd = utils.ymd_fr_doy(year, day_of_year)
 *     value: cython.longlong = utils.ymd_to_ord(_ymd.year, _ymd.month, _ymd.day)
 *     return (value - utils.EPOCH_DAY) * utils.US_DAY             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = ((__pyx_v_value - __pyx_v_7cytimes_5utils_EPOCH_DAY) * __pyx_v_7cytimes_5utils_US_DAY);
  goto __pyx_L0;

  /* "cytimes/pddt.py":179
 * 
 * 
 * @cython.cfunc             # <<<<<<<<<<<<<<
 * @cython.inline(True)
 * def _parse_us_from_doy_dict(cls: object, doy: dict) -> cython.longlong:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.pddt._parse_us_from_doy_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_year);
  __Pyx_XDECREF(__pyx_v_day_of_year);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":243
 *     """
 * 
 *     def __new__(             # <<<<<<<<<<<<<<
 *         cls,
 *         data: object,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt___new__, "A drop-in replacement for Pandas `<'DatetimeIndex'>` with extended parsing,\n        timezone normalization, resolution control, and delta-aware arithmetic.\n\n        `Pddt` behaves like `DatetimeIndex` in all common operations, while adding:\n\n        - Robust datetime parsing (via custom parser).\n        - Nanosecond/microsecond/millisecond/second unit conversion (`as_unit`).\n        - Vectorized calendar operations (year/month/quarter shifting & replacing).\n        - High-performance datetime arithmetic (`add`, `sub`).\n\n        ## Important Note\n        `Pddt` is `datetime64[us]` focused. It will try to retain nanosecond resolution\n        when possible, but will automatically downcast to microsecond resolution\n        if the value exceeds the bounds of `datetime64[ns]`. This behavior applies\n        to all `Pddt` methods.\n\n        :param data `<'Array-Like'>`: An array-like (1-dimensional) data containing datetime information.\n            Such as: `tuple`, `list`, `np.ndarray`, `DatetimeIndex`, `Series`, etc.\n\n        :param freq `<'str/timedelta/BaseOffset/None'>`: The frequency of the 'data'. Defaults to `None`.\n\n            - `<'str'>` A frequency string (e.g. `'D', 'h', 's', 'ms'`), or `'infer'` for auto-detection.\n            - `<'timedelta'>` A datetime.timedelta instance.\n            - `<'BaseOffset'>` A pandas date offset instance.\n\n        :param tz `<'tzinfo/str/None'>`: The optional target timezone. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :param ambiguous `<'str/ndarray[bool]'>`: Specified how ambiguous times should be handled. Defaults to `'raise'`.\n\n            - `'raise'` will raise an `AmbiguousTimeError` if there are ambiguous times.\n            - `'infer'` will attempt to infer fall dst-transition hours based on order.\n            - `'NaT'` will"" yield NaT where there are ambiguous times.\n            - `<'ndarray[bool]'>` where True signifies a DST time, False signifies a non-DST\n                time (note that this flag is only applicable for ambiguous times)\n\n        :param yearfirst `<'bool/None'>`: Parse the first ambiguous Y/M/D value as year. Defaults to `True`.\n\n        :param dayfirst `<'bool/None'>`: Parse the first ambiguous Y/M/D values as day. Defaults to `False`.\n\n        :param as_unit `<'str/None'>`: Convert to specified datetime unit after construction. Defaults to `None`.\n            Supports: `'s'`, `'ms'`, `'us'`, `'ns'`.\n\n        :param copy `<'bool'>`: Whether to make a copy of the 'data'. Defaults to `False`.\n\n        :param name `<'Hashable/None'>`: The name assigned to the index. Defaults to `None`.\n\n        :param cfg `<'Configs/None'>`: The Parser configuration. Defaults to `None`.\n            Only applicable to datetime-string parsing. If `None`, uses the module's default `Configs`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt___new__};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_freq = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_v_ambiguous = 0;
  int __pyx_v_yearfirst;
  int __pyx_v_dayfirst;
  PyObject *__pyx_v_as_unit = 0;
  int __pyx_v_copy;
  PyObject *__pyx_v_name = 0;
  struct __pyx_obj_7cytimes_6parser_Configs *__pyx_v_cfg = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[11] = {0,0,0,0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_data,&__pyx_mstate_global->__pyx_n_u_freq,&__pyx_mstate_global->__pyx_n_u_tz,&__pyx_mstate_global->__pyx_n_u_ambiguous,&__pyx_mstate_global->__pyx_n_u_yearfirst,&__pyx_mstate_global->__pyx_n_u_dayfirst,&__pyx_mstate_global->__pyx_n_u_as_unit,&__pyx_mstate_global->__pyx_n_u_copy,&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_cfg,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 243, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case 11:
        values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 243, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case 10:
        values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 243, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 243, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 243, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 243, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 243, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 243, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 243, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 243, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 243, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 243, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 243, __pyx_L3_error)

      /* "cytimes/pddt.py":246
 *         cls,
 *         data: object,
 *         freq: object | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         ambiguous: object = "raise",
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":247
 *         data: object,
 *         freq: object | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         ambiguous: object = "raise",
 *         yearfirst: bool = True,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_raise)));

      /* "cytimes/pddt.py":251
 *         yearfirst: bool = True,
 *         dayfirst: bool = False,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         copy: bool = False,
 *         name: Hashable | None = None,
*/
      if (!values[7]) values[7] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":253
 *         as_unit: str = None,
 *         copy: bool = False,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *         cfg: Configs = None,
 *     ) -> Self:
*/
      if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":254
 *         copy: bool = False,
 *         name: Hashable | None = None,
 *         cfg: Configs = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """A drop-in replacement for Pandas `<'DatetimeIndex'>` with extended parsing,
*/
      if (!values[10]) values[10] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 11, i); __PYX_ERR(0, 243, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case 11:
        values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 243, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case 10:
        values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 243, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 243, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 243, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 243, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 243, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 243, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 243, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 243, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 243, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 243, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pddt.py":246
 *         cls,
 *         data: object,
 *         freq: object | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         ambiguous: object = "raise",
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":247
 *         data: object,
 *         freq: object | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         ambiguous: object = "raise",
 *         yearfirst: bool = True,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_raise)));

      /* "cytimes/pddt.py":251
 *         yearfirst: bool = True,
 *         dayfirst: bool = False,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         copy: bool = False,
 *         name: Hashable | None = None,
*/
      if (!values[7]) values[7] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":253
 *         as_unit: str = None,
 *         copy: bool = False,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *         cfg: Configs = None,
 *     ) -> Self:
*/
      if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":254
 *         copy: bool = False,
 *         name: Hashable | None = None,
 *         cfg: Configs = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """A drop-in replacement for Pandas `<'DatetimeIndex'>` with extended parsing,
*/
      if (!values[10]) values[10] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_freq = values[2];
    __pyx_v_tz = values[3];
    __pyx_v_ambiguous = values[4];
    if (values[5]) {
      __pyx_v_yearfirst = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_yearfirst == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 249, __pyx_L3_error)
    } else {

      /* "cytimes/pddt.py":249
 *         tz: datetime.tzinfo | str | None = None,
 *         ambiguous: object = "raise",
 *         yearfirst: bool = True,             # <<<<<<<<<<<<<<
 *         dayfirst: bool = False,
 *         as_unit: str = None,
*/
      __pyx_v_yearfirst = ((int)((int)1));
    }
    if (values[6]) {
      __pyx_v_dayfirst = __Pyx_PyObject_IsTrue(values[6]); if (unlikely((__pyx_v_dayfirst == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 250, __pyx_L3_error)
    } else {

      /* "cytimes/pddt.py":250
 *         ambiguous: object = "raise",
 *         yearfirst: bool = True,
 *         dayfirst: bool = False,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         copy: bool = False,
*/
      __pyx_v_dayfirst = ((int)((int)0));
    }
    __pyx_v_as_unit = ((PyObject*)values[7]);
    if (values[8]) {
      __pyx_v_copy = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_copy == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 252, __pyx_L3_error)
    } else {

      /* "cytimes/pddt.py":252
 *         dayfirst: bool = False,
 *         as_unit: str = None,
 *         copy: bool = False,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *         cfg: Configs = None,
*/
      __pyx_v_copy = ((int)((int)0));
    }
    __pyx_v_name = values[9];
    __pyx_v_cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)values[10]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 11, __pyx_nargs); __PYX_ERR(0, 243, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_as_unit), (&PyUnicode_Type), 1, "as_unit", 2))) __PYX_ERR(0, 251, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfg), __pyx_mstate_global->__pyx_ptype_7cytimes_6parser_Configs, 1, "cfg", 0))) __PYX_ERR(0, 254, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt___new__(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_freq, __pyx_v_tz, __pyx_v_ambiguous, __pyx_v_yearfirst, __pyx_v_dayfirst, __pyx_v_as_unit, __pyx_v_copy, __pyx_v_name, __pyx_v_cfg);

  /* "cytimes/pddt.py":243
 *     """
 * 
 *     def __new__(             # <<<<<<<<<<<<<<
 *         cls,
 *         data: object,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_freq, PyObject *__pyx_v_tz, PyObject *__pyx_v_ambiguous, int __pyx_v_yearfirst, int __pyx_v_dayfirst, PyObject *__pyx_v_as_unit, int __pyx_v_copy, PyObject *__pyx_v_name, struct __pyx_obj_7cytimes_6parser_Configs *__pyx_v_cfg) {
  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;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "cytimes/pddt.py":309
 *             Only applicable to datetime-string parsing. If `None`, uses the module's default `Configs`.
 *         """
 *         return cls._new(             # <<<<<<<<<<<<<<
 *             data,
 *             freq=freq,
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_cls;
  __Pyx_INCREF(__pyx_t_2);

  /* "cytimes/pddt.py":314
 *             tz=tz,
 *             ambiguous=ambiguous,
 *             yearfirst=yearfirst,             # <<<<<<<<<<<<<<
 *             dayfirst=dayfirst,
 *             as_unit=as_unit,
*/
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_yearfirst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cytimes/pddt.py":315
 *             ambiguous=ambiguous,
 *             yearfirst=yearfirst,
 *             dayfirst=dayfirst,             # <<<<<<<<<<<<<<
 *             as_unit=as_unit,
 *             copy=copy,
*/
  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_dayfirst); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "cytimes/pddt.py":317
 *             dayfirst=dayfirst,
 *             as_unit=as_unit,
 *             copy=copy,             # <<<<<<<<<<<<<<
 *             name=name,
 *             cfg=cfg,
*/
  __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "cytimes/pddt.py":319
 *             copy=copy,
 *             name=name,
 *             cfg=cfg,             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 9 : 0)] = {__pyx_t_2, __pyx_v_data};
    __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_freq, __pyx_v_freq, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 309, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_7, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 309, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ambiguous, __pyx_v_ambiguous, __pyx_t_7, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 309, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_yearfirst, __pyx_t_3, __pyx_t_7, __pyx_callargs+2, 3) < (0)) __PYX_ERR(0, 309, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dayfirst, __pyx_t_4, __pyx_t_7, __pyx_callargs+2, 4) < (0)) __PYX_ERR(0, 309, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_7, __pyx_callargs+2, 5) < (0)) __PYX_ERR(0, 309, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_copy, __pyx_t_5, __pyx_t_7, __pyx_callargs+2, 6) < (0)) __PYX_ERR(0, 309, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_7, __pyx_callargs+2, 7) < (0)) __PYX_ERR(0, 309, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_cfg, ((PyObject *)__pyx_v_cfg), __pyx_t_7, __pyx_callargs+2, 8) < (0)) __PYX_ERR(0, 309, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":243
 *     """
 * 
 *     def __new__(             # <<<<<<<<<<<<<<
 *         cls,
 *         data: object,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":323
 * 
 *     # Constructor --------------------------------------------------------------------------
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _new(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_3_new(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_2_new, "(internal) Create a new `Pddt` instance.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_3_new = {"_new", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_3_new, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_2_new};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_3_new(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_freq = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_v_ambiguous = 0;
  int __pyx_v_yearfirst;
  int __pyx_v_dayfirst;
  PyObject *__pyx_v_as_unit = 0;
  int __pyx_v_copy;
  PyObject *__pyx_v_name = 0;
  struct __pyx_obj_7cytimes_6parser_Configs *__pyx_v_cfg = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[11] = {0,0,0,0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_new (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_data,&__pyx_mstate_global->__pyx_n_u_freq,&__pyx_mstate_global->__pyx_n_u_tz,&__pyx_mstate_global->__pyx_n_u_ambiguous,&__pyx_mstate_global->__pyx_n_u_yearfirst,&__pyx_mstate_global->__pyx_n_u_dayfirst,&__pyx_mstate_global->__pyx_n_u_as_unit,&__pyx_mstate_global->__pyx_n_u_copy,&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_cfg,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 323, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case 11:
        values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 323, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case 10:
        values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 323, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 323, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 323, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 323, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 323, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 323, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 323, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 323, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 323, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 323, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_new", 0) < (0)) __PYX_ERR(0, 323, __pyx_L3_error)

      /* "cytimes/pddt.py":327
 *         cls,
 *         data: object,
 *         freq: object | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         ambiguous: object = "infer",
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":328
 *         data: object,
 *         freq: object | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         ambiguous: object = "infer",
 *         yearfirst: bool = True,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_infer)));

      /* "cytimes/pddt.py":332
 *         yearfirst: bool = True,
 *         dayfirst: bool = False,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         copy: bool = False,
 *         name: Hashable | None = None,
*/
      if (!values[7]) values[7] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":334
 *         as_unit: str = None,
 *         copy: bool = False,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *         cfg: Configs = None,
 *     ) -> Self:
*/
      if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":335
 *         copy: bool = False,
 *         name: Hashable | None = None,
 *         cfg: Configs = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """(internal) Create a new `Pddt` instance."""
*/
      if (!values[10]) values[10] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_new", 0, 2, 11, i); __PYX_ERR(0, 323, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case 11:
        values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 323, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case 10:
        values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 323, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 323, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 323, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 323, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 323, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 323, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 323, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 323, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 323, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 323, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pddt.py":327
 *         cls,
 *         data: object,
 *         freq: object | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         ambiguous: object = "infer",
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":328
 *         data: object,
 *         freq: object | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         ambiguous: object = "infer",
 *         yearfirst: bool = True,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_infer)));

      /* "cytimes/pddt.py":332
 *         yearfirst: bool = True,
 *         dayfirst: bool = False,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         copy: bool = False,
 *         name: Hashable | None = None,
*/
      if (!values[7]) values[7] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":334
 *         as_unit: str = None,
 *         copy: bool = False,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *         cfg: Configs = None,
 *     ) -> Self:
*/
      if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":335
 *         copy: bool = False,
 *         name: Hashable | None = None,
 *         cfg: Configs = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """(internal) Create a new `Pddt` instance."""
*/
      if (!values[10]) values[10] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_freq = values[2];
    __pyx_v_tz = values[3];
    __pyx_v_ambiguous = values[4];
    if (values[5]) {
      __pyx_v_yearfirst = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_yearfirst == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 330, __pyx_L3_error)
    } else {

      /* "cytimes/pddt.py":330
 *         tz: datetime.tzinfo | str | None = None,
 *         ambiguous: object = "infer",
 *         yearfirst: bool = True,             # <<<<<<<<<<<<<<
 *         dayfirst: bool = False,
 *         as_unit: str = None,
*/
      __pyx_v_yearfirst = ((int)((int)1));
    }
    if (values[6]) {
      __pyx_v_dayfirst = __Pyx_PyObject_IsTrue(values[6]); if (unlikely((__pyx_v_dayfirst == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 331, __pyx_L3_error)
    } else {

      /* "cytimes/pddt.py":331
 *         ambiguous: object = "infer",
 *         yearfirst: bool = True,
 *         dayfirst: bool = False,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         copy: bool = False,
*/
      __pyx_v_dayfirst = ((int)((int)0));
    }
    __pyx_v_as_unit = ((PyObject*)values[7]);
    if (values[8]) {
      __pyx_v_copy = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_copy == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 333, __pyx_L3_error)
    } else {

      /* "cytimes/pddt.py":333
 *         dayfirst: bool = False,
 *         as_unit: str = None,
 *         copy: bool = False,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *         cfg: Configs = None,
*/
      __pyx_v_copy = ((int)((int)0));
    }
    __pyx_v_name = values[9];
    __pyx_v_cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)values[10]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_new", 0, 2, 11, __pyx_nargs); __PYX_ERR(0, 323, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt._new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_as_unit), (&PyUnicode_Type), 1, "as_unit", 2))) __PYX_ERR(0, 332, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfg), __pyx_mstate_global->__pyx_ptype_7cytimes_6parser_Configs, 1, "cfg", 0))) __PYX_ERR(0, 335, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_2_new(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_freq, __pyx_v_tz, __pyx_v_ambiguous, __pyx_v_yearfirst, __pyx_v_dayfirst, __pyx_v_as_unit, __pyx_v_copy, __pyx_v_name, __pyx_v_cfg);

  /* "cytimes/pddt.py":323
 * 
 *     # Constructor --------------------------------------------------------------------------
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _new(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_2_new(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_freq, PyObject *__pyx_v_tz, PyObject *__pyx_v_ambiguous, int __pyx_v_yearfirst, int __pyx_v_dayfirst, PyObject *__pyx_v_as_unit, int __pyx_v_copy, PyObject *__pyx_v_name, struct __pyx_obj_7cytimes_6parser_Configs *__pyx_v_cfg) {
  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;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_new", 0);
  __Pyx_INCREF(__pyx_v_freq);
  __Pyx_INCREF(__pyx_v_tz);

  /* "cytimes/pddt.py":339
 *         """(internal) Create a new `Pddt` instance."""
 *         # Parse timezone
 *         tz = utils.tz_parse(tz)             # <<<<<<<<<<<<<<
 * 
 *         # Adjust frequency
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":342
 * 
 *         # Adjust frequency
 *         if freq is None:             # <<<<<<<<<<<<<<
 *             freq = _no_default
 *         else:
*/
  __pyx_t_2 = (__pyx_v_freq == Py_None);
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":343
 *         # Adjust frequency
 *         if freq is None:
 *             freq = _no_default             # <<<<<<<<<<<<<<
 *         else:
 *             freq = _parse_freq(freq)
*/
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_no_default); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_freq, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytimes/pddt.py":342
 * 
 *         # Adjust frequency
 *         if freq is None:             # <<<<<<<<<<<<<<
 *             freq = _no_default
 *         else:
*/
    goto __pyx_L3;
  }

  /* "cytimes/pddt.py":345
 *             freq = _no_default
 *         else:
 *             freq = _parse_freq(freq)             # <<<<<<<<<<<<<<
 * 
 *         # Base approach: datetime64[ns]
*/
  /*else*/ {
    __pyx_t_1 = __pyx_f_7cytimes_4pddt__parse_freq(__pyx_v_freq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_freq, __pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "cytimes/pddt.py":348
 * 
 *         # Base approach: datetime64[ns]
 *         try:             # <<<<<<<<<<<<<<
 *             return cls._new_native(
 *                 data,
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "cytimes/pddt.py":349
 *         # Base approach: datetime64[ns]
 *         try:
 *             return cls._new_native(             # <<<<<<<<<<<<<<
 *                 data,
 *                 freq=freq,
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = __pyx_v_cls;
      __Pyx_INCREF(__pyx_t_6);

      /* "cytimes/pddt.py":354
 *                 tz=tz,
 *                 ambiguous=ambiguous,
 *                 yearfirst=yearfirst,             # <<<<<<<<<<<<<<
 *                 dayfirst=dayfirst,
 *                 as_unit=as_unit,
*/
      __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_yearfirst); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 354, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_7);

      /* "cytimes/pddt.py":355
 *                 ambiguous=ambiguous,
 *                 yearfirst=yearfirst,
 *                 dayfirst=dayfirst,             # <<<<<<<<<<<<<<
 *                 as_unit=as_unit,
 *                 copy=copy,
*/
      __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_v_dayfirst); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 355, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_8);

      /* "cytimes/pddt.py":357
 *                 dayfirst=dayfirst,
 *                 as_unit=as_unit,
 *                 copy=copy,             # <<<<<<<<<<<<<<
 *                 name=name,
 *             )
*/
      __pyx_t_9 = __Pyx_PyBool_FromLong(__pyx_v_copy); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 357, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_9);

      /* "cytimes/pddt.py":358
 *                 as_unit=as_unit,
 *                 copy=copy,
 *                 name=name,             # <<<<<<<<<<<<<<
 *             )
 * 
*/
      __pyx_t_10 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 8 : 0)] = {__pyx_t_6, __pyx_v_data};
        __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 349, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_freq, __pyx_v_freq, __pyx_t_11, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 349, __pyx_L4_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_11, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 349, __pyx_L4_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ambiguous, __pyx_v_ambiguous, __pyx_t_11, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 349, __pyx_L4_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_yearfirst, __pyx_t_7, __pyx_t_11, __pyx_callargs+2, 3) < (0)) __PYX_ERR(0, 349, __pyx_L4_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dayfirst, __pyx_t_8, __pyx_t_11, __pyx_callargs+2, 4) < (0)) __PYX_ERR(0, 349, __pyx_L4_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_11, __pyx_callargs+2, 5) < (0)) __PYX_ERR(0, 349, __pyx_L4_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_copy, __pyx_t_9, __pyx_t_11, __pyx_callargs+2, 6) < (0)) __PYX_ERR(0, 349, __pyx_L4_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_11, __pyx_callargs+2, 7) < (0)) __PYX_ERR(0, 349, __pyx_L4_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new_native, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11);
        __Pyx_XDECREF(__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;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L8_try_return;

      /* "cytimes/pddt.py":348
 * 
 *         # Base approach: datetime64[ns]
 *         try:             # <<<<<<<<<<<<<<
 *             return cls._new_native(
 *                 data,
*/
    }
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cytimes/pddt.py":363
 *         # Out of bounds / Parsing / Overflow -> Fallback: cytimes parser
 *         # datetime[us] + Optional Timezone
 *         except (errors.OutOfBoundsError, errors.ParserFailedError):             # <<<<<<<<<<<<<<
 *             return cls._new_parser(
 *                 data,
*/
    __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_11, &__pyx_t_9);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 363, __pyx_L6_except_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_OutOfBoundsError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 363, __pyx_L6_except_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 363, __pyx_L6_except_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ParserFailedError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 363, __pyx_L6_except_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_12 = __Pyx_PyErr_GivenExceptionMatches2(__pyx_t_1, __pyx_t_7, __pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_ErrRestore(__pyx_t_1, __pyx_t_11, __pyx_t_9);
    __pyx_t_1 = 0; __pyx_t_11 = 0; __pyx_t_9 = 0;
    if (__pyx_t_12) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt._new", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_11, &__pyx_t_1) < 0) __PYX_ERR(0, 363, __pyx_L6_except_error)
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_1);

      /* "cytimes/pddt.py":364
 *         # datetime[us] + Optional Timezone
 *         except (errors.OutOfBoundsError, errors.ParserFailedError):
 *             return cls._new_parser(             # <<<<<<<<<<<<<<
 *                 data,
 *                 freq=freq,
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_7 = __pyx_v_cls;
      __Pyx_INCREF(__pyx_t_7);

      /* "cytimes/pddt.py":369
 *                 tz=tz,
 *                 ambiguous=ambiguous,
 *                 yearfirst=yearfirst,             # <<<<<<<<<<<<<<
 *                 dayfirst=dayfirst,
 *                 as_unit=as_unit,
*/
      __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_v_yearfirst); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 369, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_8);

      /* "cytimes/pddt.py":370
 *                 ambiguous=ambiguous,
 *                 yearfirst=yearfirst,
 *                 dayfirst=dayfirst,             # <<<<<<<<<<<<<<
 *                 as_unit=as_unit,
 *                 copy=copy,
*/
      __pyx_t_13 = __Pyx_PyBool_FromLong(__pyx_v_dayfirst); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 370, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_13);

      /* "cytimes/pddt.py":372
 *                 dayfirst=dayfirst,
 *                 as_unit=as_unit,
 *                 copy=copy,             # <<<<<<<<<<<<<<
 *                 name=name,
 *                 cfg=cfg,
*/
      __pyx_t_14 = __Pyx_PyBool_FromLong(__pyx_v_copy); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 372, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_14);

      /* "cytimes/pddt.py":374
 *                 copy=copy,
 *                 name=name,
 *                 cfg=cfg,             # <<<<<<<<<<<<<<
 *             )
 * 
*/
      __pyx_t_10 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 9 : 0)] = {__pyx_t_7, __pyx_v_data};
        __pyx_t_15 = __Pyx_MakeVectorcallBuilderKwds(9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 364, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_15);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_freq, __pyx_v_freq, __pyx_t_15, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 364, __pyx_L6_except_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_15, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 364, __pyx_L6_except_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ambiguous, __pyx_v_ambiguous, __pyx_t_15, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 364, __pyx_L6_except_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_yearfirst, __pyx_t_8, __pyx_t_15, __pyx_callargs+2, 3) < (0)) __PYX_ERR(0, 364, __pyx_L6_except_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dayfirst, __pyx_t_13, __pyx_t_15, __pyx_callargs+2, 4) < (0)) __PYX_ERR(0, 364, __pyx_L6_except_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_15, __pyx_callargs+2, 5) < (0)) __PYX_ERR(0, 364, __pyx_L6_except_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_copy, __pyx_t_14, __pyx_t_15, __pyx_callargs+2, 6) < (0)) __PYX_ERR(0, 364, __pyx_L6_except_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_15, __pyx_callargs+2, 7) < (0)) __PYX_ERR(0, 364, __pyx_L6_except_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_cfg, ((PyObject *)__pyx_v_cfg), __pyx_t_15, __pyx_callargs+2, 8) < (0)) __PYX_ERR(0, 364, __pyx_L6_except_error)
        __pyx_t_6 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new_parser, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_15);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 364, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_6);
      }
      __pyx_r = __pyx_t_6;
      __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L7_except_return;
    }

    /* "cytimes/pddt.py":379
 *         # Ambiguous Time -> Fallback: cytimes parser
 *         # datetime[us] + Optional Timezone
 *         except errors.AmbiguousTimeError:             # <<<<<<<<<<<<<<
 *             if ambiguous == "raise":
 *                 raise
*/
    __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_11, &__pyx_t_9);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 379, __pyx_L6_except_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_AmbiguousTimeError); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 379, __pyx_L6_except_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_12 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_15);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_ErrRestore(__pyx_t_1, __pyx_t_11, __pyx_t_9);
    __pyx_t_1 = 0; __pyx_t_11 = 0; __pyx_t_9 = 0;
    if (__pyx_t_12) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt._new", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_11, &__pyx_t_1) < 0) __PYX_ERR(0, 379, __pyx_L6_except_error)
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_1);

      /* "cytimes/pddt.py":380
 *         # datetime[us] + Optional Timezone
 *         except errors.AmbiguousTimeError:
 *             if ambiguous == "raise":             # <<<<<<<<<<<<<<
 *                 raise
 *             return cls._new_parser(
*/
      __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_ambiguous, __pyx_mstate_global->__pyx_n_u_raise, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 380, __pyx_L6_except_error)
      if (unlikely(__pyx_t_2)) {

        /* "cytimes/pddt.py":381
 *         except errors.AmbiguousTimeError:
 *             if ambiguous == "raise":
 *                 raise             # <<<<<<<<<<<<<<
 *             return cls._new_parser(
 *                 data,
*/
        __Pyx_GIVEREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_ErrRestoreWithState(__pyx_t_9, __pyx_t_11, __pyx_t_1);
        __pyx_t_9 = 0;  __pyx_t_11 = 0;  __pyx_t_1 = 0; 
        __PYX_ERR(0, 381, __pyx_L6_except_error)

        /* "cytimes/pddt.py":380
 *         # datetime[us] + Optional Timezone
 *         except errors.AmbiguousTimeError:
 *             if ambiguous == "raise":             # <<<<<<<<<<<<<<
 *                 raise
 *             return cls._new_parser(
*/
      }

      /* "cytimes/pddt.py":382
 *             if ambiguous == "raise":
 *                 raise
 *             return cls._new_parser(             # <<<<<<<<<<<<<<
 *                 data,
 *                 freq=freq,
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = __pyx_v_cls;
      __Pyx_INCREF(__pyx_t_6);

      /* "cytimes/pddt.py":387
 *                 tz=tz,
 *                 ambiguous=ambiguous,
 *                 yearfirst=yearfirst,             # <<<<<<<<<<<<<<
 *                 dayfirst=dayfirst,
 *                 as_unit=as_unit,
*/
      __pyx_t_14 = __Pyx_PyBool_FromLong(__pyx_v_yearfirst); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 387, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_14);

      /* "cytimes/pddt.py":388
 *                 ambiguous=ambiguous,
 *                 yearfirst=yearfirst,
 *                 dayfirst=dayfirst,             # <<<<<<<<<<<<<<
 *                 as_unit=as_unit,
 *                 copy=copy,
*/
      __pyx_t_13 = __Pyx_PyBool_FromLong(__pyx_v_dayfirst); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 388, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_13);

      /* "cytimes/pddt.py":390
 *                 dayfirst=dayfirst,
 *                 as_unit=as_unit,
 *                 copy=copy,             # <<<<<<<<<<<<<<
 *                 name=name,
 *                 cfg=cfg,
*/
      __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_v_copy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 390, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_8);

      /* "cytimes/pddt.py":392
 *                 copy=copy,
 *                 name=name,
 *                 cfg=cfg,             # <<<<<<<<<<<<<<
 *             )
 * 
*/
      __pyx_t_10 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 9 : 0)] = {__pyx_t_6, __pyx_v_data};
        __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 382, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_freq, __pyx_v_freq, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 382, __pyx_L6_except_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_7, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 382, __pyx_L6_except_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ambiguous, __pyx_v_ambiguous, __pyx_t_7, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 382, __pyx_L6_except_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_yearfirst, __pyx_t_14, __pyx_t_7, __pyx_callargs+2, 3) < (0)) __PYX_ERR(0, 382, __pyx_L6_except_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dayfirst, __pyx_t_13, __pyx_t_7, __pyx_callargs+2, 4) < (0)) __PYX_ERR(0, 382, __pyx_L6_except_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_7, __pyx_callargs+2, 5) < (0)) __PYX_ERR(0, 382, __pyx_L6_except_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_copy, __pyx_t_8, __pyx_t_7, __pyx_callargs+2, 6) < (0)) __PYX_ERR(0, 382, __pyx_L6_except_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_7, __pyx_callargs+2, 7) < (0)) __PYX_ERR(0, 382, __pyx_L6_except_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_cfg, ((PyObject *)__pyx_v_cfg), __pyx_t_7, __pyx_callargs+2, 8) < (0)) __PYX_ERR(0, 382, __pyx_L6_except_error)
        __pyx_t_15 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new_parser, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 382, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_15);
      }
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L7_except_return;
    }

    /* "cytimes/pddt.py":396
 * 
 *         # Handle mixed timezones: datetime64[ns] + UTC
 *         except errors.MixedTimezoneError:             # <<<<<<<<<<<<<<
 *             return cls._new_native(
 *                 data,
*/
    __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_11, &__pyx_t_9);
    __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 396, __pyx_L6_except_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_MixedTimezoneError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 396, __pyx_L6_except_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __pyx_t_12 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_7);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_ErrRestore(__pyx_t_1, __pyx_t_11, __pyx_t_9);
    __pyx_t_1 = 0; __pyx_t_11 = 0; __pyx_t_9 = 0;
    if (__pyx_t_12) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt._new", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_11, &__pyx_t_1) < 0) __PYX_ERR(0, 396, __pyx_L6_except_error)
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_1);

      /* "cytimes/pddt.py":397
 *         # Handle mixed timezones: datetime64[ns] + UTC
 *         except errors.MixedTimezoneError:
 *             return cls._new_native(             # <<<<<<<<<<<<<<
 *                 data,
 *                 freq=freq,
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_15 = __pyx_v_cls;
      __Pyx_INCREF(__pyx_t_15);

      /* "cytimes/pddt.py":402
 *                 tz=utils.UTC,  # UTC timezone
 *                 ambiguous=ambiguous,
 *                 yearfirst=yearfirst,             # <<<<<<<<<<<<<<
 *                 dayfirst=dayfirst,
 *                 as_unit=as_unit,
*/
      __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_v_yearfirst); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 402, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_8);

      /* "cytimes/pddt.py":403
 *                 ambiguous=ambiguous,
 *                 yearfirst=yearfirst,
 *                 dayfirst=dayfirst,             # <<<<<<<<<<<<<<
 *                 as_unit=as_unit,
 *                 copy=copy,
*/
      __pyx_t_13 = __Pyx_PyBool_FromLong(__pyx_v_dayfirst); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 403, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_13);

      /* "cytimes/pddt.py":405
 *                 dayfirst=dayfirst,
 *                 as_unit=as_unit,
 *                 copy=copy,             # <<<<<<<<<<<<<<
 *                 name=name,
 *             )
*/
      __pyx_t_14 = __Pyx_PyBool_FromLong(__pyx_v_copy); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 405, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_14);

      /* "cytimes/pddt.py":406
 *                 as_unit=as_unit,
 *                 copy=copy,
 *                 name=name,             # <<<<<<<<<<<<<<
 *             )
 * 
*/
      __pyx_t_10 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 8 : 0)] = {__pyx_t_15, __pyx_v_data};
        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 397, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_freq, __pyx_v_freq, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 397, __pyx_L6_except_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, ((PyObject *)__pyx_v_7cytimes_5utils_UTC), __pyx_t_6, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 397, __pyx_L6_except_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ambiguous, __pyx_v_ambiguous, __pyx_t_6, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 397, __pyx_L6_except_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_yearfirst, __pyx_t_8, __pyx_t_6, __pyx_callargs+2, 3) < (0)) __PYX_ERR(0, 397, __pyx_L6_except_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dayfirst, __pyx_t_13, __pyx_t_6, __pyx_callargs+2, 4) < (0)) __PYX_ERR(0, 397, __pyx_L6_except_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_6, __pyx_callargs+2, 5) < (0)) __PYX_ERR(0, 397, __pyx_L6_except_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_copy, __pyx_t_14, __pyx_t_6, __pyx_callargs+2, 6) < (0)) __PYX_ERR(0, 397, __pyx_L6_except_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_6, __pyx_callargs+2, 7) < (0)) __PYX_ERR(0, 397, __pyx_L6_except_error)
        __pyx_t_7 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new_native, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 397, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_7);
      }
      __pyx_r = __pyx_t_7;
      __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L7_except_return;
    }
    goto __pyx_L6_except_error;

    /* "cytimes/pddt.py":348
 * 
 *         # Base approach: datetime64[ns]
 *         try:             # <<<<<<<<<<<<<<
 *             return cls._new_native(
 *                 data,
*/
    __pyx_L6_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_L8_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_L7_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;
  }

  /* "cytimes/pddt.py":323
 * 
 *     # Constructor --------------------------------------------------------------------------
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _new(
 *         cls,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("cytimes.pddt.Pddt._new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_freq);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":409
 *             )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _new_native(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_5_new_native(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_4_new_native, "(internal) Create a new `Pddt` instance using native Pandas `DatetimeIndex`.\n\n        This method attempts to create a `Pddt` instance using Pandas `DatetimeIndex`.\n        If any exceptions related to datetime bounds, parsing, or timezone ambiguities\n        occur, they are caught and re-raised as `Pddt` specific exceptions.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_5_new_native = {"_new_native", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_5_new_native, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_4_new_native};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_5_new_native(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_freq = 0;
  PyDateTime_TZInfo *__pyx_v_tz = 0;
  PyObject *__pyx_v_ambiguous = 0;
  int __pyx_v_yearfirst;
  int __pyx_v_dayfirst;
  PyObject *__pyx_v_as_unit = 0;
  int __pyx_v_copy;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_new_native (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_data,&__pyx_mstate_global->__pyx_n_u_freq,&__pyx_mstate_global->__pyx_n_u_tz,&__pyx_mstate_global->__pyx_n_u_ambiguous,&__pyx_mstate_global->__pyx_n_u_yearfirst,&__pyx_mstate_global->__pyx_n_u_dayfirst,&__pyx_mstate_global->__pyx_n_u_as_unit,&__pyx_mstate_global->__pyx_n_u_copy,&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 409, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case 10:
        values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 409, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 409, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 409, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 409, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 409, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 409, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 409, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 409, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 409, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 409, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_new_native", 0) < (0)) __PYX_ERR(0, 409, __pyx_L3_error)

      /* "cytimes/pddt.py":413
 *         cls,
 *         data: object,
 *         freq: object | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo = None,
 *         ambiguous: object = "infer",
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":414
 *         data: object,
 *         freq: object | None = None,
 *         tz: datetime.tzinfo = None,             # <<<<<<<<<<<<<<
 *         ambiguous: object = "infer",
 *         yearfirst: bool = True,
*/
      if (!values[3]) values[3] = __Pyx_NewRef((PyObject *)((PyDateTime_TZInfo *)Py_None));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_infer)));

      /* "cytimes/pddt.py":418
 *         yearfirst: bool = True,
 *         dayfirst: bool = False,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         copy: bool = False,
 *         name: Hashable | None = None,
*/
      if (!values[7]) values[7] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":420
 *         as_unit: str = None,
 *         copy: bool = False,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """(internal) Create a new `Pddt` instance using native Pandas `DatetimeIndex`.
*/
      if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_new_native", 0, 2, 10, i); __PYX_ERR(0, 409, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case 10:
        values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 409, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 409, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 409, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 409, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 409, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 409, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 409, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 409, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 409, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 409, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pddt.py":413
 *         cls,
 *         data: object,
 *         freq: object | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo = None,
 *         ambiguous: object = "infer",
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":414
 *         data: object,
 *         freq: object | None = None,
 *         tz: datetime.tzinfo = None,             # <<<<<<<<<<<<<<
 *         ambiguous: object = "infer",
 *         yearfirst: bool = True,
*/
      if (!values[3]) values[3] = __Pyx_NewRef((PyObject *)((PyDateTime_TZInfo *)Py_None));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_infer)));

      /* "cytimes/pddt.py":418
 *         yearfirst: bool = True,
 *         dayfirst: bool = False,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         copy: bool = False,
 *         name: Hashable | None = None,
*/
      if (!values[7]) values[7] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":420
 *         as_unit: str = None,
 *         copy: bool = False,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """(internal) Create a new `Pddt` instance using native Pandas `DatetimeIndex`.
*/
      if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_freq = values[2];
    __pyx_v_tz = ((PyDateTime_TZInfo *)values[3]);
    __pyx_v_ambiguous = values[4];
    if (values[5]) {
      __pyx_v_yearfirst = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_yearfirst == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 416, __pyx_L3_error)
    } else {

      /* "cytimes/pddt.py":416
 *         tz: datetime.tzinfo = None,
 *         ambiguous: object = "infer",
 *         yearfirst: bool = True,             # <<<<<<<<<<<<<<
 *         dayfirst: bool = False,
 *         as_unit: str = None,
*/
      __pyx_v_yearfirst = ((int)((int)1));
    }
    if (values[6]) {
      __pyx_v_dayfirst = __Pyx_PyObject_IsTrue(values[6]); if (unlikely((__pyx_v_dayfirst == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 417, __pyx_L3_error)
    } else {

      /* "cytimes/pddt.py":417
 *         ambiguous: object = "infer",
 *         yearfirst: bool = True,
 *         dayfirst: bool = False,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         copy: bool = False,
*/
      __pyx_v_dayfirst = ((int)((int)0));
    }
    __pyx_v_as_unit = ((PyObject*)values[7]);
    if (values[8]) {
      __pyx_v_copy = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_copy == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 419, __pyx_L3_error)
    } else {

      /* "cytimes/pddt.py":419
 *         dayfirst: bool = False,
 *         as_unit: str = None,
 *         copy: bool = False,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      __pyx_v_copy = ((int)((int)0));
    }
    __pyx_v_name = values[9];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_new_native", 0, 2, 10, __pyx_nargs); __PYX_ERR(0, 409, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt._new_native", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tz), __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_tzinfo, 1, "tz", 0))) __PYX_ERR(0, 414, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_as_unit), (&PyUnicode_Type), 1, "as_unit", 2))) __PYX_ERR(0, 418, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_4_new_native(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_freq, __pyx_v_tz, __pyx_v_ambiguous, __pyx_v_yearfirst, __pyx_v_dayfirst, __pyx_v_as_unit, __pyx_v_copy, __pyx_v_name);

  /* "cytimes/pddt.py":409
 *             )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _new_native(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_4_new_native(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_freq, PyDateTime_TZInfo *__pyx_v_tz, PyObject *__pyx_v_ambiguous, int __pyx_v_yearfirst, int __pyx_v_dayfirst, PyObject *__pyx_v_as_unit, int __pyx_v_copy, PyObject *__pyx_v_name) {
  PyObject *__pyx_v_pt = NULL;
  PyObject *__pyx_v_err = NULL;
  PyObject *__pyx_v_msg = 0;
  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_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  size_t __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_t_15;
  char const *__pyx_t_16;
  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;
  char const *__pyx_t_23;
  char const *__pyx_t_24;
  char const *__pyx_t_25;
  char const *__pyx_t_26;
  char const *__pyx_t_27;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_new_native", 0);

  /* "cytimes/pddt.py":428
 *         occur, they are caught and re-raised as `Pddt` specific exceptions.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             pt = DatetimeIndex.__new__(
 *                 cls,
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "cytimes/pddt.py":429
 *         """
 *         try:
 *             pt = DatetimeIndex.__new__(             # <<<<<<<<<<<<<<
 *                 cls,
 *                 data=data,
*/
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DatetimeIndex); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 429, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_new_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 429, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cytimes/pddt.py":433
 *                 data=data,
 *                 freq=freq,
 *                 tz=_no_default if tz is None else tz,             # <<<<<<<<<<<<<<
 *                 ambiguous=ambiguous,
 *                 dayfirst=dayfirst,
*/
      __pyx_t_8 = (((PyObject *)__pyx_v_tz) == Py_None);
      if (__pyx_t_8) {
        __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_no_default); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 433, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_6 = __pyx_t_9;
        __pyx_t_9 = 0;
      } else {
        __Pyx_INCREF((PyObject *)__pyx_v_tz);
        __pyx_t_6 = ((PyObject *)__pyx_v_tz);
      }

      /* "cytimes/pddt.py":435
 *                 tz=_no_default if tz is None else tz,
 *                 ambiguous=ambiguous,
 *                 dayfirst=dayfirst,             # <<<<<<<<<<<<<<
 *                 yearfirst=yearfirst,
 *                 dtype=None,
*/
      __pyx_t_9 = __Pyx_PyBool_FromLong(__pyx_v_dayfirst); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 435, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_9);

      /* "cytimes/pddt.py":436
 *                 ambiguous=ambiguous,
 *                 dayfirst=dayfirst,
 *                 yearfirst=yearfirst,             # <<<<<<<<<<<<<<
 *                 dtype=None,
 *                 copy=copy,
*/
      __pyx_t_10 = __Pyx_PyBool_FromLong(__pyx_v_yearfirst); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 436, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_10);

      /* "cytimes/pddt.py":438
 *                 yearfirst=yearfirst,
 *                 dtype=None,
 *                 copy=copy,             # <<<<<<<<<<<<<<
 *                 name=name,
 *             )
*/
      __pyx_t_11 = __Pyx_PyBool_FromLong(__pyx_v_copy); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 438, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_11);

      /* "cytimes/pddt.py":439
 *                 dtype=None,
 *                 copy=copy,
 *                 name=name,             # <<<<<<<<<<<<<<
 *             )
 *         except errors.PdOutOfBoundsDatetime as err:
*/
      __pyx_t_12 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
        __pyx_t_12 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 9 : 0)] = {__pyx_t_5, __pyx_v_cls};
        __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 429, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_13);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_data, __pyx_v_data, __pyx_t_13, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 429, __pyx_L3_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_freq, __pyx_v_freq, __pyx_t_13, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 429, __pyx_L3_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_6, __pyx_t_13, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 429, __pyx_L3_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ambiguous, __pyx_v_ambiguous, __pyx_t_13, __pyx_callargs+2, 3) < (0)) __PYX_ERR(0, 429, __pyx_L3_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dayfirst, __pyx_t_9, __pyx_t_13, __pyx_callargs+2, 4) < (0)) __PYX_ERR(0, 429, __pyx_L3_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_yearfirst, __pyx_t_10, __pyx_t_13, __pyx_callargs+2, 5) < (0)) __PYX_ERR(0, 429, __pyx_L3_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, Py_None, __pyx_t_13, __pyx_callargs+2, 6) < (0)) __PYX_ERR(0, 429, __pyx_L3_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_copy, __pyx_t_11, __pyx_t_13, __pyx_callargs+2, 7) < (0)) __PYX_ERR(0, 429, __pyx_L3_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_13, __pyx_callargs+2, 8) < (0)) __PYX_ERR(0, 429, __pyx_L3_error)
        __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 429, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_v_pt = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "cytimes/pddt.py":428
 *         occur, they are caught and re-raised as `Pddt` specific exceptions.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             pt = DatetimeIndex.__new__(
 *                 cls,
*/
    }
    __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_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __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;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cytimes/pddt.py":441
 *                 name=name,
 *             )
 *         except errors.PdOutOfBoundsDatetime as err:             # <<<<<<<<<<<<<<
 *             raise errors.OutOfBoundsError(err) from err
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:
*/
    __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_7, &__pyx_t_13);
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 441, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_PdOutOfBoundsDatetime); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 441, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_14 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_10);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_ErrRestore(__pyx_t_4, __pyx_t_7, __pyx_t_13);
    __pyx_t_4 = 0; __pyx_t_7 = 0; __pyx_t_13 = 0;
    if (__pyx_t_14) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt._new_native", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_7, &__pyx_t_4) < 0) __PYX_ERR(0, 441, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_v_err = __pyx_t_7;
      /*try:*/ {

        /* "cytimes/pddt.py":442
 *             )
 *         except errors.PdOutOfBoundsDatetime as err:
 *             raise errors.OutOfBoundsError(err) from err             # <<<<<<<<<<<<<<
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:
 *             raise errors.AmbiguousTimeError(err) from err
*/
        __pyx_t_11 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 442, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_OutOfBoundsError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 442, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_12 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6);
          assert(__pyx_t_11);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
          __pyx_t_12 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_err};
          __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 442, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_10);
        }
        __Pyx_Raise(__pyx_t_10, 0, 0, __pyx_v_err);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __PYX_ERR(0, 442, __pyx_L14_error)
      }

      /* "cytimes/pddt.py":441
 *                 name=name,
 *             )
 *         except errors.PdOutOfBoundsDatetime as err:             # <<<<<<<<<<<<<<
 *             raise errors.OutOfBoundsError(err) from err
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:
*/
      /*finally:*/ {
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __pyx_t_14 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
          goto __pyx_L5_except_error;
        }
      }
    }

    /* "cytimes/pddt.py":443
 *         except errors.PdOutOfBoundsDatetime as err:
 *             raise errors.OutOfBoundsError(err) from err
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:             # <<<<<<<<<<<<<<
 *             raise errors.AmbiguousTimeError(err) from err
 *         except errors.PdDateParseError as err:
*/
    __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_7, &__pyx_t_13);
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 443, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_PytzAmbiguousTimeError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 443, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 443, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_PytzNonExistentTimeError); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 443, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_15 = __Pyx_PyErr_GivenExceptionMatches2(__pyx_t_4, __pyx_t_6, __pyx_t_11);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_ErrRestore(__pyx_t_4, __pyx_t_7, __pyx_t_13);
    __pyx_t_4 = 0; __pyx_t_7 = 0; __pyx_t_13 = 0;
    if (__pyx_t_15) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt._new_native", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_7, &__pyx_t_4) < 0) __PYX_ERR(0, 443, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_v_err = __pyx_t_7;
      /*try:*/ {

        /* "cytimes/pddt.py":444
 *             raise errors.OutOfBoundsError(err) from err
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:
 *             raise errors.AmbiguousTimeError(err) from err             # <<<<<<<<<<<<<<
 *         except errors.PdDateParseError as err:
 *             raise errors.ParserFailedError(err) from err
*/
        __pyx_t_6 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 444, __pyx_L25_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_AmbiguousTimeError); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 444, __pyx_L25_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_12 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9);
          assert(__pyx_t_6);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
          __pyx_t_12 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_err};
          __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 444, __pyx_L25_error)
          __Pyx_GOTREF(__pyx_t_11);
        }
        __Pyx_Raise(__pyx_t_11, 0, 0, __pyx_v_err);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __PYX_ERR(0, 444, __pyx_L25_error)
      }

      /* "cytimes/pddt.py":443
 *         except errors.PdOutOfBoundsDatetime as err:
 *             raise errors.OutOfBoundsError(err) from err
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:             # <<<<<<<<<<<<<<
 *             raise errors.AmbiguousTimeError(err) from err
 *         except errors.PdDateParseError as err:
*/
      /*finally:*/ {
        __pyx_L25_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_18, &__pyx_t_17);
          if ( unlikely(__Pyx_GetException(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_17);
          __pyx_t_15 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_23 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_18, __pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_22, __pyx_t_21, __pyx_t_20);
          __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0;
          __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_23;
          goto __pyx_L5_except_error;
        }
      }
    }

    /* "cytimes/pddt.py":445
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:
 *             raise errors.AmbiguousTimeError(err) from err
 *         except errors.PdDateParseError as err:             # <<<<<<<<<<<<<<
 *             raise errors.ParserFailedError(err) from err
 *         except OverflowError as err:
*/
    __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_7, &__pyx_t_13);
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 445, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_PdDateParseError); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 445, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_14 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_ErrRestore(__pyx_t_4, __pyx_t_7, __pyx_t_13);
    __pyx_t_4 = 0; __pyx_t_7 = 0; __pyx_t_13 = 0;
    if (__pyx_t_14) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt._new_native", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_7, &__pyx_t_4) < 0) __PYX_ERR(0, 445, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_v_err = __pyx_t_7;
      /*try:*/ {

        /* "cytimes/pddt.py":446
 *             raise errors.AmbiguousTimeError(err) from err
 *         except errors.PdDateParseError as err:
 *             raise errors.ParserFailedError(err) from err             # <<<<<<<<<<<<<<
 *         except OverflowError as err:
 *             msg: str = str(err)
*/
        __pyx_t_11 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 446, __pyx_L36_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ParserFailedError); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 446, __pyx_L36_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_12 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
          assert(__pyx_t_11);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
          __pyx_t_12 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_err};
          __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 446, __pyx_L36_error)
          __Pyx_GOTREF(__pyx_t_9);
        }
        __Pyx_Raise(__pyx_t_9, 0, 0, __pyx_v_err);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __PYX_ERR(0, 446, __pyx_L36_error)
      }

      /* "cytimes/pddt.py":445
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:
 *             raise errors.AmbiguousTimeError(err) from err
 *         except errors.PdDateParseError as err:             # <<<<<<<<<<<<<<
 *             raise errors.ParserFailedError(err) from err
 *         except OverflowError as err:
*/
      /*finally:*/ {
        __pyx_L36_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __pyx_t_14 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_24 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_24;
          goto __pyx_L5_except_error;
        }
      }
    }

    /* "cytimes/pddt.py":447
 *         except errors.PdDateParseError as err:
 *             raise errors.ParserFailedError(err) from err
 *         except OverflowError as err:             # <<<<<<<<<<<<<<
 *             msg: str = str(err)
 *             if "too large to convert to C long" in msg:
*/
    __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_OverflowError))));
    if (__pyx_t_15) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt._new_native", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_13) < 0) __PYX_ERR(0, 447, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_v_err = __pyx_t_7;
      /*try:*/ {

        /* "cytimes/pddt.py":448
 *             raise errors.ParserFailedError(err) from err
 *         except OverflowError as err:
 *             msg: str = str(err)             # <<<<<<<<<<<<<<
 *             if "too large to convert to C long" in msg:
 *                 raise errors.OutOfBoundsError(err) from err
*/
        __pyx_t_9 = __Pyx_PyObject_Unicode(__pyx_v_err); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 448, __pyx_L47_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_v_msg = ((PyObject*)__pyx_t_9);
        __pyx_t_9 = 0;

        /* "cytimes/pddt.py":449
 *         except OverflowError as err:
 *             msg: str = str(err)
 *             if "too large to convert to C long" in msg:             # <<<<<<<<<<<<<<
 *                 raise errors.OutOfBoundsError(err) from err
 *             raise err
*/
        __pyx_t_8 = (__Pyx_PyUnicode_ContainsTF(__pyx_mstate_global->__pyx_kp_u_too_large_to_convert_to_C_long, __pyx_v_msg, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 449, __pyx_L47_error)
        if (unlikely(__pyx_t_8)) {

          /* "cytimes/pddt.py":450
 *             msg: str = str(err)
 *             if "too large to convert to C long" in msg:
 *                 raise errors.OutOfBoundsError(err) from err             # <<<<<<<<<<<<<<
 *             raise err
 *         except TypeError as err:
*/
          __pyx_t_10 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 450, __pyx_L47_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_OutOfBoundsError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 450, __pyx_L47_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_12 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
            assert(__pyx_t_10);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
            __pyx_t_12 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_err};
            __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 450, __pyx_L47_error)
            __Pyx_GOTREF(__pyx_t_9);
          }
          __Pyx_Raise(__pyx_t_9, 0, 0, __pyx_v_err);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __PYX_ERR(0, 450, __pyx_L47_error)

          /* "cytimes/pddt.py":449
 *         except OverflowError as err:
 *             msg: str = str(err)
 *             if "too large to convert to C long" in msg:             # <<<<<<<<<<<<<<
 *                 raise errors.OutOfBoundsError(err) from err
 *             raise err
*/
        }

        /* "cytimes/pddt.py":451
 *             if "too large to convert to C long" in msg:
 *                 raise errors.OutOfBoundsError(err) from err
 *             raise err             # <<<<<<<<<<<<<<
 *         except TypeError as err:
 *             msg: str = str(err)
*/
        __Pyx_Raise(__pyx_v_err, 0, 0, 0);
        __PYX_ERR(0, 451, __pyx_L47_error)
      }

      /* "cytimes/pddt.py":447
 *         except errors.PdDateParseError as err:
 *             raise errors.ParserFailedError(err) from err
 *         except OverflowError as err:             # <<<<<<<<<<<<<<
 *             msg: str = str(err)
 *             if "too large to convert to C long" in msg:
*/
      /*finally:*/ {
        __pyx_L47_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_18, &__pyx_t_17);
          if ( unlikely(__Pyx_GetException(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_17);
          __pyx_t_15 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_25 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_18, __pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_22, __pyx_t_21, __pyx_t_20);
          __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0;
          __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_25;
          goto __pyx_L5_except_error;
        }
      }
    }

    /* "cytimes/pddt.py":452
 *                 raise errors.OutOfBoundsError(err) from err
 *             raise err
 *         except TypeError as err:             # <<<<<<<<<<<<<<
 *             msg: str = str(err)
 *             if "mixed timezones" in msg:
*/
    __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
    if (__pyx_t_14) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt._new_native", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_7, &__pyx_t_4) < 0) __PYX_ERR(0, 452, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_v_err = __pyx_t_7;
      /*try:*/ {

        /* "cytimes/pddt.py":453
 *             raise err
 *         except TypeError as err:
 *             msg: str = str(err)             # <<<<<<<<<<<<<<
 *             if "mixed timezones" in msg:
 *                 raise errors.MixedTimezoneError(err) from err
*/
        __pyx_t_9 = __Pyx_PyObject_Unicode(__pyx_v_err); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 453, __pyx_L59_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_v_msg = ((PyObject*)__pyx_t_9);
        __pyx_t_9 = 0;

        /* "cytimes/pddt.py":454
 *         except TypeError as err:
 *             msg: str = str(err)
 *             if "mixed timezones" in msg:             # <<<<<<<<<<<<<<
 *                 raise errors.MixedTimezoneError(err) from err
 *             raise err
*/
        __pyx_t_8 = (__Pyx_PyUnicode_ContainsTF(__pyx_mstate_global->__pyx_kp_u_mixed_timezones, __pyx_v_msg, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 454, __pyx_L59_error)
        if (unlikely(__pyx_t_8)) {

          /* "cytimes/pddt.py":455
 *             msg: str = str(err)
 *             if "mixed timezones" in msg:
 *                 raise errors.MixedTimezoneError(err) from err             # <<<<<<<<<<<<<<
 *             raise err
 *         except ValueError as err:
*/
          __pyx_t_6 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 455, __pyx_L59_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_MixedTimezoneError); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 455, __pyx_L59_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_12 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_11))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11);
            assert(__pyx_t_6);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
            __pyx_t_12 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_err};
            __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 455, __pyx_L59_error)
            __Pyx_GOTREF(__pyx_t_9);
          }
          __Pyx_Raise(__pyx_t_9, 0, 0, __pyx_v_err);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __PYX_ERR(0, 455, __pyx_L59_error)

          /* "cytimes/pddt.py":454
 *         except TypeError as err:
 *             msg: str = str(err)
 *             if "mixed timezones" in msg:             # <<<<<<<<<<<<<<
 *                 raise errors.MixedTimezoneError(err) from err
 *             raise err
*/
        }

        /* "cytimes/pddt.py":456
 *             if "mixed timezones" in msg:
 *                 raise errors.MixedTimezoneError(err) from err
 *             raise err             # <<<<<<<<<<<<<<
 *         except ValueError as err:
 *             msg: str = str(err)
*/
        __Pyx_Raise(__pyx_v_err, 0, 0, 0);
        __PYX_ERR(0, 456, __pyx_L59_error)
      }

      /* "cytimes/pddt.py":452
 *                 raise errors.OutOfBoundsError(err) from err
 *             raise err
 *         except TypeError as err:             # <<<<<<<<<<<<<<
 *             msg: str = str(err)
 *             if "mixed timezones" in msg:
*/
      /*finally:*/ {
        __pyx_L59_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __pyx_t_14 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_26 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_26;
          goto __pyx_L5_except_error;
        }
      }
    }

    /* "cytimes/pddt.py":457
 *                 raise errors.MixedTimezoneError(err) from err
 *             raise err
 *         except ValueError as err:             # <<<<<<<<<<<<<<
 *             msg: str = str(err)
 *             if "mix tz-aware" in msg:
*/
    __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ValueError))));
    if (__pyx_t_15) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt._new_native", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_13) < 0) __PYX_ERR(0, 457, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_v_err = __pyx_t_7;
      /*try:*/ {

        /* "cytimes/pddt.py":458
 *             raise err
 *         except ValueError as err:
 *             msg: str = str(err)             # <<<<<<<<<<<<<<
 *             if "mix tz-aware" in msg:
 *                 raise errors.MixedTimezoneError(err) from err
*/
        __pyx_t_9 = __Pyx_PyObject_Unicode(__pyx_v_err); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 458, __pyx_L71_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_v_msg = ((PyObject*)__pyx_t_9);
        __pyx_t_9 = 0;

        /* "cytimes/pddt.py":459
 *         except ValueError as err:
 *             msg: str = str(err)
 *             if "mix tz-aware" in msg:             # <<<<<<<<<<<<<<
 *                 raise errors.MixedTimezoneError(err) from err
 *             if "unless utc=True" not in msg:
*/
        __pyx_t_8 = (__Pyx_PyUnicode_ContainsTF(__pyx_mstate_global->__pyx_kp_u_mix_tz_aware, __pyx_v_msg, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 459, __pyx_L71_error)
        if (unlikely(__pyx_t_8)) {

          /* "cytimes/pddt.py":460
 *             msg: str = str(err)
 *             if "mix tz-aware" in msg:
 *                 raise errors.MixedTimezoneError(err) from err             # <<<<<<<<<<<<<<
 *             if "unless utc=True" not in msg:
 *                 raise errors.MixedTimezoneError(err) from err
*/
          __pyx_t_11 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 460, __pyx_L71_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_MixedTimezoneError); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 460, __pyx_L71_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_12 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_10))) {
            __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
            assert(__pyx_t_11);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
            __pyx_t_12 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_err};
            __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 460, __pyx_L71_error)
            __Pyx_GOTREF(__pyx_t_9);
          }
          __Pyx_Raise(__pyx_t_9, 0, 0, __pyx_v_err);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __PYX_ERR(0, 460, __pyx_L71_error)

          /* "cytimes/pddt.py":459
 *         except ValueError as err:
 *             msg: str = str(err)
 *             if "mix tz-aware" in msg:             # <<<<<<<<<<<<<<
 *                 raise errors.MixedTimezoneError(err) from err
 *             if "unless utc=True" not in msg:
*/
        }

        /* "cytimes/pddt.py":461
 *             if "mix tz-aware" in msg:
 *                 raise errors.MixedTimezoneError(err) from err
 *             if "unless utc=True" not in msg:             # <<<<<<<<<<<<<<
 *                 raise errors.MixedTimezoneError(err) from err
 *             raise err
*/
        __pyx_t_8 = (__Pyx_PyUnicode_ContainsTF(__pyx_mstate_global->__pyx_kp_u_unless_utc_True, __pyx_v_msg, Py_NE)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 461, __pyx_L71_error)
        if (unlikely(__pyx_t_8)) {

          /* "cytimes/pddt.py":462
 *                 raise errors.MixedTimezoneError(err) from err
 *             if "unless utc=True" not in msg:
 *                 raise errors.MixedTimezoneError(err) from err             # <<<<<<<<<<<<<<
 *             raise err
 * 
*/
          __pyx_t_10 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 462, __pyx_L71_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_MixedTimezoneError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 462, __pyx_L71_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_12 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
            assert(__pyx_t_10);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
            __pyx_t_12 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_err};
            __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 462, __pyx_L71_error)
            __Pyx_GOTREF(__pyx_t_9);
          }
          __Pyx_Raise(__pyx_t_9, 0, 0, __pyx_v_err);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __PYX_ERR(0, 462, __pyx_L71_error)

          /* "cytimes/pddt.py":461
 *             if "mix tz-aware" in msg:
 *                 raise errors.MixedTimezoneError(err) from err
 *             if "unless utc=True" not in msg:             # <<<<<<<<<<<<<<
 *                 raise errors.MixedTimezoneError(err) from err
 *             raise err
*/
        }

        /* "cytimes/pddt.py":463
 *             if "unless utc=True" not in msg:
 *                 raise errors.MixedTimezoneError(err) from err
 *             raise err             # <<<<<<<<<<<<<<
 * 
 *         # Convert to specified unit
*/
        __Pyx_Raise(__pyx_v_err, 0, 0, 0);
        __PYX_ERR(0, 463, __pyx_L71_error)
      }

      /* "cytimes/pddt.py":457
 *                 raise errors.MixedTimezoneError(err) from err
 *             raise err
 *         except ValueError as err:             # <<<<<<<<<<<<<<
 *             msg: str = str(err)
 *             if "mix tz-aware" in msg:
*/
      /*finally:*/ {
        __pyx_L71_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_18, &__pyx_t_17);
          if ( unlikely(__Pyx_GetException(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_17);
          __pyx_t_15 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_27 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_18, __pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_22, __pyx_t_21, __pyx_t_20);
          __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0;
          __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_27;
          goto __pyx_L5_except_error;
        }
      }
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pddt.py":428
 *         occur, they are caught and re-raised as `Pddt` specific exceptions.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             pt = DatetimeIndex.__new__(
 *                 cls,
*/
    __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_L8_try_end:;
  }

  /* "cytimes/pddt.py":466
 * 
 *         # Convert to specified unit
 *         return pt if as_unit is None else pt.as_unit(as_unit)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_8 = (__pyx_v_as_unit == ((PyObject*)Py_None));
  if (__pyx_t_8) {
    __Pyx_INCREF(__pyx_v_pt);
    __pyx_t_13 = __pyx_v_pt;
  } else {
    __pyx_t_4 = __pyx_v_pt;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_12 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_as_unit};
      __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 466, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    __pyx_t_13 = __pyx_t_7;
    __pyx_t_7 = 0;
  }
  __pyx_r = __pyx_t_13;
  __pyx_t_13 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":409
 *             )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _new_native(
 *         cls,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cytimes.pddt.Pddt._new_native", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pt);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":468
 *         return pt if as_unit is None else pt.as_unit(as_unit)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _new_parser(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_7_new_parser(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_6_new_parser, "(internal) Create a new `Pddt` instance using `cytimes` parser.\n\n        This method is a fallback approach that utilizes the `cytimes` parser\n        to construct the `Pddt` instance. It is invoked when the native Pandas\n        `DatetimeIndex` constructor fails due to datetime bounds, parsing issues,\n        or timezone ambiguities.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_7_new_parser = {"_new_parser", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_7_new_parser, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_6_new_parser};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_7_new_parser(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_freq = 0;
  PyDateTime_TZInfo *__pyx_v_tz = 0;
  PyObject *__pyx_v_ambiguous = 0;
  PyObject *__pyx_v_yearfirst = 0;
  PyObject *__pyx_v_dayfirst = 0;
  PyObject *__pyx_v_as_unit = 0;
  int __pyx_v_copy;
  PyObject *__pyx_v_name = 0;
  struct __pyx_obj_7cytimes_6parser_Configs *__pyx_v_cfg = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[11] = {0,0,0,0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_new_parser (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_data,&__pyx_mstate_global->__pyx_n_u_freq,&__pyx_mstate_global->__pyx_n_u_tz,&__pyx_mstate_global->__pyx_n_u_ambiguous,&__pyx_mstate_global->__pyx_n_u_yearfirst,&__pyx_mstate_global->__pyx_n_u_dayfirst,&__pyx_mstate_global->__pyx_n_u_as_unit,&__pyx_mstate_global->__pyx_n_u_copy,&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_cfg,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 468, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case 11:
        values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 468, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case 10:
        values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 468, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 468, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 468, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 468, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 468, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 468, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 468, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 468, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 468, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 468, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_new_parser", 0) < (0)) __PYX_ERR(0, 468, __pyx_L3_error)

      /* "cytimes/pddt.py":472
 *         cls,
 *         data: object,
 *         freq: object | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo = None,
 *         ambiguous: object = "infer",
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":473
 *         data: object,
 *         freq: object | None = None,
 *         tz: datetime.tzinfo = None,             # <<<<<<<<<<<<<<
 *         ambiguous: object = "infer",
 *         yearfirst: bool | None = True,
*/
      if (!values[3]) values[3] = __Pyx_NewRef((PyObject *)((PyDateTime_TZInfo *)Py_None));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_infer)));

      /* "cytimes/pddt.py":475
 *         tz: datetime.tzinfo = None,
 *         ambiguous: object = "infer",
 *         yearfirst: bool | None = True,             # <<<<<<<<<<<<<<
 *         dayfirst: bool | None = False,
 *         as_unit: str = None,
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject*)((PyObject*)Py_True)));

      /* "cytimes/pddt.py":476
 *         ambiguous: object = "infer",
 *         yearfirst: bool | None = True,
 *         dayfirst: bool | None = False,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         copy: bool = False,
*/
      if (!values[6]) values[6] = __Pyx_NewRef(((PyObject*)((PyObject*)Py_False)));

      /* "cytimes/pddt.py":477
 *         yearfirst: bool | None = True,
 *         dayfirst: bool | None = False,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         copy: bool = False,
 *         name: Hashable | None = None,
*/
      if (!values[7]) values[7] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":479
 *         as_unit: str = None,
 *         copy: bool = False,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *         cfg: Configs = None,
 *     ) -> Self:
*/
      if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":480
 *         copy: bool = False,
 *         name: Hashable | None = None,
 *         cfg: Configs = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """(internal) Create a new `Pddt` instance using `cytimes` parser.
*/
      if (!values[10]) values[10] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_new_parser", 0, 2, 11, i); __PYX_ERR(0, 468, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case 11:
        values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 468, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case 10:
        values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 468, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 468, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 468, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 468, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 468, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 468, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 468, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 468, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 468, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 468, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pddt.py":472
 *         cls,
 *         data: object,
 *         freq: object | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo = None,
 *         ambiguous: object = "infer",
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":473
 *         data: object,
 *         freq: object | None = None,
 *         tz: datetime.tzinfo = None,             # <<<<<<<<<<<<<<
 *         ambiguous: object = "infer",
 *         yearfirst: bool | None = True,
*/
      if (!values[3]) values[3] = __Pyx_NewRef((PyObject *)((PyDateTime_TZInfo *)Py_None));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_infer)));
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject*)((PyObject*)Py_True)));
      if (!values[6]) values[6] = __Pyx_NewRef(((PyObject*)((PyObject*)Py_False)));

      /* "cytimes/pddt.py":477
 *         yearfirst: bool | None = True,
 *         dayfirst: bool | None = False,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         copy: bool = False,
 *         name: Hashable | None = None,
*/
      if (!values[7]) values[7] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":479
 *         as_unit: str = None,
 *         copy: bool = False,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *         cfg: Configs = None,
 *     ) -> Self:
*/
      if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":480
 *         copy: bool = False,
 *         name: Hashable | None = None,
 *         cfg: Configs = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """(internal) Create a new `Pddt` instance using `cytimes` parser.
*/
      if (!values[10]) values[10] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_freq = values[2];
    __pyx_v_tz = ((PyDateTime_TZInfo *)values[3]);
    __pyx_v_ambiguous = values[4];
    __pyx_v_yearfirst = ((PyObject*)values[5]);
    __pyx_v_dayfirst = ((PyObject*)values[6]);
    __pyx_v_as_unit = ((PyObject*)values[7]);
    if (values[8]) {
      __pyx_v_copy = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_copy == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 478, __pyx_L3_error)
    } else {

      /* "cytimes/pddt.py":478
 *         dayfirst: bool | None = False,
 *         as_unit: str = None,
 *         copy: bool = False,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *         cfg: Configs = None,
*/
      __pyx_v_copy = ((int)((int)0));
    }
    __pyx_v_name = values[9];
    __pyx_v_cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)values[10]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_new_parser", 0, 2, 11, __pyx_nargs); __PYX_ERR(0, 468, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt._new_parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tz), __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_tzinfo, 1, "tz", 0))) __PYX_ERR(0, 473, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yearfirst), (&PyBool_Type), 1, "yearfirst", 2))) __PYX_ERR(0, 475, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dayfirst), (&PyBool_Type), 1, "dayfirst", 2))) __PYX_ERR(0, 476, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_as_unit), (&PyUnicode_Type), 1, "as_unit", 2))) __PYX_ERR(0, 477, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfg), __pyx_mstate_global->__pyx_ptype_7cytimes_6parser_Configs, 1, "cfg", 0))) __PYX_ERR(0, 480, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_6_new_parser(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_freq, __pyx_v_tz, __pyx_v_ambiguous, __pyx_v_yearfirst, __pyx_v_dayfirst, __pyx_v_as_unit, __pyx_v_copy, __pyx_v_name, __pyx_v_cfg);

  /* "cytimes/pddt.py":468
 *         return pt if as_unit is None else pt.as_unit(as_unit)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _new_parser(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_6_new_parser(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_freq, PyDateTime_TZInfo *__pyx_v_tz, PyObject *__pyx_v_ambiguous, PyObject *__pyx_v_yearfirst, PyObject *__pyx_v_dayfirst, PyObject *__pyx_v_as_unit, int __pyx_v_copy, PyObject *__pyx_v_name, struct __pyx_obj_7cytimes_6parser_Configs *__pyx_v_cfg) {
  Py_ssize_t __pyx_v_arr_size;
  PyObject *__pyx_v_err = NULL;
  PyArrayObject *__pyx_v_arr = 0;
  npy_int64 *__pyx_v_arr_p;
  int __pyx_v_has_tz;
  PyDateTime_TZInfo *__pyx_v_tmp_tz = NULL;
  int __pyx_v_infer;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_obj = NULL;
  PyDateTime_DateTime *__pyx_v_dt = 0;
  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;
  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[4];
  PyObject *__pyx_t_14 = NULL;
  size_t __pyx_t_15;
  int __pyx_t_16;
  char const *__pyx_t_17;
  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;
  npy_intp __pyx_t_24[1];
  int __pyx_t_25;
  PyObject *(*__pyx_t_26)(PyObject *);
  struct __pyx_opt_args_7cytimes_6parser_parse_obj __pyx_t_27;
  struct __pyx_opt_args_7cytimes_5utils_dt_astimezone __pyx_t_28;
  struct __pyx_opt_args_7cytimes_5utils_dt_replace_tz_fold __pyx_t_29;
  struct __pyx_opt_args_7cytimes_5utils_dt_normalize_tz __pyx_t_30;
  PY_LONG_LONG __pyx_t_31;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_us __pyx_t_32;
  char const *__pyx_t_33;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_new_parser", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_tz);

  /* "cytimes/pddt.py":490
 *         """
 *         # . get array size
 *         try:             # <<<<<<<<<<<<<<
 *             arr_size: cython.Py_ssize_t = len(data)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "cytimes/pddt.py":491
 *         # . get array size
 *         try:
 *             arr_size: cython.Py_ssize_t = len(data)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             raise TypeError(
*/
      __pyx_t_4 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 491, __pyx_L3_error)
      __pyx_v_arr_size = __pyx_t_4;

      /* "cytimes/pddt.py":490
 *         """
 *         # . get array size
 *         try:             # <<<<<<<<<<<<<<
 *             arr_size: cython.Py_ssize_t = len(data)
 *         except Exception as err:
*/
    }
    __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_L8_try_end;
    __pyx_L3_error:;

    /* "cytimes/pddt.py":492
 *         try:
 *             arr_size: cython.Py_ssize_t = len(data)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 "%s(...) must be called with a collection of some kind, "
*/
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_5) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt._new_parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 492, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_v_err = __pyx_t_7;
      /*try:*/ {

        /* "cytimes/pddt.py":493
 *             arr_size: cython.Py_ssize_t = len(data)
 *         except Exception as err:
 *             raise TypeError(             # <<<<<<<<<<<<<<
 *                 "%s(...) must be called with a collection of some kind, "
 *                 "%s was passed" % (cls.__name__, type(data)),
*/
        __pyx_t_10 = NULL;

        /* "cytimes/pddt.py":495
 *             raise TypeError(
 *                 "%s(...) must be called with a collection of some kind, "
 *                 "%s was passed" % (cls.__name__, type(data)),             # <<<<<<<<<<<<<<
 *             ) from err
 *         # . setup array
*/
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 495, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_11), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 495, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_data))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 495, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_13[0] = __pyx_t_12;
        __pyx_t_13[1] = __pyx_mstate_global->__pyx_kp_u_must_be_called_with_a_collectio;
        __pyx_t_13[2] = __pyx_t_11;
        __pyx_t_13[3] = __pyx_mstate_global->__pyx_kp_u_was_passed;

        /* "cytimes/pddt.py":494
 *         except Exception as err:
 *             raise TypeError(
 *                 "%s(...) must be called with a collection of some kind, "             # <<<<<<<<<<<<<<
 *                 "%s was passed" % (cls.__name__, type(data)),
 *             ) from err
*/
        __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_13, 4, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 53 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + 11, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11));
        if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 494, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_15 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_14};
          __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 493, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_9);
        }

        /* "cytimes/pddt.py":496
 *                 "%s(...) must be called with a collection of some kind, "
 *                 "%s was passed" % (cls.__name__, type(data)),
 *             ) from err             # <<<<<<<<<<<<<<
 *         # . setup array
 *         arr: np.ndarray = np.PyArray_EMPTY(1, [arr_size], np.NPY_TYPES.NPY_INT64, 0)
*/
        __Pyx_Raise(__pyx_t_9, 0, 0, __pyx_v_err);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __PYX_ERR(0, 493, __pyx_L14_error)
      }

      /* "cytimes/pddt.py":492
 *         try:
 *             arr_size: cython.Py_ssize_t = len(data)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 "%s(...) must be called with a collection of some kind, "
*/
      /*finally:*/ {
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
          if ( unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __pyx_t_5 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17;
          goto __pyx_L5_except_error;
        }
      }
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pddt.py":490
 *         """
 *         # . get array size
 *         try:             # <<<<<<<<<<<<<<
 *             arr_size: cython.Py_ssize_t = len(data)
 *         except Exception as err:
*/
    __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_L8_try_end:;
  }

  /* "cytimes/pddt.py":498
 *             ) from err
 *         # . setup array
 *         arr: np.ndarray = np.PyArray_EMPTY(1, [arr_size], np.NPY_TYPES.NPY_INT64, 0)             # <<<<<<<<<<<<<<
 *         arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *         # . setup parser
*/
  __pyx_t_24[0] = __pyx_v_arr_size;
  __pyx_t_8 = PyArray_EMPTY(1, __pyx_t_24, NPY_INT64, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 498, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "cytimes/pddt.py":499
 *         # . setup array
 *         arr: np.ndarray = np.PyArray_EMPTY(1, [arr_size], np.NPY_TYPES.NPY_INT64, 0)
 *         arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))             # <<<<<<<<<<<<<<
 *         # . setup parser
 *         has_tz: cython.bint = tz is not None
*/
  __pyx_v_arr_p = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "cytimes/pddt.py":501
 *         arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *         # . setup parser
 *         has_tz: cython.bint = tz is not None             # <<<<<<<<<<<<<<
 *         tmp_tz = tz if has_tz else utils.UTC
 *         infer: cython.bint = ambiguous == "infer"
*/
  __pyx_t_25 = (((PyObject *)__pyx_v_tz) != Py_None);
  __pyx_v_has_tz = __pyx_t_25;

  /* "cytimes/pddt.py":502
 *         # . setup parser
 *         has_tz: cython.bint = tz is not None
 *         tmp_tz = tz if has_tz else utils.UTC             # <<<<<<<<<<<<<<
 *         infer: cython.bint = ambiguous == "infer"
 *         i: cython.Py_ssize_t = 0
*/
  if (__pyx_v_has_tz) {
    __Pyx_INCREF((PyObject *)__pyx_v_tz);
    __pyx_t_8 = ((PyObject *)__pyx_v_tz);
  } else {
    __Pyx_INCREF((PyObject *)__pyx_v_7cytimes_5utils_UTC);
    __pyx_t_8 = ((PyObject *)__pyx_v_7cytimes_5utils_UTC);
  }
  __pyx_v_tmp_tz = ((PyDateTime_TZInfo *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "cytimes/pddt.py":503
 *         has_tz: cython.bint = tz is not None
 *         tmp_tz = tz if has_tz else utils.UTC
 *         infer: cython.bint = ambiguous == "infer"             # <<<<<<<<<<<<<<
 *         i: cython.Py_ssize_t = 0
 *         try:
*/
  __pyx_t_8 = PyObject_RichCompare(__pyx_v_ambiguous, __pyx_mstate_global->__pyx_n_u_infer, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 503, __pyx_L1_error)
  __pyx_t_25 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_25 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_infer = __pyx_t_25;

  /* "cytimes/pddt.py":504
 *         tmp_tz = tz if has_tz else utils.UTC
 *         infer: cython.bint = ambiguous == "infer"
 *         i: cython.Py_ssize_t = 0             # <<<<<<<<<<<<<<
 *         try:
 *             for obj in data:
*/
  __pyx_v_i = 0;

  /* "cytimes/pddt.py":505
 *         infer: cython.bint = ambiguous == "infer"
 *         i: cython.Py_ssize_t = 0
 *         try:             # <<<<<<<<<<<<<<
 *             for obj in data:
 *                 # . parse datetime object
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "cytimes/pddt.py":506
 *         i: cython.Py_ssize_t = 0
 *         try:
 *             for obj in data:             # <<<<<<<<<<<<<<
 *                 # . parse datetime object
 *                 dt: datetime.datetime = _parse_obj(
*/
      if (likely(PyList_CheckExact(__pyx_v_data)) || PyTuple_CheckExact(__pyx_v_data)) {
        __pyx_t_8 = __pyx_v_data; __Pyx_INCREF(__pyx_t_8);
        __pyx_t_4 = 0;
        __pyx_t_26 = NULL;
      } else {
        __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_data); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 506, __pyx_L20_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_26 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 506, __pyx_L20_error)
      }
      for (;;) {
        if (likely(!__pyx_t_26)) {
          if (likely(PyList_CheckExact(__pyx_t_8))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 506, __pyx_L20_error)
              #endif
              if (__pyx_t_4 >= __pyx_temp) break;
            }
            __pyx_t_7 = __Pyx_PyList_GetItemRefFast(__pyx_t_8, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_4;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 506, __pyx_L20_error)
              #endif
              if (__pyx_t_4 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4));
            #else
            __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_4);
            #endif
            ++__pyx_t_4;
          }
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 506, __pyx_L20_error)
        } else {
          __pyx_t_7 = __pyx_t_26(__pyx_t_8);
          if (unlikely(!__pyx_t_7)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 506, __pyx_L20_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_XDECREF_SET(__pyx_v_obj, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "cytimes/pddt.py":508
 *             for obj in data:
 *                 # . parse datetime object
 *                 dt: datetime.datetime = _parse_obj(             # <<<<<<<<<<<<<<
 *                     obj, None, yearfirst, dayfirst, False, True, cfg, None
 *                 )
*/
        __pyx_t_27.__pyx_n = 7;
        __pyx_t_27.__pyx_default = Py_None;
        __pyx_t_27.yearfirst = __pyx_v_yearfirst;
        __pyx_t_27.dayfirst = __pyx_v_dayfirst;
        __pyx_t_27.ignoretz = 0;
        __pyx_t_27.isoformat = 1;
        __pyx_t_27.cfg = __pyx_v_cfg;
        __pyx_t_27.dtclass = Py_None;
        __pyx_t_7 = ((PyObject *)__pyx_f_7cytimes_6parser_parse_obj(__pyx_v_obj, 0, &__pyx_t_27)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 508, __pyx_L20_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_XDECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_7));
        __pyx_t_7 = 0;

        /* "cytimes/pddt.py":512
 *                 )
 *                 # . normalize timezone [aware]
 *                 if dt.tzinfo is not None:             # <<<<<<<<<<<<<<
 *                     dt = utils.dt_astimezone(dt, tmp_tz, None)
 *                     if tz is None:
*/
        __pyx_t_7 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 512, __pyx_L20_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_25 = (__pyx_t_7 != Py_None);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (__pyx_t_25) {

          /* "cytimes/pddt.py":513
 *                 # . normalize timezone [aware]
 *                 if dt.tzinfo is not None:
 *                     dt = utils.dt_astimezone(dt, tmp_tz, None)             # <<<<<<<<<<<<<<
 *                     if tz is None:
 *                         tz = utils.UTC
*/
          __pyx_t_28.__pyx_n = 2;
          __pyx_t_28.tzinfo = ((PyObject *)__pyx_v_tmp_tz);
          __pyx_t_28.dtclass = Py_None;
          __pyx_t_7 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_astimezone(__pyx_v_dt, &__pyx_t_28)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 513, __pyx_L20_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_7));
          __pyx_t_7 = 0;

          /* "cytimes/pddt.py":514
 *                 if dt.tzinfo is not None:
 *                     dt = utils.dt_astimezone(dt, tmp_tz, None)
 *                     if tz is None:             # <<<<<<<<<<<<<<
 *                         tz = utils.UTC
 *                 # . infer ambiguous time [naive]
*/
          __pyx_t_25 = (((PyObject *)__pyx_v_tz) == Py_None);
          if (__pyx_t_25) {

            /* "cytimes/pddt.py":515
 *                     dt = utils.dt_astimezone(dt, tmp_tz, None)
 *                     if tz is None:
 *                         tz = utils.UTC             # <<<<<<<<<<<<<<
 *                 # . infer ambiguous time [naive]
 *                 elif infer and has_tz:
*/
            __Pyx_INCREF((PyObject *)__pyx_v_7cytimes_5utils_UTC);
            __Pyx_DECREF_SET(__pyx_v_tz, __pyx_v_7cytimes_5utils_UTC);

            /* "cytimes/pddt.py":514
 *                 if dt.tzinfo is not None:
 *                     dt = utils.dt_astimezone(dt, tmp_tz, None)
 *                     if tz is None:             # <<<<<<<<<<<<<<
 *                         tz = utils.UTC
 *                 # . infer ambiguous time [naive]
*/
          }

          /* "cytimes/pddt.py":512
 *                 )
 *                 # . normalize timezone [aware]
 *                 if dt.tzinfo is not None:             # <<<<<<<<<<<<<<
 *                     dt = utils.dt_astimezone(dt, tmp_tz, None)
 *                     if tz is None:
*/
          goto __pyx_L28;
        }

        /* "cytimes/pddt.py":517
 *                         tz = utils.UTC
 *                 # . infer ambiguous time [naive]
 *                 elif infer and has_tz:             # <<<<<<<<<<<<<<
 *                     dt = utils.dt_replace_tz_fold(dt, tz, 1, None)
 *                     dt = utils.dt_normalize_tz(dt, None)
*/
        if (__pyx_v_infer) {
        } else {
          __pyx_t_25 = __pyx_v_infer;
          goto __pyx_L30_bool_binop_done;
        }
        __pyx_t_25 = __pyx_v_has_tz;
        __pyx_L30_bool_binop_done:;
        if (__pyx_t_25) {

          /* "cytimes/pddt.py":518
 *                 # . infer ambiguous time [naive]
 *                 elif infer and has_tz:
 *                     dt = utils.dt_replace_tz_fold(dt, tz, 1, None)             # <<<<<<<<<<<<<<
 *                     dt = utils.dt_normalize_tz(dt, None)
 *                 # . assign to array
*/
          __pyx_t_29.__pyx_n = 1;
          __pyx_t_29.dtclass = Py_None;
          __pyx_t_7 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace_tz_fold(__pyx_v_dt, ((PyObject *)__pyx_v_tz), 1, &__pyx_t_29)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 518, __pyx_L20_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_7));
          __pyx_t_7 = 0;

          /* "cytimes/pddt.py":519
 *                 elif infer and has_tz:
 *                     dt = utils.dt_replace_tz_fold(dt, tz, 1, None)
 *                     dt = utils.dt_normalize_tz(dt, None)             # <<<<<<<<<<<<<<
 *                 # . assign to array
 *                 arr_p[i] = utils.dt_to_us(dt, False)  # without timezone
*/
          __pyx_t_30.__pyx_n = 1;
          __pyx_t_30.dtclass = Py_None;
          __pyx_t_7 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_normalize_tz(__pyx_v_dt, &__pyx_t_30)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 519, __pyx_L20_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_7));
          __pyx_t_7 = 0;

          /* "cytimes/pddt.py":517
 *                         tz = utils.UTC
 *                 # . infer ambiguous time [naive]
 *                 elif infer and has_tz:             # <<<<<<<<<<<<<<
 *                     dt = utils.dt_replace_tz_fold(dt, tz, 1, None)
 *                     dt = utils.dt_normalize_tz(dt, None)
*/
        }
        __pyx_L28:;

        /* "cytimes/pddt.py":521
 *                     dt = utils.dt_normalize_tz(dt, None)
 *                 # . assign to array
 *                 arr_p[i] = utils.dt_to_us(dt, False)  # without timezone             # <<<<<<<<<<<<<<
 *                 i += 1
 *             arr = arr.astype(utils.DT64_DTYPE_US)  # convert to datetime64[us]
*/
        __pyx_t_32.__pyx_n = 1;
        __pyx_t_32.utc = 0;
        __pyx_t_31 = __pyx_f_7cytimes_5utils_dt_to_us(__pyx_v_dt, &__pyx_t_32); if (unlikely(__pyx_t_31 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 521, __pyx_L20_error)
        (__pyx_v_arr_p[__pyx_v_i]) = __pyx_t_31;

        /* "cytimes/pddt.py":522
 *                 # . assign to array
 *                 arr_p[i] = utils.dt_to_us(dt, False)  # without timezone
 *                 i += 1             # <<<<<<<<<<<<<<
 *             arr = arr.astype(utils.DT64_DTYPE_US)  # convert to datetime64[us]
 *         except Exception as err:
*/
        __pyx_v_i = (__pyx_v_i + 1);

        /* "cytimes/pddt.py":506
 *         i: cython.Py_ssize_t = 0
 *         try:
 *             for obj in data:             # <<<<<<<<<<<<<<
 *                 # . parse datetime object
 *                 dt: datetime.datetime = _parse_obj(
*/
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "cytimes/pddt.py":523
 *                 arr_p[i] = utils.dt_to_us(dt, False)  # without timezone
 *                 i += 1
 *             arr = arr.astype(utils.DT64_DTYPE_US)  # convert to datetime64[us]             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             raise ValueError(
*/
      __pyx_t_7 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_15 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 523, __pyx_L20_error)
        __Pyx_GOTREF(__pyx_t_8);
      }
      if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 523, __pyx_L20_error)
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_8));
      __pyx_t_8 = 0;

      /* "cytimes/pddt.py":505
 *         infer: cython.bint = ambiguous == "infer"
 *         i: cython.Py_ssize_t = 0
 *         try:             # <<<<<<<<<<<<<<
 *             for obj in data:
 *                 # . parse datetime object
*/
    }
    __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_L25_try_end;
    __pyx_L20_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cytimes/pddt.py":524
 *                 i += 1
 *             arr = arr.astype(utils.DT64_DTYPE_US)  # convert to datetime64[us]
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Invalid '%s.__new__(data, ...)' input.\n%s" % (cls.__name__, err)
*/
    __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_16) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt._new_parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 524, __pyx_L22_except_error)
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_v_err = __pyx_t_7;
      /*try:*/ {

        /* "cytimes/pddt.py":525
 *             arr = arr.astype(utils.DT64_DTYPE_US)  # convert to datetime64[us]
 *         except Exception as err:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Invalid '%s.__new__(data, ...)' input.\n%s" % (cls.__name__, err)
 *             ) from err
*/
        __pyx_t_14 = NULL;

        /* "cytimes/pddt.py":526
 *         except Exception as err:
 *             raise ValueError(
 *                 "Invalid '%s.__new__(data, ...)' input.\n%s" % (cls.__name__, err)             # <<<<<<<<<<<<<<
 *             ) from err
 *         # . new instance
*/
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 526, __pyx_L38_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_10), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 526, __pyx_L38_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_err), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 526, __pyx_L38_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_13[0] = __pyx_mstate_global->__pyx_kp_u_Invalid;
        __pyx_t_13[1] = __pyx_t_11;
        __pyx_t_13[2] = __pyx_mstate_global->__pyx_kp_u_new___data_input;
        __pyx_t_13[3] = __pyx_t_10;
        __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_13, 4, 9 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + 28 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10));
        if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 526, __pyx_L38_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_15 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_12};
          __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 525, __pyx_L38_error)
          __Pyx_GOTREF(__pyx_t_9);
        }

        /* "cytimes/pddt.py":527
 *             raise ValueError(
 *                 "Invalid '%s.__new__(data, ...)' input.\n%s" % (cls.__name__, err)
 *             ) from err             # <<<<<<<<<<<<<<
 *         # . new instance
 *         return cls._new_native(
*/
        __Pyx_Raise(__pyx_t_9, 0, 0, __pyx_v_err);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __PYX_ERR(0, 525, __pyx_L38_error)
      }

      /* "cytimes/pddt.py":524
 *                 i += 1
 *             arr = arr.astype(utils.DT64_DTYPE_US)  # convert to datetime64[us]
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Invalid '%s.__new__(data, ...)' input.\n%s" % (cls.__name__, err)
*/
      /*finally:*/ {
        __pyx_L38_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18);
          if ( unlikely(__Pyx_GetException(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_18);
          __pyx_t_16 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_33 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_19, __pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_23, __pyx_t_22, __pyx_t_21);
          __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
          __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_33;
          goto __pyx_L22_except_error;
        }
      }
    }
    goto __pyx_L22_except_error;

    /* "cytimes/pddt.py":505
 *         infer: cython.bint = ambiguous == "infer"
 *         i: cython.Py_ssize_t = 0
 *         try:             # <<<<<<<<<<<<<<
 *             for obj in data:
 *                 # . parse datetime object
*/
    __pyx_L22_except_error:;
    __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_L25_try_end:;
  }

  /* "cytimes/pddt.py":529
 *             ) from err
 *         # . new instance
 *         return cls._new_native(             # <<<<<<<<<<<<<<
 *             arr,
 *             freq=freq,
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = __pyx_v_cls;
  __Pyx_INCREF(__pyx_t_7);

  /* "cytimes/pddt.py":537
 *             yearfirst=yearfirst,
 *             as_unit=as_unit,
 *             copy=copy,             # <<<<<<<<<<<<<<
 *             name=name,
 *         )
*/
  __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_v_copy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "cytimes/pddt.py":538
 *             as_unit=as_unit,
 *             copy=copy,
 *             name=name,             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_15 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 8 : 0)] = {__pyx_t_7, ((PyObject *)__pyx_v_arr)};
    __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_freq, __pyx_v_freq, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 529, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, ((PyObject *)__pyx_v_tz), __pyx_t_9, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 529, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ambiguous, __pyx_v_ambiguous, __pyx_t_9, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 529, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dayfirst, __pyx_v_dayfirst, __pyx_t_9, __pyx_callargs+2, 3) < (0)) __PYX_ERR(0, 529, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_yearfirst, __pyx_v_yearfirst, __pyx_t_9, __pyx_callargs+2, 4) < (0)) __PYX_ERR(0, 529, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_9, __pyx_callargs+2, 5) < (0)) __PYX_ERR(0, 529, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_copy, __pyx_t_8, __pyx_t_9, __pyx_callargs+2, 6) < (0)) __PYX_ERR(0, 529, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_9, __pyx_callargs+2, 7) < (0)) __PYX_ERR(0, 529, __pyx_L1_error)
    __pyx_t_6 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new_native, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":468
 *         return pt if as_unit is None else pt.as_unit(as_unit)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _new_parser(
 *         cls,
*/

  /* function exit code */
  __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_14);
  __Pyx_AddTraceback("cytimes.pddt.Pddt._new_parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp_tz);
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_XDECREF((PyObject *)__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":541
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def date_range(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_9date_range(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_8date_range, "Construct a fixed-frequency index `<'Pddt'>`.\n\n        Construct datetime index from the range of equally spaced time points (where the\n        difference between any two adjacent points is specified by the given frequency)\n        such that they all satisfy `start <[=] x <[=] end`, where the first one and the\n        last one are, resp., the first and last time points in that range that fall on\n        the boundary of `freq` (if given as a frequency string) or that are valid for\n        `freq` (if given as a :class:`pandas.tseries.offsets.DateOffset`). (If exactly\n        one of `start`, `end`, or `freq` is *not* specified, this missing parameter can\n        be computed given `periods`, the number of timesteps in the range. See the note below.)\n\n        :param start `<'Datetime-Like/None'>`: Left bound for generating the index. Defaults to `None`.\n        :param end `<'Datetime-Like/None'>`: Right bound for generating the index. Defaults to `None`.\n        :param periods `<'int/None'>`: Number of periods to generate. Defaults to `None`.\n        :param freq `<'str/timedelta/BaseOffset/None'>`: The frequency of the index. Defaults to `'D'`.\n\n            - `<'str'>` A frequency string (e.g. `'D', 'h', 's', 'ms'`), or `'infer'` for auto-detection.\n            - `<'timedelta'>` A datetime.timedelta instance.\n            - `<'BaseOffset'>` A pandas date offset instance.\n            - `<'None'>` Infer the frequency from the input data.\n\n        :param tz `<'tzinfo/str/None'>`: The optional target timezone. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :param normalize `<'bool'>`: Normalize the start/end dates to midnight\n            (time fields set to 0). Defaults to `False`.\n\n        :param inclusive `<'str'>`: Include boundaries. Defaults to `'both'`.\n\n            - `'left'`"" Include the left boundary.\n            - `'right'` Include the right boundary.\n            - `'both'` Include both boundaries.\n            - `'neither'` Exclude both boundaries.\n\n        :param unit `<'str/None'>`: Specify the desired resolution of the result. Defaults to `None`.\n            Supported datetime units: 's', 'ms', 'us', 'ns'.\n\n        :param name `<'Hashable/None'>`: The name assigned to the index. Defaults to `None`.\n\n        :returns `<'Pddt'>`: The resulting datetime index.\n\n        ## Equivalent\n        >>> Pddt(pd.date_range(...))\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_9date_range = {"date_range", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_9date_range, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_8date_range};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_9date_range(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_start = 0;
  PyObject *__pyx_v_end = 0;
  PyObject *__pyx_v_periods = 0;
  PyObject *__pyx_v_freq = 0;
  PyObject *__pyx_v_tz = 0;
  int __pyx_v_normalize;
  PyObject *__pyx_v_inclusive = 0;
  PyObject *__pyx_v_unit = 0;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("date_range (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_start,&__pyx_mstate_global->__pyx_n_u_end,&__pyx_mstate_global->__pyx_n_u_periods,&__pyx_mstate_global->__pyx_n_u_freq,&__pyx_mstate_global->__pyx_n_u_tz,&__pyx_mstate_global->__pyx_n_u_normalize,&__pyx_mstate_global->__pyx_n_u_inclusive,&__pyx_mstate_global->__pyx_n_u_unit,&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 541, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case 10:
        values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "date_range", 0) < (0)) __PYX_ERR(0, 541, __pyx_L3_error)

      /* "cytimes/pddt.py":544
 *     def date_range(
 *         cls,
 *         start: object | None = None,             # <<<<<<<<<<<<<<
 *         end: object | None = None,
 *         periods: int | None = None,
*/
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":545
 *         cls,
 *         start: object | None = None,
 *         end: object | None = None,             # <<<<<<<<<<<<<<
 *         periods: int | None = None,
 *         freq: object | None = "D",
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":546
 *         start: object | None = None,
 *         end: object | None = None,
 *         periods: int | None = None,             # <<<<<<<<<<<<<<
 *         freq: object | None = "D",
 *         tz: datetime.tzinfo | str | None = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject*)Py_None));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_D)));

      /* "cytimes/pddt.py":548
 *         periods: int | None = None,
 *         freq: object | None = "D",
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         normalize: bool = False,
 *         inclusive: str = "both",
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[7]) values[7] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_n_u_both)));

      /* "cytimes/pddt.py":551
 *         normalize: bool = False,
 *         inclusive: str = "both",
 *         unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[8]) values[8] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":552
 *         inclusive: str = "both",
 *         unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct a fixed-frequency index `<'Pddt'>`.
*/
      if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("date_range", 0, 1, 10, i); __PYX_ERR(0, 541, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case 10:
        values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 541, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pddt.py":544
 *     def date_range(
 *         cls,
 *         start: object | None = None,             # <<<<<<<<<<<<<<
 *         end: object | None = None,
 *         periods: int | None = None,
*/
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":545
 *         cls,
 *         start: object | None = None,
 *         end: object | None = None,             # <<<<<<<<<<<<<<
 *         periods: int | None = None,
 *         freq: object | None = "D",
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":546
 *         start: object | None = None,
 *         end: object | None = None,
 *         periods: int | None = None,             # <<<<<<<<<<<<<<
 *         freq: object | None = "D",
 *         tz: datetime.tzinfo | str | None = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject*)Py_None));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_D)));

      /* "cytimes/pddt.py":548
 *         periods: int | None = None,
 *         freq: object | None = "D",
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         normalize: bool = False,
 *         inclusive: str = "both",
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[7]) values[7] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_n_u_both)));

      /* "cytimes/pddt.py":551
 *         normalize: bool = False,
 *         inclusive: str = "both",
 *         unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[8]) values[8] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":552
 *         inclusive: str = "both",
 *         unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct a fixed-frequency index `<'Pddt'>`.
*/
      if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_start = values[1];
    __pyx_v_end = values[2];
    if (__Pyx_PyInt_FromNumber(&values[3], "periods", 1) < (0)) __PYX_ERR(0, 546, __pyx_L3_error)
    __pyx_v_periods = ((PyObject*)values[3]);
    __pyx_v_freq = values[4];
    __pyx_v_tz = values[5];
    if (values[6]) {
      __pyx_v_normalize = __Pyx_PyObject_IsTrue(values[6]); if (unlikely((__pyx_v_normalize == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 549, __pyx_L3_error)
    } else {

      /* "cytimes/pddt.py":549
 *         freq: object | None = "D",
 *         tz: datetime.tzinfo | str | None = None,
 *         normalize: bool = False,             # <<<<<<<<<<<<<<
 *         inclusive: str = "both",
 *         unit: str = None,
*/
      __pyx_v_normalize = ((int)((int)0));
    }
    __pyx_v_inclusive = ((PyObject*)values[7]);
    __pyx_v_unit = ((PyObject*)values[8]);
    __pyx_v_name = values[9];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("date_range", 0, 1, 10, __pyx_nargs); __PYX_ERR(0, 541, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.date_range", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_periods), (&PyLong_Type), 1, "periods", 2))) __PYX_ERR(0, 546, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inclusive), (&PyUnicode_Type), 0, "inclusive", 2))) __PYX_ERR(0, 550, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 1, "unit", 2))) __PYX_ERR(0, 551, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_8date_range(__pyx_self, __pyx_v_cls, __pyx_v_start, __pyx_v_end, __pyx_v_periods, __pyx_v_freq, __pyx_v_tz, __pyx_v_normalize, __pyx_v_inclusive, __pyx_v_unit, __pyx_v_name);

  /* "cytimes/pddt.py":541
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def date_range(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_8date_range(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_periods, PyObject *__pyx_v_freq, PyObject *__pyx_v_tz, int __pyx_v_normalize, PyObject *__pyx_v_inclusive, PyObject *__pyx_v_unit, PyObject *__pyx_v_name) {
  PyObject *__pyx_v_dtarr = NULL;
  PyObject *__pyx_v_err = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  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;
  size_t __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  struct __pyx_opt_args_7cytimes_6errors_raise_error __pyx_t_14;
  int __pyx_t_15;
  char const *__pyx_t_16;
  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;
  char const *__pyx_t_23;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_24;
  char const *__pyx_t_25;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_range", 0);
  __Pyx_INCREF(__pyx_v_freq);

  /* "cytimes/pddt.py":601
 *         >>> Pddt(pd.date_range(...))
 *         """
 *         if freq is None and (periods is None or start is None or end is None):             # <<<<<<<<<<<<<<
 *             freq = "D"
 *         try:
*/
  __pyx_t_2 = (__pyx_v_freq == Py_None);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_periods == ((PyObject*)Py_None));
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_start == Py_None);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_end == Py_None);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":602
 *         """
 *         if freq is None and (periods is None or start is None or end is None):
 *             freq = "D"             # <<<<<<<<<<<<<<
 *         try:
 *             dtarr = DatetimeArray._generate_range(
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_D);
    __Pyx_DECREF_SET(__pyx_v_freq, __pyx_mstate_global->__pyx_n_u_D);

    /* "cytimes/pddt.py":601
 *         >>> Pddt(pd.date_range(...))
 *         """
 *         if freq is None and (periods is None or start is None or end is None):             # <<<<<<<<<<<<<<
 *             freq = "D"
 *         try:
*/
  }

  /* "cytimes/pddt.py":603
 *         if freq is None and (periods is None or start is None or end is None):
 *             freq = "D"
 *         try:             # <<<<<<<<<<<<<<
 *             dtarr = DatetimeArray._generate_range(
 *                 start=start,
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "cytimes/pddt.py":604
 *             freq = "D"
 *         try:
 *             dtarr = DatetimeArray._generate_range(             # <<<<<<<<<<<<<<
 *                 start=start,
 *                 end=end,
*/
      __pyx_t_7 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_DatetimeArray); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 604, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_generate_range); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 604, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "cytimes/pddt.py":609
 *                 periods=periods,
 *                 freq=freq,
 *                 tz=utils.tz_parse(tz),             # <<<<<<<<<<<<<<
 *                 normalize=normalize,
 *                 inclusive=inclusive,
*/
      __pyx_t_8 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tz); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 609, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_8);

      /* "cytimes/pddt.py":610
 *                 freq=freq,
 *                 tz=utils.tz_parse(tz),
 *                 normalize=normalize,             # <<<<<<<<<<<<<<
 *                 inclusive=inclusive,
 *                 unit=unit,
*/
      __pyx_t_10 = __Pyx_PyBool_FromLong(__pyx_v_normalize); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 610, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_10);

      /* "cytimes/pddt.py":612
 *                 normalize=normalize,
 *                 inclusive=inclusive,
 *                 unit=unit,             # <<<<<<<<<<<<<<
 *             )
 *         # fmt: off
*/
      __pyx_t_11 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
        assert(__pyx_t_7);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
        __pyx_t_11 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 8 : 0)] = {__pyx_t_7, NULL};
        __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 604, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_start, __pyx_v_start, __pyx_t_12, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 604, __pyx_L8_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_end, __pyx_v_end, __pyx_t_12, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 604, __pyx_L8_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_periods, __pyx_v_periods, __pyx_t_12, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 604, __pyx_L8_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_freq, __pyx_v_freq, __pyx_t_12, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 604, __pyx_L8_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_8, __pyx_t_12, __pyx_callargs+1, 4) < (0)) __PYX_ERR(0, 604, __pyx_L8_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_normalize, __pyx_t_10, __pyx_t_12, __pyx_callargs+1, 5) < (0)) __PYX_ERR(0, 604, __pyx_L8_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_inclusive, __pyx_v_inclusive, __pyx_t_12, __pyx_callargs+1, 6) < (0)) __PYX_ERR(0, 604, __pyx_L8_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_unit, __pyx_v_unit, __pyx_t_12, __pyx_callargs+1, 7) < (0)) __PYX_ERR(0, 604, __pyx_L8_error)
        __pyx_t_6 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_11, (1-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 604, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_6);
      }
      __pyx_v_dtarr = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "cytimes/pddt.py":603
 *         if freq is None and (periods is None or start is None or end is None):
 *             freq = "D"
 *         try:             # <<<<<<<<<<<<<<
 *             dtarr = DatetimeArray._generate_range(
 *                 start=start,
*/
    }
    __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_L8_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cytimes/pddt.py":615
 *             )
 *         # fmt: off
 *         except errors.PdOutOfBoundsDatetime as err:             # <<<<<<<<<<<<<<
 *             errors.raise_error(errors.OutOfBoundsError, cls, "date_range(...)",
 *                 "Try to set 'unit' to a lower resolution.", err)
*/
    __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_9, &__pyx_t_12);
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 615, __pyx_L10_except_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_PdOutOfBoundsDatetime); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L10_except_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_13 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_6, __pyx_t_8);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_ErrRestore(__pyx_t_6, __pyx_t_9, __pyx_t_12);
    __pyx_t_6 = 0; __pyx_t_9 = 0; __pyx_t_12 = 0;
    if (__pyx_t_13) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.date_range", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_9, &__pyx_t_6) < 0) __PYX_ERR(0, 615, __pyx_L10_except_error)
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_9);
      __pyx_v_err = __pyx_t_9;
      /*try:*/ {

        /* "cytimes/pddt.py":616
 *         # fmt: off
 *         except errors.PdOutOfBoundsDatetime as err:
 *             errors.raise_error(errors.OutOfBoundsError, cls, "date_range(...)",             # <<<<<<<<<<<<<<
 *                 "Try to set 'unit' to a lower resolution.", err)
 *             return  # unreachable: suppress compiler warning
*/
        __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 616, __pyx_L19_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_OutOfBoundsError); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 616, __pyx_L19_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "cytimes/pddt.py":617
 *         except errors.PdOutOfBoundsDatetime as err:
 *             errors.raise_error(errors.OutOfBoundsError, cls, "date_range(...)",
 *                 "Try to set 'unit' to a lower resolution.", err)             # <<<<<<<<<<<<<<
 *             return  # unreachable: suppress compiler warning
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:
*/
        __pyx_t_8 = __pyx_v_err;
        __Pyx_INCREF(__pyx_t_8);
        if (!(likely(__Pyx_PyException_Check(__pyx_t_8))||((__pyx_t_8) == Py_None) || __Pyx_RaiseUnexpectedTypeError("Exception", __pyx_t_8))) __PYX_ERR(0, 617, __pyx_L19_error)

        /* "cytimes/pddt.py":616
 *         # fmt: off
 *         except errors.PdOutOfBoundsDatetime as err:
 *             errors.raise_error(errors.OutOfBoundsError, cls, "date_range(...)",             # <<<<<<<<<<<<<<
 *                 "Try to set 'unit' to a lower resolution.", err)
 *             return  # unreachable: suppress compiler warning
*/
        __pyx_t_14.__pyx_n = 4;
        __pyx_t_14.cls = __pyx_v_cls;
        __pyx_t_14.input_msg = __pyx_mstate_global->__pyx_kp_u_date_range;
        __pyx_t_14.error_msg = __pyx_mstate_global->__pyx_kp_u_Try_to_set_unit_to_a_lower_resol;
        __pyx_t_14.tb_exc = ((PyObject*)__pyx_t_8);
        __pyx_f_7cytimes_6errors_raise_error(__pyx_t_10, 0, &__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 616, __pyx_L19_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "cytimes/pddt.py":618
 *             errors.raise_error(errors.OutOfBoundsError, cls, "date_range(...)",
 *                 "Try to set 'unit' to a lower resolution.", err)
 *             return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:
 *             errors.raise_error(errors.AmbiguousTimeError, cls, "date_range(...)", None, err)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L18_return;
      }

      /* "cytimes/pddt.py":615
 *             )
 *         # fmt: off
 *         except errors.PdOutOfBoundsDatetime as err:             # <<<<<<<<<<<<<<
 *             errors.raise_error(errors.OutOfBoundsError, cls, "date_range(...)",
 *                 "Try to set 'unit' to a lower resolution.", err)
*/
      /*finally:*/ {
        __pyx_L19_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __pyx_t_13 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
          goto __pyx_L10_except_error;
        }
        __pyx_L18_return: {
          __pyx_t_22 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          __pyx_r = __pyx_t_22;
          __pyx_t_22 = 0;
          goto __pyx_L11_except_return;
        }
      }
    }

    /* "cytimes/pddt.py":619
 *                 "Try to set 'unit' to a lower resolution.", err)
 *             return  # unreachable: suppress compiler warning
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:             # <<<<<<<<<<<<<<
 *             errors.raise_error(errors.AmbiguousTimeError, cls, "date_range(...)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
    __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_9, &__pyx_t_12);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 619, __pyx_L10_except_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_PytzAmbiguousTimeError); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 619, __pyx_L10_except_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 619, __pyx_L10_except_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_PytzNonExistentTimeError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 619, __pyx_L10_except_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_15 = __Pyx_PyErr_GivenExceptionMatches2(__pyx_t_6, __pyx_t_10, __pyx_t_7);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_ErrRestore(__pyx_t_6, __pyx_t_9, __pyx_t_12);
    __pyx_t_6 = 0; __pyx_t_9 = 0; __pyx_t_12 = 0;
    if (__pyx_t_15) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.date_range", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_9, &__pyx_t_6) < 0) __PYX_ERR(0, 619, __pyx_L10_except_error)
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_9);
      __pyx_v_err = __pyx_t_9;
      /*try:*/ {

        /* "cytimes/pddt.py":620
 *             return  # unreachable: suppress compiler warning
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:
 *             errors.raise_error(errors.AmbiguousTimeError, cls, "date_range(...)", None, err)             # <<<<<<<<<<<<<<
 *             return  # unreachable: suppress compiler warning
 *         except Exception as err:
*/
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 620, __pyx_L30_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_AmbiguousTimeError); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 620, __pyx_L30_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __pyx_v_err;
        __Pyx_INCREF(__pyx_t_7);
        if (!(likely(__Pyx_PyException_Check(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("Exception", __pyx_t_7))) __PYX_ERR(0, 620, __pyx_L30_error)
        __pyx_t_14.__pyx_n = 4;
        __pyx_t_14.cls = __pyx_v_cls;
        __pyx_t_14.input_msg = __pyx_mstate_global->__pyx_kp_u_date_range;
        __pyx_t_14.error_msg = ((PyObject*)Py_None);
        __pyx_t_14.tb_exc = ((PyObject*)__pyx_t_7);
        __pyx_f_7cytimes_6errors_raise_error(__pyx_t_10, 0, &__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 620, __pyx_L30_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "cytimes/pddt.py":621
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:
 *             errors.raise_error(errors.AmbiguousTimeError, cls, "date_range(...)", None, err)
 *             return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "date_range(...)", None, err)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L29_return;
      }

      /* "cytimes/pddt.py":619
 *                 "Try to set 'unit' to a lower resolution.", err)
 *             return  # unreachable: suppress compiler warning
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:             # <<<<<<<<<<<<<<
 *             errors.raise_error(errors.AmbiguousTimeError, cls, "date_range(...)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
      /*finally:*/ {
        __pyx_L30_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_18, &__pyx_t_17);
          if ( unlikely(__Pyx_GetException(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_17);
          __pyx_t_15 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_23 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_18, __pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_22, __pyx_t_21, __pyx_t_20);
          __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0;
          __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_23;
          goto __pyx_L10_except_error;
        }
        __pyx_L29_return: {
          __pyx_t_17 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          __pyx_r = __pyx_t_17;
          __pyx_t_17 = 0;
          goto __pyx_L11_except_return;
        }
      }
    }

    /* "cytimes/pddt.py":622
 *             errors.raise_error(errors.AmbiguousTimeError, cls, "date_range(...)", None, err)
 *             return  # unreachable: suppress compiler warning
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "date_range(...)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
    __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_13) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.date_range", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_12) < 0) __PYX_ERR(0, 622, __pyx_L10_except_error)
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_9);
      __pyx_v_err = __pyx_t_9;
      /*try:*/ {

        /* "cytimes/pddt.py":623
 *             return  # unreachable: suppress compiler warning
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "date_range(...)", None, err)             # <<<<<<<<<<<<<<
 *             return  # unreachable: suppress compiler warning
 *         # fmt: on
*/
        __pyx_t_7 = __pyx_v_err;
        __Pyx_INCREF(__pyx_t_7);
        if (!(likely(__Pyx_PyException_Check(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("Exception", __pyx_t_7))) __PYX_ERR(0, 623, __pyx_L41_error)
        __pyx_t_24.__pyx_n = 4;
        __pyx_t_24.cls = __pyx_v_cls;
        __pyx_t_24.input_msg = __pyx_mstate_global->__pyx_kp_u_date_range;
        __pyx_t_24.error_msg = ((PyObject*)Py_None);
        __pyx_t_24.tb_exc = ((PyObject*)__pyx_t_7);
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_24); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 623, __pyx_L41_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "cytimes/pddt.py":624
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "date_range(...)", None, err)
 *             return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *         # fmt: on
 *         return cls._new(dtarr, name=name)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L40_return;
      }

      /* "cytimes/pddt.py":622
 *             errors.raise_error(errors.AmbiguousTimeError, cls, "date_range(...)", None, err)
 *             return  # unreachable: suppress compiler warning
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "date_range(...)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
      /*finally:*/ {
        __pyx_L41_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __pyx_t_13 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_25 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_25;
          goto __pyx_L10_except_error;
        }
        __pyx_L40_return: {
          __pyx_t_22 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          __pyx_r = __pyx_t_22;
          __pyx_t_22 = 0;
          goto __pyx_L11_except_return;
        }
      }
    }
    goto __pyx_L10_except_error;

    /* "cytimes/pddt.py":603
 *         if freq is None and (periods is None or start is None or end is None):
 *             freq = "D"
 *         try:             # <<<<<<<<<<<<<<
 *             dtarr = DatetimeArray._generate_range(
 *                 start=start,
*/
    __pyx_L10_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_L11_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_L13_try_end:;
  }

  /* "cytimes/pddt.py":626
 *             return  # unreachable: suppress compiler warning
 *         # fmt: on
 *         return cls._new(dtarr, name=name)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_9 = __pyx_v_cls;
  __Pyx_INCREF(__pyx_t_9);
  __pyx_t_11 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_9, __pyx_v_dtarr};
    __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 626, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 626, __pyx_L1_error)
    __pyx_t_12 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 626, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  __pyx_r = __pyx_t_12;
  __pyx_t_12 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":541
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def date_range(
 *         cls,
*/

  /* function exit code */
  __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_12);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.date_range", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dtarr);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_freq);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":628
 *         return cls._new(dtarr, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def parse(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_11parse(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_10parse, "Parse from an array-like (1-dimensional) data `<'Pddt'>`.\n\n        :param data `<'Array-Like'>`: An array-like (1-dimensional) data containing datetime information.\n            Such as: `tuple`, `list`, `np.ndarray`, `DatetimeIndex`, `Series`, etc.\n\n        :param freq `<'str/timedelta/BaseOffset/None'>`: The frequency of the 'data'. Defaults to `None`.\n\n            - `<'str'>` A frequency string (e.g. `'D', 'h', 's', 'ms'`), or `'infer'` for auto-detection.\n            - `<'timedelta'>` A datetime.timedelta instance.\n            - `<'BaseOffset'>` A pandas date offset instance.\n\n        :param tz `<'tzinfo/str/None'>`: The optional target timezone. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :param ambiguous `<'str/ndarray[bool]'>`: Specified how ambiguous times should be handled. Defaults to `'raise'`.\n\n            - `'raise'` will raise an `AmbiguousTimeError` if there are ambiguous times.\n            - `'infer'` will attempt to infer fall dst-transition hours based on order.\n            - `'NaT'` will yield NaT where there are ambiguous times.\n            - `<'ndarray[bool]'>` where True signifies a DST time, False signifies a non-DST\n                time (note that this flag is only applicable for ambiguous times)\n\n        :param yearfirst `<'bool/None'>`: Parse the first ambiguous Y/M/D value as year. Defaults to `True`.\n\n        :param dayfirst `<'bool/None'>`: Parse the first ambiguous Y/M/D values as day. Defaults to `False`.\n\n        :param as_unit `<'str/None'>`: Convert to specified datetime unit after construction. Defaults to `None`.\n            Supports: `'s'`, `'ms'`, `'us'`, `'ns'`.\n\n        :param copy `<'bool'>`: Whether to make a copy of the 'data'. Defaults to `False`.\n\n        :param name `<'Hashable/None'>`: The name assigned to the index. Defau""lts to `None`.\n\n        :param cfg `<'Configs/None'>`: The Parser configuration. Defaults to `None`.\n            Only applicable to datetime-string parsing. If `None`, uses the module's default `Configs`.\n\n        :returns `<'Pddt'>`: The resulting datetime index.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_11parse = {"parse", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_11parse, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_10parse};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_11parse(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_freq = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_v_ambiguous = 0;
  int __pyx_v_yearfirst;
  int __pyx_v_dayfirst;
  PyObject *__pyx_v_as_unit = 0;
  int __pyx_v_copy;
  PyObject *__pyx_v_name = 0;
  struct __pyx_obj_7cytimes_6parser_Configs *__pyx_v_cfg = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[11] = {0,0,0,0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_data,&__pyx_mstate_global->__pyx_n_u_freq,&__pyx_mstate_global->__pyx_n_u_tz,&__pyx_mstate_global->__pyx_n_u_ambiguous,&__pyx_mstate_global->__pyx_n_u_yearfirst,&__pyx_mstate_global->__pyx_n_u_dayfirst,&__pyx_mstate_global->__pyx_n_u_as_unit,&__pyx_mstate_global->__pyx_n_u_copy,&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_cfg,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 628, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case 11:
        values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 628, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case 10:
        values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 628, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 628, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 628, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 628, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 628, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 628, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 628, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 628, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 628, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 628, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "parse", 0) < (0)) __PYX_ERR(0, 628, __pyx_L3_error)

      /* "cytimes/pddt.py":632
 *         cls,
 *         data: object,
 *         freq: object | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         ambiguous: object = "raise",
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":633
 *         data: object,
 *         freq: object | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         ambiguous: object = "raise",
 *         yearfirst: bool = True,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_raise)));

      /* "cytimes/pddt.py":637
 *         yearfirst: bool = True,
 *         dayfirst: bool = False,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         copy: bool = False,
 *         name: Hashable | None = None,
*/
      if (!values[7]) values[7] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":639
 *         as_unit: str = None,
 *         copy: bool = False,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *         cfg: Configs = None,
 *     ) -> Self:
*/
      if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":640
 *         copy: bool = False,
 *         name: Hashable | None = None,
 *         cfg: Configs = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Parse from an array-like (1-dimensional) data `<'Pddt'>`.
*/
      if (!values[10]) values[10] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("parse", 0, 2, 11, i); __PYX_ERR(0, 628, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case 11:
        values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 628, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case 10:
        values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 628, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 628, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 628, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 628, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 628, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 628, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 628, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 628, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 628, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 628, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pddt.py":632
 *         cls,
 *         data: object,
 *         freq: object | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         ambiguous: object = "raise",
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":633
 *         data: object,
 *         freq: object | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         ambiguous: object = "raise",
 *         yearfirst: bool = True,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_raise)));

      /* "cytimes/pddt.py":637
 *         yearfirst: bool = True,
 *         dayfirst: bool = False,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         copy: bool = False,
 *         name: Hashable | None = None,
*/
      if (!values[7]) values[7] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":639
 *         as_unit: str = None,
 *         copy: bool = False,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *         cfg: Configs = None,
 *     ) -> Self:
*/
      if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":640
 *         copy: bool = False,
 *         name: Hashable | None = None,
 *         cfg: Configs = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Parse from an array-like (1-dimensional) data `<'Pddt'>`.
*/
      if (!values[10]) values[10] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_freq = values[2];
    __pyx_v_tz = values[3];
    __pyx_v_ambiguous = values[4];
    if (values[5]) {
      __pyx_v_yearfirst = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_yearfirst == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 635, __pyx_L3_error)
    } else {

      /* "cytimes/pddt.py":635
 *         tz: datetime.tzinfo | str | None = None,
 *         ambiguous: object = "raise",
 *         yearfirst: bool = True,             # <<<<<<<<<<<<<<
 *         dayfirst: bool = False,
 *         as_unit: str = None,
*/
      __pyx_v_yearfirst = ((int)((int)1));
    }
    if (values[6]) {
      __pyx_v_dayfirst = __Pyx_PyObject_IsTrue(values[6]); if (unlikely((__pyx_v_dayfirst == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 636, __pyx_L3_error)
    } else {

      /* "cytimes/pddt.py":636
 *         ambiguous: object = "raise",
 *         yearfirst: bool = True,
 *         dayfirst: bool = False,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         copy: bool = False,
*/
      __pyx_v_dayfirst = ((int)((int)0));
    }
    __pyx_v_as_unit = ((PyObject*)values[7]);
    if (values[8]) {
      __pyx_v_copy = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_copy == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 638, __pyx_L3_error)
    } else {

      /* "cytimes/pddt.py":638
 *         dayfirst: bool = False,
 *         as_unit: str = None,
 *         copy: bool = False,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *         cfg: Configs = None,
*/
      __pyx_v_copy = ((int)((int)0));
    }
    __pyx_v_name = values[9];
    __pyx_v_cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)values[10]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parse", 0, 2, 11, __pyx_nargs); __PYX_ERR(0, 628, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_as_unit), (&PyUnicode_Type), 1, "as_unit", 2))) __PYX_ERR(0, 637, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfg), __pyx_mstate_global->__pyx_ptype_7cytimes_6parser_Configs, 1, "cfg", 0))) __PYX_ERR(0, 640, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_10parse(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_freq, __pyx_v_tz, __pyx_v_ambiguous, __pyx_v_yearfirst, __pyx_v_dayfirst, __pyx_v_as_unit, __pyx_v_copy, __pyx_v_name, __pyx_v_cfg);

  /* "cytimes/pddt.py":628
 *         return cls._new(dtarr, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def parse(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_10parse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_freq, PyObject *__pyx_v_tz, PyObject *__pyx_v_ambiguous, int __pyx_v_yearfirst, int __pyx_v_dayfirst, PyObject *__pyx_v_as_unit, int __pyx_v_copy, PyObject *__pyx_v_name, struct __pyx_obj_7cytimes_6parser_Configs *__pyx_v_cfg) {
  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;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse", 0);

  /* "cytimes/pddt.py":683
 *         :returns `<'Pddt'>`: The resulting datetime index.
 *         """
 *         return cls(             # <<<<<<<<<<<<<<
 *             data,
 *             freq=freq,
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_3 = __pyx_v_cls; 

  /* "cytimes/pddt.py":688
 *             tz=tz,
 *             ambiguous=ambiguous,
 *             yearfirst=yearfirst,             # <<<<<<<<<<<<<<
 *             dayfirst=dayfirst,
 *             as_unit=as_unit,
*/
  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_yearfirst); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "cytimes/pddt.py":689
 *             ambiguous=ambiguous,
 *             yearfirst=yearfirst,
 *             dayfirst=dayfirst,             # <<<<<<<<<<<<<<
 *             as_unit=as_unit,
 *             copy=copy,
*/
  __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_dayfirst); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "cytimes/pddt.py":691
 *             dayfirst=dayfirst,
 *             as_unit=as_unit,
 *             copy=copy,             # <<<<<<<<<<<<<<
 *             name=name,
 *             cfg=cfg,
*/
  __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_copy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "cytimes/pddt.py":693
 *             copy=copy,
 *             name=name,
 *             cfg=cfg,             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_7 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_7 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 9 : 0)] = {__pyx_t_2, __pyx_v_data};
    __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_freq, __pyx_v_freq, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 683, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_8, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 683, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ambiguous, __pyx_v_ambiguous, __pyx_t_8, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 683, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_yearfirst, __pyx_t_4, __pyx_t_8, __pyx_callargs+2, 3) < (0)) __PYX_ERR(0, 683, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dayfirst, __pyx_t_5, __pyx_t_8, __pyx_callargs+2, 4) < (0)) __PYX_ERR(0, 683, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_8, __pyx_callargs+2, 5) < (0)) __PYX_ERR(0, 683, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_copy, __pyx_t_6, __pyx_t_8, __pyx_callargs+2, 6) < (0)) __PYX_ERR(0, 683, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_8, __pyx_callargs+2, 7) < (0)) __PYX_ERR(0, 683, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_cfg, ((PyObject *)__pyx_v_cfg), __pyx_t_8, __pyx_callargs+2, 8) < (0)) __PYX_ERR(0, 683, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":628
 *         return cls._new(dtarr, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def parse(
 *         cls,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":696
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def now(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_13now(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_12now, "Construct an index from the current datetime with optional timezone `<'Pddt'>`.\n\n        :param size `<'int/Any'>`: The target size of the index.\n\n            - `<'int'>` A positive integer number.\n            - `<'Any'>` Takes the `len(size)` value as the index size.\n\n        :param tz `<'tzinfo/str/None'>`: The optional timezone. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :param as_unit `<'str/None'>`: Convert to specified datetime unit after construction. Defaults to `None`.\n            Supports: `'s'`, `'ms'`, `'us'`, `'ns'`.\n\n        :param name `<'Hashable/None'>`: Optional name of the index. Defaults to `None`.\n\n        :returns `<'Pddt'>`: The resulting datetime index (naive when `tz` is None).\n\n        ## Notice\n        - This method only construct `datetime64[us]` index (microsecond resolution).\n        - Parameter `as_unit` converts it to other datetime units after construction.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_13now = {"now", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_13now, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_12now};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_13now(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_v_as_unit = 0;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("now (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_size_2,&__pyx_mstate_global->__pyx_n_u_tz,&__pyx_mstate_global->__pyx_n_u_as_unit,&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 696, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "now", 0) < (0)) __PYX_ERR(0, 696, __pyx_L3_error)

      /* "cytimes/pddt.py":700
 *         cls,
 *         size: int | Any,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":701
 *         size: int | Any,
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":702
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from the current datetime with optional timezone `<'Pddt'>`.
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("now", 0, 2, 5, i); __PYX_ERR(0, 696, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 696, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 696, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pddt.py":700
 *         cls,
 *         size: int | Any,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":701
 *         size: int | Any,
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":702
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from the current datetime with optional timezone `<'Pddt'>`.
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_size = values[1];
    __pyx_v_tz = values[2];
    __pyx_v_as_unit = ((PyObject*)values[3]);
    __pyx_v_name = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("now", 0, 2, 5, __pyx_nargs); __PYX_ERR(0, 696, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.now", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_as_unit), (&PyUnicode_Type), 1, "as_unit", 2))) __PYX_ERR(0, 701, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_12now(__pyx_self, __pyx_v_cls, __pyx_v_size, __pyx_v_tz, __pyx_v_as_unit, __pyx_v_name);

  /* "cytimes/pddt.py":696
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def now(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_12now(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_size, PyObject *__pyx_v_tz, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name) {
  Py_ssize_t __pyx_v_size_i;
  PyDateTime_DateTime *__pyx_v_dt = 0;
  PY_LONG_LONG __pyx_v_us;
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_dt_now __pyx_t_3;
  PY_LONG_LONG __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_us __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("now", 0);
  __Pyx_INCREF(__pyx_v_tz);

  /* "cytimes/pddt.py":728
 *         - Parameter `as_unit` converts it to other datetime units after construction.
 *         """
 *         tz = utils.tz_parse(tz)             # <<<<<<<<<<<<<<
 *         size_i: cython.Py_ssize_t = _parse_size(cls, size)
 *         dt: datetime.datetime = utils.dt_now(tz, None)
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":729
 *         """
 *         tz = utils.tz_parse(tz)
 *         size_i: cython.Py_ssize_t = _parse_size(cls, size)             # <<<<<<<<<<<<<<
 *         dt: datetime.datetime = utils.dt_now(tz, None)
 *         us: cython.longlong = utils.dt_to_us(dt, False)
*/
  __pyx_t_2 = __pyx_f_7cytimes_4pddt__parse_size(__pyx_v_cls, __pyx_v_size); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 729, __pyx_L1_error)
  __pyx_v_size_i = __pyx_t_2;

  /* "cytimes/pddt.py":730
 *         tz = utils.tz_parse(tz)
 *         size_i: cython.Py_ssize_t = _parse_size(cls, size)
 *         dt: datetime.datetime = utils.dt_now(tz, None)             # <<<<<<<<<<<<<<
 *         us: cython.longlong = utils.dt_to_us(dt, False)
 *         arr: np.ndarray = utils.dt64arr_fr_int64(us, size_i, "us")
*/
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.tzinfo = __pyx_v_tz;
  __pyx_t_3.dtclass = Py_None;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_now(&__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":731
 *         size_i: cython.Py_ssize_t = _parse_size(cls, size)
 *         dt: datetime.datetime = utils.dt_now(tz, None)
 *         us: cython.longlong = utils.dt_to_us(dt, False)             # <<<<<<<<<<<<<<
 *         arr: np.ndarray = utils.dt64arr_fr_int64(us, size_i, "us")
 *         return cls._new(arr, tz=tz, as_unit=as_unit, name=name)
*/
  __pyx_t_5.__pyx_n = 1;
  __pyx_t_5.utc = 0;
  __pyx_t_4 = __pyx_f_7cytimes_5utils_dt_to_us(__pyx_v_dt, &__pyx_t_5); if (unlikely(__pyx_t_4 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 731, __pyx_L1_error)
  __pyx_v_us = __pyx_t_4;

  /* "cytimes/pddt.py":732
 *         dt: datetime.datetime = utils.dt_now(tz, None)
 *         us: cython.longlong = utils.dt_to_us(dt, False)
 *         arr: np.ndarray = utils.dt64arr_fr_int64(us, size_i, "us")             # <<<<<<<<<<<<<<
 *         return cls._new(arr, tz=tz, as_unit=as_unit, name=name)
 * 
*/
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_fr_int64(__pyx_v_us, __pyx_v_size_i, __pyx_mstate_global->__pyx_n_u_us)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":733
 *         us: cython.longlong = utils.dt_to_us(dt, False)
 *         arr: np.ndarray = utils.dt64arr_fr_int64(us, size_i, "us")
 *         return cls._new(arr, tz=tz, as_unit=as_unit, name=name)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __pyx_v_cls;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_6, ((PyObject *)__pyx_v_arr)};
    __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 733, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_8, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 733, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_8, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 733, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":696
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def now(
 *         cls,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.now", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":735
 *         return cls._new(arr, tz=tz, as_unit=as_unit, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def utcnow(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_15utcnow(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_14utcnow, "Construct an index from the current `UTC` datetime (timezone-aware) `<'Pddt'>`.\n\n        :param size `<'int/Any'>`: The target size of the index.\n\n            - `<'int'>` A positive integer number.\n            - `<'Any'>` Takes the `len(size)` value as the index size.\n\n        :param as_unit `<'str/None'>`: Convert to specified datetime unit after construction. Defaults to `None`.\n            Supports: `'s'`, `'ms'`, `'us'`, `'ns'`.\n\n        :param name `<'Hashable/None'>`: Optional name of the index. Defaults to `None`.\n\n        :returns `<'Pddt'>`: The resulting datetime index (timezone-aware).\n\n        ## Notice\n        - This method only construct `datetime64[us]` index (microsecond resolution).\n        - Parameter `as_unit` converts it to other datetime units after construction.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_15utcnow = {"utcnow", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_15utcnow, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_14utcnow};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_15utcnow(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_as_unit = 0;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utcnow (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_size_2,&__pyx_mstate_global->__pyx_n_u_as_unit,&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 735, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 735, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 735, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 735, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 735, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "utcnow", 0) < (0)) __PYX_ERR(0, 735, __pyx_L3_error)

      /* "cytimes/pddt.py":739
 *         cls,
 *         size: int | Any,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":740
 *         size: int | Any,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from the current `UTC` datetime (timezone-aware) `<'Pddt'>`.
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("utcnow", 0, 2, 4, i); __PYX_ERR(0, 735, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 735, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 735, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 735, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 735, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pddt.py":739
 *         cls,
 *         size: int | Any,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":740
 *         size: int | Any,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from the current `UTC` datetime (timezone-aware) `<'Pddt'>`.
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_size = values[1];
    __pyx_v_as_unit = ((PyObject*)values[2]);
    __pyx_v_name = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("utcnow", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 735, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.utcnow", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_as_unit), (&PyUnicode_Type), 1, "as_unit", 2))) __PYX_ERR(0, 739, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_14utcnow(__pyx_self, __pyx_v_cls, __pyx_v_size, __pyx_v_as_unit, __pyx_v_name);

  /* "cytimes/pddt.py":735
 *         return cls._new(arr, tz=tz, as_unit=as_unit, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def utcnow(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_14utcnow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_size, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utcnow", 0);

  /* "cytimes/pddt.py":760
 *         - Parameter `as_unit` converts it to other datetime units after construction.
 *         """
 *         return cls.now(size, tz=utils.UTC, as_unit=as_unit, name=name)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_cls;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_2, __pyx_v_size};
    __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, ((PyObject *)__pyx_v_7cytimes_5utils_UTC), __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 760, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_4, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 760, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_4, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 760, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_now, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":735
 *         return cls._new(arr, tz=tz, as_unit=as_unit, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def utcnow(
 *         cls,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.utcnow", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":762
 *         return cls.now(size, tz=utils.UTC, as_unit=as_unit, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def today(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_17today(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_16today, "Construct an index from the current `local` datetime (timezone-naive) `<'Pddt'>`.\n\n        :param size `<'int/Any'>`: The target size of the index.\n\n            - `<'int'>` A positive integer number.\n            - `<'Any'>` Takes the `len(size)` value as the index size.\n\n        :param as_unit `<'str/None'>`: Convert to specified datetime unit after construction. Defaults to `None`.\n            Supports: `'s'`, `'ms'`, `'us'`, `'ns'`.\n\n        :param name `<'Hashable/None'>`: Optional name of the index. Defaults to `None`.\n\n        :returns `<'Pddt'>`: The resulting datetime index (timezone-naive).\n\n        ## Notice\n        - This method only construct `datetime64[us]` index (microsecond resolution).\n        - Parameter `as_unit` converts it to other datetime units after construction.\n\n        ## Equivalent\n        >>> Pddt.now(size, tz=None)\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_17today = {"today", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_17today, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_16today};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_17today(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_as_unit = 0;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("today (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_size_2,&__pyx_mstate_global->__pyx_n_u_as_unit,&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 762, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 762, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 762, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 762, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 762, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "today", 0) < (0)) __PYX_ERR(0, 762, __pyx_L3_error)

      /* "cytimes/pddt.py":766
 *         cls,
 *         size: int | Any,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":767
 *         size: int | Any,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from the current `local` datetime (timezone-naive) `<'Pddt'>`.
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("today", 0, 2, 4, i); __PYX_ERR(0, 762, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 762, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 762, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 762, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 762, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pddt.py":766
 *         cls,
 *         size: int | Any,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":767
 *         size: int | Any,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from the current `local` datetime (timezone-naive) `<'Pddt'>`.
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_size = values[1];
    __pyx_v_as_unit = ((PyObject*)values[2]);
    __pyx_v_name = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("today", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 762, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.today", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_as_unit), (&PyUnicode_Type), 1, "as_unit", 2))) __PYX_ERR(0, 766, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_16today(__pyx_self, __pyx_v_cls, __pyx_v_size, __pyx_v_as_unit, __pyx_v_name);

  /* "cytimes/pddt.py":762
 *         return cls.now(size, tz=utils.UTC, as_unit=as_unit, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def today(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_16today(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_size, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("today", 0);

  /* "cytimes/pddt.py":790
 *         >>> Pddt.now(size, tz=None)
 *         """
 *         return cls.now(size, tz=None, as_unit=as_unit, name=name)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_cls;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_2, __pyx_v_size};
    __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, Py_None, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 790, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_4, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 790, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_4, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 790, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_now, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":762
 *         return cls.now(size, tz=utils.UTC, as_unit=as_unit, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def today(
 *         cls,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.today", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":792
 *         return cls.now(size, tz=None, as_unit=as_unit, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def combine(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_19combine(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_18combine, "Combine date and time into a new datetime index `<'Pddt'>`.\n\n        :param size `<'int/Any'>`: The target size of the index.\n\n            - `<'int'>` A positive integer number.\n            - `<'Any'>` Takes the `len(size)` value as the index size.\n\n        :param date `<'date/str/None'>`: A date-like object. Defaults to `None`.\n            If None, uses today's `local` date.\n\n        :param time `<'time/str/None'>`: A time-like object. Defaults to `None`.\n            If None, uses `00:00:00.000000`.\n\n        :param tz `<'tzinfo/str/None'>`: The optional timezone to `attach`. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive (when `time` has no timezone info, see `Notes`).\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :param as_unit `<'str/None'>`: Convert to specified datetime unit after construction. Defaults to `None`.\n            Supports: `'s'`, `'ms'`, `'us'`, `'ns'`.\n\n        :param name `<'Hashable/None'>`: Optional name of the index. Defaults to `None`.\n\n        :returns `<'Pddt'>`: The resulting datetime index.\n\n        ## Notice\n        - This method only construct `datetime64[us]` index (microsecond resolution).\n        - Parameter `as_unit` converts it to other datetime units after construction.\n\n        ## Notes\n        - Both `date` and `time` supports datetime-like object (please refer\n          to `Pydt.parse()` method for details), but only the corresponding date\n          or time fields are used for combination.\n        - If `tz` is `None`, but `time` contains timezone information, the\n          resulting datetime will be timezone-aware using `time`'s timezone.\n        - If `tz` is specified (not `None`), it `overrides` any timezone\n          information in `time`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_19combine = {"combine", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_19combine, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_18combine};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_19combine(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_date = 0;
  PyObject *__pyx_v_time = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_v_as_unit = 0;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[7] = {0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("combine (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_size_2,&__pyx_mstate_global->__pyx_n_u_date,&__pyx_mstate_global->__pyx_n_u_time,&__pyx_mstate_global->__pyx_n_u_tz,&__pyx_mstate_global->__pyx_n_u_as_unit,&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 792, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 792, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 792, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 792, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 792, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 792, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 792, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 792, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "combine", 0) < (0)) __PYX_ERR(0, 792, __pyx_L3_error)

      /* "cytimes/pddt.py":796
 *         cls,
 *         size: int | Any,
 *         date: datetime.date | str | None = None,             # <<<<<<<<<<<<<<
 *         time: datetime.time | str | None = None,
 *         tz: datetime.tzinfo | str | None = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":797
 *         size: int | Any,
 *         date: datetime.date | str | None = None,
 *         time: datetime.time | str | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":798
 *         date: datetime.date | str | None = None,
 *         time: datetime.time | str | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":799
 *         time: datetime.time | str | None = None,
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":800
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Combine date and time into a new datetime index `<'Pddt'>`.
*/
      if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("combine", 0, 2, 7, i); __PYX_ERR(0, 792, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 792, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 792, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 792, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 792, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 792, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 792, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 792, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pddt.py":796
 *         cls,
 *         size: int | Any,
 *         date: datetime.date | str | None = None,             # <<<<<<<<<<<<<<
 *         time: datetime.time | str | None = None,
 *         tz: datetime.tzinfo | str | None = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":797
 *         size: int | Any,
 *         date: datetime.date | str | None = None,
 *         time: datetime.time | str | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":798
 *         date: datetime.date | str | None = None,
 *         time: datetime.time | str | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":799
 *         time: datetime.time | str | None = None,
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":800
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Combine date and time into a new datetime index `<'Pddt'>`.
*/
      if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_size = values[1];
    __pyx_v_date = values[2];
    __pyx_v_time = values[3];
    __pyx_v_tz = values[4];
    __pyx_v_as_unit = ((PyObject*)values[5]);
    __pyx_v_name = values[6];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("combine", 0, 2, 7, __pyx_nargs); __PYX_ERR(0, 792, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.combine", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_as_unit), (&PyUnicode_Type), 1, "as_unit", 2))) __PYX_ERR(0, 799, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_18combine(__pyx_self, __pyx_v_cls, __pyx_v_size, __pyx_v_date, __pyx_v_time, __pyx_v_tz, __pyx_v_as_unit, __pyx_v_name);

  /* "cytimes/pddt.py":792
 *         return cls.now(size, tz=None, as_unit=as_unit, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def combine(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_18combine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_size, PyObject *__pyx_v_date, PyObject *__pyx_v_time, PyObject *__pyx_v_tz, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name) {
  Py_ssize_t __pyx_v_size_i;
  PyObject *__pyx_v_err = NULL;
  PyDateTime_DateTime *__pyx_v_dt = 0;
  PY_LONG_LONG __pyx_v_us;
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  struct __pyx_opt_args_7cytimes_6parser_parse_obj __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_13;
  int __pyx_t_14;
  char const *__pyx_t_15;
  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;
  struct __pyx_opt_args_7cytimes_5utils_date_fr_dt __pyx_t_22;
  char const *__pyx_t_23;
  struct __pyx_opt_args_7cytimes_5utils_time_fr_dt __pyx_t_24;
  struct __pyx_opt_args_7cytimes_5utils_dt_combine __pyx_t_25;
  PY_LONG_LONG __pyx_t_26;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_us __pyx_t_27;
  size_t __pyx_t_28;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("combine", 0);
  __Pyx_INCREF(__pyx_v_date);
  __Pyx_INCREF(__pyx_v_time);
  __Pyx_INCREF(__pyx_v_tz);

  /* "cytimes/pddt.py":842
 *         """
 *         # Timezone & size
 *         tz = utils.tz_parse(tz)             # <<<<<<<<<<<<<<
 *         size_i: cython.Py_ssize_t = _parse_size(cls, size)
 * 
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":843
 *         # Timezone & size
 *         tz = utils.tz_parse(tz)
 *         size_i: cython.Py_ssize_t = _parse_size(cls, size)             # <<<<<<<<<<<<<<
 * 
 *         # Parse date
*/
  __pyx_t_2 = __pyx_f_7cytimes_4pddt__parse_size(__pyx_v_cls, __pyx_v_size); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 843, __pyx_L1_error)
  __pyx_v_size_i = __pyx_t_2;

  /* "cytimes/pddt.py":846
 * 
 *         # Parse date
 *         if date is not None and not utils.is_date(date):             # <<<<<<<<<<<<<<
 *             try:
 *                 date = _parse_obj(date, None, True, False, True, True, None, None)
*/
  __pyx_t_4 = (__pyx_v_date != Py_None);
  if (__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __pyx_f_7cytimes_5utils_is_date(__pyx_v_date); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 846, __pyx_L1_error)
  __pyx_t_5 = (!__pyx_t_4);
  __pyx_t_3 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "cytimes/pddt.py":847
 *         # Parse date
 *         if date is not None and not utils.is_date(date):
 *             try:             # <<<<<<<<<<<<<<
 *                 date = _parse_obj(date, None, True, False, True, True, None, None)
 *             except Exception as err:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __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:*/ {

        /* "cytimes/pddt.py":848
 *         if date is not None and not utils.is_date(date):
 *             try:
 *                 date = _parse_obj(date, None, True, False, True, True, None, None)             # <<<<<<<<<<<<<<
 *             except Exception as err:
 *                 errors.raise_argument_error(cls, "combine(date, ...)", None, err)
*/
        __pyx_t_9.__pyx_n = 7;
        __pyx_t_9.__pyx_default = Py_None;
        __pyx_t_9.yearfirst = Py_True;
        __pyx_t_9.dayfirst = Py_False;
        __pyx_t_9.ignoretz = 1;
        __pyx_t_9.isoformat = 1;
        __pyx_t_9.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
        __pyx_t_9.dtclass = Py_None;
        __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_6parser_parse_obj(__pyx_v_date, 0, &__pyx_t_9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF_SET(__pyx_v_date, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "cytimes/pddt.py":847
 *         # Parse date
 *         if date is not None and not utils.is_date(date):
 *             try:             # <<<<<<<<<<<<<<
 *                 date = _parse_obj(date, None, True, False, True, True, None, None)
 *             except Exception as err:
*/
      }
      __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_L11_try_end;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "cytimes/pddt.py":849
 *             try:
 *                 date = _parse_obj(date, None, True, False, True, True, None, None)
 *             except Exception as err:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(cls, "combine(date, ...)", None, err)
 *             date = utils.date_fr_dt(date, None)
*/
      __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_10) {
        __Pyx_AddTraceback("cytimes.pddt.Pddt.combine", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_11, &__pyx_t_12) < 0) __PYX_ERR(0, 849, __pyx_L8_except_error)
        __Pyx_XGOTREF(__pyx_t_1);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_11);
        __pyx_v_err = __pyx_t_11;
        /*try:*/ {

          /* "cytimes/pddt.py":850
 *                 date = _parse_obj(date, None, True, False, True, True, None, None)
 *             except Exception as err:
 *                 errors.raise_argument_error(cls, "combine(date, ...)", None, err)             # <<<<<<<<<<<<<<
 *             date = utils.date_fr_dt(date, None)
 * 
*/
          __pyx_t_13.__pyx_n = 4;
          __pyx_t_13.cls = __pyx_v_cls;
          __pyx_t_13.input_msg = __pyx_mstate_global->__pyx_kp_u_combine_date;
          __pyx_t_13.error_msg = ((PyObject*)Py_None);
          __pyx_t_13.tb_exc = __pyx_v_err;
          __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_13); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 850, __pyx_L17_error)
        }

        /* "cytimes/pddt.py":849
 *             try:
 *                 date = _parse_obj(date, None, True, False, True, True, None, None)
 *             except Exception as err:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(cls, "combine(date, ...)", None, err)
 *             date = utils.date_fr_dt(date, None)
*/
        /*finally:*/ {
          /*normal exit:*/{
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            goto __pyx_L18;
          }
          __pyx_L17_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
            if ( unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
            __Pyx_XGOTREF(__pyx_t_16);
            __Pyx_XGOTREF(__pyx_t_17);
            __Pyx_XGOTREF(__pyx_t_18);
            __Pyx_XGOTREF(__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_21);
            __pyx_t_10 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            }
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_16);
            __Pyx_XGIVEREF(__pyx_t_17);
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
            __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
            __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
            goto __pyx_L8_except_error;
          }
          __pyx_L18:;
        }
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L7_exception_handled;
      }
      goto __pyx_L8_except_error;

      /* "cytimes/pddt.py":847
 *         # Parse date
 *         if date is not None and not utils.is_date(date):
 *             try:             # <<<<<<<<<<<<<<
 *                 date = _parse_obj(date, None, True, False, True, True, None, None)
 *             except Exception as err:
*/
      __pyx_L8_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_L7_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      __pyx_L11_try_end:;
    }

    /* "cytimes/pddt.py":851
 *             except Exception as err:
 *                 errors.raise_argument_error(cls, "combine(date, ...)", None, err)
 *             date = utils.date_fr_dt(date, None)             # <<<<<<<<<<<<<<
 * 
 *         # Prase time
*/
    if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 851, __pyx_L1_error)
    __pyx_t_22.__pyx_n = 1;
    __pyx_t_22.dclass = Py_None;
    __pyx_t_12 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_dt(((PyDateTime_DateTime *)__pyx_v_date), &__pyx_t_22)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF_SET(__pyx_v_date, __pyx_t_12);
    __pyx_t_12 = 0;

    /* "cytimes/pddt.py":846
 * 
 *         # Parse date
 *         if date is not None and not utils.is_date(date):             # <<<<<<<<<<<<<<
 *             try:
 *                 date = _parse_obj(date, None, True, False, True, True, None, None)
*/
  }

  /* "cytimes/pddt.py":854
 * 
 *         # Prase time
 *         if time is not None and not utils.is_time(time):             # <<<<<<<<<<<<<<
 *             try:
 *                 time = _parse_obj(
*/
  __pyx_t_5 = (__pyx_v_time != Py_None);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L24_bool_binop_done;
  }
  __pyx_t_5 = __pyx_f_7cytimes_5utils_is_time(__pyx_v_time); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 854, __pyx_L1_error)
  __pyx_t_4 = (!__pyx_t_5);
  __pyx_t_3 = __pyx_t_4;
  __pyx_L24_bool_binop_done:;
  if (__pyx_t_3) {

    /* "cytimes/pddt.py":855
 *         # Prase time
 *         if time is not None and not utils.is_time(time):
 *             try:             # <<<<<<<<<<<<<<
 *                 time = _parse_obj(
 *                     time, utils.EPOCH_DT, True, False, False, True, None, None
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_6);
      /*try:*/ {

        /* "cytimes/pddt.py":857
 *             try:
 *                 time = _parse_obj(
 *                     time, utils.EPOCH_DT, True, False, False, True, None, None             # <<<<<<<<<<<<<<
 *                 )
 *             except Exception as err:
*/
        __pyx_t_12 = ((PyObject *)__pyx_v_7cytimes_5utils_EPOCH_DT);
        __Pyx_INCREF(__pyx_t_12);

        /* "cytimes/pddt.py":856
 *         if time is not None and not utils.is_time(time):
 *             try:
 *                 time = _parse_obj(             # <<<<<<<<<<<<<<
 *                     time, utils.EPOCH_DT, True, False, False, True, None, None
 *                 )
*/
        __pyx_t_9.__pyx_n = 7;
        __pyx_t_9.__pyx_default = __pyx_t_12;
        __pyx_t_9.yearfirst = Py_True;
        __pyx_t_9.dayfirst = Py_False;
        __pyx_t_9.ignoretz = 0;
        __pyx_t_9.isoformat = 1;
        __pyx_t_9.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
        __pyx_t_9.dtclass = Py_None;
        __pyx_t_11 = ((PyObject *)__pyx_f_7cytimes_6parser_parse_obj(__pyx_v_time, 0, &__pyx_t_9)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 856, __pyx_L26_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF_SET(__pyx_v_time, __pyx_t_11);
        __pyx_t_11 = 0;

        /* "cytimes/pddt.py":855
 *         # Prase time
 *         if time is not None and not utils.is_time(time):
 *             try:             # <<<<<<<<<<<<<<
 *                 time = _parse_obj(
 *                     time, utils.EPOCH_DT, True, False, False, True, None, None
*/
      }
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L31_try_end;
      __pyx_L26_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;

      /* "cytimes/pddt.py":859
 *                     time, utils.EPOCH_DT, True, False, False, True, None, None
 *                 )
 *             except Exception as err:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(cls, "combine(time, ...)", None, err)
 *             time = utils.time_fr_dt(time, None)
*/
      __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_14) {
        __Pyx_AddTraceback("cytimes.pddt.Pddt.combine", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_1) < 0) __PYX_ERR(0, 859, __pyx_L28_except_error)
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_12);
        __pyx_v_err = __pyx_t_12;
        /*try:*/ {

          /* "cytimes/pddt.py":860
 *                 )
 *             except Exception as err:
 *                 errors.raise_argument_error(cls, "combine(time, ...)", None, err)             # <<<<<<<<<<<<<<
 *             time = utils.time_fr_dt(time, None)
 * 
*/
          __pyx_t_13.__pyx_n = 4;
          __pyx_t_13.cls = __pyx_v_cls;
          __pyx_t_13.input_msg = __pyx_mstate_global->__pyx_kp_u_combine_time;
          __pyx_t_13.error_msg = ((PyObject*)Py_None);
          __pyx_t_13.tb_exc = __pyx_v_err;
          __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_13); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 860, __pyx_L37_error)
        }

        /* "cytimes/pddt.py":859
 *                     time, utils.EPOCH_DT, True, False, False, True, None, None
 *                 )
 *             except Exception as err:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(cls, "combine(time, ...)", None, err)
 *             time = utils.time_fr_dt(time, None)
*/
        /*finally:*/ {
          /*normal exit:*/{
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            goto __pyx_L38;
          }
          __pyx_L37_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16);
            if ( unlikely(__Pyx_GetException(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_18);
            __Pyx_XGOTREF(__pyx_t_17);
            __Pyx_XGOTREF(__pyx_t_16);
            __pyx_t_14 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_23 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            }
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_XGIVEREF(__pyx_t_17);
            __Pyx_XGIVEREF(__pyx_t_16);
            __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_ErrRestore(__pyx_t_21, __pyx_t_20, __pyx_t_19);
            __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0;
            __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_23;
            goto __pyx_L28_except_error;
          }
          __pyx_L38:;
        }
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L27_exception_handled;
      }
      goto __pyx_L28_except_error;

      /* "cytimes/pddt.py":855
 *         # Prase time
 *         if time is not None and not utils.is_time(time):
 *             try:             # <<<<<<<<<<<<<<
 *                 time = _parse_obj(
 *                     time, utils.EPOCH_DT, True, False, False, True, None, None
*/
      __pyx_L28_except_error:;
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6);
      goto __pyx_L1_error;
      __pyx_L27_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6);
      __pyx_L31_try_end:;
    }

    /* "cytimes/pddt.py":861
 *             except Exception as err:
 *                 errors.raise_argument_error(cls, "combine(time, ...)", None, err)
 *             time = utils.time_fr_dt(time, None)             # <<<<<<<<<<<<<<
 * 
 *         # Combine datetime
*/
    if (!(likely(((__pyx_v_time) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_time, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 861, __pyx_L1_error)
    __pyx_t_24.__pyx_n = 1;
    __pyx_t_24.tclass = Py_None;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_dt(((PyDateTime_DateTime *)__pyx_v_time), &__pyx_t_24)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 861, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_time, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytimes/pddt.py":854
 * 
 *         # Prase time
 *         if time is not None and not utils.is_time(time):             # <<<<<<<<<<<<<<
 *             try:
 *                 time = _parse_obj(
*/
  }

  /* "cytimes/pddt.py":864
 * 
 *         # Combine datetime
 *         dt: datetime.datetime = utils.dt_combine(date, time, tz, None)             # <<<<<<<<<<<<<<
 *         us: cython.longlong = utils.dt_to_us(dt, False)
 *         arr: np.ndarray = utils.dt64arr_fr_int64(us, size_i, "us")
*/
  if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 864, __pyx_L1_error)
  if (!(likely(((__pyx_v_time) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_time, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 864, __pyx_L1_error)
  __pyx_t_25.__pyx_n = 4;
  __pyx_t_25.date = ((PyDateTime_Date *)__pyx_v_date);
  __pyx_t_25.time = ((PyDateTime_Time *)__pyx_v_time);
  __pyx_t_25.tzinfo = __pyx_v_tz;
  __pyx_t_25.dtclass = Py_None;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_combine(&__pyx_t_25)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":865
 *         # Combine datetime
 *         dt: datetime.datetime = utils.dt_combine(date, time, tz, None)
 *         us: cython.longlong = utils.dt_to_us(dt, False)             # <<<<<<<<<<<<<<
 *         arr: np.ndarray = utils.dt64arr_fr_int64(us, size_i, "us")
 *         return cls._new(arr, tz=tz, as_unit=as_unit, name=name)
*/
  __pyx_t_27.__pyx_n = 1;
  __pyx_t_27.utc = 0;
  __pyx_t_26 = __pyx_f_7cytimes_5utils_dt_to_us(__pyx_v_dt, &__pyx_t_27); if (unlikely(__pyx_t_26 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 865, __pyx_L1_error)
  __pyx_v_us = __pyx_t_26;

  /* "cytimes/pddt.py":866
 *         dt: datetime.datetime = utils.dt_combine(date, time, tz, None)
 *         us: cython.longlong = utils.dt_to_us(dt, False)
 *         arr: np.ndarray = utils.dt64arr_fr_int64(us, size_i, "us")             # <<<<<<<<<<<<<<
 *         return cls._new(arr, tz=tz, as_unit=as_unit, name=name)
 * 
*/
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_fr_int64(__pyx_v_us, __pyx_v_size_i, __pyx_mstate_global->__pyx_n_u_us)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":867
 *         us: cython.longlong = utils.dt_to_us(dt, False)
 *         arr: np.ndarray = utils.dt64arr_fr_int64(us, size_i, "us")
 *         return cls._new(arr, tz=tz, as_unit=as_unit, name=name)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_12 = __pyx_v_cls;
  __Pyx_INCREF(__pyx_t_12);
  __pyx_t_28 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_12, ((PyObject *)__pyx_v_arr)};
    __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 867, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_11, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 867, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_11, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 867, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_11, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 867, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_28, (2-__pyx_t_28) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11);
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":792
 *         return cls.now(size, tz=None, as_unit=as_unit, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def combine(
 *         cls,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.combine", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_date);
  __Pyx_XDECREF(__pyx_v_time);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":869
 *         return cls._new(arr, tz=tz, as_unit=as_unit, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromordinal(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_21fromordinal(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_20fromordinal, "Construct an index from Gregorian ordinal days `<'Pddt'>`.\n\n        :param ordinal `<'int/Array-like'>`: The ordinal days to construct with.\n\n            - `<'int'>` The integer representing the Gregorian ordinal day.\n            - `<'Array-like'>` An array-like object containing elements representing the ordinal days.\n\n        :param size `<'int/Any/None'>`: The target size of the index\n            (required when `ordinal` is an integer). Defaults to `None`.\n\n            - `<'int'>` A positive integer number.\n            - `<'Any'>` Takes the `len(size)` value as the index size.\n            - `<'None'>` Ignored when `ordinal` is an array-like object.\n\n        :param tz `<'tzinfo/str/None'>`: The optional timezone to `attach`. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive (when `time` has no timezone info, see `Notes`).\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :param as_unit `<'str/None'>`: Convert to specified datetime unit after construction. Defaults to `None`.\n            Supports: `'s'`, `'ms'`, `'us'`, `'ns'`.\n\n        :param name `<'Hashable/None'>`: Optional name of the index. Defaults to `None`.\n\n        :returns `<'Pddt'>`: The resulting datetime index (naive when `tz` is None).\n\n        ## Notice\n        - This method only construct `datetime64[us]` index (microsecond resolution).\n        - Parameter `as_unit` converts it to other datetime units after construction.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_21fromordinal = {"fromordinal", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_21fromordinal, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_20fromordinal};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_21fromordinal(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_ordinal = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_v_as_unit = 0;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fromordinal (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_ordinal,&__pyx_mstate_global->__pyx_n_u_size_2,&__pyx_mstate_global->__pyx_n_u_tz,&__pyx_mstate_global->__pyx_n_u_as_unit,&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 869, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 869, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 869, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 869, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 869, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 869, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 869, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fromordinal", 0) < (0)) __PYX_ERR(0, 869, __pyx_L3_error)

      /* "cytimes/pddt.py":873
 *         cls,
 *         ordinal: int | object,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":874
 *         ordinal: int | object,
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":875
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":876
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from Gregorian ordinal days `<'Pddt'>`.
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fromordinal", 0, 2, 6, i); __PYX_ERR(0, 869, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 869, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 869, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 869, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 869, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 869, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 869, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pddt.py":873
 *         cls,
 *         ordinal: int | object,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":874
 *         ordinal: int | object,
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":875
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":876
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from Gregorian ordinal days `<'Pddt'>`.
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_ordinal = values[1];
    __pyx_v_size = values[2];
    __pyx_v_tz = values[3];
    __pyx_v_as_unit = ((PyObject*)values[4]);
    __pyx_v_name = values[5];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fromordinal", 0, 2, 6, __pyx_nargs); __PYX_ERR(0, 869, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.fromordinal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_as_unit), (&PyUnicode_Type), 1, "as_unit", 2))) __PYX_ERR(0, 875, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_20fromordinal(__pyx_self, __pyx_v_cls, __pyx_v_ordinal, __pyx_v_size, __pyx_v_tz, __pyx_v_as_unit, __pyx_v_name);

  /* "cytimes/pddt.py":869
 *         return cls._new(arr, tz=tz, as_unit=as_unit, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromordinal(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_20fromordinal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_ordinal, PyObject *__pyx_v_size, PyObject *__pyx_v_tz, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name) {
  Py_ssize_t __pyx_v_size_i;
  PY_LONG_LONG __pyx_v_value;
  PyArrayObject *__pyx_v_arr = 0;
  npy_int64 *__pyx_v_arr_p;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_o = NULL;
  PyObject *__pyx_v_err = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PY_LONG_LONG __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  npy_intp __pyx_t_10[1];
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20[7];
  PyObject *__pyx_t_21 = NULL;
  int __pyx_t_22;
  char const *__pyx_t_23;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  PyObject *__pyx_t_28 = NULL;
  PyObject *__pyx_t_29 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_30;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_31;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_32;
  struct __pyx_opt_args_7cytimes_6errors_raise_type_error __pyx_t_33;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fromordinal", 0);
  __Pyx_INCREF(__pyx_v_ordinal);

  /* "cytimes/pddt.py":910
 *         """
 *         # Integer
 *         if isinstance(ordinal, int):             # <<<<<<<<<<<<<<
 *             if size is None:
 *                 errors.raise_argument_error(
*/
  __pyx_t_1 = PyLong_Check(__pyx_v_ordinal); 
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":911
 *         # Integer
 *         if isinstance(ordinal, int):
 *             if size is None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    __pyx_t_1 = (__pyx_v_size == Py_None);
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":912
 *         if isinstance(ordinal, int):
 *             if size is None:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     cls,
 *                     "fromordinal(size)",
*/
      __pyx_t_2.__pyx_n = 3;
      __pyx_t_2.cls = __pyx_v_cls;
      __pyx_t_2.input_msg = __pyx_mstate_global->__pyx_kp_u_fromordinal_size;
      __pyx_t_2.error_msg = __pyx_mstate_global->__pyx_kp_u_When_ordinal_is_an_integer_size;
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 912, __pyx_L1_error)

      /* "cytimes/pddt.py":911
 *         # Integer
 *         if isinstance(ordinal, int):
 *             if size is None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    }

    /* "cytimes/pddt.py":917
 *                     "When 'ordinal' is an integer, 'size' must be specified.",
 *                 )
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)             # <<<<<<<<<<<<<<
 *             value: cython.longlong = int(ordinal)
 *             value = (value - utils.EPOCH_DAY) * utils.US_DAY
*/
    __pyx_t_3 = __pyx_f_7cytimes_4pddt__parse_size(__pyx_v_cls, __pyx_v_size); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 917, __pyx_L1_error)
    __pyx_v_size_i = __pyx_t_3;

    /* "cytimes/pddt.py":918
 *                 )
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)
 *             value: cython.longlong = int(ordinal)             # <<<<<<<<<<<<<<
 *             value = (value - utils.EPOCH_DAY) * utils.US_DAY
 *             # . new instance
*/
    __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_ordinal); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 918, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_5 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 918, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_value = __pyx_t_5;

    /* "cytimes/pddt.py":919
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)
 *             value: cython.longlong = int(ordinal)
 *             value = (value - utils.EPOCH_DAY) * utils.US_DAY             # <<<<<<<<<<<<<<
 *             # . new instance
 *             arr: np.ndarray = utils.dt64arr_fr_int64(value, size_i, "us")
*/
    __pyx_v_value = ((__pyx_v_value - __pyx_v_7cytimes_5utils_EPOCH_DAY) * __pyx_v_7cytimes_5utils_US_DAY);

    /* "cytimes/pddt.py":921
 *             value = (value - utils.EPOCH_DAY) * utils.US_DAY
 *             # . new instance
 *             arr: np.ndarray = utils.dt64arr_fr_int64(value, size_i, "us")             # <<<<<<<<<<<<<<
 *             return cls._new(arr, tz=tz, as_unit=as_unit, name=name)
 * 
*/
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_fr_int64(__pyx_v_value, __pyx_v_size_i, __pyx_mstate_global->__pyx_n_u_us)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 921, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":922
 *             # . new instance
 *             arr: np.ndarray = utils.dt64arr_fr_int64(value, size_i, "us")
 *             return cls._new(arr, tz=tz, as_unit=as_unit, name=name)             # <<<<<<<<<<<<<<
 * 
 *         # list / tuple
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __pyx_v_cls;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_6, ((PyObject *)__pyx_v_arr)};
      __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 922, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 922, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_8, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 922, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_8, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 922, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 922, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":910
 *         """
 *         # Integer
 *         if isinstance(ordinal, int):             # <<<<<<<<<<<<<<
 *             if size is None:
 *                 errors.raise_argument_error(
*/
  }

  /* "cytimes/pddt.py":925
 * 
 *         # list / tuple
 *         if isinstance(ordinal, (list, tuple)):             # <<<<<<<<<<<<<<
 *             # . construct ndarray[int64] - unit: us
 *             size_i: cython.Py_ssize_t = len(ordinal)
*/
  __pyx_t_9 = PyList_Check(__pyx_v_ordinal); 
  if (!__pyx_t_9) {
  } else {
    __pyx_t_1 = __pyx_t_9;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_9 = PyTuple_Check(__pyx_v_ordinal); 
  __pyx_t_1 = __pyx_t_9;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":927
 *         if isinstance(ordinal, (list, tuple)):
 *             # . construct ndarray[int64] - unit: us
 *             size_i: cython.Py_ssize_t = len(ordinal)             # <<<<<<<<<<<<<<
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
*/
    __pyx_t_3 = PyObject_Length(__pyx_v_ordinal); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 927, __pyx_L1_error)
    __pyx_v_size_i = __pyx_t_3;

    /* "cytimes/pddt.py":928
 *             # . construct ndarray[int64] - unit: us
 *             size_i: cython.Py_ssize_t = len(ordinal)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)             # <<<<<<<<<<<<<<
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
*/
    __pyx_t_10[0] = __pyx_v_size_i;
    __pyx_t_4 = PyArray_EMPTY(1, __pyx_t_10, NPY_INT64, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 928, __pyx_L1_error)
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":929
 *             size_i: cython.Py_ssize_t = len(ordinal)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))             # <<<<<<<<<<<<<<
 *             i: cython.Py_ssize_t = 0
 *             for o in ordinal:
*/
    __pyx_v_arr_p = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

    /* "cytimes/pddt.py":930
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0             # <<<<<<<<<<<<<<
 *             for o in ordinal:
 *                 try:
*/
    __pyx_v_i = 0;

    /* "cytimes/pddt.py":931
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
 *             for o in ordinal:             # <<<<<<<<<<<<<<
 *                 try:
 *                     value: cython.longlong = int(o)
*/
    if (likely(PyList_CheckExact(__pyx_v_ordinal)) || PyTuple_CheckExact(__pyx_v_ordinal)) {
      __pyx_t_4 = __pyx_v_ordinal; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_3 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_ordinal); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 931, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 931, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_11)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 931, __pyx_L1_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          __pyx_t_8 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_3;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 931, __pyx_L1_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_3));
          #else
          __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_3);
          #endif
          ++__pyx_t_3;
        }
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 931, __pyx_L1_error)
      } else {
        __pyx_t_8 = __pyx_t_11(__pyx_t_4);
        if (unlikely(!__pyx_t_8)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 931, __pyx_L1_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_XDECREF_SET(__pyx_v_o, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "cytimes/pddt.py":932
 *             i: cython.Py_ssize_t = 0
 *             for o in ordinal:
 *                 try:             # <<<<<<<<<<<<<<
 *                     value: cython.longlong = int(o)
 *                 except Exception as err:
*/
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __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:*/ {

          /* "cytimes/pddt.py":933
 *             for o in ordinal:
 *                 try:
 *                     value: cython.longlong = int(o)             # <<<<<<<<<<<<<<
 *                 except Exception as err:
 *                     errors.raise_argument_error(
*/
          __pyx_t_8 = __Pyx_PyNumber_Int(__pyx_v_o); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 933, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_5 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_t_8); if (unlikely((__pyx_t_5 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 933, __pyx_L10_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_v_value = __pyx_t_5;

          /* "cytimes/pddt.py":932
 *             i: cython.Py_ssize_t = 0
 *             for o in ordinal:
 *                 try:             # <<<<<<<<<<<<<<
 *                     value: cython.longlong = int(o)
 *                 except Exception as err:
*/
        }
        __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_L17_try_end;
        __pyx_L10_error:;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "cytimes/pddt.py":934
 *                 try:
 *                     value: cython.longlong = int(o)
 *                 except Exception as err:             # <<<<<<<<<<<<<<
 *                     errors.raise_argument_error(
 *                         cls,
*/
        __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
        if (__pyx_t_15) {
          __Pyx_AddTraceback("cytimes.pddt.Pddt.fromordinal", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_6, &__pyx_t_16) < 0) __PYX_ERR(0, 934, __pyx_L12_except_error)
          __Pyx_XGOTREF(__pyx_t_8);
          __Pyx_XGOTREF(__pyx_t_6);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_INCREF(__pyx_t_6);
          __pyx_v_err = __pyx_t_6;
          /*try:*/ {

            /* "cytimes/pddt.py":939
 *                         "fromordinal(ordinal)",
 *                         "Expects integer element from %s, got '%s' %s."
 *                         % (type(ordinal).__name__, o, type(o)),             # <<<<<<<<<<<<<<
 *                         err,
 *                     )
*/
            __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_ordinal)), __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 939, __pyx_L23_error)
            __Pyx_GOTREF(__pyx_t_17);
            __pyx_t_18 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_17), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 939, __pyx_L23_error)
            __Pyx_GOTREF(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __pyx_t_17 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_o), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 939, __pyx_L23_error)
            __Pyx_GOTREF(__pyx_t_17);
            __pyx_t_19 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_o))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 939, __pyx_L23_error)
            __Pyx_GOTREF(__pyx_t_19);
            __pyx_t_20[0] = __pyx_mstate_global->__pyx_kp_u_Expects_integer_element_from;
            __pyx_t_20[1] = __pyx_t_18;
            __pyx_t_20[2] = __pyx_mstate_global->__pyx_kp_u_got;
            __pyx_t_20[3] = __pyx_t_17;
            __pyx_t_20[4] = __pyx_mstate_global->__pyx_kp_u__9;
            __pyx_t_20[5] = __pyx_t_19;
            __pyx_t_20[6] = __pyx_mstate_global->__pyx_kp_u__2;

            /* "cytimes/pddt.py":938
 *                         cls,
 *                         "fromordinal(ordinal)",
 *                         "Expects integer element from %s, got '%s' %s."             # <<<<<<<<<<<<<<
 *                         % (type(ordinal).__name__, o, type(o)),
 *                         err,
*/
            __pyx_t_21 = __Pyx_PyUnicode_Join(__pyx_t_20, 7, 29 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18) + 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_19) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_19));
            if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 938, __pyx_L23_error)
            __Pyx_GOTREF(__pyx_t_21);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

            /* "cytimes/pddt.py":935
 *                     value: cython.longlong = int(o)
 *                 except Exception as err:
 *                     errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                         cls,
 *                         "fromordinal(ordinal)",
*/
            __pyx_t_2.__pyx_n = 4;
            __pyx_t_2.cls = __pyx_v_cls;
            __pyx_t_2.input_msg = __pyx_mstate_global->__pyx_kp_u_fromordinal_ordinal;
            __pyx_t_2.error_msg = ((PyObject*)__pyx_t_21);
            __pyx_t_2.tb_exc = __pyx_v_err;
            __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 935, __pyx_L23_error)
            __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

            /* "cytimes/pddt.py":942
 *                         err,
 *                     )
 *                     return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *                 arr_p[i] = (value - utils.EPOCH_DAY) * utils.US_DAY
 *                 i += 1
*/
            __Pyx_XDECREF(__pyx_r);
            __pyx_r = Py_None; __Pyx_INCREF(Py_None);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            goto __pyx_L22_return;
          }

          /* "cytimes/pddt.py":934
 *                 try:
 *                     value: cython.longlong = int(o)
 *                 except Exception as err:             # <<<<<<<<<<<<<<
 *                     errors.raise_argument_error(
 *                         cls,
*/
          /*finally:*/ {
            __pyx_L23_error:;
            /*exception exit:*/{
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0;
              __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
              __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
              __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
              __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
               __Pyx_ExceptionSwap(&__pyx_t_27, &__pyx_t_28, &__pyx_t_29);
              if ( unlikely(__Pyx_GetException(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26) < 0)) __Pyx_ErrFetch(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26);
              __Pyx_XGOTREF(__pyx_t_24);
              __Pyx_XGOTREF(__pyx_t_25);
              __Pyx_XGOTREF(__pyx_t_26);
              __Pyx_XGOTREF(__pyx_t_27);
              __Pyx_XGOTREF(__pyx_t_28);
              __Pyx_XGOTREF(__pyx_t_29);
              __pyx_t_15 = __pyx_lineno; __pyx_t_22 = __pyx_clineno; __pyx_t_23 = __pyx_filename;
              {
                __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
              }
              __Pyx_XGIVEREF(__pyx_t_27);
              __Pyx_XGIVEREF(__pyx_t_28);
              __Pyx_XGIVEREF(__pyx_t_29);
              __Pyx_ExceptionReset(__pyx_t_27, __pyx_t_28, __pyx_t_29);
              __Pyx_XGIVEREF(__pyx_t_24);
              __Pyx_XGIVEREF(__pyx_t_25);
              __Pyx_XGIVEREF(__pyx_t_26);
              __Pyx_ErrRestore(__pyx_t_24, __pyx_t_25, __pyx_t_26);
              __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0;
              __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_22; __pyx_filename = __pyx_t_23;
              goto __pyx_L12_except_error;
            }
            __pyx_L22_return: {
              __pyx_t_29 = __pyx_r;
              __pyx_r = 0;
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
              __pyx_r = __pyx_t_29;
              __pyx_t_29 = 0;
              goto __pyx_L13_except_return;
            }
          }
        }
        goto __pyx_L12_except_error;

        /* "cytimes/pddt.py":932
 *             i: cython.Py_ssize_t = 0
 *             for o in ordinal:
 *                 try:             # <<<<<<<<<<<<<<
 *                     value: cython.longlong = int(o)
 *                 except Exception as err:
*/
        __pyx_L12_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_except_return:;
        __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_L0;
        __pyx_L17_try_end:;
      }

      /* "cytimes/pddt.py":943
 *                     )
 *                     return  # unreachable: suppress compiler warning
 *                 arr_p[i] = (value - utils.EPOCH_DAY) * utils.US_DAY             # <<<<<<<<<<<<<<
 *                 i += 1
 *             # . new instance
*/
      (__pyx_v_arr_p[__pyx_v_i]) = ((__pyx_v_value - __pyx_v_7cytimes_5utils_EPOCH_DAY) * __pyx_v_7cytimes_5utils_US_DAY);

      /* "cytimes/pddt.py":944
 *                     return  # unreachable: suppress compiler warning
 *                 arr_p[i] = (value - utils.EPOCH_DAY) * utils.US_DAY
 *                 i += 1             # <<<<<<<<<<<<<<
 *             # . new instance
 *             return cls._new(
*/
      __pyx_v_i = (__pyx_v_i + 1);

      /* "cytimes/pddt.py":931
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
 *             for o in ordinal:             # <<<<<<<<<<<<<<
 *                 try:
 *                     value: cython.longlong = int(o)
*/
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytimes/pddt.py":946
 *                 i += 1
 *             # . new instance
 *             return cls._new(             # <<<<<<<<<<<<<<
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name
 *             )
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_16 = __pyx_v_cls;
    __Pyx_INCREF(__pyx_t_16);

    /* "cytimes/pddt.py":947
 *             # . new instance
 *             return cls._new(
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name             # <<<<<<<<<<<<<<
 *             )
 * 
*/
    __pyx_t_8 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
      __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 947, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_16, __pyx_t_6};
      __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 946, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 946, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_8, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 946, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_8, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 946, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 946, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":925
 * 
 *         # list / tuple
 *         if isinstance(ordinal, (list, tuple)):             # <<<<<<<<<<<<<<
 *             # . construct ndarray[int64] - unit: us
 *             size_i: cython.Py_ssize_t = len(ordinal)
*/
  }

  /* "cytimes/pddt.py":951
 * 
 *         # pd.Index (DatetimeIndex) / pd.Series
 *         if isinstance(ordinal, (pd.Index, pd.Series)):             # <<<<<<<<<<<<<<
 *             ordinal = ordinal.values
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Series); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_9 = PyObject_IsInstance(__pyx_v_ordinal, __pyx_t_8); 
  if (!__pyx_t_9) {
  } else {
    __pyx_t_1 = __pyx_t_9;
    goto __pyx_L31_bool_binop_done;
  }
  __pyx_t_9 = PyObject_IsInstance(__pyx_v_ordinal, __pyx_t_6); 
  __pyx_t_1 = __pyx_t_9;
  __pyx_L31_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":952
 *         # pd.Index (DatetimeIndex) / pd.Series
 *         if isinstance(ordinal, (pd.Index, pd.Series)):
 *             ordinal = ordinal.values             # <<<<<<<<<<<<<<
 * 
 *         # numpy.ndarray
*/
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_ordinal, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF_SET(__pyx_v_ordinal, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "cytimes/pddt.py":951
 * 
 *         # pd.Index (DatetimeIndex) / pd.Series
 *         if isinstance(ordinal, (pd.Index, pd.Series)):             # <<<<<<<<<<<<<<
 *             ordinal = ordinal.values
 * 
*/
  }

  /* "cytimes/pddt.py":955
 * 
 *         # numpy.ndarray
 *         if isinstance(ordinal, np.ndarray):             # <<<<<<<<<<<<<<
 *             # . validate 1-D array
 *             arr: np.ndarray = ordinal
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ordinal, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray); 
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":957
 *         if isinstance(ordinal, np.ndarray):
 *             # . validate 1-D array
 *             arr: np.ndarray = ordinal             # <<<<<<<<<<<<<<
 *             if arr.ndim != 1:
 *                 errors.raise_argument_error(
*/
    __pyx_t_8 = __pyx_v_ordinal;
    __Pyx_INCREF(__pyx_t_8);
    if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 957, __pyx_L1_error)
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_8);
    __pyx_t_8 = 0;

    /* "cytimes/pddt.py":958
 *             # . validate 1-D array
 *             arr: np.ndarray = ordinal
 *             if arr.ndim != 1:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    __pyx_t_1 = (__pyx_f_5numpy_7ndarray_4ndim_ndim(__pyx_v_arr) != 1);
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":962
 *                     cls,
 *                     "fromordinal(ordinal)",
 *                     "Expects a 1-dimensional array, got %d-dim." % arr.ndim,             # <<<<<<<<<<<<<<
 *                 )
 *             # . convert to ndarray[int64] - unit: us
*/
      __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_f_5numpy_7ndarray_4ndim_ndim(__pyx_v_arr)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 962, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Expects_a_1_dimensional_array_go, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 962, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "cytimes/pddt.py":959
 *             arr: np.ndarray = ordinal
 *             if arr.ndim != 1:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     cls,
 *                     "fromordinal(ordinal)",
*/
      __pyx_t_2.__pyx_n = 3;
      __pyx_t_2.cls = __pyx_v_cls;
      __pyx_t_2.input_msg = __pyx_mstate_global->__pyx_kp_u_fromordinal_ordinal;
      __pyx_t_2.error_msg = ((PyObject*)__pyx_t_6);
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 959, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cytimes/pddt.py":958
 *             # . validate 1-D array
 *             arr: np.ndarray = ordinal
 *             if arr.ndim != 1:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    }

    /* "cytimes/pddt.py":965
 *                 )
 *             # . convert to ndarray[int64] - unit: us
 *             if utils.is_arr_int(arr) or utils.is_arr_uint(arr):             # <<<<<<<<<<<<<<
 *                 arr = utils.arr_add(arr, -utils.EPOCH_DAY, True)
 *             elif utils.is_dt64arr(arr):
*/
    __pyx_t_9 = __pyx_f_7cytimes_5utils_is_arr_int(__pyx_v_arr); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 965, __pyx_L1_error)
    if (!__pyx_t_9) {
    } else {
      __pyx_t_1 = __pyx_t_9;
      goto __pyx_L36_bool_binop_done;
    }
    __pyx_t_9 = __pyx_f_7cytimes_5utils_is_arr_uint(__pyx_v_arr); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 965, __pyx_L1_error)
    __pyx_t_1 = __pyx_t_9;
    __pyx_L36_bool_binop_done:;
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":966
 *             # . convert to ndarray[int64] - unit: us
 *             if utils.is_arr_int(arr) or utils.is_arr_uint(arr):
 *                 arr = utils.arr_add(arr, -utils.EPOCH_DAY, True)             # <<<<<<<<<<<<<<
 *             elif utils.is_dt64arr(arr):
 *                 arr = utils.dt64arr_as_int64_D(arr, -1, 0, True)
*/
      __pyx_t_30.__pyx_n = 1;
      __pyx_t_30.copy = 1;
      __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, (-__pyx_v_7cytimes_5utils_EPOCH_DAY), &__pyx_t_30)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 966, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_6));
      __pyx_t_6 = 0;

      /* "cytimes/pddt.py":965
 *                 )
 *             # . convert to ndarray[int64] - unit: us
 *             if utils.is_arr_int(arr) or utils.is_arr_uint(arr):             # <<<<<<<<<<<<<<
 *                 arr = utils.arr_add(arr, -utils.EPOCH_DAY, True)
 *             elif utils.is_dt64arr(arr):
*/
      goto __pyx_L35;
    }

    /* "cytimes/pddt.py":967
 *             if utils.is_arr_int(arr) or utils.is_arr_uint(arr):
 *                 arr = utils.arr_add(arr, -utils.EPOCH_DAY, True)
 *             elif utils.is_dt64arr(arr):             # <<<<<<<<<<<<<<
 *                 arr = utils.dt64arr_as_int64_D(arr, -1, 0, True)
 *             else:
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 967, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":968
 *                 arr = utils.arr_add(arr, -utils.EPOCH_DAY, True)
 *             elif utils.is_dt64arr(arr):
 *                 arr = utils.dt64arr_as_int64_D(arr, -1, 0, True)             # <<<<<<<<<<<<<<
 *             else:
 *                 errors.raise_argument_error(
*/
      __pyx_t_31.__pyx_n = 3;
      __pyx_t_31.arr_reso = -1;
      __pyx_t_31.offset = 0;
      __pyx_t_31.copy = 1;
      __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_31)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 968, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_6));
      __pyx_t_6 = 0;

      /* "cytimes/pddt.py":967
 *             if utils.is_arr_int(arr) or utils.is_arr_uint(arr):
 *                 arr = utils.arr_add(arr, -utils.EPOCH_DAY, True)
 *             elif utils.is_dt64arr(arr):             # <<<<<<<<<<<<<<
 *                 arr = utils.dt64arr_as_int64_D(arr, -1, 0, True)
 *             else:
*/
      goto __pyx_L35;
    }

    /* "cytimes/pddt.py":970
 *                 arr = utils.dt64arr_as_int64_D(arr, -1, 0, True)
 *             else:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     cls,
 *                     "fromordinal(ordinal)",
*/
    /*else*/ {

      /* "cytimes/pddt.py":973
 *                     cls,
 *                     "fromordinal(ordinal)",
 *                     "Unsupported array dtype [%s]." % arr.dtype,             # <<<<<<<<<<<<<<
 *                 )
 *             arr = utils.arr_mul(arr, utils.US_DAY, 0, False)
*/
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 973, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Unsupported_array_dtype_s, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 973, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cytimes/pddt.py":970
 *                 arr = utils.dt64arr_as_int64_D(arr, -1, 0, True)
 *             else:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     cls,
 *                     "fromordinal(ordinal)",
*/
      __pyx_t_2.__pyx_n = 3;
      __pyx_t_2.cls = __pyx_v_cls;
      __pyx_t_2.input_msg = __pyx_mstate_global->__pyx_kp_u_fromordinal_ordinal;
      __pyx_t_2.error_msg = ((PyObject*)__pyx_t_8);
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 970, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_L35:;

    /* "cytimes/pddt.py":975
 *                     "Unsupported array dtype [%s]." % arr.dtype,
 *                 )
 *             arr = utils.arr_mul(arr, utils.US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             # . new instance
 *             return cls._new(
*/
    __pyx_t_32.__pyx_n = 2;
    __pyx_t_32.offset = 0;
    __pyx_t_32.copy = 0;
    __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_32)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 975, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_8));
    __pyx_t_8 = 0;

    /* "cytimes/pddt.py":977
 *             arr = utils.arr_mul(arr, utils.US_DAY, 0, False)
 *             # . new instance
 *             return cls._new(             # <<<<<<<<<<<<<<
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name
 *             )
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __pyx_v_cls;
    __Pyx_INCREF(__pyx_t_6);

    /* "cytimes/pddt.py":978
 *             # . new instance
 *             return cls._new(
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name             # <<<<<<<<<<<<<<
 *             )
 * 
*/
    __pyx_t_16 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_16);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 978, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_16 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 977, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_16, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 977, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_16, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 977, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_16, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 977, __pyx_L1_error)
      __pyx_t_8 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_16);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 977, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    }
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":955
 * 
 *         # numpy.ndarray
 *         if isinstance(ordinal, np.ndarray):             # <<<<<<<<<<<<<<
 *             # . validate 1-D array
 *             arr: np.ndarray = ordinal
*/
  }

  /* "cytimes/pddt.py":985
 *             cls,
 *             "fromordinal(ordinal)",
 *             "Unsupported 'ordinal' data type %s." % type(ordinal),             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_8 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Unsupported_ordinal_data_type_s, ((PyObject *)Py_TYPE(__pyx_v_ordinal))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "cytimes/pddt.py":982
 * 
 *         # Unsupported type
 *         errors.raise_type_error(             # <<<<<<<<<<<<<<
 *             cls,
 *             "fromordinal(ordinal)",
*/
  __pyx_t_33.__pyx_n = 3;
  __pyx_t_33.cls = __pyx_v_cls;
  __pyx_t_33.input_msg = __pyx_mstate_global->__pyx_kp_u_fromordinal_ordinal;
  __pyx_t_33.error_msg = ((PyObject*)__pyx_t_8);
  __pyx_f_7cytimes_6errors_raise_type_error(0, &__pyx_t_33); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 982, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":869
 *         return cls._new(arr, tz=tz, as_unit=as_unit, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromordinal(
 *         cls,
*/

  /* function exit code */
  __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_8);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.fromordinal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_ordinal);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":988
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromseconds(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_23fromseconds(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_22fromseconds, "Construct an index from seconds since the epoch `<'Pddt'>`.\n\n        :param seconds `<'int/float/Array-like'>`: The seconds to construct with.\n\n            - `<'int/float'>` A numeric value representing seconds since epoch.\n            - `<'Array-like'>` An array-like object containing elements representing the seconds.\n\n        :param size `<'int/Any/None'>`: The target size of the index\n            (required when `seconds` is a float or integer ). Defaults to `None`.\n\n            - `<'int'>` A positive integer number.\n            - `<'Any'>` Takes the `len(size)` value as the index size.\n            - `<'None'>` Ignored when `seconds` is an array-like object.\n\n        :param tz `<'tzinfo/str/None'>`: The optional timezone to `attach`. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive (when `time` has no timezone info, see `Notes`).\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :param as_unit `<'str/None'>`: Convert to specified datetime unit after construction. Defaults to `None`.\n            Supports: `'s'`, `'ms'`, `'us'`, `'ns'`.\n\n        :param name `<'Hashable/None'>`: Optional name of the index. Defaults to `None`.\n\n        :returns `<'Pddt'>`: The resulting datetime index (naive when `tz` is None).\n\n        ## Notice\n        - This method only construct `datetime64[us]` index (microsecond resolution).\n        - Parameter `as_unit` converts it to other datetime units after construction.\n        - Unlike `fromtimestamp()`, this method never assumes local time when\n          `tz is None`, and interprets `seconds` as-is without any local-time conversion.\n        - When `tz` is specified, the timezone is simply `attached` without any conversion.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_23fromseconds = {"fromseconds", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_23fromseconds, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_22fromseconds};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_23fromseconds(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_seconds = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_v_as_unit = 0;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fromseconds (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_seconds,&__pyx_mstate_global->__pyx_n_u_size_2,&__pyx_mstate_global->__pyx_n_u_tz,&__pyx_mstate_global->__pyx_n_u_as_unit,&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 988, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 988, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 988, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 988, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 988, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 988, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 988, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fromseconds", 0) < (0)) __PYX_ERR(0, 988, __pyx_L3_error)

      /* "cytimes/pddt.py":992
 *         cls,
 *         seconds: int | float | object,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":993
 *         seconds: int | float | object,
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":994
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":995
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from seconds since the epoch `<'Pddt'>`.
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fromseconds", 0, 2, 6, i); __PYX_ERR(0, 988, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 988, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 988, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 988, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 988, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 988, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 988, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pddt.py":992
 *         cls,
 *         seconds: int | float | object,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":993
 *         seconds: int | float | object,
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":994
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":995
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from seconds since the epoch `<'Pddt'>`.
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_seconds = values[1];
    __pyx_v_size = values[2];
    __pyx_v_tz = values[3];
    __pyx_v_as_unit = ((PyObject*)values[4]);
    __pyx_v_name = values[5];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fromseconds", 0, 2, 6, __pyx_nargs); __PYX_ERR(0, 988, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.fromseconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_as_unit), (&PyUnicode_Type), 1, "as_unit", 2))) __PYX_ERR(0, 994, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_22fromseconds(__pyx_self, __pyx_v_cls, __pyx_v_seconds, __pyx_v_size, __pyx_v_tz, __pyx_v_as_unit, __pyx_v_name);

  /* "cytimes/pddt.py":988
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromseconds(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_22fromseconds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_seconds, PyObject *__pyx_v_size, PyObject *__pyx_v_tz, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name) {
  Py_ssize_t __pyx_v_size_i;
  double __pyx_v_value;
  PY_LONG_LONG __pyx_v_us;
  PyArrayObject *__pyx_v_arr = 0;
  npy_int64 *__pyx_v_arr_p;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_o = NULL;
  PyObject *__pyx_v_err = NULL;
  PyArrayObject *__pyx_v_arrf = 0;
  npy_float64 *__pyx_v_arrf_p;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  double __pyx_t_5;
  PY_LONG_LONG __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  npy_intp __pyx_t_11[1];
  PyObject *(*__pyx_t_12)(PyObject *);
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21[7];
  PyObject *__pyx_t_22 = NULL;
  int __pyx_t_23;
  char const *__pyx_t_24;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  PyObject *__pyx_t_28 = NULL;
  PyObject *__pyx_t_29 = NULL;
  PyObject *__pyx_t_30 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_float64 __pyx_t_31;
  npy_intp __pyx_t_32[1];
  Py_ssize_t __pyx_t_33;
  Py_ssize_t __pyx_t_34;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_35;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_us __pyx_t_36;
  struct __pyx_opt_args_7cytimes_6errors_raise_type_error __pyx_t_37;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fromseconds", 0);
  __Pyx_INCREF(__pyx_v_seconds);

  /* "cytimes/pddt.py":1032
 *         """
 *         # Integer / Float
 *         if isinstance(seconds, (int, float)):             # <<<<<<<<<<<<<<
 *             if size is None:
 *                 errors.raise_argument_error(
*/
  __pyx_t_2 = PyLong_Check(__pyx_v_seconds); 
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = PyFloat_Check(__pyx_v_seconds); 
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":1033
 *         # Integer / Float
 *         if isinstance(seconds, (int, float)):
 *             if size is None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    __pyx_t_1 = (__pyx_v_size == Py_None);
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":1034
 *         if isinstance(seconds, (int, float)):
 *             if size is None:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     cls,
 *                     "fromseconds(size)",
*/
      __pyx_t_3.__pyx_n = 3;
      __pyx_t_3.cls = __pyx_v_cls;
      __pyx_t_3.input_msg = __pyx_mstate_global->__pyx_kp_u_fromseconds_size;
      __pyx_t_3.error_msg = __pyx_mstate_global->__pyx_kp_u_When_seconds_is_a_float_or_integ;
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1034, __pyx_L1_error)

      /* "cytimes/pddt.py":1033
 *         # Integer / Float
 *         if isinstance(seconds, (int, float)):
 *             if size is None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    }

    /* "cytimes/pddt.py":1039
 *                     "When 'seconds' is a float or integer, 'size' must be specified.",
 *                 )
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)             # <<<<<<<<<<<<<<
 *             value: cython.double = float(seconds)
 *             us: cython.longlong = utils.sec_to_us(value)
*/
    __pyx_t_4 = __pyx_f_7cytimes_4pddt__parse_size(__pyx_v_cls, __pyx_v_size); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 1039, __pyx_L1_error)
    __pyx_v_size_i = __pyx_t_4;

    /* "cytimes/pddt.py":1040
 *                 )
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)
 *             value: cython.double = float(seconds)             # <<<<<<<<<<<<<<
 *             us: cython.longlong = utils.sec_to_us(value)
 *             # . new instance
*/
    __pyx_t_5 = __Pyx_PyObject_AsDouble(__pyx_v_seconds); if (unlikely(__PYX_CHECK_FLOAT_EXCEPTION(__pyx_t_5, ((double)((double)-1))) && PyErr_Occurred())) __PYX_ERR(0, 1040, __pyx_L1_error)
    __pyx_v_value = __pyx_t_5;

    /* "cytimes/pddt.py":1041
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)
 *             value: cython.double = float(seconds)
 *             us: cython.longlong = utils.sec_to_us(value)             # <<<<<<<<<<<<<<
 *             # . new instance
 *             arr: np.ndarray = utils.dt64arr_fr_int64(us, size_i, "us")
*/
    __pyx_t_6 = __pyx_f_7cytimes_5utils_sec_to_us(__pyx_v_value); if (unlikely(__pyx_t_6 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1041, __pyx_L1_error)
    __pyx_v_us = __pyx_t_6;

    /* "cytimes/pddt.py":1043
 *             us: cython.longlong = utils.sec_to_us(value)
 *             # . new instance
 *             arr: np.ndarray = utils.dt64arr_fr_int64(us, size_i, "us")             # <<<<<<<<<<<<<<
 *             return cls._new(arr, tz=tz, as_unit=as_unit, name=name)
 * 
*/
    __pyx_t_7 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_fr_int64(__pyx_v_us, __pyx_v_size_i, __pyx_mstate_global->__pyx_n_u_us)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_7);
    __pyx_t_7 = 0;

    /* "cytimes/pddt.py":1044
 *             # . new instance
 *             arr: np.ndarray = utils.dt64arr_fr_int64(us, size_i, "us")
 *             return cls._new(arr, tz=tz, as_unit=as_unit, name=name)             # <<<<<<<<<<<<<<
 * 
 *         # list / tuple
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = __pyx_v_cls;
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_9 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_8, ((PyObject *)__pyx_v_arr)};
      __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1044, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_10, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1044, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_10, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1044, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_10, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 1044, __pyx_L1_error)
      __pyx_t_7 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1044, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":1032
 *         """
 *         # Integer / Float
 *         if isinstance(seconds, (int, float)):             # <<<<<<<<<<<<<<
 *             if size is None:
 *                 errors.raise_argument_error(
*/
  }

  /* "cytimes/pddt.py":1047
 * 
 *         # list / tuple
 *         if isinstance(seconds, (list, tuple)):             # <<<<<<<<<<<<<<
 *             # . construct ndarray[int64] - unit: us
 *             size_i: cython.Py_ssize_t = len(seconds)
*/
  __pyx_t_2 = PyList_Check(__pyx_v_seconds); 
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_2 = PyTuple_Check(__pyx_v_seconds); 
  __pyx_t_1 = __pyx_t_2;
  __pyx_L8_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":1049
 *         if isinstance(seconds, (list, tuple)):
 *             # . construct ndarray[int64] - unit: us
 *             size_i: cython.Py_ssize_t = len(seconds)             # <<<<<<<<<<<<<<
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
*/
    __pyx_t_4 = PyObject_Length(__pyx_v_seconds); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1049, __pyx_L1_error)
    __pyx_v_size_i = __pyx_t_4;

    /* "cytimes/pddt.py":1050
 *             # . construct ndarray[int64] - unit: us
 *             size_i: cython.Py_ssize_t = len(seconds)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)             # <<<<<<<<<<<<<<
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
*/
    __pyx_t_11[0] = __pyx_v_size_i;
    __pyx_t_7 = PyArray_EMPTY(1, __pyx_t_11, NPY_INT64, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1050, __pyx_L1_error)
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_7);
    __pyx_t_7 = 0;

    /* "cytimes/pddt.py":1051
 *             size_i: cython.Py_ssize_t = len(seconds)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))             # <<<<<<<<<<<<<<
 *             i: cython.Py_ssize_t = 0
 *             for o in seconds:
*/
    __pyx_v_arr_p = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

    /* "cytimes/pddt.py":1052
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0             # <<<<<<<<<<<<<<
 *             for o in seconds:
 *                 try:
*/
    __pyx_v_i = 0;

    /* "cytimes/pddt.py":1053
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
 *             for o in seconds:             # <<<<<<<<<<<<<<
 *                 try:
 *                     value: cython.double = float(o)
*/
    if (likely(PyList_CheckExact(__pyx_v_seconds)) || PyTuple_CheckExact(__pyx_v_seconds)) {
      __pyx_t_7 = __pyx_v_seconds; __Pyx_INCREF(__pyx_t_7);
      __pyx_t_4 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_seconds); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1053, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1053, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1053, __pyx_L1_error)
            #endif
            if (__pyx_t_4 >= __pyx_temp) break;
          }
          __pyx_t_10 = __Pyx_PyList_GetItemRefFast(__pyx_t_7, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_4;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1053, __pyx_L1_error)
            #endif
            if (__pyx_t_4 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_10 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4));
          #else
          __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_4);
          #endif
          ++__pyx_t_4;
        }
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1053, __pyx_L1_error)
      } else {
        __pyx_t_10 = __pyx_t_12(__pyx_t_7);
        if (unlikely(!__pyx_t_10)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1053, __pyx_L1_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_XDECREF_SET(__pyx_v_o, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "cytimes/pddt.py":1054
 *             i: cython.Py_ssize_t = 0
 *             for o in seconds:
 *                 try:             # <<<<<<<<<<<<<<
 *                     value: cython.double = float(o)
 *                 except Exception as err:
*/
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __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:*/ {

          /* "cytimes/pddt.py":1055
 *             for o in seconds:
 *                 try:
 *                     value: cython.double = float(o)             # <<<<<<<<<<<<<<
 *                 except Exception as err:
 *                     errors.raise_argument_error(
*/
          __pyx_t_5 = __Pyx_PyObject_AsDouble(__pyx_v_o); if (unlikely(__PYX_CHECK_FLOAT_EXCEPTION(__pyx_t_5, ((double)((double)-1))) && PyErr_Occurred())) __PYX_ERR(0, 1055, __pyx_L12_error)
          __pyx_v_value = __pyx_t_5;

          /* "cytimes/pddt.py":1054
 *             i: cython.Py_ssize_t = 0
 *             for o in seconds:
 *                 try:             # <<<<<<<<<<<<<<
 *                     value: cython.double = float(o)
 *                 except Exception as err:
*/
        }
        __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_L19_try_end;
        __pyx_L12_error:;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "cytimes/pddt.py":1056
 *                 try:
 *                     value: cython.double = float(o)
 *                 except Exception as err:             # <<<<<<<<<<<<<<
 *                     errors.raise_argument_error(
 *                         cls,
*/
        __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
        if (__pyx_t_16) {
          __Pyx_AddTraceback("cytimes.pddt.Pddt.fromseconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_8, &__pyx_t_17) < 0) __PYX_ERR(0, 1056, __pyx_L14_except_error)
          __Pyx_XGOTREF(__pyx_t_10);
          __Pyx_XGOTREF(__pyx_t_8);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_INCREF(__pyx_t_8);
          __pyx_v_err = __pyx_t_8;
          /*try:*/ {

            /* "cytimes/pddt.py":1061
 *                         "fromseconds(seconds)",
 *                         "Expects float or integer element from %s, got '%s' %s."
 *                         % (type(seconds).__name__, o, type(o)),             # <<<<<<<<<<<<<<
 *                         err,
 *                     )
*/
            __pyx_t_18 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_seconds)), __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1061, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_18);
            __pyx_t_19 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_18), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1061, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_19);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            __pyx_t_18 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_o), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1061, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_18);
            __pyx_t_20 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_o))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1061, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_20);
            __pyx_t_21[0] = __pyx_mstate_global->__pyx_kp_u_Expects_float_or_integer_element;
            __pyx_t_21[1] = __pyx_t_19;
            __pyx_t_21[2] = __pyx_mstate_global->__pyx_kp_u_got;
            __pyx_t_21[3] = __pyx_t_18;
            __pyx_t_21[4] = __pyx_mstate_global->__pyx_kp_u__9;
            __pyx_t_21[5] = __pyx_t_20;
            __pyx_t_21[6] = __pyx_mstate_global->__pyx_kp_u__2;

            /* "cytimes/pddt.py":1060
 *                         cls,
 *                         "fromseconds(seconds)",
 *                         "Expects float or integer element from %s, got '%s' %s."             # <<<<<<<<<<<<<<
 *                         % (type(seconds).__name__, o, type(o)),
 *                         err,
*/
            __pyx_t_22 = __Pyx_PyUnicode_Join(__pyx_t_21, 7, 38 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_19) + 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_20) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_19) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_20));
            if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1060, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_22);
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

            /* "cytimes/pddt.py":1057
 *                     value: cython.double = float(o)
 *                 except Exception as err:
 *                     errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                         cls,
 *                         "fromseconds(seconds)",
*/
            __pyx_t_3.__pyx_n = 4;
            __pyx_t_3.cls = __pyx_v_cls;
            __pyx_t_3.input_msg = __pyx_mstate_global->__pyx_kp_u_fromseconds_seconds;
            __pyx_t_3.error_msg = ((PyObject*)__pyx_t_22);
            __pyx_t_3.tb_exc = __pyx_v_err;
            __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1057, __pyx_L25_error)
            __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

            /* "cytimes/pddt.py":1064
 *                         err,
 *                     )
 *                     return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *                 arr_p[i] = utils.sec_to_us(value)
 *                 i += 1
*/
            __Pyx_XDECREF(__pyx_r);
            __pyx_r = Py_None; __Pyx_INCREF(Py_None);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            goto __pyx_L24_return;
          }

          /* "cytimes/pddt.py":1056
 *                 try:
 *                     value: cython.double = float(o)
 *                 except Exception as err:             # <<<<<<<<<<<<<<
 *                     errors.raise_argument_error(
 *                         cls,
*/
          /*finally:*/ {
            __pyx_L25_error:;
            /*exception exit:*/{
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0; __pyx_t_30 = 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;
              __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
               __Pyx_ExceptionSwap(&__pyx_t_28, &__pyx_t_29, &__pyx_t_30);
              if ( unlikely(__Pyx_GetException(&__pyx_t_25, &__pyx_t_26, &__pyx_t_27) < 0)) __Pyx_ErrFetch(&__pyx_t_25, &__pyx_t_26, &__pyx_t_27);
              __Pyx_XGOTREF(__pyx_t_25);
              __Pyx_XGOTREF(__pyx_t_26);
              __Pyx_XGOTREF(__pyx_t_27);
              __Pyx_XGOTREF(__pyx_t_28);
              __Pyx_XGOTREF(__pyx_t_29);
              __Pyx_XGOTREF(__pyx_t_30);
              __pyx_t_16 = __pyx_lineno; __pyx_t_23 = __pyx_clineno; __pyx_t_24 = __pyx_filename;
              {
                __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
              }
              __Pyx_XGIVEREF(__pyx_t_28);
              __Pyx_XGIVEREF(__pyx_t_29);
              __Pyx_XGIVEREF(__pyx_t_30);
              __Pyx_ExceptionReset(__pyx_t_28, __pyx_t_29, __pyx_t_30);
              __Pyx_XGIVEREF(__pyx_t_25);
              __Pyx_XGIVEREF(__pyx_t_26);
              __Pyx_XGIVEREF(__pyx_t_27);
              __Pyx_ErrRestore(__pyx_t_25, __pyx_t_26, __pyx_t_27);
              __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0; __pyx_t_30 = 0;
              __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_23; __pyx_filename = __pyx_t_24;
              goto __pyx_L14_except_error;
            }
            __pyx_L24_return: {
              __pyx_t_30 = __pyx_r;
              __pyx_r = 0;
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
              __pyx_r = __pyx_t_30;
              __pyx_t_30 = 0;
              goto __pyx_L15_except_return;
            }
          }
        }
        goto __pyx_L14_except_error;

        /* "cytimes/pddt.py":1054
 *             i: cython.Py_ssize_t = 0
 *             for o in seconds:
 *                 try:             # <<<<<<<<<<<<<<
 *                     value: cython.double = float(o)
 *                 except Exception as err:
*/
        __pyx_L14_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_L1_error;
        __pyx_L15_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_L0;
        __pyx_L19_try_end:;
      }

      /* "cytimes/pddt.py":1065
 *                     )
 *                     return  # unreachable: suppress compiler warning
 *                 arr_p[i] = utils.sec_to_us(value)             # <<<<<<<<<<<<<<
 *                 i += 1
 *             # . new instance
*/
      __pyx_t_6 = __pyx_f_7cytimes_5utils_sec_to_us(__pyx_v_value); if (unlikely(__pyx_t_6 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1065, __pyx_L1_error)
      (__pyx_v_arr_p[__pyx_v_i]) = __pyx_t_6;

      /* "cytimes/pddt.py":1066
 *                     return  # unreachable: suppress compiler warning
 *                 arr_p[i] = utils.sec_to_us(value)
 *                 i += 1             # <<<<<<<<<<<<<<
 *             # . new instance
 *             return cls._new(
*/
      __pyx_v_i = (__pyx_v_i + 1);

      /* "cytimes/pddt.py":1053
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
 *             for o in seconds:             # <<<<<<<<<<<<<<
 *                 try:
 *                     value: cython.double = float(o)
*/
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "cytimes/pddt.py":1068
 *                 i += 1
 *             # . new instance
 *             return cls._new(             # <<<<<<<<<<<<<<
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name
 *             )
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_17 = __pyx_v_cls;
    __Pyx_INCREF(__pyx_t_17);

    /* "cytimes/pddt.py":1069
 *             # . new instance
 *             return cls._new(
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name             # <<<<<<<<<<<<<<
 *             )
 * 
*/
    __pyx_t_10 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_10);
    __pyx_t_9 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
      __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1069, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    }
    __pyx_t_9 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_17, __pyx_t_8};
      __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1068, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_10, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1068, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_10, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1068, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_10, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 1068, __pyx_L1_error)
      __pyx_t_7 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10);
      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1068, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":1047
 * 
 *         # list / tuple
 *         if isinstance(seconds, (list, tuple)):             # <<<<<<<<<<<<<<
 *             # . construct ndarray[int64] - unit: us
 *             size_i: cython.Py_ssize_t = len(seconds)
*/
  }

  /* "cytimes/pddt.py":1073
 * 
 *         # pd.Index (DatetimeIndex) / pd.Series
 *         if isinstance(seconds, (pd.Index, pd.Series)):             # <<<<<<<<<<<<<<
 *             seconds = seconds.values
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_Series); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_seconds, __pyx_t_10); 
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L33_bool_binop_done;
  }
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_seconds, __pyx_t_8); 
  __pyx_t_1 = __pyx_t_2;
  __pyx_L33_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":1074
 *         # pd.Index (DatetimeIndex) / pd.Series
 *         if isinstance(seconds, (pd.Index, pd.Series)):
 *             seconds = seconds.values             # <<<<<<<<<<<<<<
 * 
 *         # numpy.ndarray
*/
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_seconds, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF_SET(__pyx_v_seconds, __pyx_t_10);
    __pyx_t_10 = 0;

    /* "cytimes/pddt.py":1073
 * 
 *         # pd.Index (DatetimeIndex) / pd.Series
 *         if isinstance(seconds, (pd.Index, pd.Series)):             # <<<<<<<<<<<<<<
 *             seconds = seconds.values
 * 
*/
  }

  /* "cytimes/pddt.py":1077
 * 
 *         # numpy.ndarray
 *         if isinstance(seconds, np.ndarray):             # <<<<<<<<<<<<<<
 *             # . validate 1-D array
 *             arr: np.ndarray = seconds
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_seconds, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray); 
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":1079
 *         if isinstance(seconds, np.ndarray):
 *             # . validate 1-D array
 *             arr: np.ndarray = seconds             # <<<<<<<<<<<<<<
 *             if arr.ndim != 1:
 *                 errors.raise_argument_error(
*/
    __pyx_t_10 = __pyx_v_seconds;
    __Pyx_INCREF(__pyx_t_10);
    if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1079, __pyx_L1_error)
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "cytimes/pddt.py":1080
 *             # . validate 1-D array
 *             arr: np.ndarray = seconds
 *             if arr.ndim != 1:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    __pyx_t_1 = (__pyx_f_5numpy_7ndarray_4ndim_ndim(__pyx_v_arr) != 1);
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":1084
 *                     cls,
 *                     "fromseconds(seconds)",
 *                     "Expects a 1-dimensional array, got %d-dim." % arr.ndim,             # <<<<<<<<<<<<<<
 *                 )
 *             # . convert to ndarray[int64] - unit: us
*/
      __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_f_5numpy_7ndarray_4ndim_ndim(__pyx_v_arr)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1084, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_8 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Expects_a_1_dimensional_array_go, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1084, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "cytimes/pddt.py":1081
 *             arr: np.ndarray = seconds
 *             if arr.ndim != 1:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     cls,
 *                     "fromseconds(seconds)",
*/
      __pyx_t_3.__pyx_n = 3;
      __pyx_t_3.cls = __pyx_v_cls;
      __pyx_t_3.input_msg = __pyx_mstate_global->__pyx_kp_u_fromseconds_seconds;
      __pyx_t_3.error_msg = ((PyObject*)__pyx_t_8);
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1081, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "cytimes/pddt.py":1080
 *             # . validate 1-D array
 *             arr: np.ndarray = seconds
 *             if arr.ndim != 1:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    }

    /* "cytimes/pddt.py":1087
 *                 )
 *             # . convert to ndarray[int64] - unit: us
 *             if utils.is_arr_float(arr):             # <<<<<<<<<<<<<<
 *                 arrf: np.ndarray = utils.arr_assure_float64(arr, False)
 *                 arrf_p = cython.cast(
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_is_arr_float(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1087, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":1088
 *             # . convert to ndarray[int64] - unit: us
 *             if utils.is_arr_float(arr):
 *                 arrf: np.ndarray = utils.arr_assure_float64(arr, False)             # <<<<<<<<<<<<<<
 *                 arrf_p = cython.cast(
 *                     cython.pointer(np.npy_float64), np.PyArray_DATA(arrf)
*/
      __pyx_t_31.__pyx_n = 1;
      __pyx_t_31.copy = 0;
      __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_float64(__pyx_v_arr, &__pyx_t_31)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1088, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_v_arrf = ((PyArrayObject *)__pyx_t_8);
      __pyx_t_8 = 0;

      /* "cytimes/pddt.py":1089
 *             if utils.is_arr_float(arr):
 *                 arrf: np.ndarray = utils.arr_assure_float64(arr, False)
 *                 arrf_p = cython.cast(             # <<<<<<<<<<<<<<
 *                     cython.pointer(np.npy_float64), np.PyArray_DATA(arrf)
 *                 )
*/
      __pyx_v_arrf_p = ((npy_float64 *)PyArray_DATA(__pyx_v_arrf));

      /* "cytimes/pddt.py":1092
 *                     cython.pointer(np.npy_float64), np.PyArray_DATA(arrf)
 *                 )
 *                 size_i: cython.Py_ssize_t = arrf.shape[0]             # <<<<<<<<<<<<<<
 *                 arr = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *                 arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
*/
      __pyx_v_size_i = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arrf)[0]);

      /* "cytimes/pddt.py":1093
 *                 )
 *                 size_i: cython.Py_ssize_t = arrf.shape[0]
 *                 arr = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)             # <<<<<<<<<<<<<<
 *                 arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *                 i: cython.Py_ssize_t
*/
      __pyx_t_32[0] = __pyx_v_size_i;
      __pyx_t_8 = PyArray_EMPTY(1, __pyx_t_32, NPY_INT64, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1093, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1093, __pyx_L1_error)
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_8));
      __pyx_t_8 = 0;

      /* "cytimes/pddt.py":1094
 *                 size_i: cython.Py_ssize_t = arrf.shape[0]
 *                 arr = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *                 arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))             # <<<<<<<<<<<<<<
 *                 i: cython.Py_ssize_t
 *                 for i in range(size_i):
*/
      __pyx_v_arr_p = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

      /* "cytimes/pddt.py":1096
 *                 arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *                 i: cython.Py_ssize_t
 *                 for i in range(size_i):             # <<<<<<<<<<<<<<
 *                     arr_p[i] = utils.sec_to_us(arrf_p[i])
 *             elif utils.is_arr_int(arr) or utils.is_arr_uint(arr):
*/
      __pyx_t_4 = __pyx_v_size_i;
      __pyx_t_33 = __pyx_t_4;
      for (__pyx_t_34 = 0; __pyx_t_34 < __pyx_t_33; __pyx_t_34+=1) {
        __pyx_v_i = __pyx_t_34;

        /* "cytimes/pddt.py":1097
 *                 i: cython.Py_ssize_t
 *                 for i in range(size_i):
 *                     arr_p[i] = utils.sec_to_us(arrf_p[i])             # <<<<<<<<<<<<<<
 *             elif utils.is_arr_int(arr) or utils.is_arr_uint(arr):
 *                 arr = utils.arr_mul(arr, utils.US_SECOND, 0, True)
*/
        __pyx_t_6 = __pyx_f_7cytimes_5utils_sec_to_us((__pyx_v_arrf_p[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1097, __pyx_L1_error)
        (__pyx_v_arr_p[__pyx_v_i]) = __pyx_t_6;
      }

      /* "cytimes/pddt.py":1087
 *                 )
 *             # . convert to ndarray[int64] - unit: us
 *             if utils.is_arr_float(arr):             # <<<<<<<<<<<<<<
 *                 arrf: np.ndarray = utils.arr_assure_float64(arr, False)
 *                 arrf_p = cython.cast(
*/
      goto __pyx_L37;
    }

    /* "cytimes/pddt.py":1098
 *                 for i in range(size_i):
 *                     arr_p[i] = utils.sec_to_us(arrf_p[i])
 *             elif utils.is_arr_int(arr) or utils.is_arr_uint(arr):             # <<<<<<<<<<<<<<
 *                 arr = utils.arr_mul(arr, utils.US_SECOND, 0, True)
 *             elif utils.is_dt64arr(arr):
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_is_arr_int(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1098, __pyx_L1_error)
    if (!__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L40_bool_binop_done;
    }
    __pyx_t_2 = __pyx_f_7cytimes_5utils_is_arr_uint(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1098, __pyx_L1_error)
    __pyx_t_1 = __pyx_t_2;
    __pyx_L40_bool_binop_done:;
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":1099
 *                     arr_p[i] = utils.sec_to_us(arrf_p[i])
 *             elif utils.is_arr_int(arr) or utils.is_arr_uint(arr):
 *                 arr = utils.arr_mul(arr, utils.US_SECOND, 0, True)             # <<<<<<<<<<<<<<
 *             elif utils.is_dt64arr(arr):
 *                 arr = utils.dt64arr_as_int64_us(arr, -1, 0, True)
*/
      __pyx_t_35.__pyx_n = 2;
      __pyx_t_35.offset = 0;
      __pyx_t_35.copy = 1;
      __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_SECOND, &__pyx_t_35)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1099, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_8));
      __pyx_t_8 = 0;

      /* "cytimes/pddt.py":1098
 *                 for i in range(size_i):
 *                     arr_p[i] = utils.sec_to_us(arrf_p[i])
 *             elif utils.is_arr_int(arr) or utils.is_arr_uint(arr):             # <<<<<<<<<<<<<<
 *                 arr = utils.arr_mul(arr, utils.US_SECOND, 0, True)
 *             elif utils.is_dt64arr(arr):
*/
      goto __pyx_L37;
    }

    /* "cytimes/pddt.py":1100
 *             elif utils.is_arr_int(arr) or utils.is_arr_uint(arr):
 *                 arr = utils.arr_mul(arr, utils.US_SECOND, 0, True)
 *             elif utils.is_dt64arr(arr):             # <<<<<<<<<<<<<<
 *                 arr = utils.dt64arr_as_int64_us(arr, -1, 0, True)
 *             else:
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1100, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":1101
 *                 arr = utils.arr_mul(arr, utils.US_SECOND, 0, True)
 *             elif utils.is_dt64arr(arr):
 *                 arr = utils.dt64arr_as_int64_us(arr, -1, 0, True)             # <<<<<<<<<<<<<<
 *             else:
 *                 errors.raise_argument_error(
*/
      __pyx_t_36.__pyx_n = 3;
      __pyx_t_36.arr_reso = -1;
      __pyx_t_36.offset = 0;
      __pyx_t_36.copy = 1;
      __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_us(__pyx_v_arr, &__pyx_t_36)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1101, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_8));
      __pyx_t_8 = 0;

      /* "cytimes/pddt.py":1100
 *             elif utils.is_arr_int(arr) or utils.is_arr_uint(arr):
 *                 arr = utils.arr_mul(arr, utils.US_SECOND, 0, True)
 *             elif utils.is_dt64arr(arr):             # <<<<<<<<<<<<<<
 *                 arr = utils.dt64arr_as_int64_us(arr, -1, 0, True)
 *             else:
*/
      goto __pyx_L37;
    }

    /* "cytimes/pddt.py":1103
 *                 arr = utils.dt64arr_as_int64_us(arr, -1, 0, True)
 *             else:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     cls,
 *                     "fromseconds(seconds)",
*/
    /*else*/ {

      /* "cytimes/pddt.py":1106
 *                     cls,
 *                     "fromseconds(seconds)",
 *                     "Unsupported array dtype [%s]." % arr.dtype,             # <<<<<<<<<<<<<<
 *                 )
 *             # . new instance
*/
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1106, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_10 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Unsupported_array_dtype_s, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1106, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "cytimes/pddt.py":1103
 *                 arr = utils.dt64arr_as_int64_us(arr, -1, 0, True)
 *             else:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     cls,
 *                     "fromseconds(seconds)",
*/
      __pyx_t_3.__pyx_n = 3;
      __pyx_t_3.cls = __pyx_v_cls;
      __pyx_t_3.input_msg = __pyx_mstate_global->__pyx_kp_u_fromseconds_seconds;
      __pyx_t_3.error_msg = ((PyObject*)__pyx_t_10);
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1103, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __pyx_L37:;

    /* "cytimes/pddt.py":1109
 *                 )
 *             # . new instance
 *             return cls._new(             # <<<<<<<<<<<<<<
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name
 *             )
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = __pyx_v_cls;
    __Pyx_INCREF(__pyx_t_8);

    /* "cytimes/pddt.py":1110
 *             # . new instance
 *             return cls._new(
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name             # <<<<<<<<<<<<<<
 *             )
 * 
*/
    __pyx_t_17 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_17);
    __pyx_t_9 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
      __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1110, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    __pyx_t_9 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_8, __pyx_t_7};
      __pyx_t_17 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1109, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_17, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1109, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_17, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1109, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_17, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 1109, __pyx_L1_error)
      __pyx_t_10 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_17);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1109, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":1077
 * 
 *         # numpy.ndarray
 *         if isinstance(seconds, np.ndarray):             # <<<<<<<<<<<<<<
 *             # . validate 1-D array
 *             arr: np.ndarray = seconds
*/
  }

  /* "cytimes/pddt.py":1117
 *             cls,
 *             "fromseconds(seconds)",
 *             "Unsupported 'seconds' data type %s." % type(seconds),             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_10 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Unsupported_seconds_data_type_s, ((PyObject *)Py_TYPE(__pyx_v_seconds))); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);

  /* "cytimes/pddt.py":1114
 * 
 *         # Unsupported type
 *         errors.raise_type_error(             # <<<<<<<<<<<<<<
 *             cls,
 *             "fromseconds(seconds)",
*/
  __pyx_t_37.__pyx_n = 3;
  __pyx_t_37.cls = __pyx_v_cls;
  __pyx_t_37.input_msg = __pyx_mstate_global->__pyx_kp_u_fromseconds_seconds;
  __pyx_t_37.error_msg = ((PyObject*)__pyx_t_10);
  __pyx_f_7cytimes_6errors_raise_type_error(0, &__pyx_t_37); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1114, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "cytimes/pddt.py":988
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromseconds(
 *         cls,
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.fromseconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF((PyObject *)__pyx_v_arrf);
  __Pyx_XDECREF(__pyx_v_seconds);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":1120
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def frommicroseconds(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_25frommicroseconds(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_24frommicroseconds, "Construct an index from microseconds since the epoch `<'Pddt'>`.\n\n        :param us `<'int/Array-like'>`: The microseconds to construct with.\n\n            - `<'int'>` The integer representing microseconds since epoch.\n            - `<'Array-like'>` An array-like object containing elements representing the microseconds.\n\n        :param size `<'int/Any/None'>`: The target size of the index\n            (required when `us` is an integer ). Defaults to `None`.\n\n            - `<'int'>` A positive integer number.\n            - `<'Any'>` Takes the `len(size)` value as the index size.\n            - `<'None'>` Ignored when `us` is an array-like object.\n\n        :param tz `<'tzinfo/str/None'>`: The optional timezone to `attach`. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive (when `time` has no timezone info, see `Notes`).\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :param as_unit `<'str/None'>`: Convert to specified datetime unit after construction. Defaults to `None`.\n            Supports: `'s'`, `'ms'`, `'us'`, `'ns'`.\n\n        :param name `<'Hashable/None'>`: Optional name of the index. Defaults to `None`.\n\n        :returns `<'Pddt'>`: The resulting datetime index (naive when `tz` is None).\n\n        ## Notice\n        - This method only construct `datetime64[us]` index (microsecond resolution).\n        - Parameter `as_unit` converts it to other datetime units after construction.\n        - Unlike `fromtimestamp()`, this method never assumes local time when\n          `tz is None`, and interprets `us` as-is without any local-time conversion.\n        - When `tz` is specified, the timezone is simply `attached` without any conversion.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_25frommicroseconds = {"frommicroseconds", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_25frommicroseconds, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_24frommicroseconds};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_25frommicroseconds(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_us = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_v_as_unit = 0;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("frommicroseconds (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_us,&__pyx_mstate_global->__pyx_n_u_size_2,&__pyx_mstate_global->__pyx_n_u_tz,&__pyx_mstate_global->__pyx_n_u_as_unit,&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1120, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1120, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1120, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1120, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1120, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1120, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1120, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "frommicroseconds", 0) < (0)) __PYX_ERR(0, 1120, __pyx_L3_error)

      /* "cytimes/pddt.py":1124
 *         cls,
 *         us: int | object,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1125
 *         us: int | object,
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1126
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":1127
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from microseconds since the epoch `<'Pddt'>`.
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("frommicroseconds", 0, 2, 6, i); __PYX_ERR(0, 1120, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1120, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1120, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1120, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1120, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1120, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1120, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pddt.py":1124
 *         cls,
 *         us: int | object,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1125
 *         us: int | object,
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1126
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":1127
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from microseconds since the epoch `<'Pddt'>`.
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_us = values[1];
    __pyx_v_size = values[2];
    __pyx_v_tz = values[3];
    __pyx_v_as_unit = ((PyObject*)values[4]);
    __pyx_v_name = values[5];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("frommicroseconds", 0, 2, 6, __pyx_nargs); __PYX_ERR(0, 1120, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.frommicroseconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_as_unit), (&PyUnicode_Type), 1, "as_unit", 2))) __PYX_ERR(0, 1126, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_24frommicroseconds(__pyx_self, __pyx_v_cls, __pyx_v_us, __pyx_v_size, __pyx_v_tz, __pyx_v_as_unit, __pyx_v_name);

  /* "cytimes/pddt.py":1120
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def frommicroseconds(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_24frommicroseconds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_us, PyObject *__pyx_v_size, PyObject *__pyx_v_tz, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name) {
  Py_ssize_t __pyx_v_size_i;
  PY_LONG_LONG __pyx_v_value;
  PyArrayObject *__pyx_v_arr = 0;
  npy_int64 *__pyx_v_arr_p;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_o = NULL;
  PyObject *__pyx_v_err = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PY_LONG_LONG __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  npy_intp __pyx_t_10[1];
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20[7];
  PyObject *__pyx_t_21 = NULL;
  int __pyx_t_22;
  char const *__pyx_t_23;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  PyObject *__pyx_t_28 = NULL;
  PyObject *__pyx_t_29 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_30;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_us __pyx_t_31;
  struct __pyx_opt_args_7cytimes_6errors_raise_type_error __pyx_t_32;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("frommicroseconds", 0);
  __Pyx_INCREF(__pyx_v_us);

  /* "cytimes/pddt.py":1164
 *         """
 *         # Integer
 *         if isinstance(us, int):             # <<<<<<<<<<<<<<
 *             if size is None:
 *                 errors.raise_argument_error(
*/
  __pyx_t_1 = PyLong_Check(__pyx_v_us); 
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":1165
 *         # Integer
 *         if isinstance(us, int):
 *             if size is None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    __pyx_t_1 = (__pyx_v_size == Py_None);
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":1166
 *         if isinstance(us, int):
 *             if size is None:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     cls,
 *                     "frommicroseconds(size)",
*/
      __pyx_t_2.__pyx_n = 3;
      __pyx_t_2.cls = __pyx_v_cls;
      __pyx_t_2.input_msg = __pyx_mstate_global->__pyx_kp_u_frommicroseconds_size;
      __pyx_t_2.error_msg = __pyx_mstate_global->__pyx_kp_u_When_us_is_an_integer_size_must;
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1166, __pyx_L1_error)

      /* "cytimes/pddt.py":1165
 *         # Integer
 *         if isinstance(us, int):
 *             if size is None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    }

    /* "cytimes/pddt.py":1171
 *                     "When 'us' is an integer, 'size' must be specified.",
 *                 )
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)             # <<<<<<<<<<<<<<
 *             value: cython.longlong = int(us)
 *             # . new instance
*/
    __pyx_t_3 = __pyx_f_7cytimes_4pddt__parse_size(__pyx_v_cls, __pyx_v_size); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 1171, __pyx_L1_error)
    __pyx_v_size_i = __pyx_t_3;

    /* "cytimes/pddt.py":1172
 *                 )
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)
 *             value: cython.longlong = int(us)             # <<<<<<<<<<<<<<
 *             # . new instance
 *             arr: np.ndarray = utils.dt64arr_fr_int64(value, size_i, "us")
*/
    __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_us); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_5 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1172, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_value = __pyx_t_5;

    /* "cytimes/pddt.py":1174
 *             value: cython.longlong = int(us)
 *             # . new instance
 *             arr: np.ndarray = utils.dt64arr_fr_int64(value, size_i, "us")             # <<<<<<<<<<<<<<
 *             return cls._new(arr, tz=tz, as_unit=as_unit, name=name)
 * 
*/
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_fr_int64(__pyx_v_value, __pyx_v_size_i, __pyx_mstate_global->__pyx_n_u_us)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":1175
 *             # . new instance
 *             arr: np.ndarray = utils.dt64arr_fr_int64(value, size_i, "us")
 *             return cls._new(arr, tz=tz, as_unit=as_unit, name=name)             # <<<<<<<<<<<<<<
 * 
 *         # list / tuple
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __pyx_v_cls;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_6, ((PyObject *)__pyx_v_arr)};
      __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1175, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_8, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1175, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_8, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 1175, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":1164
 *         """
 *         # Integer
 *         if isinstance(us, int):             # <<<<<<<<<<<<<<
 *             if size is None:
 *                 errors.raise_argument_error(
*/
  }

  /* "cytimes/pddt.py":1178
 * 
 *         # list / tuple
 *         if isinstance(us, (list, tuple)):             # <<<<<<<<<<<<<<
 *             # . construct ndarray[int64] - unit: us
 *             size_i: cython.Py_ssize_t = len(us)
*/
  __pyx_t_9 = PyList_Check(__pyx_v_us); 
  if (!__pyx_t_9) {
  } else {
    __pyx_t_1 = __pyx_t_9;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_9 = PyTuple_Check(__pyx_v_us); 
  __pyx_t_1 = __pyx_t_9;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":1180
 *         if isinstance(us, (list, tuple)):
 *             # . construct ndarray[int64] - unit: us
 *             size_i: cython.Py_ssize_t = len(us)             # <<<<<<<<<<<<<<
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
*/
    __pyx_t_3 = PyObject_Length(__pyx_v_us); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1180, __pyx_L1_error)
    __pyx_v_size_i = __pyx_t_3;

    /* "cytimes/pddt.py":1181
 *             # . construct ndarray[int64] - unit: us
 *             size_i: cython.Py_ssize_t = len(us)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)             # <<<<<<<<<<<<<<
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
*/
    __pyx_t_10[0] = __pyx_v_size_i;
    __pyx_t_4 = PyArray_EMPTY(1, __pyx_t_10, NPY_INT64, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1181, __pyx_L1_error)
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":1182
 *             size_i: cython.Py_ssize_t = len(us)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))             # <<<<<<<<<<<<<<
 *             i: cython.Py_ssize_t = 0
 *             for o in us:
*/
    __pyx_v_arr_p = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

    /* "cytimes/pddt.py":1183
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0             # <<<<<<<<<<<<<<
 *             for o in us:
 *                 try:
*/
    __pyx_v_i = 0;

    /* "cytimes/pddt.py":1184
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
 *             for o in us:             # <<<<<<<<<<<<<<
 *                 try:
 *                     value: cython.longlong = int(o)
*/
    if (likely(PyList_CheckExact(__pyx_v_us)) || PyTuple_CheckExact(__pyx_v_us)) {
      __pyx_t_4 = __pyx_v_us; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_3 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_us); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1184, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1184, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_11)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1184, __pyx_L1_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          __pyx_t_8 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_3;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1184, __pyx_L1_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_3));
          #else
          __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_3);
          #endif
          ++__pyx_t_3;
        }
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1184, __pyx_L1_error)
      } else {
        __pyx_t_8 = __pyx_t_11(__pyx_t_4);
        if (unlikely(!__pyx_t_8)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1184, __pyx_L1_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_XDECREF_SET(__pyx_v_o, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "cytimes/pddt.py":1185
 *             i: cython.Py_ssize_t = 0
 *             for o in us:
 *                 try:             # <<<<<<<<<<<<<<
 *                     value: cython.longlong = int(o)
 *                 except Exception as err:
*/
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __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:*/ {

          /* "cytimes/pddt.py":1186
 *             for o in us:
 *                 try:
 *                     value: cython.longlong = int(o)             # <<<<<<<<<<<<<<
 *                 except Exception as err:
 *                     errors.raise_argument_error(
*/
          __pyx_t_8 = __Pyx_PyNumber_Int(__pyx_v_o); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1186, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_5 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_t_8); if (unlikely((__pyx_t_5 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1186, __pyx_L10_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_v_value = __pyx_t_5;

          /* "cytimes/pddt.py":1185
 *             i: cython.Py_ssize_t = 0
 *             for o in us:
 *                 try:             # <<<<<<<<<<<<<<
 *                     value: cython.longlong = int(o)
 *                 except Exception as err:
*/
        }
        __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_L17_try_end;
        __pyx_L10_error:;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "cytimes/pddt.py":1187
 *                 try:
 *                     value: cython.longlong = int(o)
 *                 except Exception as err:             # <<<<<<<<<<<<<<
 *                     errors.raise_argument_error(
 *                         cls,
*/
        __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
        if (__pyx_t_15) {
          __Pyx_AddTraceback("cytimes.pddt.Pddt.frommicroseconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_6, &__pyx_t_16) < 0) __PYX_ERR(0, 1187, __pyx_L12_except_error)
          __Pyx_XGOTREF(__pyx_t_8);
          __Pyx_XGOTREF(__pyx_t_6);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_INCREF(__pyx_t_6);
          __pyx_v_err = __pyx_t_6;
          /*try:*/ {

            /* "cytimes/pddt.py":1192
 *                         "frommicroseconds(us)",
 *                         "Expects integer element from %s, got '%s' %s."
 *                         % (type(us).__name__, o, type(o)),             # <<<<<<<<<<<<<<
 *                         err,
 *                     )
*/
            __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_us)), __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1192, __pyx_L23_error)
            __Pyx_GOTREF(__pyx_t_17);
            __pyx_t_18 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_17), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1192, __pyx_L23_error)
            __Pyx_GOTREF(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __pyx_t_17 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_o), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1192, __pyx_L23_error)
            __Pyx_GOTREF(__pyx_t_17);
            __pyx_t_19 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_o))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1192, __pyx_L23_error)
            __Pyx_GOTREF(__pyx_t_19);
            __pyx_t_20[0] = __pyx_mstate_global->__pyx_kp_u_Expects_integer_element_from;
            __pyx_t_20[1] = __pyx_t_18;
            __pyx_t_20[2] = __pyx_mstate_global->__pyx_kp_u_got;
            __pyx_t_20[3] = __pyx_t_17;
            __pyx_t_20[4] = __pyx_mstate_global->__pyx_kp_u__9;
            __pyx_t_20[5] = __pyx_t_19;
            __pyx_t_20[6] = __pyx_mstate_global->__pyx_kp_u__2;

            /* "cytimes/pddt.py":1191
 *                         cls,
 *                         "frommicroseconds(us)",
 *                         "Expects integer element from %s, got '%s' %s."             # <<<<<<<<<<<<<<
 *                         % (type(us).__name__, o, type(o)),
 *                         err,
*/
            __pyx_t_21 = __Pyx_PyUnicode_Join(__pyx_t_20, 7, 29 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18) + 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_19) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_19));
            if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1191, __pyx_L23_error)
            __Pyx_GOTREF(__pyx_t_21);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

            /* "cytimes/pddt.py":1188
 *                     value: cython.longlong = int(o)
 *                 except Exception as err:
 *                     errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                         cls,
 *                         "frommicroseconds(us)",
*/
            __pyx_t_2.__pyx_n = 4;
            __pyx_t_2.cls = __pyx_v_cls;
            __pyx_t_2.input_msg = __pyx_mstate_global->__pyx_kp_u_frommicroseconds_us;
            __pyx_t_2.error_msg = ((PyObject*)__pyx_t_21);
            __pyx_t_2.tb_exc = __pyx_v_err;
            __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1188, __pyx_L23_error)
            __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

            /* "cytimes/pddt.py":1195
 *                         err,
 *                     )
 *                     return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *                 arr_p[i] = value
 *                 i += 1
*/
            __Pyx_XDECREF(__pyx_r);
            __pyx_r = Py_None; __Pyx_INCREF(Py_None);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            goto __pyx_L22_return;
          }

          /* "cytimes/pddt.py":1187
 *                 try:
 *                     value: cython.longlong = int(o)
 *                 except Exception as err:             # <<<<<<<<<<<<<<
 *                     errors.raise_argument_error(
 *                         cls,
*/
          /*finally:*/ {
            __pyx_L23_error:;
            /*exception exit:*/{
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0;
              __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
              __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
              __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
              __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
               __Pyx_ExceptionSwap(&__pyx_t_27, &__pyx_t_28, &__pyx_t_29);
              if ( unlikely(__Pyx_GetException(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26) < 0)) __Pyx_ErrFetch(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26);
              __Pyx_XGOTREF(__pyx_t_24);
              __Pyx_XGOTREF(__pyx_t_25);
              __Pyx_XGOTREF(__pyx_t_26);
              __Pyx_XGOTREF(__pyx_t_27);
              __Pyx_XGOTREF(__pyx_t_28);
              __Pyx_XGOTREF(__pyx_t_29);
              __pyx_t_15 = __pyx_lineno; __pyx_t_22 = __pyx_clineno; __pyx_t_23 = __pyx_filename;
              {
                __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
              }
              __Pyx_XGIVEREF(__pyx_t_27);
              __Pyx_XGIVEREF(__pyx_t_28);
              __Pyx_XGIVEREF(__pyx_t_29);
              __Pyx_ExceptionReset(__pyx_t_27, __pyx_t_28, __pyx_t_29);
              __Pyx_XGIVEREF(__pyx_t_24);
              __Pyx_XGIVEREF(__pyx_t_25);
              __Pyx_XGIVEREF(__pyx_t_26);
              __Pyx_ErrRestore(__pyx_t_24, __pyx_t_25, __pyx_t_26);
              __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0;
              __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_22; __pyx_filename = __pyx_t_23;
              goto __pyx_L12_except_error;
            }
            __pyx_L22_return: {
              __pyx_t_29 = __pyx_r;
              __pyx_r = 0;
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
              __pyx_r = __pyx_t_29;
              __pyx_t_29 = 0;
              goto __pyx_L13_except_return;
            }
          }
        }
        goto __pyx_L12_except_error;

        /* "cytimes/pddt.py":1185
 *             i: cython.Py_ssize_t = 0
 *             for o in us:
 *                 try:             # <<<<<<<<<<<<<<
 *                     value: cython.longlong = int(o)
 *                 except Exception as err:
*/
        __pyx_L12_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_except_return:;
        __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_L0;
        __pyx_L17_try_end:;
      }

      /* "cytimes/pddt.py":1196
 *                     )
 *                     return  # unreachable: suppress compiler warning
 *                 arr_p[i] = value             # <<<<<<<<<<<<<<
 *                 i += 1
 *             # . new instance
*/
      (__pyx_v_arr_p[__pyx_v_i]) = __pyx_v_value;

      /* "cytimes/pddt.py":1197
 *                     return  # unreachable: suppress compiler warning
 *                 arr_p[i] = value
 *                 i += 1             # <<<<<<<<<<<<<<
 *             # . new instance
 *             return cls._new(
*/
      __pyx_v_i = (__pyx_v_i + 1);

      /* "cytimes/pddt.py":1184
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
 *             for o in us:             # <<<<<<<<<<<<<<
 *                 try:
 *                     value: cython.longlong = int(o)
*/
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytimes/pddt.py":1199
 *                 i += 1
 *             # . new instance
 *             return cls._new(             # <<<<<<<<<<<<<<
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name
 *             )
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_16 = __pyx_v_cls;
    __Pyx_INCREF(__pyx_t_16);

    /* "cytimes/pddt.py":1200
 *             # . new instance
 *             return cls._new(
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name             # <<<<<<<<<<<<<<
 *             )
 * 
*/
    __pyx_t_8 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
      __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1200, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_16, __pyx_t_6};
      __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1199, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1199, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_8, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1199, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_8, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 1199, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1199, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":1178
 * 
 *         # list / tuple
 *         if isinstance(us, (list, tuple)):             # <<<<<<<<<<<<<<
 *             # . construct ndarray[int64] - unit: us
 *             size_i: cython.Py_ssize_t = len(us)
*/
  }

  /* "cytimes/pddt.py":1204
 * 
 *         # pd.Index (DatetimeIndex) / pd.Series
 *         if isinstance(us, (pd.Index, pd.Series)):             # <<<<<<<<<<<<<<
 *             us = us.values
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Series); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_9 = PyObject_IsInstance(__pyx_v_us, __pyx_t_8); 
  if (!__pyx_t_9) {
  } else {
    __pyx_t_1 = __pyx_t_9;
    goto __pyx_L31_bool_binop_done;
  }
  __pyx_t_9 = PyObject_IsInstance(__pyx_v_us, __pyx_t_6); 
  __pyx_t_1 = __pyx_t_9;
  __pyx_L31_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":1205
 *         # pd.Index (DatetimeIndex) / pd.Series
 *         if isinstance(us, (pd.Index, pd.Series)):
 *             us = us.values             # <<<<<<<<<<<<<<
 * 
 *         # numpy.ndarray
*/
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_us, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF_SET(__pyx_v_us, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "cytimes/pddt.py":1204
 * 
 *         # pd.Index (DatetimeIndex) / pd.Series
 *         if isinstance(us, (pd.Index, pd.Series)):             # <<<<<<<<<<<<<<
 *             us = us.values
 * 
*/
  }

  /* "cytimes/pddt.py":1208
 * 
 *         # numpy.ndarray
 *         if isinstance(us, np.ndarray):             # <<<<<<<<<<<<<<
 *             # . validate 1-D array
 *             arr: np.ndarray = us
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_us, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray); 
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":1210
 *         if isinstance(us, np.ndarray):
 *             # . validate 1-D array
 *             arr: np.ndarray = us             # <<<<<<<<<<<<<<
 *             if arr.ndim != 1:
 *                 errors.raise_argument_error(
*/
    __pyx_t_8 = __pyx_v_us;
    __Pyx_INCREF(__pyx_t_8);
    if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1210, __pyx_L1_error)
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_8);
    __pyx_t_8 = 0;

    /* "cytimes/pddt.py":1211
 *             # . validate 1-D array
 *             arr: np.ndarray = us
 *             if arr.ndim != 1:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    __pyx_t_1 = (__pyx_f_5numpy_7ndarray_4ndim_ndim(__pyx_v_arr) != 1);
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":1215
 *                     cls,
 *                     "frommicroseconds(us)",
 *                     "Expects a 1-dimensional ndarray, got %d-dim." % arr.ndim,             # <<<<<<<<<<<<<<
 *                 )
 *             # . convert to ndarray[int64] - unit: us
*/
      __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_f_5numpy_7ndarray_4ndim_ndim(__pyx_v_arr)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1215, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Expects_a_1_dimensional_ndarray, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1215, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "cytimes/pddt.py":1212
 *             arr: np.ndarray = us
 *             if arr.ndim != 1:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     cls,
 *                     "frommicroseconds(us)",
*/
      __pyx_t_2.__pyx_n = 3;
      __pyx_t_2.cls = __pyx_v_cls;
      __pyx_t_2.input_msg = __pyx_mstate_global->__pyx_kp_u_frommicroseconds_us;
      __pyx_t_2.error_msg = ((PyObject*)__pyx_t_6);
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1212, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cytimes/pddt.py":1211
 *             # . validate 1-D array
 *             arr: np.ndarray = us
 *             if arr.ndim != 1:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    }

    /* "cytimes/pddt.py":1218
 *                 )
 *             # . convert to ndarray[int64] - unit: us
 *             if utils.is_arr_int(arr) or utils.is_arr_uint(arr):             # <<<<<<<<<<<<<<
 *                 arr = utils.arr_assure_int64(arr, True)
 *             elif utils.is_dt64arr(arr):
*/
    __pyx_t_9 = __pyx_f_7cytimes_5utils_is_arr_int(__pyx_v_arr); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1218, __pyx_L1_error)
    if (!__pyx_t_9) {
    } else {
      __pyx_t_1 = __pyx_t_9;
      goto __pyx_L36_bool_binop_done;
    }
    __pyx_t_9 = __pyx_f_7cytimes_5utils_is_arr_uint(__pyx_v_arr); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1218, __pyx_L1_error)
    __pyx_t_1 = __pyx_t_9;
    __pyx_L36_bool_binop_done:;
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":1219
 *             # . convert to ndarray[int64] - unit: us
 *             if utils.is_arr_int(arr) or utils.is_arr_uint(arr):
 *                 arr = utils.arr_assure_int64(arr, True)             # <<<<<<<<<<<<<<
 *             elif utils.is_dt64arr(arr):
 *                 arr = utils.dt64arr_as_int64_us(arr, -1, 0, True)
*/
      __pyx_t_30.__pyx_n = 1;
      __pyx_t_30.copy = 1;
      __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_30)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1219, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_6));
      __pyx_t_6 = 0;

      /* "cytimes/pddt.py":1218
 *                 )
 *             # . convert to ndarray[int64] - unit: us
 *             if utils.is_arr_int(arr) or utils.is_arr_uint(arr):             # <<<<<<<<<<<<<<
 *                 arr = utils.arr_assure_int64(arr, True)
 *             elif utils.is_dt64arr(arr):
*/
      goto __pyx_L35;
    }

    /* "cytimes/pddt.py":1220
 *             if utils.is_arr_int(arr) or utils.is_arr_uint(arr):
 *                 arr = utils.arr_assure_int64(arr, True)
 *             elif utils.is_dt64arr(arr):             # <<<<<<<<<<<<<<
 *                 arr = utils.dt64arr_as_int64_us(arr, -1, 0, True)
 *             else:
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1220, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":1221
 *                 arr = utils.arr_assure_int64(arr, True)
 *             elif utils.is_dt64arr(arr):
 *                 arr = utils.dt64arr_as_int64_us(arr, -1, 0, True)             # <<<<<<<<<<<<<<
 *             else:
 *                 errors.raise_argument_error(
*/
      __pyx_t_31.__pyx_n = 3;
      __pyx_t_31.arr_reso = -1;
      __pyx_t_31.offset = 0;
      __pyx_t_31.copy = 1;
      __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_us(__pyx_v_arr, &__pyx_t_31)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1221, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_6));
      __pyx_t_6 = 0;

      /* "cytimes/pddt.py":1220
 *             if utils.is_arr_int(arr) or utils.is_arr_uint(arr):
 *                 arr = utils.arr_assure_int64(arr, True)
 *             elif utils.is_dt64arr(arr):             # <<<<<<<<<<<<<<
 *                 arr = utils.dt64arr_as_int64_us(arr, -1, 0, True)
 *             else:
*/
      goto __pyx_L35;
    }

    /* "cytimes/pddt.py":1223
 *                 arr = utils.dt64arr_as_int64_us(arr, -1, 0, True)
 *             else:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     cls,
 *                     "frommicroseconds(us)",
*/
    /*else*/ {

      /* "cytimes/pddt.py":1226
 *                     cls,
 *                     "frommicroseconds(us)",
 *                     "Unsupported array dtype [%s]." % arr.dtype,             # <<<<<<<<<<<<<<
 *                 )
 *             # . new instance
*/
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Unsupported_array_dtype_s, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cytimes/pddt.py":1223
 *                 arr = utils.dt64arr_as_int64_us(arr, -1, 0, True)
 *             else:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     cls,
 *                     "frommicroseconds(us)",
*/
      __pyx_t_2.__pyx_n = 3;
      __pyx_t_2.cls = __pyx_v_cls;
      __pyx_t_2.input_msg = __pyx_mstate_global->__pyx_kp_u_frommicroseconds_us;
      __pyx_t_2.error_msg = ((PyObject*)__pyx_t_8);
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1223, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_L35:;

    /* "cytimes/pddt.py":1229
 *                 )
 *             # . new instance
 *             return cls._new(             # <<<<<<<<<<<<<<
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name
 *             )
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __pyx_v_cls;
    __Pyx_INCREF(__pyx_t_6);

    /* "cytimes/pddt.py":1230
 *             # . new instance
 *             return cls._new(
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name             # <<<<<<<<<<<<<<
 *             )
 * 
*/
    __pyx_t_16 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_16);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1230, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_16 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1229, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_16, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1229, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_16, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1229, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_16, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 1229, __pyx_L1_error)
      __pyx_t_8 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_16);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1229, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    }
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":1208
 * 
 *         # numpy.ndarray
 *         if isinstance(us, np.ndarray):             # <<<<<<<<<<<<<<
 *             # . validate 1-D array
 *             arr: np.ndarray = us
*/
  }

  /* "cytimes/pddt.py":1237
 *             cls,
 *             "frommicroseconds(us)",
 *             "Unsupported 'us' data type %s." % type(us),             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_8 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Unsupported_us_data_type_s, ((PyObject *)Py_TYPE(__pyx_v_us))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "cytimes/pddt.py":1234
 * 
 *         # Unsupported type
 *         errors.raise_type_error(             # <<<<<<<<<<<<<<
 *             cls,
 *             "frommicroseconds(us)",
*/
  __pyx_t_32.__pyx_n = 3;
  __pyx_t_32.cls = __pyx_v_cls;
  __pyx_t_32.input_msg = __pyx_mstate_global->__pyx_kp_u_frommicroseconds_us;
  __pyx_t_32.error_msg = ((PyObject*)__pyx_t_8);
  __pyx_f_7cytimes_6errors_raise_type_error(0, &__pyx_t_32); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1234, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":1120
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def frommicroseconds(
 *         cls,
*/

  /* function exit code */
  __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_8);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.frommicroseconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_us);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":1240
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromtimestamp(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_27fromtimestamp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_26fromtimestamp, "Construct an index from POSIX timestamps optionally converted to a timezone `<'Pddt'>`.\n\n        :param ts `<'int/float/Array-like'>`: The POSIX timestamps to construct with.\n\n            - `<'int/float'>` A numeric value representing the timestamp.\n            - `<'Array-like'>` An array-like object containing elements representing the timestamps.\n\n        :param size `<'int/Any/None'>`: The target size of the index\n            (required when `ts` is a float or integer ). Defaults to `None`.\n\n            - `<'int'>` A positive integer number.\n            - `<'Any'>` Takes the `len(size)` value as the index size.\n            - `<'None'>` Ignored when `ts` is an array-like object.\n\n        :param tz `<'tzinfo/str/None'>`: Target timezone. Defaults to `None`.\n\n            - `<'None'>` naive `local` time (assumes local timezone).\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :param as_unit `<'str/None'>`: Convert to specified datetime unit after construction. Defaults to `None`.\n            Supports: `'s'`, `'ms'`, `'us'`, `'ns'`.\n\n        :param name `<'Hashable/None'>`: Optional name of the index. Defaults to `None`.\n\n        :returns `<'Pddt'>`: The resulting datetime index (naive when `tz` is None).\n\n        ## Notice\n        - This method only construct `datetime64[us]` index (microsecond resolution).\n        - Parameter `as_unit` converts it to other datetime units after construction.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_27fromtimestamp = {"fromtimestamp", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_27fromtimestamp, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_26fromtimestamp};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_27fromtimestamp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_ts = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_v_as_unit = 0;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fromtimestamp (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_ts,&__pyx_mstate_global->__pyx_n_u_size_2,&__pyx_mstate_global->__pyx_n_u_tz,&__pyx_mstate_global->__pyx_n_u_as_unit,&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1240, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1240, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1240, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1240, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1240, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1240, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1240, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fromtimestamp", 0) < (0)) __PYX_ERR(0, 1240, __pyx_L3_error)

      /* "cytimes/pddt.py":1244
 *         cls,
 *         ts: int | float | object,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1245
 *         ts: int | float | object,
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1246
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":1247
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from POSIX timestamps optionally converted to a timezone `<'Pddt'>`.
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fromtimestamp", 0, 2, 6, i); __PYX_ERR(0, 1240, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1240, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1240, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1240, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1240, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1240, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1240, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pddt.py":1244
 *         cls,
 *         ts: int | float | object,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1245
 *         ts: int | float | object,
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1246
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":1247
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from POSIX timestamps optionally converted to a timezone `<'Pddt'>`.
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_ts = values[1];
    __pyx_v_size = values[2];
    __pyx_v_tz = values[3];
    __pyx_v_as_unit = ((PyObject*)values[4]);
    __pyx_v_name = values[5];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fromtimestamp", 0, 2, 6, __pyx_nargs); __PYX_ERR(0, 1240, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.fromtimestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_as_unit), (&PyUnicode_Type), 1, "as_unit", 2))) __PYX_ERR(0, 1246, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_26fromtimestamp(__pyx_self, __pyx_v_cls, __pyx_v_ts, __pyx_v_size, __pyx_v_tz, __pyx_v_as_unit, __pyx_v_name);

  /* "cytimes/pddt.py":1240
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromtimestamp(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_26fromtimestamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_ts, PyObject *__pyx_v_size, PyObject *__pyx_v_tz, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name) {
  Py_ssize_t __pyx_v_size_i;
  double __pyx_v_value;
  PyDateTime_DateTime *__pyx_v_dt = 0;
  PyObject *__pyx_v_err = NULL;
  PY_LONG_LONG __pyx_v_us;
  PyArrayObject *__pyx_v_arr = 0;
  npy_int64 *__pyx_v_arr_p;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_o = NULL;
  PyArrayObject *__pyx_v_arrf = 0;
  npy_float64 *__pyx_v_arrf_p;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  double __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_ts __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  char const *__pyx_t_17;
  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;
  PY_LONG_LONG __pyx_t_24;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_us __pyx_t_25;
  size_t __pyx_t_26;
  npy_intp __pyx_t_27[1];
  PyObject *(*__pyx_t_28)(PyObject *);
  PyObject *__pyx_t_29 = NULL;
  PyObject *__pyx_t_30 = NULL;
  PyObject *__pyx_t_31[7];
  PyObject *__pyx_t_32 = NULL;
  char const *__pyx_t_33;
  PyObject *__pyx_t_34[5];
  char const *__pyx_t_35;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_float64 __pyx_t_36;
  npy_intp __pyx_t_37[1];
  Py_ssize_t __pyx_t_38;
  Py_ssize_t __pyx_t_39;
  char const *__pyx_t_40;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_us __pyx_t_41;
  struct __pyx_opt_args_7cytimes_6errors_raise_type_error __pyx_t_42;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fromtimestamp", 0);
  __Pyx_INCREF(__pyx_v_ts);
  __Pyx_INCREF(__pyx_v_tz);

  /* "cytimes/pddt.py":1281
 *         """
 *         # Parse timezone
 *         tz = utils.tz_parse(tz)             # <<<<<<<<<<<<<<
 * 
 *         # Integer / Float
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":1284
 * 
 *         # Integer / Float
 *         if isinstance(ts, (int, float)):             # <<<<<<<<<<<<<<
 *             if size is None:
 *                 errors.raise_argument_error(
*/
  __pyx_t_3 = PyLong_Check(__pyx_v_ts); 
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = PyFloat_Check(__pyx_v_ts); 
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":1285
 *         # Integer / Float
 *         if isinstance(ts, (int, float)):
 *             if size is None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    __pyx_t_2 = (__pyx_v_size == Py_None);
    if (__pyx_t_2) {

      /* "cytimes/pddt.py":1286
 *         if isinstance(ts, (int, float)):
 *             if size is None:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     cls,
 *                     "fromtimestamp(ts)",
*/
      __pyx_t_4.__pyx_n = 3;
      __pyx_t_4.cls = __pyx_v_cls;
      __pyx_t_4.input_msg = __pyx_mstate_global->__pyx_kp_u_fromtimestamp_ts;
      __pyx_t_4.error_msg = __pyx_mstate_global->__pyx_kp_u_When_ts_is_a_float_or_integer_si;
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1286, __pyx_L1_error)

      /* "cytimes/pddt.py":1285
 *         # Integer / Float
 *         if isinstance(ts, (int, float)):
 *             if size is None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    }

    /* "cytimes/pddt.py":1291
 *                     "When 'ts' is a float or integer, 'size' must be specified.",
 *                 )
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)             # <<<<<<<<<<<<<<
 *             value: cython.double = float(ts)
 *             try:
*/
    __pyx_t_5 = __pyx_f_7cytimes_4pddt__parse_size(__pyx_v_cls, __pyx_v_size); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 1291, __pyx_L1_error)
    __pyx_v_size_i = __pyx_t_5;

    /* "cytimes/pddt.py":1292
 *                 )
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)
 *             value: cython.double = float(ts)             # <<<<<<<<<<<<<<
 *             try:
 *                 dt: datetime.datetime = utils.dt_fr_ts(value, tz, None)
*/
    __pyx_t_6 = __Pyx_PyObject_AsDouble(__pyx_v_ts); if (unlikely(__PYX_CHECK_FLOAT_EXCEPTION(__pyx_t_6, ((double)((double)-1))) && PyErr_Occurred())) __PYX_ERR(0, 1292, __pyx_L1_error)
    __pyx_v_value = __pyx_t_6;

    /* "cytimes/pddt.py":1293
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)
 *             value: cython.double = float(ts)
 *             try:             # <<<<<<<<<<<<<<
 *                 dt: datetime.datetime = utils.dt_fr_ts(value, tz, None)
 *             except Exception as err:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      /*try:*/ {

        /* "cytimes/pddt.py":1294
 *             value: cython.double = float(ts)
 *             try:
 *                 dt: datetime.datetime = utils.dt_fr_ts(value, tz, None)             # <<<<<<<<<<<<<<
 *             except Exception as err:
 *                 errors.raise_argument_error(
*/
        __pyx_t_10.__pyx_n = 2;
        __pyx_t_10.tzinfo = __pyx_v_tz;
        __pyx_t_10.dtclass = Py_None;
        __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_ts(__pyx_v_value, &__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1294, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_1);
        __pyx_t_1 = 0;

        /* "cytimes/pddt.py":1293
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)
 *             value: cython.double = float(ts)
 *             try:             # <<<<<<<<<<<<<<
 *                 dt: datetime.datetime = utils.dt_fr_ts(value, tz, None)
 *             except Exception as err:
*/
      }
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L12_try_end;
      __pyx_L7_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "cytimes/pddt.py":1295
 *             try:
 *                 dt: datetime.datetime = utils.dt_fr_ts(value, tz, None)
 *             except Exception as err:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
      __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_11) {
        __Pyx_AddTraceback("cytimes.pddt.Pddt.fromtimestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_12, &__pyx_t_13) < 0) __PYX_ERR(0, 1295, __pyx_L9_except_error)
        __Pyx_XGOTREF(__pyx_t_1);
        __Pyx_XGOTREF(__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_13);
        __Pyx_INCREF(__pyx_t_12);
        __pyx_v_err = __pyx_t_12;
        /*try:*/ {

          /* "cytimes/pddt.py":1299
 *                     cls,
 *                     "fromtimestamp(ts)",
 *                     "Cannot convert timestamp '%s' to datetime." % value,             # <<<<<<<<<<<<<<
 *                     err,
 *                 )
*/
          __pyx_t_14 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1299, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_15 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_convert_timestamp_s_to_da, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1299, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

          /* "cytimes/pddt.py":1296
 *                 dt: datetime.datetime = utils.dt_fr_ts(value, tz, None)
 *             except Exception as err:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     cls,
 *                     "fromtimestamp(ts)",
*/
          __pyx_t_4.__pyx_n = 4;
          __pyx_t_4.cls = __pyx_v_cls;
          __pyx_t_4.input_msg = __pyx_mstate_global->__pyx_kp_u_fromtimestamp_ts;
          __pyx_t_4.error_msg = ((PyObject*)__pyx_t_15);
          __pyx_t_4.tb_exc = __pyx_v_err;
          __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1296, __pyx_L18_error)
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

          /* "cytimes/pddt.py":1302
 *                     err,
 *                 )
 *                 return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *             us: cython.longlong = utils.dt_to_us(dt, False)
 *             # . new instance
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          goto __pyx_L17_return;
        }

        /* "cytimes/pddt.py":1295
 *             try:
 *                 dt: datetime.datetime = utils.dt_fr_ts(value, tz, None)
 *             except Exception as err:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
        /*finally:*/ {
          __pyx_L18_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
            if ( unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_18);
            __Pyx_XGOTREF(__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_23);
            __pyx_t_11 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            }
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
            __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
            __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17;
            goto __pyx_L9_except_error;
          }
          __pyx_L17_return: {
            __pyx_t_23 = __pyx_r;
            __pyx_r = 0;
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            __pyx_r = __pyx_t_23;
            __pyx_t_23 = 0;
            goto __pyx_L10_except_return;
          }
        }
      }
      goto __pyx_L9_except_error;

      /* "cytimes/pddt.py":1293
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)
 *             value: cython.double = float(ts)
 *             try:             # <<<<<<<<<<<<<<
 *                 dt: datetime.datetime = utils.dt_fr_ts(value, tz, None)
 *             except Exception as err:
*/
      __pyx_L9_except_error:;
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      goto __pyx_L1_error;
      __pyx_L10_except_return:;
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      goto __pyx_L0;
      __pyx_L12_try_end:;
    }

    /* "cytimes/pddt.py":1303
 *                 )
 *                 return  # unreachable: suppress compiler warning
 *             us: cython.longlong = utils.dt_to_us(dt, False)             # <<<<<<<<<<<<<<
 *             # . new instance
 *             arr: np.ndarray = utils.dt64arr_fr_int64(us, size_i, "us")
*/
    __pyx_t_25.__pyx_n = 1;
    __pyx_t_25.utc = 0;
    __pyx_t_24 = __pyx_f_7cytimes_5utils_dt_to_us(__pyx_v_dt, &__pyx_t_25); if (unlikely(__pyx_t_24 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1303, __pyx_L1_error)
    __pyx_v_us = __pyx_t_24;

    /* "cytimes/pddt.py":1305
 *             us: cython.longlong = utils.dt_to_us(dt, False)
 *             # . new instance
 *             arr: np.ndarray = utils.dt64arr_fr_int64(us, size_i, "us")             # <<<<<<<<<<<<<<
 *             return cls._new(arr, tz=tz, as_unit=as_unit, name=name)
 * 
*/
    __pyx_t_13 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_fr_int64(__pyx_v_us, __pyx_v_size_i, __pyx_mstate_global->__pyx_n_u_us)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_13);
    __pyx_t_13 = 0;

    /* "cytimes/pddt.py":1306
 *             # . new instance
 *             arr: np.ndarray = utils.dt64arr_fr_int64(us, size_i, "us")
 *             return cls._new(arr, tz=tz, as_unit=as_unit, name=name)             # <<<<<<<<<<<<<<
 * 
 *         # list / tuple
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_12 = __pyx_v_cls;
    __Pyx_INCREF(__pyx_t_12);
    __pyx_t_26 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_12, ((PyObject *)__pyx_v_arr)};
      __pyx_t_1 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1306, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_1, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1306, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_1, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1306, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_1, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 1306, __pyx_L1_error)
      __pyx_t_13 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_26, (2-__pyx_t_26) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_1);
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1306, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
    }
    __pyx_r = __pyx_t_13;
    __pyx_t_13 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":1284
 * 
 *         # Integer / Float
 *         if isinstance(ts, (int, float)):             # <<<<<<<<<<<<<<
 *             if size is None:
 *                 errors.raise_argument_error(
*/
  }

  /* "cytimes/pddt.py":1309
 * 
 *         # list / tuple
 *         if isinstance(ts, (list, tuple)):             # <<<<<<<<<<<<<<
 *             # . construct ndarray[int64] - unit: us
 *             size_i: cython.Py_ssize_t = len(ts)
*/
  __pyx_t_3 = PyList_Check(__pyx_v_ts); 
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L25_bool_binop_done;
  }
  __pyx_t_3 = PyTuple_Check(__pyx_v_ts); 
  __pyx_t_2 = __pyx_t_3;
  __pyx_L25_bool_binop_done:;
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":1311
 *         if isinstance(ts, (list, tuple)):
 *             # . construct ndarray[int64] - unit: us
 *             size_i: cython.Py_ssize_t = len(ts)             # <<<<<<<<<<<<<<
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
*/
    __pyx_t_5 = PyObject_Length(__pyx_v_ts); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1311, __pyx_L1_error)
    __pyx_v_size_i = __pyx_t_5;

    /* "cytimes/pddt.py":1312
 *             # . construct ndarray[int64] - unit: us
 *             size_i: cython.Py_ssize_t = len(ts)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)             # <<<<<<<<<<<<<<
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
*/
    __pyx_t_27[0] = __pyx_v_size_i;
    __pyx_t_13 = PyArray_EMPTY(1, __pyx_t_27, NPY_INT64, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1312, __pyx_L1_error)
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_13);
    __pyx_t_13 = 0;

    /* "cytimes/pddt.py":1313
 *             size_i: cython.Py_ssize_t = len(ts)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))             # <<<<<<<<<<<<<<
 *             i: cython.Py_ssize_t = 0
 *             for o in ts:
*/
    __pyx_v_arr_p = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

    /* "cytimes/pddt.py":1314
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0             # <<<<<<<<<<<<<<
 *             for o in ts:
 *                 try:
*/
    __pyx_v_i = 0;

    /* "cytimes/pddt.py":1315
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
 *             for o in ts:             # <<<<<<<<<<<<<<
 *                 try:
 *                     value: cython.double = float(o)
*/
    if (likely(PyList_CheckExact(__pyx_v_ts)) || PyTuple_CheckExact(__pyx_v_ts)) {
      __pyx_t_13 = __pyx_v_ts; __Pyx_INCREF(__pyx_t_13);
      __pyx_t_5 = 0;
      __pyx_t_28 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_v_ts); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1315, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_28 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_13); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1315, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_28)) {
        if (likely(PyList_CheckExact(__pyx_t_13))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1315, __pyx_L1_error)
            #endif
            if (__pyx_t_5 >= __pyx_temp) break;
          }
          __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_13, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_5;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_13);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1315, __pyx_L1_error)
            #endif
            if (__pyx_t_5 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_5));
          #else
          __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_5);
          #endif
          ++__pyx_t_5;
        }
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1315, __pyx_L1_error)
      } else {
        __pyx_t_1 = __pyx_t_28(__pyx_t_13);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1315, __pyx_L1_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_o, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "cytimes/pddt.py":1316
 *             i: cython.Py_ssize_t = 0
 *             for o in ts:
 *                 try:             # <<<<<<<<<<<<<<
 *                     value: cython.double = float(o)
 *                 except Exception as err:
*/
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_7);
        /*try:*/ {

          /* "cytimes/pddt.py":1317
 *             for o in ts:
 *                 try:
 *                     value: cython.double = float(o)             # <<<<<<<<<<<<<<
 *                 except Exception as err:
 *                     errors.raise_argument_error(
*/
          __pyx_t_6 = __Pyx_PyObject_AsDouble(__pyx_v_o); if (unlikely(__PYX_CHECK_FLOAT_EXCEPTION(__pyx_t_6, ((double)((double)-1))) && PyErr_Occurred())) __PYX_ERR(0, 1317, __pyx_L29_error)
          __pyx_v_value = __pyx_t_6;

          /* "cytimes/pddt.py":1316
 *             i: cython.Py_ssize_t = 0
 *             for o in ts:
 *                 try:             # <<<<<<<<<<<<<<
 *                     value: cython.double = float(o)
 *                 except Exception as err:
*/
        }
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L36_try_end;
        __pyx_L29_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;

        /* "cytimes/pddt.py":1318
 *                 try:
 *                     value: cython.double = float(o)
 *                 except Exception as err:             # <<<<<<<<<<<<<<
 *                     errors.raise_argument_error(
 *                         cls,
*/
        __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
        if (__pyx_t_16) {
          __Pyx_AddTraceback("cytimes.pddt.Pddt.fromtimestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_12, &__pyx_t_15) < 0) __PYX_ERR(0, 1318, __pyx_L31_except_error)
          __Pyx_XGOTREF(__pyx_t_1);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_INCREF(__pyx_t_12);
          __pyx_v_err = __pyx_t_12;
          /*try:*/ {

            /* "cytimes/pddt.py":1323
 *                         "fromtimestamp(ts)",
 *                         "Expects float or integer element from %s, got '%s' %s."
 *                         % (type(ts).__name__, o, type(o)),             # <<<<<<<<<<<<<<
 *                         err,
 *                     )
*/
            __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_ts)), __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1323, __pyx_L42_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_29 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_14), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1323, __pyx_L42_error)
            __Pyx_GOTREF(__pyx_t_29);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_o), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1323, __pyx_L42_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_30 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_o))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1323, __pyx_L42_error)
            __Pyx_GOTREF(__pyx_t_30);
            __pyx_t_31[0] = __pyx_mstate_global->__pyx_kp_u_Expects_float_or_integer_element;
            __pyx_t_31[1] = __pyx_t_29;
            __pyx_t_31[2] = __pyx_mstate_global->__pyx_kp_u_got;
            __pyx_t_31[3] = __pyx_t_14;
            __pyx_t_31[4] = __pyx_mstate_global->__pyx_kp_u__9;
            __pyx_t_31[5] = __pyx_t_30;
            __pyx_t_31[6] = __pyx_mstate_global->__pyx_kp_u__2;

            /* "cytimes/pddt.py":1322
 *                         cls,
 *                         "fromtimestamp(ts)",
 *                         "Expects float or integer element from %s, got '%s' %s."             # <<<<<<<<<<<<<<
 *                         % (type(ts).__name__, o, type(o)),
 *                         err,
*/
            __pyx_t_32 = __Pyx_PyUnicode_Join(__pyx_t_31, 7, 38 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_29) + 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_30) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_29) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_30));
            if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 1322, __pyx_L42_error)
            __Pyx_GOTREF(__pyx_t_32);
            __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;

            /* "cytimes/pddt.py":1319
 *                     value: cython.double = float(o)
 *                 except Exception as err:
 *                     errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                         cls,
 *                         "fromtimestamp(ts)",
*/
            __pyx_t_4.__pyx_n = 4;
            __pyx_t_4.cls = __pyx_v_cls;
            __pyx_t_4.input_msg = __pyx_mstate_global->__pyx_kp_u_fromtimestamp_ts;
            __pyx_t_4.error_msg = ((PyObject*)__pyx_t_32);
            __pyx_t_4.tb_exc = __pyx_v_err;
            __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1319, __pyx_L42_error)
            __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;

            /* "cytimes/pddt.py":1326
 *                         err,
 *                     )
 *                     return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *                 try:
 *                     dt: datetime.datetime = utils.dt_fr_ts(value, tz, None)
*/
            __Pyx_XDECREF(__pyx_r);
            __pyx_r = Py_None; __Pyx_INCREF(Py_None);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            goto __pyx_L41_return;
          }

          /* "cytimes/pddt.py":1318
 *                 try:
 *                     value: cython.double = float(o)
 *                 except Exception as err:             # <<<<<<<<<<<<<<
 *                     errors.raise_argument_error(
 *                         cls,
*/
          /*finally:*/ {
            __pyx_L42_error:;
            /*exception exit:*/{
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
              __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
              __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0;
              __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0;
              __Pyx_XDECREF(__pyx_t_32); __pyx_t_32 = 0;
               __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18);
              if ( unlikely(__Pyx_GetException(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21);
              __Pyx_XGOTREF(__pyx_t_23);
              __Pyx_XGOTREF(__pyx_t_22);
              __Pyx_XGOTREF(__pyx_t_21);
              __Pyx_XGOTREF(__pyx_t_20);
              __Pyx_XGOTREF(__pyx_t_19);
              __Pyx_XGOTREF(__pyx_t_18);
              __pyx_t_16 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_33 = __pyx_filename;
              {
                __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
              }
              __Pyx_XGIVEREF(__pyx_t_20);
              __Pyx_XGIVEREF(__pyx_t_19);
              __Pyx_XGIVEREF(__pyx_t_18);
              __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_19, __pyx_t_18);
              __Pyx_XGIVEREF(__pyx_t_23);
              __Pyx_XGIVEREF(__pyx_t_22);
              __Pyx_XGIVEREF(__pyx_t_21);
              __Pyx_ErrRestore(__pyx_t_23, __pyx_t_22, __pyx_t_21);
              __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
              __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_33;
              goto __pyx_L31_except_error;
            }
            __pyx_L41_return: {
              __pyx_t_18 = __pyx_r;
              __pyx_r = 0;
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
              __pyx_r = __pyx_t_18;
              __pyx_t_18 = 0;
              goto __pyx_L32_except_return;
            }
          }
        }
        goto __pyx_L31_except_error;

        /* "cytimes/pddt.py":1316
 *             i: cython.Py_ssize_t = 0
 *             for o in ts:
 *                 try:             # <<<<<<<<<<<<<<
 *                     value: cython.double = float(o)
 *                 except Exception as err:
*/
        __pyx_L31_except_error:;
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
        goto __pyx_L1_error;
        __pyx_L32_except_return:;
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
        goto __pyx_L0;
        __pyx_L36_try_end:;
      }

      /* "cytimes/pddt.py":1327
 *                     )
 *                     return  # unreachable: suppress compiler warning
 *                 try:             # <<<<<<<<<<<<<<
 *                     dt: datetime.datetime = utils.dt_fr_ts(value, tz, None)
 *                 except Exception as err:
*/
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_9);
        /*try:*/ {

          /* "cytimes/pddt.py":1328
 *                     return  # unreachable: suppress compiler warning
 *                 try:
 *                     dt: datetime.datetime = utils.dt_fr_ts(value, tz, None)             # <<<<<<<<<<<<<<
 *                 except Exception as err:
 *                     errors.raise_argument_error(
*/
          __pyx_t_10.__pyx_n = 2;
          __pyx_t_10.tzinfo = __pyx_v_tz;
          __pyx_t_10.dtclass = Py_None;
          __pyx_t_15 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_ts(__pyx_v_value, &__pyx_t_10)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1328, __pyx_L48_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_XDECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_15));
          __pyx_t_15 = 0;

          /* "cytimes/pddt.py":1327
 *                     )
 *                     return  # unreachable: suppress compiler warning
 *                 try:             # <<<<<<<<<<<<<<
 *                     dt: datetime.datetime = utils.dt_fr_ts(value, tz, None)
 *                 except Exception as err:
*/
        }
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L55_try_end;
        __pyx_L48_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0;
        __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0;
        __Pyx_XDECREF(__pyx_t_32); __pyx_t_32 = 0;

        /* "cytimes/pddt.py":1329
 *                 try:
 *                     dt: datetime.datetime = utils.dt_fr_ts(value, tz, None)
 *                 except Exception as err:             # <<<<<<<<<<<<<<
 *                     errors.raise_argument_error(
 *                         cls,
*/
        __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
        if (__pyx_t_11) {
          __Pyx_AddTraceback("cytimes.pddt.Pddt.fromtimestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_15, &__pyx_t_12, &__pyx_t_1) < 0) __PYX_ERR(0, 1329, __pyx_L50_except_error)
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_12);
          __pyx_v_err = __pyx_t_12;
          /*try:*/ {

            /* "cytimes/pddt.py":1334
 *                         "fromtimestamp(ts)",
 *                         "Cannot convert %s element '%s' to datetime."
 *                         % (type(ts).__name__, value),             # <<<<<<<<<<<<<<
 *                         err,
 *                     )
*/
            __pyx_t_32 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_ts)), __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 1334, __pyx_L61_error)
            __Pyx_GOTREF(__pyx_t_32);
            __pyx_t_30 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_32), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1334, __pyx_L61_error)
            __Pyx_GOTREF(__pyx_t_30);
            __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
            __pyx_t_32 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 1334, __pyx_L61_error)
            __Pyx_GOTREF(__pyx_t_32);
            __pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_32), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1334, __pyx_L61_error)
            __Pyx_GOTREF(__pyx_t_14);
            __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
            __pyx_t_34[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_convert_2;
            __pyx_t_34[1] = __pyx_t_30;
            __pyx_t_34[2] = __pyx_mstate_global->__pyx_kp_u_element;
            __pyx_t_34[3] = __pyx_t_14;
            __pyx_t_34[4] = __pyx_mstate_global->__pyx_kp_u_to_datetime;

            /* "cytimes/pddt.py":1333
 *                         cls,
 *                         "fromtimestamp(ts)",
 *                         "Cannot convert %s element '%s' to datetime."             # <<<<<<<<<<<<<<
 *                         % (type(ts).__name__, value),
 *                         err,
*/
            __pyx_t_32 = __Pyx_PyUnicode_Join(__pyx_t_34, 5, 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_30) + 10 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 14, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_30) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14));
            if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 1333, __pyx_L61_error)
            __Pyx_GOTREF(__pyx_t_32);
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

            /* "cytimes/pddt.py":1330
 *                     dt: datetime.datetime = utils.dt_fr_ts(value, tz, None)
 *                 except Exception as err:
 *                     errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                         cls,
 *                         "fromtimestamp(ts)",
*/
            __pyx_t_4.__pyx_n = 4;
            __pyx_t_4.cls = __pyx_v_cls;
            __pyx_t_4.input_msg = __pyx_mstate_global->__pyx_kp_u_fromtimestamp_ts;
            __pyx_t_4.error_msg = ((PyObject*)__pyx_t_32);
            __pyx_t_4.tb_exc = __pyx_v_err;
            __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1330, __pyx_L61_error)
            __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;

            /* "cytimes/pddt.py":1337
 *                         err,
 *                     )
 *                     return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *                 arr_p[i] = utils.dt_to_us(dt, False)
 *                 i += 1
*/
            __Pyx_XDECREF(__pyx_r);
            __pyx_r = Py_None; __Pyx_INCREF(Py_None);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            goto __pyx_L60_return;
          }

          /* "cytimes/pddt.py":1329
 *                 try:
 *                     dt: datetime.datetime = utils.dt_fr_ts(value, tz, None)
 *                 except Exception as err:             # <<<<<<<<<<<<<<
 *                     errors.raise_argument_error(
 *                         cls,
*/
          /*finally:*/ {
            __pyx_L61_error:;
            /*exception exit:*/{
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
              __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
              __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0;
              __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0;
              __Pyx_XDECREF(__pyx_t_32); __pyx_t_32 = 0;
               __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
              if ( unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
              __Pyx_XGOTREF(__pyx_t_18);
              __Pyx_XGOTREF(__pyx_t_19);
              __Pyx_XGOTREF(__pyx_t_20);
              __Pyx_XGOTREF(__pyx_t_21);
              __Pyx_XGOTREF(__pyx_t_22);
              __Pyx_XGOTREF(__pyx_t_23);
              __pyx_t_11 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_35 = __pyx_filename;
              {
                __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
              }
              __Pyx_XGIVEREF(__pyx_t_21);
              __Pyx_XGIVEREF(__pyx_t_22);
              __Pyx_XGIVEREF(__pyx_t_23);
              __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
              __Pyx_XGIVEREF(__pyx_t_18);
              __Pyx_XGIVEREF(__pyx_t_19);
              __Pyx_XGIVEREF(__pyx_t_20);
              __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
              __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
              __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_35;
              goto __pyx_L50_except_error;
            }
            __pyx_L60_return: {
              __pyx_t_23 = __pyx_r;
              __pyx_r = 0;
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
              __pyx_r = __pyx_t_23;
              __pyx_t_23 = 0;
              goto __pyx_L51_except_return;
            }
          }
        }
        goto __pyx_L50_except_error;

        /* "cytimes/pddt.py":1327
 *                     )
 *                     return  # unreachable: suppress compiler warning
 *                 try:             # <<<<<<<<<<<<<<
 *                     dt: datetime.datetime = utils.dt_fr_ts(value, tz, None)
 *                 except Exception as err:
*/
        __pyx_L50_except_error:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        goto __pyx_L1_error;
        __pyx_L51_except_return:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        goto __pyx_L0;
        __pyx_L55_try_end:;
      }

      /* "cytimes/pddt.py":1338
 *                     )
 *                     return  # unreachable: suppress compiler warning
 *                 arr_p[i] = utils.dt_to_us(dt, False)             # <<<<<<<<<<<<<<
 *                 i += 1
 *             # . new instance
*/
      __pyx_t_25.__pyx_n = 1;
      __pyx_t_25.utc = 0;
      __pyx_t_24 = __pyx_f_7cytimes_5utils_dt_to_us(__pyx_v_dt, &__pyx_t_25); if (unlikely(__pyx_t_24 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1338, __pyx_L1_error)
      (__pyx_v_arr_p[__pyx_v_i]) = __pyx_t_24;

      /* "cytimes/pddt.py":1339
 *                     return  # unreachable: suppress compiler warning
 *                 arr_p[i] = utils.dt_to_us(dt, False)
 *                 i += 1             # <<<<<<<<<<<<<<
 *             # . new instance
 *             return cls._new(
*/
      __pyx_v_i = (__pyx_v_i + 1);

      /* "cytimes/pddt.py":1315
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
 *             for o in ts:             # <<<<<<<<<<<<<<
 *                 try:
 *                     value: cython.double = float(o)
*/
    }
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "cytimes/pddt.py":1341
 *                 i += 1
 *             # . new instance
 *             return cls._new(             # <<<<<<<<<<<<<<
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name
 *             )
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __pyx_v_cls;
    __Pyx_INCREF(__pyx_t_1);

    /* "cytimes/pddt.py":1342
 *             # . new instance
 *             return cls._new(
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name             # <<<<<<<<<<<<<<
 *             )
 * 
*/
    __pyx_t_15 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_15);
    __pyx_t_26 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
      __pyx_t_12 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_26, (2-__pyx_t_26) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1342, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
    }
    __pyx_t_26 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_1, __pyx_t_12};
      __pyx_t_15 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1341, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_15, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1341, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_15, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1341, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_15, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 1341, __pyx_L1_error)
      __pyx_t_13 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_26, (2-__pyx_t_26) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_15);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1341, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
    }
    __pyx_r = __pyx_t_13;
    __pyx_t_13 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":1309
 * 
 *         # list / tuple
 *         if isinstance(ts, (list, tuple)):             # <<<<<<<<<<<<<<
 *             # . construct ndarray[int64] - unit: us
 *             size_i: cython.Py_ssize_t = len(ts)
*/
  }

  /* "cytimes/pddt.py":1346
 * 
 *         # pd.Index (DatetimeIndex) / pd.Series
 *         if isinstance(ts, (pd.Index, pd.Series)):             # <<<<<<<<<<<<<<
 *             ts = ts.values
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_Series); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_3 = PyObject_IsInstance(__pyx_v_ts, __pyx_t_15); 
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L69_bool_binop_done;
  }
  __pyx_t_3 = PyObject_IsInstance(__pyx_v_ts, __pyx_t_12); 
  __pyx_t_2 = __pyx_t_3;
  __pyx_L69_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":1347
 *         # pd.Index (DatetimeIndex) / pd.Series
 *         if isinstance(ts, (pd.Index, pd.Series)):
 *             ts = ts.values             # <<<<<<<<<<<<<<
 * 
 *         # numpy.ndarray
*/
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1347, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF_SET(__pyx_v_ts, __pyx_t_15);
    __pyx_t_15 = 0;

    /* "cytimes/pddt.py":1346
 * 
 *         # pd.Index (DatetimeIndex) / pd.Series
 *         if isinstance(ts, (pd.Index, pd.Series)):             # <<<<<<<<<<<<<<
 *             ts = ts.values
 * 
*/
  }

  /* "cytimes/pddt.py":1350
 * 
 *         # numpy.ndarray
 *         if isinstance(ts, np.ndarray):             # <<<<<<<<<<<<<<
 *             # . validate 1-D array
 *             arr: np.ndarray = ts
*/
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ts, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray); 
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":1352
 *         if isinstance(ts, np.ndarray):
 *             # . validate 1-D array
 *             arr: np.ndarray = ts             # <<<<<<<<<<<<<<
 *             if arr.ndim != 1:
 *                 errors.raise_argument_error(
*/
    __pyx_t_15 = __pyx_v_ts;
    __Pyx_INCREF(__pyx_t_15);
    if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1352, __pyx_L1_error)
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_15);
    __pyx_t_15 = 0;

    /* "cytimes/pddt.py":1353
 *             # . validate 1-D array
 *             arr: np.ndarray = ts
 *             if arr.ndim != 1:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    __pyx_t_2 = (__pyx_f_5numpy_7ndarray_4ndim_ndim(__pyx_v_arr) != 1);
    if (__pyx_t_2) {

      /* "cytimes/pddt.py":1357
 *                     cls,
 *                     "fromtimestamp(ts)",
 *                     "Expects a 1-dimensional array, got %d-dim." % arr.ndim,             # <<<<<<<<<<<<<<
 *                 )
 *             # . convert to ndarray[int64] - unit: us
*/
      __pyx_t_15 = __Pyx_PyLong_From_int(__pyx_f_5numpy_7ndarray_4ndim_ndim(__pyx_v_arr)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1357, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_12 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Expects_a_1_dimensional_array_go, __pyx_t_15); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1357, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

      /* "cytimes/pddt.py":1354
 *             arr: np.ndarray = ts
 *             if arr.ndim != 1:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     cls,
 *                     "fromtimestamp(ts)",
*/
      __pyx_t_4.__pyx_n = 3;
      __pyx_t_4.cls = __pyx_v_cls;
      __pyx_t_4.input_msg = __pyx_mstate_global->__pyx_kp_u_fromtimestamp_ts;
      __pyx_t_4.error_msg = ((PyObject*)__pyx_t_12);
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1354, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

      /* "cytimes/pddt.py":1353
 *             # . validate 1-D array
 *             arr: np.ndarray = ts
 *             if arr.ndim != 1:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    }

    /* "cytimes/pddt.py":1361
 *             # . convert to ndarray[int64] - unit: us
 *             if (
 *                 utils.is_arr_float(arr)             # <<<<<<<<<<<<<<
 *                 or utils.is_arr_int(arr)
 *                 or utils.is_arr_uint(arr)
*/
    __pyx_t_3 = __pyx_f_7cytimes_5utils_is_arr_float(__pyx_v_arr); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1361, __pyx_L1_error)
    if (!__pyx_t_3) {
    } else {
      __pyx_t_2 = __pyx_t_3;
      goto __pyx_L74_bool_binop_done;
    }

    /* "cytimes/pddt.py":1362
 *             if (
 *                 utils.is_arr_float(arr)
 *                 or utils.is_arr_int(arr)             # <<<<<<<<<<<<<<
 *                 or utils.is_arr_uint(arr)
 *             ):
*/
    __pyx_t_3 = __pyx_f_7cytimes_5utils_is_arr_int(__pyx_v_arr); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1362, __pyx_L1_error)
    if (!__pyx_t_3) {
    } else {
      __pyx_t_2 = __pyx_t_3;
      goto __pyx_L74_bool_binop_done;
    }

    /* "cytimes/pddt.py":1363
 *                 utils.is_arr_float(arr)
 *                 or utils.is_arr_int(arr)
 *                 or utils.is_arr_uint(arr)             # <<<<<<<<<<<<<<
 *             ):
 *                 arrf: np.ndarray = utils.arr_assure_float64(arr, False)
*/
    __pyx_t_3 = __pyx_f_7cytimes_5utils_is_arr_uint(__pyx_v_arr); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1363, __pyx_L1_error)
    __pyx_t_2 = __pyx_t_3;
    __pyx_L74_bool_binop_done:;

    /* "cytimes/pddt.py":1360
 *                 )
 *             # . convert to ndarray[int64] - unit: us
 *             if (             # <<<<<<<<<<<<<<
 *                 utils.is_arr_float(arr)
 *                 or utils.is_arr_int(arr)
*/
    if (__pyx_t_2) {

      /* "cytimes/pddt.py":1365
 *                 or utils.is_arr_uint(arr)
 *             ):
 *                 arrf: np.ndarray = utils.arr_assure_float64(arr, False)             # <<<<<<<<<<<<<<
 *                 arrf_p = cython.cast(
 *                     cython.pointer(np.npy_float64), np.PyArray_DATA(arrf)
*/
      __pyx_t_36.__pyx_n = 1;
      __pyx_t_36.copy = 0;
      __pyx_t_12 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_float64(__pyx_v_arr, &__pyx_t_36)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1365, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_v_arrf = ((PyArrayObject *)__pyx_t_12);
      __pyx_t_12 = 0;

      /* "cytimes/pddt.py":1366
 *             ):
 *                 arrf: np.ndarray = utils.arr_assure_float64(arr, False)
 *                 arrf_p = cython.cast(             # <<<<<<<<<<<<<<
 *                     cython.pointer(np.npy_float64), np.PyArray_DATA(arrf)
 *                 )
*/
      __pyx_v_arrf_p = ((npy_float64 *)PyArray_DATA(__pyx_v_arrf));

      /* "cytimes/pddt.py":1369
 *                     cython.pointer(np.npy_float64), np.PyArray_DATA(arrf)
 *                 )
 *                 size_i: cython.Py_ssize_t = arrf.shape[0]             # <<<<<<<<<<<<<<
 *                 arr = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *                 arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
*/
      __pyx_v_size_i = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arrf)[0]);

      /* "cytimes/pddt.py":1370
 *                 )
 *                 size_i: cython.Py_ssize_t = arrf.shape[0]
 *                 arr = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)             # <<<<<<<<<<<<<<
 *                 arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *                 i: cython.Py_ssize_t
*/
      __pyx_t_37[0] = __pyx_v_size_i;
      __pyx_t_12 = PyArray_EMPTY(1, __pyx_t_37, NPY_INT64, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1370, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1370, __pyx_L1_error)
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_12));
      __pyx_t_12 = 0;

      /* "cytimes/pddt.py":1371
 *                 size_i: cython.Py_ssize_t = arrf.shape[0]
 *                 arr = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *                 arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))             # <<<<<<<<<<<<<<
 *                 i: cython.Py_ssize_t
 *                 for i in range(size_i):
*/
      __pyx_v_arr_p = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

      /* "cytimes/pddt.py":1373
 *                 arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *                 i: cython.Py_ssize_t
 *                 for i in range(size_i):             # <<<<<<<<<<<<<<
 *                     try:
 *                         dt = utils.dt_fr_ts(arrf_p[i], tz, None)
*/
      __pyx_t_5 = __pyx_v_size_i;
      __pyx_t_38 = __pyx_t_5;
      for (__pyx_t_39 = 0; __pyx_t_39 < __pyx_t_38; __pyx_t_39+=1) {
        __pyx_v_i = __pyx_t_39;

        /* "cytimes/pddt.py":1374
 *                 i: cython.Py_ssize_t
 *                 for i in range(size_i):
 *                     try:             # <<<<<<<<<<<<<<
 *                         dt = utils.dt_fr_ts(arrf_p[i], tz, None)
 *                     except Exception as err:
*/
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
          __Pyx_XGOTREF(__pyx_t_9);
          __Pyx_XGOTREF(__pyx_t_8);
          __Pyx_XGOTREF(__pyx_t_7);
          /*try:*/ {

            /* "cytimes/pddt.py":1375
 *                 for i in range(size_i):
 *                     try:
 *                         dt = utils.dt_fr_ts(arrf_p[i], tz, None)             # <<<<<<<<<<<<<<
 *                     except Exception as err:
 *                         errors.raise_argument_error(
*/
            __pyx_t_10.__pyx_n = 2;
            __pyx_t_10.tzinfo = __pyx_v_tz;
            __pyx_t_10.dtclass = Py_None;
            __pyx_t_12 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_ts((__pyx_v_arrf_p[__pyx_v_i]), &__pyx_t_10)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1375, __pyx_L79_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_XDECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_12));
            __pyx_t_12 = 0;

            /* "cytimes/pddt.py":1374
 *                 i: cython.Py_ssize_t
 *                 for i in range(size_i):
 *                     try:             # <<<<<<<<<<<<<<
 *                         dt = utils.dt_fr_ts(arrf_p[i], tz, None)
 *                     except Exception as err:
*/
          }
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          goto __pyx_L86_try_end;
          __pyx_L79_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 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;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0;
          __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0;
          __Pyx_XDECREF(__pyx_t_32); __pyx_t_32 = 0;

          /* "cytimes/pddt.py":1376
 *                     try:
 *                         dt = utils.dt_fr_ts(arrf_p[i], tz, None)
 *                     except Exception as err:             # <<<<<<<<<<<<<<
 *                         errors.raise_argument_error(
 *                             cls,
*/
          __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
          if (__pyx_t_16) {
            __Pyx_AddTraceback("cytimes.pddt.Pddt.fromtimestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_15, &__pyx_t_13) < 0) __PYX_ERR(0, 1376, __pyx_L81_except_error)
            __Pyx_XGOTREF(__pyx_t_12);
            __Pyx_XGOTREF(__pyx_t_15);
            __Pyx_XGOTREF(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_15);
            __pyx_v_err = __pyx_t_15;
            /*try:*/ {

              /* "cytimes/pddt.py":1381
 *                             "fromtimestamp(ts)",
 *                             "Cannot convert array element '%s' to datetime."
 *                             % arrf_p[i],             # <<<<<<<<<<<<<<
 *                             err,
 *                         )
*/
              __pyx_t_1 = PyFloat_FromDouble((__pyx_v_arrf_p[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1381, __pyx_L92_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_32 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_convert_array_element_s_t, __pyx_t_1); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 1381, __pyx_L92_error)
              __Pyx_GOTREF(__pyx_t_32);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

              /* "cytimes/pddt.py":1377
 *                         dt = utils.dt_fr_ts(arrf_p[i], tz, None)
 *                     except Exception as err:
 *                         errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                             cls,
 *                             "fromtimestamp(ts)",
*/
              __pyx_t_4.__pyx_n = 4;
              __pyx_t_4.cls = __pyx_v_cls;
              __pyx_t_4.input_msg = __pyx_mstate_global->__pyx_kp_u_fromtimestamp_ts;
              __pyx_t_4.error_msg = ((PyObject*)__pyx_t_32);
              __pyx_t_4.tb_exc = __pyx_v_err;
              __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1377, __pyx_L92_error)
              __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;

              /* "cytimes/pddt.py":1384
 *                             err,
 *                         )
 *                         return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *                     arr_p[i] = utils.dt_to_us(dt, False)
 *             elif utils.is_dt64arr(arr):
*/
              __Pyx_XDECREF(__pyx_r);
              __pyx_r = Py_None; __Pyx_INCREF(Py_None);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
              goto __pyx_L91_return;
            }

            /* "cytimes/pddt.py":1376
 *                     try:
 *                         dt = utils.dt_fr_ts(arrf_p[i], tz, None)
 *                     except Exception as err:             # <<<<<<<<<<<<<<
 *                         errors.raise_argument_error(
 *                             cls,
*/
            /*finally:*/ {
              __pyx_L92_error:;
              /*exception exit:*/{
                __Pyx_PyThreadState_declare
                __Pyx_PyThreadState_assign
                __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
                __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0;
                __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0;
                __Pyx_XDECREF(__pyx_t_32); __pyx_t_32 = 0;
                 __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18);
                if ( unlikely(__Pyx_GetException(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21);
                __Pyx_XGOTREF(__pyx_t_23);
                __Pyx_XGOTREF(__pyx_t_22);
                __Pyx_XGOTREF(__pyx_t_21);
                __Pyx_XGOTREF(__pyx_t_20);
                __Pyx_XGOTREF(__pyx_t_19);
                __Pyx_XGOTREF(__pyx_t_18);
                __pyx_t_16 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_40 = __pyx_filename;
                {
                  __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
                }
                __Pyx_XGIVEREF(__pyx_t_20);
                __Pyx_XGIVEREF(__pyx_t_19);
                __Pyx_XGIVEREF(__pyx_t_18);
                __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_19, __pyx_t_18);
                __Pyx_XGIVEREF(__pyx_t_23);
                __Pyx_XGIVEREF(__pyx_t_22);
                __Pyx_XGIVEREF(__pyx_t_21);
                __Pyx_ErrRestore(__pyx_t_23, __pyx_t_22, __pyx_t_21);
                __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
                __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_40;
                goto __pyx_L81_except_error;
              }
              __pyx_L91_return: {
                __pyx_t_18 = __pyx_r;
                __pyx_r = 0;
                __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
                __pyx_r = __pyx_t_18;
                __pyx_t_18 = 0;
                goto __pyx_L82_except_return;
              }
            }
          }
          goto __pyx_L81_except_error;

          /* "cytimes/pddt.py":1374
 *                 i: cython.Py_ssize_t
 *                 for i in range(size_i):
 *                     try:             # <<<<<<<<<<<<<<
 *                         dt = utils.dt_fr_ts(arrf_p[i], tz, None)
 *                     except Exception as err:
*/
          __pyx_L81_except_error:;
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_7);
          __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
          goto __pyx_L1_error;
          __pyx_L82_except_return:;
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_7);
          __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
          goto __pyx_L0;
          __pyx_L86_try_end:;
        }

        /* "cytimes/pddt.py":1385
 *                         )
 *                         return  # unreachable: suppress compiler warning
 *                     arr_p[i] = utils.dt_to_us(dt, False)             # <<<<<<<<<<<<<<
 *             elif utils.is_dt64arr(arr):
 *                 arr = utils.dt64arr_as_int64_us(arr, -1, 0, True)
*/
        __pyx_t_25.__pyx_n = 1;
        __pyx_t_25.utc = 0;
        __pyx_t_24 = __pyx_f_7cytimes_5utils_dt_to_us(__pyx_v_dt, &__pyx_t_25); if (unlikely(__pyx_t_24 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1385, __pyx_L1_error)
        (__pyx_v_arr_p[__pyx_v_i]) = __pyx_t_24;
      }

      /* "cytimes/pddt.py":1360
 *                 )
 *             # . convert to ndarray[int64] - unit: us
 *             if (             # <<<<<<<<<<<<<<
 *                 utils.is_arr_float(arr)
 *                 or utils.is_arr_int(arr)
*/
      goto __pyx_L73;
    }

    /* "cytimes/pddt.py":1386
 *                         return  # unreachable: suppress compiler warning
 *                     arr_p[i] = utils.dt_to_us(dt, False)
 *             elif utils.is_dt64arr(arr):             # <<<<<<<<<<<<<<
 *                 arr = utils.dt64arr_as_int64_us(arr, -1, 0, True)
 *             else:
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_is_dt64arr(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1386, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "cytimes/pddt.py":1387
 *                     arr_p[i] = utils.dt_to_us(dt, False)
 *             elif utils.is_dt64arr(arr):
 *                 arr = utils.dt64arr_as_int64_us(arr, -1, 0, True)             # <<<<<<<<<<<<<<
 *             else:
 *                 errors.raise_argument_error(
*/
      __pyx_t_41.__pyx_n = 3;
      __pyx_t_41.arr_reso = -1;
      __pyx_t_41.offset = 0;
      __pyx_t_41.copy = 1;
      __pyx_t_13 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_us(__pyx_v_arr, &__pyx_t_41)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1387, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_13));
      __pyx_t_13 = 0;

      /* "cytimes/pddt.py":1386
 *                         return  # unreachable: suppress compiler warning
 *                     arr_p[i] = utils.dt_to_us(dt, False)
 *             elif utils.is_dt64arr(arr):             # <<<<<<<<<<<<<<
 *                 arr = utils.dt64arr_as_int64_us(arr, -1, 0, True)
 *             else:
*/
      goto __pyx_L73;
    }

    /* "cytimes/pddt.py":1389
 *                 arr = utils.dt64arr_as_int64_us(arr, -1, 0, True)
 *             else:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     cls,
 *                     "fromtimestamp(ts)",
*/
    /*else*/ {

      /* "cytimes/pddt.py":1392
 *                     cls,
 *                     "fromtimestamp(ts)",
 *                     "Unsupported array dtype [%s]." % arr.dtype,             # <<<<<<<<<<<<<<
 *                 )
 *             # . new instance
*/
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1392, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_15 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Unsupported_array_dtype_s, __pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1392, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

      /* "cytimes/pddt.py":1389
 *                 arr = utils.dt64arr_as_int64_us(arr, -1, 0, True)
 *             else:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     cls,
 *                     "fromtimestamp(ts)",
*/
      __pyx_t_4.__pyx_n = 3;
      __pyx_t_4.cls = __pyx_v_cls;
      __pyx_t_4.input_msg = __pyx_mstate_global->__pyx_kp_u_fromtimestamp_ts;
      __pyx_t_4.error_msg = ((PyObject*)__pyx_t_15);
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1389, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    }
    __pyx_L73:;

    /* "cytimes/pddt.py":1395
 *                 )
 *             # . new instance
 *             return cls._new(             # <<<<<<<<<<<<<<
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name
 *             )
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_13 = __pyx_v_cls;
    __Pyx_INCREF(__pyx_t_13);

    /* "cytimes/pddt.py":1396
 *             # . new instance
 *             return cls._new(
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name             # <<<<<<<<<<<<<<
 *             )
 * 
*/
    __pyx_t_32 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_32);
    __pyx_t_26 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_32, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
      __pyx_t_12 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_26, (2-__pyx_t_26) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_32); __pyx_t_32 = 0;
      if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1396, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
    }
    __pyx_t_26 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_13, __pyx_t_12};
      __pyx_t_32 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 1395, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_32);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_32, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1395, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_32, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1395, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_32, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 1395, __pyx_L1_error)
      __pyx_t_15 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_26, (2-__pyx_t_26) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_32);
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
      if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1395, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
    }
    __pyx_r = __pyx_t_15;
    __pyx_t_15 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":1350
 * 
 *         # numpy.ndarray
 *         if isinstance(ts, np.ndarray):             # <<<<<<<<<<<<<<
 *             # . validate 1-D array
 *             arr: np.ndarray = ts
*/
  }

  /* "cytimes/pddt.py":1403
 *             cls,
 *             "fromtimestamp(ts)",
 *             "Unsupported 'ts' data type %s." % type(ts),             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_15 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Unsupported_ts_data_type_s, ((PyObject *)Py_TYPE(__pyx_v_ts))); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);

  /* "cytimes/pddt.py":1400
 * 
 *         # Unsupported type
 *         errors.raise_type_error(             # <<<<<<<<<<<<<<
 *             cls,
 *             "fromtimestamp(ts)",
*/
  __pyx_t_42.__pyx_n = 3;
  __pyx_t_42.cls = __pyx_v_cls;
  __pyx_t_42.input_msg = __pyx_mstate_global->__pyx_kp_u_fromtimestamp_ts;
  __pyx_t_42.error_msg = ((PyObject*)__pyx_t_15);
  __pyx_f_7cytimes_6errors_raise_type_error(0, &__pyx_t_42); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1400, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "cytimes/pddt.py":1240
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromtimestamp(
 *         cls,
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_29);
  __Pyx_XDECREF(__pyx_t_30);
  __Pyx_XDECREF(__pyx_t_32);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.fromtimestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XDECREF((PyObject *)__pyx_v_arrf);
  __Pyx_XDECREF(__pyx_v_ts);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":1406
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def utcfromtimestamp(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_29utcfromtimestamp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_28utcfromtimestamp, "Construct a UTC-aware index from POSIX timestamps (timezone-aware) `<'Pddt'>`.\n\n        :param ts `<'int/float/Array-like'>`: The POSIX timestamps to construct with.\n\n            - `<'int/float'>` A numeric value representing the timestamp.\n            - `<'Array-like'>` An array-like object containing elements representing the timestamps.\n\n        :param size `<'int/Any/None'>`: The target size of the index\n            (required when `ts` is a float or integer ). Defaults to `None`.\n\n            - `<'int'>` A positive integer number.\n            - `<'Any'>` Takes the `len(size)` value as the index size.\n            - `<'None'>` Ignored when `ts` is an array-like object.\n\n        :param as_unit `<'str/None'>`: Convert to specified datetime unit after construction. Defaults to `None`.\n            Supports: `'s'`, `'ms'`, `'us'`, `'ns'`.\n\n        :param name `<'Hashable/None'>`: Optional name of the index. Defaults to `None`.\n\n        :returns `<'Pddt'>`: The resulting datetime index (timezone-aware).\n\n        ## Notice\n        - This method only construct `datetime64[us]` index (microsecond resolution).\n        - Parameter `as_unit` converts it to other datetime units after construction.\n\n        ## Equivalent\n        >>> Pddt.fromtimestamp(ts, size=size, tz=utils.UTC)\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_29utcfromtimestamp = {"utcfromtimestamp", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_29utcfromtimestamp, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_28utcfromtimestamp};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_29utcfromtimestamp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_ts = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_as_unit = 0;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utcfromtimestamp (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_ts,&__pyx_mstate_global->__pyx_n_u_size_2,&__pyx_mstate_global->__pyx_n_u_as_unit,&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1406, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1406, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1406, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1406, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1406, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1406, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "utcfromtimestamp", 0) < (0)) __PYX_ERR(0, 1406, __pyx_L3_error)

      /* "cytimes/pddt.py":1410
 *         cls,
 *         ts: int | float | object,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1411
 *         ts: int | float | object,
 *         size: int | Any | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":1412
 *         size: int | Any | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct a UTC-aware index from POSIX timestamps (timezone-aware) `<'Pddt'>`.
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("utcfromtimestamp", 0, 2, 5, i); __PYX_ERR(0, 1406, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1406, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1406, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1406, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1406, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1406, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pddt.py":1410
 *         cls,
 *         ts: int | float | object,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1411
 *         ts: int | float | object,
 *         size: int | Any | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":1412
 *         size: int | Any | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct a UTC-aware index from POSIX timestamps (timezone-aware) `<'Pddt'>`.
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_ts = values[1];
    __pyx_v_size = values[2];
    __pyx_v_as_unit = ((PyObject*)values[3]);
    __pyx_v_name = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("utcfromtimestamp", 0, 2, 5, __pyx_nargs); __PYX_ERR(0, 1406, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.utcfromtimestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_as_unit), (&PyUnicode_Type), 1, "as_unit", 2))) __PYX_ERR(0, 1411, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_28utcfromtimestamp(__pyx_self, __pyx_v_cls, __pyx_v_ts, __pyx_v_size, __pyx_v_as_unit, __pyx_v_name);

  /* "cytimes/pddt.py":1406
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def utcfromtimestamp(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_28utcfromtimestamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_ts, PyObject *__pyx_v_size, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utcfromtimestamp", 0);

  /* "cytimes/pddt.py":1442
 *         >>> Pddt.fromtimestamp(ts, size=size, tz=utils.UTC)
 *         """
 *         return cls.fromtimestamp(             # <<<<<<<<<<<<<<
 *             ts, size=size, tz=utils.UTC, as_unit=as_unit, name=name
 *         )
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_cls;
  __Pyx_INCREF(__pyx_t_2);

  /* "cytimes/pddt.py":1443
 *         """
 *         return cls.fromtimestamp(
 *             ts, size=size, tz=utils.UTC, as_unit=as_unit, name=name             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 4 : 0)] = {__pyx_t_2, __pyx_v_ts};
    __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_size_2, __pyx_v_size, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1442, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, ((PyObject *)__pyx_v_7cytimes_5utils_UTC), __pyx_t_4, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1442, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_4, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 1442, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_4, __pyx_callargs+2, 3) < (0)) __PYX_ERR(0, 1442, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_fromtimestamp, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":1406
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def utcfromtimestamp(
 *         cls,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.utcfromtimestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":1446
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromisoformat(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_31fromisoformat(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_30fromisoformat, "Construct an index from ISO format strings `<'Pddt'>`.\n\n        :param dtstr `<'str/Array-like'>`: The ISO format datetime string(s) to construct with.\n\n            - `<'str'>` A ISO format datetime string.\n            - `<'Array-like'>` An array-like object containing elements representing the datetime strings.\n\n        :param size `<'int/Any/None'>`: The target size of the index\n            (required when `dtstr` is a literal string ). Defaults to `None`.\n\n            - `<'int'>` A positive integer number.\n            - `<'Any'>` Takes the `len(size)` value as the index size.\n            - `<'None'>` Ignored when `dtstr` is an array-like object.\n\n        :param as_unit `<'str/None'>`: Convert to specified datetime unit after construction. Defaults to `None`.\n            Supports: `'s'`, `'ms'`, `'us'`, `'ns'`.\n\n        :param name `<'Hashable/None'>`: Optional name of the index. Defaults to `None`.\n\n        :returns `<'Pddt'>`: The resulting datetime index.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_31fromisoformat = {"fromisoformat", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_31fromisoformat, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_30fromisoformat};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_31fromisoformat(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_dtstr = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_as_unit = 0;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fromisoformat (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_dtstr,&__pyx_mstate_global->__pyx_n_u_size_2,&__pyx_mstate_global->__pyx_n_u_as_unit,&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1446, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1446, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1446, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1446, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1446, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1446, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fromisoformat", 0) < (0)) __PYX_ERR(0, 1446, __pyx_L3_error)

      /* "cytimes/pddt.py":1450
 *         cls,
 *         dtstr: str | object,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1451
 *         dtstr: str | object,
 *         size: int | Any | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":1452
 *         size: int | Any | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from ISO format strings `<'Pddt'>`.
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fromisoformat", 0, 2, 5, i); __PYX_ERR(0, 1446, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1446, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1446, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1446, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1446, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1446, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pddt.py":1450
 *         cls,
 *         dtstr: str | object,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1451
 *         dtstr: str | object,
 *         size: int | Any | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":1452
 *         size: int | Any | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from ISO format strings `<'Pddt'>`.
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_dtstr = values[1];
    __pyx_v_size = values[2];
    __pyx_v_as_unit = ((PyObject*)values[3]);
    __pyx_v_name = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fromisoformat", 0, 2, 5, __pyx_nargs); __PYX_ERR(0, 1446, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.fromisoformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_as_unit), (&PyUnicode_Type), 1, "as_unit", 2))) __PYX_ERR(0, 1451, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_30fromisoformat(__pyx_self, __pyx_v_cls, __pyx_v_dtstr, __pyx_v_size, __pyx_v_as_unit, __pyx_v_name);

  /* "cytimes/pddt.py":1446
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromisoformat(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_30fromisoformat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_dtstr, PyObject *__pyx_v_size, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name) {
  Py_ssize_t __pyx_v_size_i;
  PyObject *__pyx_v_err = NULL;
  CYTHON_UNUSED Py_ssize_t __pyx_7genexpr__pyx_v__;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  size_t __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_t_14;
  char const *__pyx_t_15;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fromisoformat", 0);
  __Pyx_INCREF(__pyx_v_dtstr);

  /* "cytimes/pddt.py":1476
 *         """
 *         # String -> list[str]
 *         if isinstance(dtstr, str):             # <<<<<<<<<<<<<<
 *             if size is None:
 *                 errors.raise_argument_error(
*/
  __pyx_t_1 = PyUnicode_Check(__pyx_v_dtstr); 
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":1477
 *         # String -> list[str]
 *         if isinstance(dtstr, str):
 *             if size is None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    __pyx_t_1 = (__pyx_v_size == Py_None);
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":1478
 *         if isinstance(dtstr, str):
 *             if size is None:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     cls,
 *                     "fromisoformat(size)",
*/
      __pyx_t_2.__pyx_n = 3;
      __pyx_t_2.cls = __pyx_v_cls;
      __pyx_t_2.input_msg = __pyx_mstate_global->__pyx_kp_u_fromisoformat_size;
      __pyx_t_2.error_msg = __pyx_mstate_global->__pyx_kp_u_When_dtstr_is_a_literal_string_s;
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1478, __pyx_L1_error)

      /* "cytimes/pddt.py":1477
 *         # String -> list[str]
 *         if isinstance(dtstr, str):
 *             if size is None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    }

    /* "cytimes/pddt.py":1483
 *                     "When 'dtstr' is a literal string, 'size' must be specified.",
 *                 )
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)             # <<<<<<<<<<<<<<
 *             dtstr = [dtstr for _ in range(size_i)]
 * 
*/
    __pyx_t_3 = __pyx_f_7cytimes_4pddt__parse_size(__pyx_v_cls, __pyx_v_size); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 1483, __pyx_L1_error)
    __pyx_v_size_i = __pyx_t_3;

    /* "cytimes/pddt.py":1484
 *                 )
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)
 *             dtstr = [dtstr for _ in range(size_i)]             # <<<<<<<<<<<<<<
 * 
 *         # Array-like
*/
    { /* enter inner scope */
      __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1484, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __pyx_v_size_i;
      __pyx_t_5 = __pyx_t_3;
      for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
        __pyx_7genexpr__pyx_v__ = __pyx_t_6;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_v_dtstr))) __PYX_ERR(0, 1484, __pyx_L1_error)
      }
    } /* exit inner scope */
    __Pyx_DECREF_SET(__pyx_v_dtstr, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":1476
 *         """
 *         # String -> list[str]
 *         if isinstance(dtstr, str):             # <<<<<<<<<<<<<<
 *             if size is None:
 *                 errors.raise_argument_error(
*/
  }

  /* "cytimes/pddt.py":1487
 * 
 *         # Array-like
 *         try:             # <<<<<<<<<<<<<<
 *             return cls._new(dtstr, as_unit=as_unit, name=name)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    /*try:*/ {

      /* "cytimes/pddt.py":1488
 *         # Array-like
 *         try:
 *             return cls._new(dtstr, as_unit=as_unit, name=name)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "fromisoformat(...)", None, err)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_10 = __pyx_v_cls;
      __Pyx_INCREF(__pyx_t_10);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_10, __pyx_v_dtstr};
        __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1488, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_12, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1488, __pyx_L7_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_12, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1488, __pyx_L7_error)
        __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1488, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L11_try_return;

      /* "cytimes/pddt.py":1487
 * 
 *         # Array-like
 *         try:             # <<<<<<<<<<<<<<
 *             return cls._new(dtstr, as_unit=as_unit, name=name)
 *         except Exception as err:
*/
    }
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytimes/pddt.py":1489
 *         try:
 *             return cls._new(dtstr, as_unit=as_unit, name=name)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "fromisoformat(...)", None, err)
 * 
*/
    __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_13) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.fromisoformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_12, &__pyx_t_10) < 0) __PYX_ERR(0, 1489, __pyx_L9_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_12);
      __pyx_v_err = __pyx_t_12;
      /*try:*/ {

        /* "cytimes/pddt.py":1490
 *             return cls._new(dtstr, as_unit=as_unit, name=name)
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "fromisoformat(...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
        __pyx_t_2.__pyx_n = 4;
        __pyx_t_2.cls = __pyx_v_cls;
        __pyx_t_2.input_msg = __pyx_mstate_global->__pyx_kp_u_fromisoformat;
        __pyx_t_2.error_msg = ((PyObject*)Py_None);
        __pyx_t_2.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1490, __pyx_L18_error)
      }

      /* "cytimes/pddt.py":1489
 *         try:
 *             return cls._new(dtstr, as_unit=as_unit, name=name)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "fromisoformat(...)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L19;
        }
        __pyx_L18_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
          if ( unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __pyx_t_13 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
          __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
          __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
          goto __pyx_L9_except_error;
        }
        __pyx_L19:;
      }
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L8_exception_handled;
    }
    goto __pyx_L9_except_error;

    /* "cytimes/pddt.py":1487
 * 
 *         # Array-like
 *         try:             # <<<<<<<<<<<<<<
 *             return cls._new(dtstr, as_unit=as_unit, name=name)
 *         except Exception as err:
*/
    __pyx_L9_except_error:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L1_error;
    __pyx_L11_try_return:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L0;
    __pyx_L8_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
  }

  /* "cytimes/pddt.py":1446
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromisoformat(
 *         cls,
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.fromisoformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_dtstr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":1492
 *             errors.raise_argument_error(cls, "fromisoformat(...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromisocalendar(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_33fromisocalendar(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_32fromisocalendar, "Construct an index from ISO calendar values `<'Pddt'>`.\n\n        :param iso `<'dict/list/tuple/DataFrame'>`: The ISO calendar values to construct with.\n\n            - `<'dict'>` A dictionary containing the ISO calendar values with keys:\n                `'year'`, `'week'` and `'weekday'` (or `'day'`).\n            - `<'list/tuple'>` A list or tuple of dictionaries, each containing the ISO calendar values.\n            - `<'DataFrame'>` A pandas DataFrame with columns: `'year'`, `'week'` and `'weekday'` (or `'day'`).\n\n        :param size `<'int/Any/None'>`: The target size of the index\n            (required when `iso` is a dict ). Defaults to `None`.\n\n            - `<'int'>` A positive integer number.\n            - `<'Any'>` Takes the `len(size)` value as the index size.\n            - `<'None'>` Ignored when `iso` is a dictionary.\n\n        :param tz `<'tzinfo/str/None'>`: The optional timezone to `attach`. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :param as_unit `<'str/None'>`: Convert to specified datetime unit after construction. Defaults to `None`.\n            Supports: `'s'`, `'ms'`, `'us'`, `'ns'`.\n\n        :param name `<'Hashable/None'>`: Optional name of the index. Defaults to `None`.\n\n        :returns `<'Pddt'>`: The resulting datetime index.\n\n        ## Notice\n        - This method only construct `datetime64[us]` index (microsecond resolution).\n        - Parameter `as_unit` converts it to other datetime units after construction.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_33fromisocalendar = {"fromisocalendar", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_33fromisocalendar, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_32fromisocalendar};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_33fromisocalendar(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_iso = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_v_as_unit = 0;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fromisocalendar (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_iso,&__pyx_mstate_global->__pyx_n_u_size_2,&__pyx_mstate_global->__pyx_n_u_tz,&__pyx_mstate_global->__pyx_n_u_as_unit,&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1492, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1492, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1492, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1492, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1492, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1492, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1492, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fromisocalendar", 0) < (0)) __PYX_ERR(0, 1492, __pyx_L3_error)

      /* "cytimes/pddt.py":1496
 *         cls,
 *         iso: dict | list | tuple | pd.DataFrame,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1497
 *         iso: dict | list | tuple | pd.DataFrame,
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1498
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":1499
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from ISO calendar values `<'Pddt'>`.
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fromisocalendar", 0, 2, 6, i); __PYX_ERR(0, 1492, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1492, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1492, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1492, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1492, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1492, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1492, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pddt.py":1496
 *         cls,
 *         iso: dict | list | tuple | pd.DataFrame,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1497
 *         iso: dict | list | tuple | pd.DataFrame,
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1498
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":1499
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from ISO calendar values `<'Pddt'>`.
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_iso = values[1];
    __pyx_v_size = values[2];
    __pyx_v_tz = values[3];
    __pyx_v_as_unit = ((PyObject*)values[4]);
    __pyx_v_name = values[5];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fromisocalendar", 0, 2, 6, __pyx_nargs); __PYX_ERR(0, 1492, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.fromisocalendar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_as_unit), (&PyUnicode_Type), 1, "as_unit", 2))) __PYX_ERR(0, 1498, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_32fromisocalendar(__pyx_self, __pyx_v_cls, __pyx_v_iso, __pyx_v_size, __pyx_v_tz, __pyx_v_as_unit, __pyx_v_name);

  /* "cytimes/pddt.py":1492
 *             errors.raise_argument_error(cls, "fromisoformat(...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromisocalendar(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_32fromisocalendar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_iso, PyObject *__pyx_v_size, PyObject *__pyx_v_tz, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name) {
  Py_ssize_t __pyx_v_size_i;
  PY_LONG_LONG __pyx_v_us;
  PyArrayObject *__pyx_v_arr = 0;
  npy_int64 *__pyx_v_arr_p;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_o = NULL;
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PY_LONG_LONG __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  npy_intp __pyx_t_10[1];
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13[7];
  PyObject *__pyx_t_14 = NULL;
  npy_intp __pyx_t_15[1];
  struct __pyx_opt_args_7cytimes_6errors_raise_type_error __pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fromisocalendar", 0);

  /* "cytimes/pddt.py":1535
 *         """
 *         # dict
 *         if isinstance(iso, dict):             # <<<<<<<<<<<<<<
 *             if size is None:
 *                 errors.raise_argument_error(
*/
  __pyx_t_1 = PyDict_Check(__pyx_v_iso); 
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":1536
 *         # dict
 *         if isinstance(iso, dict):
 *             if size is None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    __pyx_t_1 = (__pyx_v_size == Py_None);
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":1537
 *         if isinstance(iso, dict):
 *             if size is None:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     cls,
 *                     "fromisocalendar(iso)",
*/
      __pyx_t_2.__pyx_n = 3;
      __pyx_t_2.cls = __pyx_v_cls;
      __pyx_t_2.input_msg = __pyx_mstate_global->__pyx_kp_u_fromisocalendar_iso;
      __pyx_t_2.error_msg = __pyx_mstate_global->__pyx_kp_u_When_iso_is_a_dictionary_size_mu;
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1537, __pyx_L1_error)

      /* "cytimes/pddt.py":1536
 *         # dict
 *         if isinstance(iso, dict):
 *             if size is None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    }

    /* "cytimes/pddt.py":1542
 *                     "When 'iso' is a dictionary, 'size' must be specified.",
 *                 )
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)             # <<<<<<<<<<<<<<
 *             us: cython.longlong = _parse_us_from_iso_dict(cls, iso)
 *             arr: np.ndarray = utils.dt64arr_fr_int64(us, size_i, "us")
*/
    __pyx_t_3 = __pyx_f_7cytimes_4pddt__parse_size(__pyx_v_cls, __pyx_v_size); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 1542, __pyx_L1_error)
    __pyx_v_size_i = __pyx_t_3;

    /* "cytimes/pddt.py":1543
 *                 )
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)
 *             us: cython.longlong = _parse_us_from_iso_dict(cls, iso)             # <<<<<<<<<<<<<<
 *             arr: np.ndarray = utils.dt64arr_fr_int64(us, size_i, "us")
 *             return cls._new(arr, tz=tz, as_unit=as_unit, name=name)
*/
    __pyx_t_4 = __pyx_v_iso;
    __Pyx_INCREF(__pyx_t_4);
    if (!(likely(PyDict_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_4))) __PYX_ERR(0, 1543, __pyx_L1_error)
    if (unlikely(__pyx_t_4 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'");
      __PYX_ERR(0, 1543, __pyx_L1_error)
    }
    __pyx_t_5 = __pyx_f_7cytimes_4pddt__parse_us_from_iso_dict(__pyx_v_cls, ((PyObject*)__pyx_t_4)); if (unlikely(__pyx_t_5 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1543, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_us = __pyx_t_5;

    /* "cytimes/pddt.py":1544
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)
 *             us: cython.longlong = _parse_us_from_iso_dict(cls, iso)
 *             arr: np.ndarray = utils.dt64arr_fr_int64(us, size_i, "us")             # <<<<<<<<<<<<<<
 *             return cls._new(arr, tz=tz, as_unit=as_unit, name=name)
 * 
*/
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_fr_int64(__pyx_v_us, __pyx_v_size_i, __pyx_mstate_global->__pyx_n_u_us)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":1545
 *             us: cython.longlong = _parse_us_from_iso_dict(cls, iso)
 *             arr: np.ndarray = utils.dt64arr_fr_int64(us, size_i, "us")
 *             return cls._new(arr, tz=tz, as_unit=as_unit, name=name)             # <<<<<<<<<<<<<<
 * 
 *         # list / tuple
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __pyx_v_cls;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_6, ((PyObject *)__pyx_v_arr)};
      __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1545, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1545, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_8, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1545, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_8, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 1545, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1545, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":1535
 *         """
 *         # dict
 *         if isinstance(iso, dict):             # <<<<<<<<<<<<<<
 *             if size is None:
 *                 errors.raise_argument_error(
*/
  }

  /* "cytimes/pddt.py":1548
 * 
 *         # list / tuple
 *         if isinstance(iso, (list, tuple)):             # <<<<<<<<<<<<<<
 *             size_i: cython.Py_ssize_t = len(iso)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
*/
  __pyx_t_9 = PyList_Check(__pyx_v_iso); 
  if (!__pyx_t_9) {
  } else {
    __pyx_t_1 = __pyx_t_9;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_9 = PyTuple_Check(__pyx_v_iso); 
  __pyx_t_1 = __pyx_t_9;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":1549
 *         # list / tuple
 *         if isinstance(iso, (list, tuple)):
 *             size_i: cython.Py_ssize_t = len(iso)             # <<<<<<<<<<<<<<
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
*/
    __pyx_t_3 = PyObject_Length(__pyx_v_iso); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1549, __pyx_L1_error)
    __pyx_v_size_i = __pyx_t_3;

    /* "cytimes/pddt.py":1550
 *         if isinstance(iso, (list, tuple)):
 *             size_i: cython.Py_ssize_t = len(iso)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)             # <<<<<<<<<<<<<<
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
*/
    __pyx_t_10[0] = __pyx_v_size_i;
    __pyx_t_4 = PyArray_EMPTY(1, __pyx_t_10, NPY_INT64, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1550, __pyx_L1_error)
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":1551
 *             size_i: cython.Py_ssize_t = len(iso)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))             # <<<<<<<<<<<<<<
 *             i: cython.Py_ssize_t = 0
 *             for o in iso:
*/
    __pyx_v_arr_p = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

    /* "cytimes/pddt.py":1552
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0             # <<<<<<<<<<<<<<
 *             for o in iso:
 *                 if isinstance(o, dict):
*/
    __pyx_v_i = 0;

    /* "cytimes/pddt.py":1553
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
 *             for o in iso:             # <<<<<<<<<<<<<<
 *                 if isinstance(o, dict):
 *                     us: cython.longlong = _parse_us_from_iso_dict(cls, o)
*/
    if (likely(PyList_CheckExact(__pyx_v_iso)) || PyTuple_CheckExact(__pyx_v_iso)) {
      __pyx_t_4 = __pyx_v_iso; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_3 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_iso); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1553, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1553, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_11)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1553, __pyx_L1_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          __pyx_t_8 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_3;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1553, __pyx_L1_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_3));
          #else
          __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_3);
          #endif
          ++__pyx_t_3;
        }
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1553, __pyx_L1_error)
      } else {
        __pyx_t_8 = __pyx_t_11(__pyx_t_4);
        if (unlikely(!__pyx_t_8)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1553, __pyx_L1_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_XDECREF_SET(__pyx_v_o, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "cytimes/pddt.py":1554
 *             i: cython.Py_ssize_t = 0
 *             for o in iso:
 *                 if isinstance(o, dict):             # <<<<<<<<<<<<<<
 *                     us: cython.longlong = _parse_us_from_iso_dict(cls, o)
 *                 else:
*/
      __pyx_t_1 = PyDict_Check(__pyx_v_o); 
      if (__pyx_t_1) {

        /* "cytimes/pddt.py":1555
 *             for o in iso:
 *                 if isinstance(o, dict):
 *                     us: cython.longlong = _parse_us_from_iso_dict(cls, o)             # <<<<<<<<<<<<<<
 *                 else:
 *                     errors.raise_argument_error(
*/
        __pyx_t_8 = __pyx_v_o;
        __Pyx_INCREF(__pyx_t_8);
        if (!(likely(PyDict_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_8))) __PYX_ERR(0, 1555, __pyx_L1_error)
        if (unlikely(__pyx_t_8 == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'");
          __PYX_ERR(0, 1555, __pyx_L1_error)
        }
        __pyx_t_5 = __pyx_f_7cytimes_4pddt__parse_us_from_iso_dict(__pyx_v_cls, ((PyObject*)__pyx_t_8)); if (unlikely(__pyx_t_5 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1555, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_v_us = __pyx_t_5;

        /* "cytimes/pddt.py":1554
 *             i: cython.Py_ssize_t = 0
 *             for o in iso:
 *                 if isinstance(o, dict):             # <<<<<<<<<<<<<<
 *                     us: cython.longlong = _parse_us_from_iso_dict(cls, o)
 *                 else:
*/
        goto __pyx_L10;
      }

      /* "cytimes/pddt.py":1557
 *                     us: cython.longlong = _parse_us_from_iso_dict(cls, o)
 *                 else:
 *                     errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                         cls,
 *                         "fromisocalendar(iso)",
*/
      /*else*/ {

        /* "cytimes/pddt.py":1561
 *                         "fromisocalendar(iso)",
 *                         "Expects dict element from %s, got '%s' %s."
 *                         % (type(iso).__name__, o, type(o)),             # <<<<<<<<<<<<<<
 *                     )
 *                     return  # unreachable: suppress compiler warning
*/
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_iso)), __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1561, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_8), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1561, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_o), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1561, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_o))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1561, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13[0] = __pyx_mstate_global->__pyx_kp_u_Expects_dict_element_from;
        __pyx_t_13[1] = __pyx_t_6;
        __pyx_t_13[2] = __pyx_mstate_global->__pyx_kp_u_got;
        __pyx_t_13[3] = __pyx_t_8;
        __pyx_t_13[4] = __pyx_mstate_global->__pyx_kp_u__9;
        __pyx_t_13[5] = __pyx_t_12;
        __pyx_t_13[6] = __pyx_mstate_global->__pyx_kp_u__2;

        /* "cytimes/pddt.py":1560
 *                         cls,
 *                         "fromisocalendar(iso)",
 *                         "Expects dict element from %s, got '%s' %s."             # <<<<<<<<<<<<<<
 *                         % (type(iso).__name__, o, type(o)),
 *                     )
*/
        __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_13, 7, 26 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12));
        if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1560, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

        /* "cytimes/pddt.py":1557
 *                     us: cython.longlong = _parse_us_from_iso_dict(cls, o)
 *                 else:
 *                     errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                         cls,
 *                         "fromisocalendar(iso)",
*/
        __pyx_t_2.__pyx_n = 3;
        __pyx_t_2.cls = __pyx_v_cls;
        __pyx_t_2.input_msg = __pyx_mstate_global->__pyx_kp_u_fromisocalendar_iso;
        __pyx_t_2.error_msg = ((PyObject*)__pyx_t_14);
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1557, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

        /* "cytimes/pddt.py":1563
 *                         % (type(iso).__name__, o, type(o)),
 *                     )
 *                     return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *                 arr_p[i] = us
 *                 i += 1
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L0;
      }
      __pyx_L10:;

      /* "cytimes/pddt.py":1564
 *                     )
 *                     return  # unreachable: suppress compiler warning
 *                 arr_p[i] = us             # <<<<<<<<<<<<<<
 *                 i += 1
 *             return cls._new(
*/
      (__pyx_v_arr_p[__pyx_v_i]) = __pyx_v_us;

      /* "cytimes/pddt.py":1565
 *                     return  # unreachable: suppress compiler warning
 *                 arr_p[i] = us
 *                 i += 1             # <<<<<<<<<<<<<<
 *             return cls._new(
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name
*/
      __pyx_v_i = (__pyx_v_i + 1);

      /* "cytimes/pddt.py":1553
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
 *             for o in iso:             # <<<<<<<<<<<<<<
 *                 if isinstance(o, dict):
 *                     us: cython.longlong = _parse_us_from_iso_dict(cls, o)
*/
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytimes/pddt.py":1566
 *                 arr_p[i] = us
 *                 i += 1
 *             return cls._new(             # <<<<<<<<<<<<<<
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name
 *             )
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_14 = __pyx_v_cls;
    __Pyx_INCREF(__pyx_t_14);

    /* "cytimes/pddt.py":1567
 *                 i += 1
 *             return cls._new(
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name             # <<<<<<<<<<<<<<
 *             )
 * 
*/
    __pyx_t_8 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
      __pyx_t_12 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1567, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
    }
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_14, __pyx_t_12};
      __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1566, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1566, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_8, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1566, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_8, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 1566, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1566, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":1548
 * 
 *         # list / tuple
 *         if isinstance(iso, (list, tuple)):             # <<<<<<<<<<<<<<
 *             size_i: cython.Py_ssize_t = len(iso)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
*/
  }

  /* "cytimes/pddt.py":1571
 * 
 *         # DataFrame
 *         if isinstance(iso, pd.DataFrame):             # <<<<<<<<<<<<<<
 *             size_i: cython.Py_ssize_t = len(iso)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DataFrame); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = PyObject_IsInstance(__pyx_v_iso, __pyx_t_8); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1571, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":1572
 *         # DataFrame
 *         if isinstance(iso, pd.DataFrame):
 *             size_i: cython.Py_ssize_t = len(iso)             # <<<<<<<<<<<<<<
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
*/
    __pyx_t_3 = PyObject_Length(__pyx_v_iso); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1572, __pyx_L1_error)
    __pyx_v_size_i = __pyx_t_3;

    /* "cytimes/pddt.py":1573
 *         if isinstance(iso, pd.DataFrame):
 *             size_i: cython.Py_ssize_t = len(iso)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)             # <<<<<<<<<<<<<<
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
*/
    __pyx_t_15[0] = __pyx_v_size_i;
    __pyx_t_8 = PyArray_EMPTY(1, __pyx_t_15, NPY_INT64, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1573, __pyx_L1_error)
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_8);
    __pyx_t_8 = 0;

    /* "cytimes/pddt.py":1574
 *             size_i: cython.Py_ssize_t = len(iso)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))             # <<<<<<<<<<<<<<
 *             i: cython.Py_ssize_t = 0
 *             for row in iso.to_dict(orient="records"):
*/
    __pyx_v_arr_p = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

    /* "cytimes/pddt.py":1575
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0             # <<<<<<<<<<<<<<
 *             for row in iso.to_dict(orient="records"):
 *                 arr_p[i] = _parse_us_from_iso_dict(cls, row)
*/
    __pyx_v_i = 0;

    /* "cytimes/pddt.py":1576
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
 *             for row in iso.to_dict(orient="records"):             # <<<<<<<<<<<<<<
 *                 arr_p[i] = _parse_us_from_iso_dict(cls, row)
 *                 i += 1
*/
    __pyx_t_4 = __pyx_v_iso;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL};
      __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1576, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_orient, __pyx_mstate_global->__pyx_n_u_records, __pyx_t_12, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1576, __pyx_L1_error)
      __pyx_t_8 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_dict, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1576, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    }
    if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
      __pyx_t_12 = __pyx_t_8; __Pyx_INCREF(__pyx_t_12);
      __pyx_t_3 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1576, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1576, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    for (;;) {
      if (likely(!__pyx_t_11)) {
        if (likely(PyList_CheckExact(__pyx_t_12))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_12);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1576, __pyx_L1_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          __pyx_t_8 = __Pyx_PyList_GetItemRefFast(__pyx_t_12, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_3;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_12);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1576, __pyx_L1_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_3));
          #else
          __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_3);
          #endif
          ++__pyx_t_3;
        }
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1576, __pyx_L1_error)
      } else {
        __pyx_t_8 = __pyx_t_11(__pyx_t_12);
        if (unlikely(!__pyx_t_8)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1576, __pyx_L1_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "cytimes/pddt.py":1577
 *             i: cython.Py_ssize_t = 0
 *             for row in iso.to_dict(orient="records"):
 *                 arr_p[i] = _parse_us_from_iso_dict(cls, row)             # <<<<<<<<<<<<<<
 *                 i += 1
 *             return cls._new(
*/
      __pyx_t_8 = __pyx_v_row;
      __Pyx_INCREF(__pyx_t_8);
      if (!(likely(PyDict_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_8))) __PYX_ERR(0, 1577, __pyx_L1_error)
      if (unlikely(__pyx_t_8 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'");
        __PYX_ERR(0, 1577, __pyx_L1_error)
      }
      __pyx_t_5 = __pyx_f_7cytimes_4pddt__parse_us_from_iso_dict(__pyx_v_cls, ((PyObject*)__pyx_t_8)); if (unlikely(__pyx_t_5 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1577, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      (__pyx_v_arr_p[__pyx_v_i]) = __pyx_t_5;

      /* "cytimes/pddt.py":1578
 *             for row in iso.to_dict(orient="records"):
 *                 arr_p[i] = _parse_us_from_iso_dict(cls, row)
 *                 i += 1             # <<<<<<<<<<<<<<
 *             return cls._new(
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name
*/
      __pyx_v_i = (__pyx_v_i + 1);

      /* "cytimes/pddt.py":1576
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
 *             for row in iso.to_dict(orient="records"):             # <<<<<<<<<<<<<<
 *                 arr_p[i] = _parse_us_from_iso_dict(cls, row)
 *                 i += 1
*/
    }
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "cytimes/pddt.py":1579
 *                 arr_p[i] = _parse_us_from_iso_dict(cls, row)
 *                 i += 1
 *             return cls._new(             # <<<<<<<<<<<<<<
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name
 *             )
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = __pyx_v_cls;
    __Pyx_INCREF(__pyx_t_8);

    /* "cytimes/pddt.py":1580
 *                 i += 1
 *             return cls._new(
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name             # <<<<<<<<<<<<<<
 *             )
 * 
*/
    __pyx_t_14 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_14);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_8, __pyx_t_4};
      __pyx_t_14 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1579, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_14, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1579, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_14, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1579, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_14, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 1579, __pyx_L1_error)
      __pyx_t_12 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_14);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1579, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
    }
    __pyx_r = __pyx_t_12;
    __pyx_t_12 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":1571
 * 
 *         # DataFrame
 *         if isinstance(iso, pd.DataFrame):             # <<<<<<<<<<<<<<
 *             size_i: cython.Py_ssize_t = len(iso)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
*/
  }

  /* "cytimes/pddt.py":1587
 *             cls,
 *             "fromisocalendar(iso)",
 *             "Unsupported 'iso' data type %s." % type(iso),             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_12 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Unsupported_iso_data_type_s, ((PyObject *)Py_TYPE(__pyx_v_iso))); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);

  /* "cytimes/pddt.py":1584
 * 
 *         # Unsupported type
 *         errors.raise_type_error(             # <<<<<<<<<<<<<<
 *             cls,
 *             "fromisocalendar(iso)",
*/
  __pyx_t_16.__pyx_n = 3;
  __pyx_t_16.cls = __pyx_v_cls;
  __pyx_t_16.input_msg = __pyx_mstate_global->__pyx_kp_u_fromisocalendar_iso;
  __pyx_t_16.error_msg = ((PyObject*)__pyx_t_12);
  __pyx_f_7cytimes_6errors_raise_type_error(0, &__pyx_t_16); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1584, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "cytimes/pddt.py":1492
 *             errors.raise_argument_error(cls, "fromisoformat(...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromisocalendar(
 *         cls,
*/

  /* function exit code */
  __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_8);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.fromisocalendar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":1590
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdayofyear(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_35fromdayofyear(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_34fromdayofyear, "Construct an index from day-of-year values `<'Pddt'>`.\n\n        :param doy `<'dict/list/tuple/DataFrame'>`: The day-of-year values to construct with.\n\n            - `<'dict'>` A dictionary containing the day-of-year values with keys:\n                `'year'` and `'doy'` (or `'day'`).\n            - `<'list/tuple'>` A list or tuple of dictionaries, each containing the day-of-year values.\n            - `<'DataFrame'>` A pandas DataFrame with columns: `'year'` and `'doy'` (or `'day'`).\n\n        :param size `<'int/Any/None'>`: The target size of the index\n            (required when `doy` is a dict ). Defaults to `None`.\n\n            - `<'int'>` A positive integer number.\n            - `<'Any'>` Takes the `len(size)` value as the index size.\n            - `<'None'>` Ignored when `doy` is a dictionary.\n\n        :param tz `<'tzinfo/str/None'>`: The optional timezone to `attach`. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :param as_unit `<'str/None'>`: Convert to specified datetime unit after construction. Defaults to `None`.\n            Supports: `'s'`, `'ms'`, `'us'`, `'ns'`.\n\n        :param name `<'Hashable/None'>`: Optional name of the index. Defaults to `None`.\n\n        :returns `<'Pddt'>`: The resulting datetime index.\n\n        ## Notice\n        - This method only construct `datetime64[us]` index (microsecond resolution).\n        - Parameter `as_unit` converts it to other datetime units after construction.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_35fromdayofyear = {"fromdayofyear", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_35fromdayofyear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_34fromdayofyear};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_35fromdayofyear(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_doy = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_v_as_unit = 0;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fromdayofyear (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_doy,&__pyx_mstate_global->__pyx_n_u_size_2,&__pyx_mstate_global->__pyx_n_u_tz,&__pyx_mstate_global->__pyx_n_u_as_unit,&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1590, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1590, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1590, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1590, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1590, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1590, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1590, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fromdayofyear", 0) < (0)) __PYX_ERR(0, 1590, __pyx_L3_error)

      /* "cytimes/pddt.py":1594
 *         cls,
 *         doy: dict | list | tuple | pd.DataFrame,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1595
 *         doy: dict | list | tuple | pd.DataFrame,
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1596
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":1597
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from day-of-year values `<'Pddt'>`.
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fromdayofyear", 0, 2, 6, i); __PYX_ERR(0, 1590, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1590, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1590, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1590, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1590, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1590, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1590, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pddt.py":1594
 *         cls,
 *         doy: dict | list | tuple | pd.DataFrame,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1595
 *         doy: dict | list | tuple | pd.DataFrame,
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1596
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":1597
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from day-of-year values `<'Pddt'>`.
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_doy = values[1];
    __pyx_v_size = values[2];
    __pyx_v_tz = values[3];
    __pyx_v_as_unit = ((PyObject*)values[4]);
    __pyx_v_name = values[5];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fromdayofyear", 0, 2, 6, __pyx_nargs); __PYX_ERR(0, 1590, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.fromdayofyear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_as_unit), (&PyUnicode_Type), 1, "as_unit", 2))) __PYX_ERR(0, 1596, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_34fromdayofyear(__pyx_self, __pyx_v_cls, __pyx_v_doy, __pyx_v_size, __pyx_v_tz, __pyx_v_as_unit, __pyx_v_name);

  /* "cytimes/pddt.py":1590
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdayofyear(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_34fromdayofyear(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_doy, PyObject *__pyx_v_size, PyObject *__pyx_v_tz, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name) {
  Py_ssize_t __pyx_v_size_i;
  PY_LONG_LONG __pyx_v_us;
  PyArrayObject *__pyx_v_arr = 0;
  npy_int64 *__pyx_v_arr_p;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_o = NULL;
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PY_LONG_LONG __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  npy_intp __pyx_t_10[1];
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13[7];
  PyObject *__pyx_t_14 = NULL;
  npy_intp __pyx_t_15[1];
  struct __pyx_opt_args_7cytimes_6errors_raise_type_error __pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fromdayofyear", 0);

  /* "cytimes/pddt.py":1633
 *         """
 *         # dict
 *         if isinstance(doy, dict):             # <<<<<<<<<<<<<<
 *             if size is None:
 *                 errors.raise_argument_error(
*/
  __pyx_t_1 = PyDict_Check(__pyx_v_doy); 
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":1634
 *         # dict
 *         if isinstance(doy, dict):
 *             if size is None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    __pyx_t_1 = (__pyx_v_size == Py_None);
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":1635
 *         if isinstance(doy, dict):
 *             if size is None:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     cls,
 *                     "fromdayofyear(doy)",
*/
      __pyx_t_2.__pyx_n = 3;
      __pyx_t_2.cls = __pyx_v_cls;
      __pyx_t_2.input_msg = __pyx_mstate_global->__pyx_kp_u_fromdayofyear_doy;
      __pyx_t_2.error_msg = __pyx_mstate_global->__pyx_kp_u_When_doy_is_a_dictionary_size_mu;
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1635, __pyx_L1_error)

      /* "cytimes/pddt.py":1634
 *         # dict
 *         if isinstance(doy, dict):
 *             if size is None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    }

    /* "cytimes/pddt.py":1640
 *                     "When 'doy' is a dictionary, 'size' must be specified.",
 *                 )
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)             # <<<<<<<<<<<<<<
 *             us: cython.longlong = _parse_us_from_doy_dict(cls, doy)
 *             arr: np.ndarray = utils.dt64arr_fr_int64(us, size_i, "us")
*/
    __pyx_t_3 = __pyx_f_7cytimes_4pddt__parse_size(__pyx_v_cls, __pyx_v_size); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 1640, __pyx_L1_error)
    __pyx_v_size_i = __pyx_t_3;

    /* "cytimes/pddt.py":1641
 *                 )
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)
 *             us: cython.longlong = _parse_us_from_doy_dict(cls, doy)             # <<<<<<<<<<<<<<
 *             arr: np.ndarray = utils.dt64arr_fr_int64(us, size_i, "us")
 *             return cls._new(arr, tz=tz, as_unit=as_unit, name=name)
*/
    __pyx_t_4 = __pyx_v_doy;
    __Pyx_INCREF(__pyx_t_4);
    if (!(likely(PyDict_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_4))) __PYX_ERR(0, 1641, __pyx_L1_error)
    if (unlikely(__pyx_t_4 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'");
      __PYX_ERR(0, 1641, __pyx_L1_error)
    }
    __pyx_t_5 = __pyx_f_7cytimes_4pddt__parse_us_from_doy_dict(__pyx_v_cls, ((PyObject*)__pyx_t_4)); if (unlikely(__pyx_t_5 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1641, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_us = __pyx_t_5;

    /* "cytimes/pddt.py":1642
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)
 *             us: cython.longlong = _parse_us_from_doy_dict(cls, doy)
 *             arr: np.ndarray = utils.dt64arr_fr_int64(us, size_i, "us")             # <<<<<<<<<<<<<<
 *             return cls._new(arr, tz=tz, as_unit=as_unit, name=name)
 * 
*/
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_fr_int64(__pyx_v_us, __pyx_v_size_i, __pyx_mstate_global->__pyx_n_u_us)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":1643
 *             us: cython.longlong = _parse_us_from_doy_dict(cls, doy)
 *             arr: np.ndarray = utils.dt64arr_fr_int64(us, size_i, "us")
 *             return cls._new(arr, tz=tz, as_unit=as_unit, name=name)             # <<<<<<<<<<<<<<
 * 
 *         # list / tuple
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __pyx_v_cls;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_6, ((PyObject *)__pyx_v_arr)};
      __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1643, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1643, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_8, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1643, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_8, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 1643, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1643, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":1633
 *         """
 *         # dict
 *         if isinstance(doy, dict):             # <<<<<<<<<<<<<<
 *             if size is None:
 *                 errors.raise_argument_error(
*/
  }

  /* "cytimes/pddt.py":1646
 * 
 *         # list / tuple
 *         if isinstance(doy, (list, tuple)):             # <<<<<<<<<<<<<<
 *             size_i: cython.Py_ssize_t = len(doy)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
*/
  __pyx_t_9 = PyList_Check(__pyx_v_doy); 
  if (!__pyx_t_9) {
  } else {
    __pyx_t_1 = __pyx_t_9;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_9 = PyTuple_Check(__pyx_v_doy); 
  __pyx_t_1 = __pyx_t_9;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":1647
 *         # list / tuple
 *         if isinstance(doy, (list, tuple)):
 *             size_i: cython.Py_ssize_t = len(doy)             # <<<<<<<<<<<<<<
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
*/
    __pyx_t_3 = PyObject_Length(__pyx_v_doy); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1647, __pyx_L1_error)
    __pyx_v_size_i = __pyx_t_3;

    /* "cytimes/pddt.py":1648
 *         if isinstance(doy, (list, tuple)):
 *             size_i: cython.Py_ssize_t = len(doy)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)             # <<<<<<<<<<<<<<
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
*/
    __pyx_t_10[0] = __pyx_v_size_i;
    __pyx_t_4 = PyArray_EMPTY(1, __pyx_t_10, NPY_INT64, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1648, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1648, __pyx_L1_error)
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":1649
 *             size_i: cython.Py_ssize_t = len(doy)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))             # <<<<<<<<<<<<<<
 *             i: cython.Py_ssize_t = 0
 *             for o in doy:
*/
    __pyx_v_arr_p = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

    /* "cytimes/pddt.py":1650
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0             # <<<<<<<<<<<<<<
 *             for o in doy:
 *                 if isinstance(o, dict):
*/
    __pyx_v_i = 0;

    /* "cytimes/pddt.py":1651
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
 *             for o in doy:             # <<<<<<<<<<<<<<
 *                 if isinstance(o, dict):
 *                     us: cython.longlong = _parse_us_from_doy_dict(cls, o)
*/
    if (likely(PyList_CheckExact(__pyx_v_doy)) || PyTuple_CheckExact(__pyx_v_doy)) {
      __pyx_t_4 = __pyx_v_doy; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_3 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_doy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1651, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1651, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_11)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1651, __pyx_L1_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          __pyx_t_8 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_3;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1651, __pyx_L1_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_3));
          #else
          __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_3);
          #endif
          ++__pyx_t_3;
        }
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1651, __pyx_L1_error)
      } else {
        __pyx_t_8 = __pyx_t_11(__pyx_t_4);
        if (unlikely(!__pyx_t_8)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1651, __pyx_L1_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_XDECREF_SET(__pyx_v_o, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "cytimes/pddt.py":1652
 *             i: cython.Py_ssize_t = 0
 *             for o in doy:
 *                 if isinstance(o, dict):             # <<<<<<<<<<<<<<
 *                     us: cython.longlong = _parse_us_from_doy_dict(cls, o)
 *                 else:
*/
      __pyx_t_1 = PyDict_Check(__pyx_v_o); 
      if (__pyx_t_1) {

        /* "cytimes/pddt.py":1653
 *             for o in doy:
 *                 if isinstance(o, dict):
 *                     us: cython.longlong = _parse_us_from_doy_dict(cls, o)             # <<<<<<<<<<<<<<
 *                 else:
 *                     errors.raise_argument_error(
*/
        __pyx_t_8 = __pyx_v_o;
        __Pyx_INCREF(__pyx_t_8);
        if (!(likely(PyDict_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_8))) __PYX_ERR(0, 1653, __pyx_L1_error)
        if (unlikely(__pyx_t_8 == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'");
          __PYX_ERR(0, 1653, __pyx_L1_error)
        }
        __pyx_t_5 = __pyx_f_7cytimes_4pddt__parse_us_from_doy_dict(__pyx_v_cls, ((PyObject*)__pyx_t_8)); if (unlikely(__pyx_t_5 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1653, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_v_us = __pyx_t_5;

        /* "cytimes/pddt.py":1652
 *             i: cython.Py_ssize_t = 0
 *             for o in doy:
 *                 if isinstance(o, dict):             # <<<<<<<<<<<<<<
 *                     us: cython.longlong = _parse_us_from_doy_dict(cls, o)
 *                 else:
*/
        goto __pyx_L10;
      }

      /* "cytimes/pddt.py":1655
 *                     us: cython.longlong = _parse_us_from_doy_dict(cls, o)
 *                 else:
 *                     errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                         cls,
 *                         "fromdayofyear(doy)",
*/
      /*else*/ {

        /* "cytimes/pddt.py":1659
 *                         "fromdayofyear(doy)",
 *                         "Expects dict element from %s, got '%s' %s."
 *                         % (type(doy).__name__, o, type(o)),             # <<<<<<<<<<<<<<
 *                     )
 *                     return  # unreachable: suppress compiler warning
*/
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_doy)), __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1659, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_8), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1659, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_o), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1659, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_o))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1659, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13[0] = __pyx_mstate_global->__pyx_kp_u_Expects_dict_element_from;
        __pyx_t_13[1] = __pyx_t_6;
        __pyx_t_13[2] = __pyx_mstate_global->__pyx_kp_u_got;
        __pyx_t_13[3] = __pyx_t_8;
        __pyx_t_13[4] = __pyx_mstate_global->__pyx_kp_u__9;
        __pyx_t_13[5] = __pyx_t_12;
        __pyx_t_13[6] = __pyx_mstate_global->__pyx_kp_u__2;

        /* "cytimes/pddt.py":1658
 *                         cls,
 *                         "fromdayofyear(doy)",
 *                         "Expects dict element from %s, got '%s' %s."             # <<<<<<<<<<<<<<
 *                         % (type(doy).__name__, o, type(o)),
 *                     )
*/
        __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_13, 7, 26 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12));
        if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

        /* "cytimes/pddt.py":1655
 *                     us: cython.longlong = _parse_us_from_doy_dict(cls, o)
 *                 else:
 *                     errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                         cls,
 *                         "fromdayofyear(doy)",
*/
        __pyx_t_2.__pyx_n = 3;
        __pyx_t_2.cls = __pyx_v_cls;
        __pyx_t_2.input_msg = __pyx_mstate_global->__pyx_kp_u_fromdayofyear_doy;
        __pyx_t_2.error_msg = ((PyObject*)__pyx_t_14);
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1655, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

        /* "cytimes/pddt.py":1661
 *                         % (type(doy).__name__, o, type(o)),
 *                     )
 *                     return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *                 arr_p[i] = us
 *                 i += 1
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L0;
      }
      __pyx_L10:;

      /* "cytimes/pddt.py":1662
 *                     )
 *                     return  # unreachable: suppress compiler warning
 *                 arr_p[i] = us             # <<<<<<<<<<<<<<
 *                 i += 1
 *             return cls._new(
*/
      (__pyx_v_arr_p[__pyx_v_i]) = __pyx_v_us;

      /* "cytimes/pddt.py":1663
 *                     return  # unreachable: suppress compiler warning
 *                 arr_p[i] = us
 *                 i += 1             # <<<<<<<<<<<<<<
 *             return cls._new(
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name
*/
      __pyx_v_i = (__pyx_v_i + 1);

      /* "cytimes/pddt.py":1651
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
 *             for o in doy:             # <<<<<<<<<<<<<<
 *                 if isinstance(o, dict):
 *                     us: cython.longlong = _parse_us_from_doy_dict(cls, o)
*/
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytimes/pddt.py":1664
 *                 arr_p[i] = us
 *                 i += 1
 *             return cls._new(             # <<<<<<<<<<<<<<
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name
 *             )
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_14 = __pyx_v_cls;
    __Pyx_INCREF(__pyx_t_14);

    /* "cytimes/pddt.py":1665
 *                 i += 1
 *             return cls._new(
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name             # <<<<<<<<<<<<<<
 *             )
 * 
*/
    __pyx_t_8 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
      __pyx_t_12 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1665, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
    }
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_14, __pyx_t_12};
      __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1664, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1664, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_8, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1664, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_8, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 1664, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1664, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":1646
 * 
 *         # list / tuple
 *         if isinstance(doy, (list, tuple)):             # <<<<<<<<<<<<<<
 *             size_i: cython.Py_ssize_t = len(doy)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
*/
  }

  /* "cytimes/pddt.py":1669
 * 
 *         # DataFrame
 *         if isinstance(doy, pd.DataFrame):             # <<<<<<<<<<<<<<
 *             size_i: cython.Py_ssize_t = len(doy)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DataFrame); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = PyObject_IsInstance(__pyx_v_doy, __pyx_t_8); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1669, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":1670
 *         # DataFrame
 *         if isinstance(doy, pd.DataFrame):
 *             size_i: cython.Py_ssize_t = len(doy)             # <<<<<<<<<<<<<<
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
*/
    __pyx_t_3 = PyObject_Length(__pyx_v_doy); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1670, __pyx_L1_error)
    __pyx_v_size_i = __pyx_t_3;

    /* "cytimes/pddt.py":1671
 *         if isinstance(doy, pd.DataFrame):
 *             size_i: cython.Py_ssize_t = len(doy)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)             # <<<<<<<<<<<<<<
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
*/
    __pyx_t_15[0] = __pyx_v_size_i;
    __pyx_t_8 = PyArray_EMPTY(1, __pyx_t_15, NPY_INT64, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1671, __pyx_L1_error)
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_8);
    __pyx_t_8 = 0;

    /* "cytimes/pddt.py":1672
 *             size_i: cython.Py_ssize_t = len(doy)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))             # <<<<<<<<<<<<<<
 *             i: cython.Py_ssize_t = 0
 *             for row in doy.to_dict(orient="records"):
*/
    __pyx_v_arr_p = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

    /* "cytimes/pddt.py":1673
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0             # <<<<<<<<<<<<<<
 *             for row in doy.to_dict(orient="records"):
 *                 arr_p[i] = _parse_us_from_doy_dict(cls, row)
*/
    __pyx_v_i = 0;

    /* "cytimes/pddt.py":1674
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
 *             for row in doy.to_dict(orient="records"):             # <<<<<<<<<<<<<<
 *                 arr_p[i] = _parse_us_from_doy_dict(cls, row)
 *                 i += 1
*/
    __pyx_t_4 = __pyx_v_doy;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL};
      __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1674, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_orient, __pyx_mstate_global->__pyx_n_u_records, __pyx_t_12, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1674, __pyx_L1_error)
      __pyx_t_8 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_dict, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1674, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    }
    if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
      __pyx_t_12 = __pyx_t_8; __Pyx_INCREF(__pyx_t_12);
      __pyx_t_3 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1674, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1674, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    for (;;) {
      if (likely(!__pyx_t_11)) {
        if (likely(PyList_CheckExact(__pyx_t_12))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_12);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1674, __pyx_L1_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          __pyx_t_8 = __Pyx_PyList_GetItemRefFast(__pyx_t_12, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_3;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_12);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1674, __pyx_L1_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_3));
          #else
          __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_3);
          #endif
          ++__pyx_t_3;
        }
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1674, __pyx_L1_error)
      } else {
        __pyx_t_8 = __pyx_t_11(__pyx_t_12);
        if (unlikely(!__pyx_t_8)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1674, __pyx_L1_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "cytimes/pddt.py":1675
 *             i: cython.Py_ssize_t = 0
 *             for row in doy.to_dict(orient="records"):
 *                 arr_p[i] = _parse_us_from_doy_dict(cls, row)             # <<<<<<<<<<<<<<
 *                 i += 1
 *             return cls._new(
*/
      __pyx_t_8 = __pyx_v_row;
      __Pyx_INCREF(__pyx_t_8);
      if (!(likely(PyDict_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_8))) __PYX_ERR(0, 1675, __pyx_L1_error)
      if (unlikely(__pyx_t_8 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'");
        __PYX_ERR(0, 1675, __pyx_L1_error)
      }
      __pyx_t_5 = __pyx_f_7cytimes_4pddt__parse_us_from_doy_dict(__pyx_v_cls, ((PyObject*)__pyx_t_8)); if (unlikely(__pyx_t_5 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1675, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      (__pyx_v_arr_p[__pyx_v_i]) = __pyx_t_5;

      /* "cytimes/pddt.py":1676
 *             for row in doy.to_dict(orient="records"):
 *                 arr_p[i] = _parse_us_from_doy_dict(cls, row)
 *                 i += 1             # <<<<<<<<<<<<<<
 *             return cls._new(
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name
*/
      __pyx_v_i = (__pyx_v_i + 1);

      /* "cytimes/pddt.py":1674
 *             arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *             i: cython.Py_ssize_t = 0
 *             for row in doy.to_dict(orient="records"):             # <<<<<<<<<<<<<<
 *                 arr_p[i] = _parse_us_from_doy_dict(cls, row)
 *                 i += 1
*/
    }
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "cytimes/pddt.py":1677
 *                 arr_p[i] = _parse_us_from_doy_dict(cls, row)
 *                 i += 1
 *             return cls._new(             # <<<<<<<<<<<<<<
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name
 *             )
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = __pyx_v_cls;
    __Pyx_INCREF(__pyx_t_8);

    /* "cytimes/pddt.py":1678
 *                 i += 1
 *             return cls._new(
 *                 arr.astype(utils.DT64_DTYPE_US), tz=tz, as_unit=as_unit, name=name             # <<<<<<<<<<<<<<
 *             )
 * 
*/
    __pyx_t_14 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_14);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1678, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_8, __pyx_t_4};
      __pyx_t_14 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1677, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_14, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1677, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_14, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1677, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_14, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 1677, __pyx_L1_error)
      __pyx_t_12 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_14);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1677, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
    }
    __pyx_r = __pyx_t_12;
    __pyx_t_12 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":1669
 * 
 *         # DataFrame
 *         if isinstance(doy, pd.DataFrame):             # <<<<<<<<<<<<<<
 *             size_i: cython.Py_ssize_t = len(doy)
 *             arr: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_INT64, 0)
*/
  }

  /* "cytimes/pddt.py":1685
 *             cls,
 *             "fromdayofyear(doy)",
 *             "Unsupported 'doy' data type %s." % type(doy),             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_12 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Unsupported_doy_data_type_s, ((PyObject *)Py_TYPE(__pyx_v_doy))); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);

  /* "cytimes/pddt.py":1682
 * 
 *         # Unsupported type
 *         errors.raise_type_error(             # <<<<<<<<<<<<<<
 *             cls,
 *             "fromdayofyear(doy)",
*/
  __pyx_t_16.__pyx_n = 3;
  __pyx_t_16.cls = __pyx_v_cls;
  __pyx_t_16.input_msg = __pyx_mstate_global->__pyx_kp_u_fromdayofyear_doy;
  __pyx_t_16.error_msg = ((PyObject*)__pyx_t_12);
  __pyx_f_7cytimes_6errors_raise_type_error(0, &__pyx_t_16); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1682, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "cytimes/pddt.py":1590
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdayofyear(
 *         cls,
*/

  /* function exit code */
  __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_8);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.fromdayofyear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":1688
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdate(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_37fromdate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_36fromdate, "Construct an index from instances of date `<'Pddt'>`.\n\n        :param date `<'date/Array-like'>`: The date-like object(s) to construct with.\n\n            - `<'datetime.date'>` An instance or subclass of `datetime.date`.\n            - `<'Array-like'>` An array-like object containing elements of date-like objects.\n\n        :param size `<'int/Any/None'>`: The target size of the index\n            (required when `date` is a date instance ). Defaults to `None`.\n\n            - `<'int'>` A positive integer number.\n            - `<'Any'>` Takes the `len(size)` value as the index size.\n            - `<'None'>` Ignored when `date` is an array-like object.\n\n        :param tz `<'tzinfo/str/None'>`: The optional timezone to `attach`. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :param as_unit `<'str/None'>`: Convert to specified datetime unit after construction. Defaults to `None`.\n            Supports: `'s'`, `'ms'`, `'us'`, `'ns'`.\n\n        :param name `<'Hashable/None'>`: Optional name of the index. Defaults to `None`.\n\n        :returns `<'Pddt'>`: The resulting datetime index.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_37fromdate = {"fromdate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_37fromdate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_36fromdate};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_37fromdate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_date = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_v_as_unit = 0;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fromdate (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_date,&__pyx_mstate_global->__pyx_n_u_size_2,&__pyx_mstate_global->__pyx_n_u_tz,&__pyx_mstate_global->__pyx_n_u_as_unit,&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1688, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1688, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1688, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1688, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1688, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1688, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1688, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fromdate", 0) < (0)) __PYX_ERR(0, 1688, __pyx_L3_error)

      /* "cytimes/pddt.py":1692
 *         cls,
 *         date: datetime.date | object,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1693
 *         date: datetime.date | object,
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1694
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":1695
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from instances of date `<'Pddt'>`.
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fromdate", 0, 2, 6, i); __PYX_ERR(0, 1688, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1688, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1688, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1688, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1688, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1688, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1688, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pddt.py":1692
 *         cls,
 *         date: datetime.date | object,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1693
 *         date: datetime.date | object,
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1694
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":1695
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from instances of date `<'Pddt'>`.
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_date = values[1];
    __pyx_v_size = values[2];
    __pyx_v_tz = values[3];
    __pyx_v_as_unit = ((PyObject*)values[4]);
    __pyx_v_name = values[5];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fromdate", 0, 2, 6, __pyx_nargs); __PYX_ERR(0, 1688, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.fromdate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_as_unit), (&PyUnicode_Type), 1, "as_unit", 2))) __PYX_ERR(0, 1694, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_36fromdate(__pyx_self, __pyx_v_cls, __pyx_v_date, __pyx_v_size, __pyx_v_tz, __pyx_v_as_unit, __pyx_v_name);

  /* "cytimes/pddt.py":1688
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdate(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_36fromdate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_date, PyObject *__pyx_v_size, PyObject *__pyx_v_tz, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name) {
  Py_ssize_t __pyx_v_size_i;
  PyObject *__pyx_v_err = NULL;
  CYTHON_UNUSED Py_ssize_t __pyx_8genexpr1__pyx_v__;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  size_t __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_t_14;
  char const *__pyx_t_15;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fromdate", 0);
  __Pyx_INCREF(__pyx_v_date);

  /* "cytimes/pddt.py":1725
 *         """
 *         # date
 *         if utils.is_date(date):             # <<<<<<<<<<<<<<
 *             if size is None:
 *                 errors.raise_argument_error(
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_is_date(__pyx_v_date); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1725, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":1726
 *         # date
 *         if utils.is_date(date):
 *             if size is None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    __pyx_t_1 = (__pyx_v_size == Py_None);
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":1727
 *         if utils.is_date(date):
 *             if size is None:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     cls,
 *                     "fromdate(size)",
*/
      __pyx_t_2.__pyx_n = 3;
      __pyx_t_2.cls = __pyx_v_cls;
      __pyx_t_2.input_msg = __pyx_mstate_global->__pyx_kp_u_fromdate_size;
      __pyx_t_2.error_msg = __pyx_mstate_global->__pyx_kp_u_When_date_is_a_date_instance_siz;
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1727, __pyx_L1_error)

      /* "cytimes/pddt.py":1726
 *         # date
 *         if utils.is_date(date):
 *             if size is None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    }

    /* "cytimes/pddt.py":1732
 *                     "When 'date' is a date instance, 'size' must be specified.",
 *                 )
 *             size_i = _parse_size(cls, size)             # <<<<<<<<<<<<<<
 *             date = [date for _ in range(size_i)]
 * 
*/
    __pyx_t_3 = __pyx_f_7cytimes_4pddt__parse_size(__pyx_v_cls, __pyx_v_size); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 1732, __pyx_L1_error)
    __pyx_v_size_i = __pyx_t_3;

    /* "cytimes/pddt.py":1733
 *                 )
 *             size_i = _parse_size(cls, size)
 *             date = [date for _ in range(size_i)]             # <<<<<<<<<<<<<<
 * 
 *         # Array-like
*/
    { /* enter inner scope */
      __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1733, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __pyx_v_size_i;
      __pyx_t_5 = __pyx_t_3;
      for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
        __pyx_8genexpr1__pyx_v__ = __pyx_t_6;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_v_date))) __PYX_ERR(0, 1733, __pyx_L1_error)
      }
    } /* exit inner scope */
    __Pyx_DECREF_SET(__pyx_v_date, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":1725
 *         """
 *         # date
 *         if utils.is_date(date):             # <<<<<<<<<<<<<<
 *             if size is None:
 *                 errors.raise_argument_error(
*/
  }

  /* "cytimes/pddt.py":1736
 * 
 *         # Array-like
 *         try:             # <<<<<<<<<<<<<<
 *             return cls._new(date, tz=tz, as_unit=as_unit, name=name)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    /*try:*/ {

      /* "cytimes/pddt.py":1737
 *         # Array-like
 *         try:
 *             return cls._new(date, tz=tz, as_unit=as_unit, name=name)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "fromdate(...)", None, err)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_10 = __pyx_v_cls;
      __Pyx_INCREF(__pyx_t_10);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_10, __pyx_v_date};
        __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1737, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_12, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1737, __pyx_L7_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_12, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1737, __pyx_L7_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_12, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 1737, __pyx_L7_error)
        __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1737, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L11_try_return;

      /* "cytimes/pddt.py":1736
 * 
 *         # Array-like
 *         try:             # <<<<<<<<<<<<<<
 *             return cls._new(date, tz=tz, as_unit=as_unit, name=name)
 *         except Exception as err:
*/
    }
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytimes/pddt.py":1738
 *         try:
 *             return cls._new(date, tz=tz, as_unit=as_unit, name=name)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "fromdate(...)", None, err)
 * 
*/
    __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_13) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.fromdate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_12, &__pyx_t_10) < 0) __PYX_ERR(0, 1738, __pyx_L9_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_12);
      __pyx_v_err = __pyx_t_12;
      /*try:*/ {

        /* "cytimes/pddt.py":1739
 *             return cls._new(date, tz=tz, as_unit=as_unit, name=name)
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "fromdate(...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
        __pyx_t_2.__pyx_n = 4;
        __pyx_t_2.cls = __pyx_v_cls;
        __pyx_t_2.input_msg = __pyx_mstate_global->__pyx_kp_u_fromdate;
        __pyx_t_2.error_msg = ((PyObject*)Py_None);
        __pyx_t_2.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1739, __pyx_L18_error)
      }

      /* "cytimes/pddt.py":1738
 *         try:
 *             return cls._new(date, tz=tz, as_unit=as_unit, name=name)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "fromdate(...)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L19;
        }
        __pyx_L18_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
          if ( unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __pyx_t_13 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
          __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
          __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
          goto __pyx_L9_except_error;
        }
        __pyx_L19:;
      }
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L8_exception_handled;
    }
    goto __pyx_L9_except_error;

    /* "cytimes/pddt.py":1736
 * 
 *         # Array-like
 *         try:             # <<<<<<<<<<<<<<
 *             return cls._new(date, tz=tz, as_unit=as_unit, name=name)
 *         except Exception as err:
*/
    __pyx_L9_except_error:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L1_error;
    __pyx_L11_try_return:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L0;
    __pyx_L8_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
  }

  /* "cytimes/pddt.py":1688
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdate(
 *         cls,
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.fromdate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_date);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":1741
 *             errors.raise_argument_error(cls, "fromdate(...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdatetime(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_39fromdatetime(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_38fromdatetime, "Construct an index from instances of datetime `<'Pddt'>`.\n\n        :param dt `<'Datetime-Like/Array-like'>`: The datetime-like object(s) to construct with.\n\n            - `<'datetime.datetime'>` An instance or subclass of `datetime.datetime`.\n            - `<'np.datetime64'>` An instance of `np.datetime64`.\n            - `<'Array-like'>` An array-like object containing elements of the datetime-like objects.\n\n        :param size `<'int/Any/None'>`: The target size of the index\n            (required when `dt` is a datetime-like object). Defaults to `None`.\n\n            - `<'int'>` A positive integer number.\n            - `<'Any'>` Takes the `len(size)` value as the index size.\n            - `<'None'>` Ignored when `dt` is an array-like object.\n\n        :param tz `<'tzinfo/str/None'>`: The optional timezone to `attach`. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :param as_unit `<'str/None'>`: Convert to specified datetime unit after construction. Defaults to `None`.\n            Supports: `'s'`, `'ms'`, `'us'`, `'ns'`.\n\n        :param name `<'Hashable/None'>`: Optional name of the index. Defaults to `None`.\n\n        :returns `<'Pddt'>`: The resulting datetime index.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_39fromdatetime = {"fromdatetime", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_39fromdatetime, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_38fromdatetime};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_39fromdatetime(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_dt = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_v_as_unit = 0;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fromdatetime (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_dt,&__pyx_mstate_global->__pyx_n_u_size_2,&__pyx_mstate_global->__pyx_n_u_tz,&__pyx_mstate_global->__pyx_n_u_as_unit,&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1741, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1741, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1741, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1741, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1741, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1741, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1741, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fromdatetime", 0) < (0)) __PYX_ERR(0, 1741, __pyx_L3_error)

      /* "cytimes/pddt.py":1745
 *         cls,
 *         dt: datetime.datetime | np.datetime64 | object,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1746
 *         dt: datetime.datetime | np.datetime64 | object,
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1747
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":1748
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from instances of datetime `<'Pddt'>`.
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fromdatetime", 0, 2, 6, i); __PYX_ERR(0, 1741, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1741, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1741, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1741, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1741, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1741, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1741, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pddt.py":1745
 *         cls,
 *         dt: datetime.datetime | np.datetime64 | object,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1746
 *         dt: datetime.datetime | np.datetime64 | object,
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1747
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":1748
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from instances of datetime `<'Pddt'>`.
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_dt = values[1];
    __pyx_v_size = values[2];
    __pyx_v_tz = values[3];
    __pyx_v_as_unit = ((PyObject*)values[4]);
    __pyx_v_name = values[5];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fromdatetime", 0, 2, 6, __pyx_nargs); __PYX_ERR(0, 1741, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.fromdatetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_as_unit), (&PyUnicode_Type), 1, "as_unit", 2))) __PYX_ERR(0, 1747, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_38fromdatetime(__pyx_self, __pyx_v_cls, __pyx_v_dt, __pyx_v_size, __pyx_v_tz, __pyx_v_as_unit, __pyx_v_name);

  /* "cytimes/pddt.py":1741
 *             errors.raise_argument_error(cls, "fromdate(...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdatetime(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_38fromdatetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_dt, PyObject *__pyx_v_size, PyObject *__pyx_v_tz, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name) {
  Py_ssize_t __pyx_v_size_i;
  PyObject *__pyx_v_err = NULL;
  CYTHON_UNUSED Py_ssize_t __pyx_8genexpr2__pyx_v__;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  size_t __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_t_15;
  char const *__pyx_t_16;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fromdatetime", 0);
  __Pyx_INCREF(__pyx_v_dt);

  /* "cytimes/pddt.py":1779
 *         """
 *         # datetime / datetime64 / str
 *         if isinstance(dt, (datetime.datetime, np.datetime64, str)):             # <<<<<<<<<<<<<<
 *             if size is None:
 *                 errors.raise_argument_error(
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_datetime64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime); 
  if (!__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = PyObject_IsInstance(__pyx_v_dt, __pyx_t_2); 
  if (!__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = PyUnicode_Check(__pyx_v_dt); 
  __pyx_t_3 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "cytimes/pddt.py":1780
 *         # datetime / datetime64 / str
 *         if isinstance(dt, (datetime.datetime, np.datetime64, str)):
 *             if size is None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    __pyx_t_3 = (__pyx_v_size == Py_None);
    if (__pyx_t_3) {

      /* "cytimes/pddt.py":1781
 *         if isinstance(dt, (datetime.datetime, np.datetime64, str)):
 *             if size is None:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     cls,
 *                     "fromdatetime(size)",
*/
      __pyx_t_5.__pyx_n = 3;
      __pyx_t_5.cls = __pyx_v_cls;
      __pyx_t_5.input_msg = __pyx_mstate_global->__pyx_kp_u_fromdatetime_size;
      __pyx_t_5.error_msg = __pyx_mstate_global->__pyx_kp_u_When_dt_is_a_datetime_like_insta;
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1781, __pyx_L1_error)

      /* "cytimes/pddt.py":1780
 *         # datetime / datetime64 / str
 *         if isinstance(dt, (datetime.datetime, np.datetime64, str)):
 *             if size is None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    }

    /* "cytimes/pddt.py":1786
 *                     "When 'dt' is a datetime-like instance, 'size' must be specified.",
 *                 )
 *             size_i = _parse_size(cls, size)             # <<<<<<<<<<<<<<
 *             dt = [dt for _ in range(size_i)]
 * 
*/
    __pyx_t_6 = __pyx_f_7cytimes_4pddt__parse_size(__pyx_v_cls, __pyx_v_size); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 1786, __pyx_L1_error)
    __pyx_v_size_i = __pyx_t_6;

    /* "cytimes/pddt.py":1787
 *                 )
 *             size_i = _parse_size(cls, size)
 *             dt = [dt for _ in range(size_i)]             # <<<<<<<<<<<<<<
 * 
 *         # Array-like
*/
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1787, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __pyx_v_size_i;
      __pyx_t_7 = __pyx_t_6;
      for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
        __pyx_8genexpr2__pyx_v__ = __pyx_t_8;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_v_dt))) __PYX_ERR(0, 1787, __pyx_L1_error)
      }
    } /* exit inner scope */
    __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":1779
 *         """
 *         # datetime / datetime64 / str
 *         if isinstance(dt, (datetime.datetime, np.datetime64, str)):             # <<<<<<<<<<<<<<
 *             if size is None:
 *                 errors.raise_argument_error(
*/
  }

  /* "cytimes/pddt.py":1790
 * 
 *         # Array-like
 *         try:             # <<<<<<<<<<<<<<
 *             return cls._new(dt, tz=tz, as_unit=as_unit, name=name)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_11);
    /*try:*/ {

      /* "cytimes/pddt.py":1791
 *         # Array-like
 *         try:
 *             return cls._new(dt, tz=tz, as_unit=as_unit, name=name)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "fromdatetime(...)", None, err)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_v_cls;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_12 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_1, __pyx_v_dt};
        __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1791, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_13);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_13, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1791, __pyx_L10_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_13, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1791, __pyx_L10_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_13, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 1791, __pyx_L10_error)
        __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1791, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L14_try_return;

      /* "cytimes/pddt.py":1790
 * 
 *         # Array-like
 *         try:             # <<<<<<<<<<<<<<
 *             return cls._new(dt, tz=tz, as_unit=as_unit, name=name)
 *         except Exception as err:
*/
    }
    __pyx_L10_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cytimes/pddt.py":1792
 *         try:
 *             return cls._new(dt, tz=tz, as_unit=as_unit, name=name)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "fromdatetime(...)", None, err)
 * 
*/
    __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_14) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.fromdatetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_13, &__pyx_t_1) < 0) __PYX_ERR(0, 1792, __pyx_L12_except_error)
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_13);
      __pyx_v_err = __pyx_t_13;
      /*try:*/ {

        /* "cytimes/pddt.py":1793
 *             return cls._new(dt, tz=tz, as_unit=as_unit, name=name)
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "fromdatetime(...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
        __pyx_t_5.__pyx_n = 4;
        __pyx_t_5.cls = __pyx_v_cls;
        __pyx_t_5.input_msg = __pyx_mstate_global->__pyx_kp_u_fromdatetime;
        __pyx_t_5.error_msg = ((PyObject*)Py_None);
        __pyx_t_5.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1793, __pyx_L21_error)
      }

      /* "cytimes/pddt.py":1792
 *         try:
 *             return cls._new(dt, tz=tz, as_unit=as_unit, name=name)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "fromdatetime(...)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L22;
        }
        __pyx_L21_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __pyx_t_14 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
          goto __pyx_L12_except_error;
        }
        __pyx_L22:;
      }
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L11_exception_handled;
    }
    goto __pyx_L12_except_error;

    /* "cytimes/pddt.py":1790
 * 
 *         # Array-like
 *         try:             # <<<<<<<<<<<<<<
 *             return cls._new(dt, tz=tz, as_unit=as_unit, name=name)
 *         except Exception as err:
*/
    __pyx_L12_except_error:;
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
    goto __pyx_L1_error;
    __pyx_L14_try_return:;
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
    goto __pyx_L0;
    __pyx_L11_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  }

  /* "cytimes/pddt.py":1741
 *             errors.raise_argument_error(cls, "fromdate(...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdatetime(
 *         cls,
*/

  /* function exit code */
  __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_13);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.fromdatetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":1795
 *             errors.raise_argument_error(cls, "fromdatetime(...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdatetime64(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_41fromdatetime64(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_40fromdatetime64, "Construct an index from instances of datetime `<'Pddt'>`.\n\n        - Alias of `fromdatetime()`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_41fromdatetime64 = {"fromdatetime64", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_41fromdatetime64, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_40fromdatetime64};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_41fromdatetime64(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_dt64 = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_v_as_unit = 0;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fromdatetime64 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_dt64,&__pyx_mstate_global->__pyx_n_u_size_2,&__pyx_mstate_global->__pyx_n_u_tz,&__pyx_mstate_global->__pyx_n_u_as_unit,&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1795, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1795, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1795, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1795, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1795, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1795, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1795, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fromdatetime64", 0) < (0)) __PYX_ERR(0, 1795, __pyx_L3_error)

      /* "cytimes/pddt.py":1799
 *         cls,
 *         dt64: datetime.datetime | np.datetime64 | object,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1800
 *         dt64: datetime.datetime | np.datetime64 | object,
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1801
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":1802
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from instances of datetime `<'Pddt'>`.
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fromdatetime64", 0, 2, 6, i); __PYX_ERR(0, 1795, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1795, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1795, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1795, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1795, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1795, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1795, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pddt.py":1799
 *         cls,
 *         dt64: datetime.datetime | np.datetime64 | object,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1800
 *         dt64: datetime.datetime | np.datetime64 | object,
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1801
 *         size: int | Any | None = None,
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":1802
 *         tz: datetime.tzinfo | str | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from instances of datetime `<'Pddt'>`.
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_dt64 = values[1];
    __pyx_v_size = values[2];
    __pyx_v_tz = values[3];
    __pyx_v_as_unit = ((PyObject*)values[4]);
    __pyx_v_name = values[5];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fromdatetime64", 0, 2, 6, __pyx_nargs); __PYX_ERR(0, 1795, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.fromdatetime64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_as_unit), (&PyUnicode_Type), 1, "as_unit", 2))) __PYX_ERR(0, 1801, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_40fromdatetime64(__pyx_self, __pyx_v_cls, __pyx_v_dt64, __pyx_v_size, __pyx_v_tz, __pyx_v_as_unit, __pyx_v_name);

  /* "cytimes/pddt.py":1795
 *             errors.raise_argument_error(cls, "fromdatetime(...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdatetime64(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_40fromdatetime64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_dt64, PyObject *__pyx_v_size, PyObject *__pyx_v_tz, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fromdatetime64", 0);

  /* "cytimes/pddt.py":1808
 *         - Alias of `fromdatetime()`.
 *         """
 *         return cls.fromdatetime(dt64, size=size, tz=tz, as_unit=as_unit, name=name)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_cls;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 4 : 0)] = {__pyx_t_2, __pyx_v_dt64};
    __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_size_2, __pyx_v_size, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1808, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_v_tz, __pyx_t_4, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1808, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_4, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 1808, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_4, __pyx_callargs+2, 3) < (0)) __PYX_ERR(0, 1808, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_fromdatetime_2, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":1795
 *             errors.raise_argument_error(cls, "fromdatetime(...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdatetime64(
 *         cls,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.fromdatetime64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":1810
 *         return cls.fromdatetime(dt64, size=size, tz=tz, as_unit=as_unit, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def strptime(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_43strptime(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_42strptime, "Construct an index from parsing datetime-strings `<'Pddt'>`.\n\n        :param dtstr `<'str/Array-like'>`: The datetime string(s) to construct with.\n\n            - `<'str'>` A datetime string.\n            - `<'Array-like'>` An array-like object containing elements of the datetime strings.\n\n        :param format `<'str'>`: The format used to parse the strings.\n\n        :param size `<'int/Any/None'>`: The target size of the index\n            (required when `dtstr` is a literal string ). Defaults to `None`.\n\n            - `<'int'>` A positive integer number.\n            - `<'Any'>` Takes the `len(size)` value as the index size.\n            - `<'None'>` Ignored when `dtstr` is an array-like object.\n\n        :param as_unit `<'str/None'>`: Convert to specified datetime unit after construction. Defaults to `None`.\n            Supports: `'s'`, `'ms'`, `'us'`, `'ns'`.\n\n        :param name `<'Hashable/None'>`: Optional name of the index. Defaults to `None`.\n\n        :returns `<'Pddt'>`: The resulting datetime index.\n\n        ## Notice\n        - This method only construct `datetime64[us]` index (microsecond resolution).\n        - Parameter `as_unit` converts it to other datetime units after construction.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_43strptime = {"strptime", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_43strptime, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_42strptime};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_43strptime(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_dtstr = 0;
  PyObject *__pyx_v_fmt = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_as_unit = 0;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("strptime (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_dtstr,&__pyx_mstate_global->__pyx_n_u_fmt,&__pyx_mstate_global->__pyx_n_u_size_2,&__pyx_mstate_global->__pyx_n_u_as_unit,&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1810, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1810, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1810, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1810, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1810, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1810, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1810, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "strptime", 0) < (0)) __PYX_ERR(0, 1810, __pyx_L3_error)

      /* "cytimes/pddt.py":1815
 *         dtstr: str | object,
 *         fmt: str,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1816
 *         fmt: str,
 *         size: int | Any | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":1817
 *         size: int | Any | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from parsing datetime-strings `<'Pddt'>`.
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("strptime", 0, 3, 6, i); __PYX_ERR(0, 1810, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1810, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1810, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1810, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1810, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1810, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1810, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pddt.py":1815
 *         dtstr: str | object,
 *         fmt: str,
 *         size: int | Any | None = None,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         name: Hashable | None = None,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pddt.py":1816
 *         fmt: str,
 *         size: int | Any | None = None,
 *         as_unit: str = None,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pddt.py":1817
 *         size: int | Any | None = None,
 *         as_unit: str = None,
 *         name: Hashable | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct an index from parsing datetime-strings `<'Pddt'>`.
*/
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_dtstr = values[1];
    __pyx_v_fmt = ((PyObject*)values[2]);
    __pyx_v_size = values[3];
    __pyx_v_as_unit = ((PyObject*)values[4]);
    __pyx_v_name = values[5];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("strptime", 0, 3, 6, __pyx_nargs); __PYX_ERR(0, 1810, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.strptime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fmt), (&PyUnicode_Type), 0, "fmt", 2))) __PYX_ERR(0, 1814, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_as_unit), (&PyUnicode_Type), 1, "as_unit", 2))) __PYX_ERR(0, 1816, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_42strptime(__pyx_self, __pyx_v_cls, __pyx_v_dtstr, __pyx_v_fmt, __pyx_v_size, __pyx_v_as_unit, __pyx_v_name);

  /* "cytimes/pddt.py":1810
 *         return cls.fromdatetime(dt64, size=size, tz=tz, as_unit=as_unit, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def strptime(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_42strptime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_dtstr, PyObject *__pyx_v_fmt, PyObject *__pyx_v_size, PyObject *__pyx_v_as_unit, PyObject *__pyx_v_name) {
  Py_ssize_t __pyx_v_size_i;
  PyObject *__pyx_v_dt = NULL;
  PyObject *__pyx_v_err = NULL;
  PyObject *__pyx_v_dts = 0;
  PyObject *__pyx_v_o = NULL;
  CYTHON_UNUSED Py_ssize_t __pyx_8genexpr3__pyx_v__;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_2;
  Py_ssize_t __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;
  size_t __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  char const *__pyx_t_13;
  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;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_t_23;
  PyObject *(*__pyx_t_24)(PyObject *);
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  PyObject *__pyx_t_28[5];
  char const *__pyx_t_29;
  int __pyx_t_30;
  struct __pyx_opt_args_7cytimes_6errors_raise_type_error __pyx_t_31;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("strptime", 0);

  /* "cytimes/pddt.py":1847
 *         """
 *         # String
 *         if isinstance(dtstr, str):             # <<<<<<<<<<<<<<
 *             if size is None:
 *                 errors.raise_argument_error(
*/
  __pyx_t_1 = PyUnicode_Check(__pyx_v_dtstr); 
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":1848
 *         # String
 *         if isinstance(dtstr, str):
 *             if size is None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    __pyx_t_1 = (__pyx_v_size == Py_None);
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":1849
 *         if isinstance(dtstr, str):
 *             if size is None:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     cls,
 *                     "strptime(dtstr)",
*/
      __pyx_t_2.__pyx_n = 3;
      __pyx_t_2.cls = __pyx_v_cls;
      __pyx_t_2.input_msg = __pyx_mstate_global->__pyx_kp_u_strptime_dtstr;
      __pyx_t_2.error_msg = __pyx_mstate_global->__pyx_kp_u_When_dtstr_is_a_literal_string_s;
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1849, __pyx_L1_error)

      /* "cytimes/pddt.py":1848
 *         # String
 *         if isinstance(dtstr, str):
 *             if size is None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     cls,
*/
    }

    /* "cytimes/pddt.py":1854
 *                     "When 'dtstr' is a literal string, 'size' must be specified.",
 *                 )
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)             # <<<<<<<<<<<<<<
 *             try:
 *                 dt = datetime.datetime.strptime(dtstr, fmt)
*/
    __pyx_t_3 = __pyx_f_7cytimes_4pddt__parse_size(__pyx_v_cls, __pyx_v_size); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 1854, __pyx_L1_error)
    __pyx_v_size_i = __pyx_t_3;

    /* "cytimes/pddt.py":1855
 *                 )
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)
 *             try:             # <<<<<<<<<<<<<<
 *                 dt = datetime.datetime.strptime(dtstr, fmt)
 *             except Exception as err:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __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:*/ {

        /* "cytimes/pddt.py":1856
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)
 *             try:
 *                 dt = datetime.datetime.strptime(dtstr, fmt)             # <<<<<<<<<<<<<<
 *             except Exception as err:
 *                 errors.raise_argument_error(cls, "strptime(dtstr, fmt)", None, err)
*/
        __pyx_t_8 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime);
        __Pyx_INCREF(__pyx_t_8);
        __pyx_t_9 = 0;
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_dtstr, __pyx_v_fmt};
          __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_strptime, __pyx_callargs+__pyx_t_9, (3-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1856, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_7);
        }
        __pyx_v_dt = __pyx_t_7;
        __pyx_t_7 = 0;

        /* "cytimes/pddt.py":1855
 *                 )
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)
 *             try:             # <<<<<<<<<<<<<<
 *                 dt = datetime.datetime.strptime(dtstr, fmt)
 *             except Exception as err:
*/
      }
      __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_L10_try_end;
      __pyx_L5_error:;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "cytimes/pddt.py":1857
 *             try:
 *                 dt = datetime.datetime.strptime(dtstr, fmt)
 *             except Exception as err:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(cls, "strptime(dtstr, fmt)", None, err)
 *                 return  # unreachable: suppress compiler warning
*/
      __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_10) {
        __Pyx_AddTraceback("cytimes.pddt.Pddt.strptime", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_11) < 0) __PYX_ERR(0, 1857, __pyx_L7_except_error)
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_8);
        __pyx_v_err = __pyx_t_8;
        /*try:*/ {

          /* "cytimes/pddt.py":1858
 *                 dt = datetime.datetime.strptime(dtstr, fmt)
 *             except Exception as err:
 *                 errors.raise_argument_error(cls, "strptime(dtstr, fmt)", None, err)             # <<<<<<<<<<<<<<
 *                 return  # unreachable: suppress compiler warning
 *             return cls._new([dt for _ in range(size_i)], as_unit=as_unit, name=name)
*/
          __pyx_t_2.__pyx_n = 4;
          __pyx_t_2.cls = __pyx_v_cls;
          __pyx_t_2.input_msg = __pyx_mstate_global->__pyx_kp_u_strptime_dtstr_fmt;
          __pyx_t_2.error_msg = ((PyObject*)Py_None);
          __pyx_t_2.tb_exc = __pyx_v_err;
          __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1858, __pyx_L16_error)

          /* "cytimes/pddt.py":1859
 *             except Exception as err:
 *                 errors.raise_argument_error(cls, "strptime(dtstr, fmt)", None, err)
 *                 return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *             return cls._new([dt for _ in range(size_i)], as_unit=as_unit, name=name)
 * 
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          goto __pyx_L15_return;
        }

        /* "cytimes/pddt.py":1857
 *             try:
 *                 dt = datetime.datetime.strptime(dtstr, fmt)
 *             except Exception as err:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(cls, "strptime(dtstr, fmt)", None, err)
 *                 return  # unreachable: suppress compiler warning
*/
        /*finally:*/ {
          __pyx_L16_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
            if ( unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
            __Pyx_XGOTREF(__pyx_t_14);
            __Pyx_XGOTREF(__pyx_t_15);
            __Pyx_XGOTREF(__pyx_t_16);
            __Pyx_XGOTREF(__pyx_t_17);
            __Pyx_XGOTREF(__pyx_t_18);
            __Pyx_XGOTREF(__pyx_t_19);
            __pyx_t_10 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            }
            __Pyx_XGIVEREF(__pyx_t_17);
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_14);
            __Pyx_XGIVEREF(__pyx_t_15);
            __Pyx_XGIVEREF(__pyx_t_16);
            __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
            __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
            __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
            goto __pyx_L7_except_error;
          }
          __pyx_L15_return: {
            __pyx_t_19 = __pyx_r;
            __pyx_r = 0;
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            __pyx_r = __pyx_t_19;
            __pyx_t_19 = 0;
            goto __pyx_L8_except_return;
          }
        }
      }
      goto __pyx_L7_except_error;

      /* "cytimes/pddt.py":1855
 *                 )
 *             size_i: cython.Py_ssize_t = _parse_size(cls, size)
 *             try:             # <<<<<<<<<<<<<<
 *                 dt = datetime.datetime.strptime(dtstr, fmt)
 *             except Exception as err:
*/
      __pyx_L7_except_error:;
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
      goto __pyx_L1_error;
      __pyx_L8_except_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_L10_try_end:;
    }

    /* "cytimes/pddt.py":1860
 *                 errors.raise_argument_error(cls, "strptime(dtstr, fmt)", None, err)
 *                 return  # unreachable: suppress compiler warning
 *             return cls._new([dt for _ in range(size_i)], as_unit=as_unit, name=name)             # <<<<<<<<<<<<<<
 * 
 *         # Array-like
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = __pyx_v_cls;
    __Pyx_INCREF(__pyx_t_8);
    { /* enter inner scope */
      __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1860, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = __pyx_v_size_i;
      __pyx_t_20 = __pyx_t_3;
      for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) {
        __pyx_8genexpr3__pyx_v__ = __pyx_t_21;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_v_dt))) __PYX_ERR(0, 1860, __pyx_L1_error)
      }
    } /* exit inner scope */
    __pyx_t_9 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_8, __pyx_t_7};
      __pyx_t_22 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1860, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_22);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_22, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1860, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_22, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1860, __pyx_L1_error)
      __pyx_t_11 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_22);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1860, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
    }
    __pyx_r = __pyx_t_11;
    __pyx_t_11 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":1847
 *         """
 *         # String
 *         if isinstance(dtstr, str):             # <<<<<<<<<<<<<<
 *             if size is None:
 *                 errors.raise_argument_error(
*/
  }

  /* "cytimes/pddt.py":1863
 * 
 *         # Array-like
 *         if isinstance(dtstr, (list, tuple, pd.Index, pd.Series, np.ndarray)):             # <<<<<<<<<<<<<<
 *             dts: list = []
 *             for o in dtstr:
*/
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_Series); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_23 = PyList_Check(__pyx_v_dtstr); 
  if (!__pyx_t_23) {
  } else {
    __pyx_t_1 = __pyx_t_23;
    goto __pyx_L25_bool_binop_done;
  }
  __pyx_t_23 = PyTuple_Check(__pyx_v_dtstr); 
  if (!__pyx_t_23) {
  } else {
    __pyx_t_1 = __pyx_t_23;
    goto __pyx_L25_bool_binop_done;
  }
  __pyx_t_23 = PyObject_IsInstance(__pyx_v_dtstr, __pyx_t_22); 
  if (!__pyx_t_23) {
  } else {
    __pyx_t_1 = __pyx_t_23;
    goto __pyx_L25_bool_binop_done;
  }
  __pyx_t_23 = PyObject_IsInstance(__pyx_v_dtstr, __pyx_t_7); 
  if (!__pyx_t_23) {
  } else {
    __pyx_t_1 = __pyx_t_23;
    goto __pyx_L25_bool_binop_done;
  }
  __pyx_t_23 = __Pyx_TypeCheck(__pyx_v_dtstr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray); 
  __pyx_t_1 = __pyx_t_23;
  __pyx_L25_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":1864
 *         # Array-like
 *         if isinstance(dtstr, (list, tuple, pd.Index, pd.Series, np.ndarray)):
 *             dts: list = []             # <<<<<<<<<<<<<<
 *             for o in dtstr:
 *                 try:
*/
    __pyx_t_22 = PyList_New(0); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1864, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_22);
    __pyx_v_dts = ((PyObject*)__pyx_t_22);
    __pyx_t_22 = 0;

    /* "cytimes/pddt.py":1865
 *         if isinstance(dtstr, (list, tuple, pd.Index, pd.Series, np.ndarray)):
 *             dts: list = []
 *             for o in dtstr:             # <<<<<<<<<<<<<<
 *                 try:
 *                     dt = datetime.datetime.strptime(o, fmt)
*/
    if (likely(PyList_CheckExact(__pyx_v_dtstr)) || PyTuple_CheckExact(__pyx_v_dtstr)) {
      __pyx_t_22 = __pyx_v_dtstr; __Pyx_INCREF(__pyx_t_22);
      __pyx_t_3 = 0;
      __pyx_t_24 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_22 = PyObject_GetIter(__pyx_v_dtstr); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1865, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_22);
      __pyx_t_24 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_22); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1865, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_24)) {
        if (likely(PyList_CheckExact(__pyx_t_22))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_22);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1865, __pyx_L1_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          __pyx_t_7 = __Pyx_PyList_GetItemRefFast(__pyx_t_22, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_3;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_22);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1865, __pyx_L1_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_22, __pyx_t_3));
          #else
          __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_22, __pyx_t_3);
          #endif
          ++__pyx_t_3;
        }
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1865, __pyx_L1_error)
      } else {
        __pyx_t_7 = __pyx_t_24(__pyx_t_22);
        if (unlikely(!__pyx_t_7)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1865, __pyx_L1_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_XDECREF_SET(__pyx_v_o, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "cytimes/pddt.py":1866
 *             dts: list = []
 *             for o in dtstr:
 *                 try:             # <<<<<<<<<<<<<<
 *                     dt = datetime.datetime.strptime(o, fmt)
 *                 except Exception as err:
*/
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_5);
        __Pyx_XGOTREF(__pyx_t_4);
        /*try:*/ {

          /* "cytimes/pddt.py":1867
 *             for o in dtstr:
 *                 try:
 *                     dt = datetime.datetime.strptime(o, fmt)             # <<<<<<<<<<<<<<
 *                 except Exception as err:
 *                     errors.raise_argument_error(
*/
          __pyx_t_11 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime);
          __Pyx_INCREF(__pyx_t_11);
          __pyx_t_9 = 0;
          {
            PyObject *__pyx_callargs[3] = {__pyx_t_11, __pyx_v_o, __pyx_v_fmt};
            __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_strptime, __pyx_callargs+__pyx_t_9, (3-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1867, __pyx_L32_error)
            __Pyx_GOTREF(__pyx_t_7);
          }
          __Pyx_XDECREF_SET(__pyx_v_dt, __pyx_t_7);
          __pyx_t_7 = 0;

          /* "cytimes/pddt.py":1866
 *             dts: list = []
 *             for o in dtstr:
 *                 try:             # <<<<<<<<<<<<<<
 *                     dt = datetime.datetime.strptime(o, fmt)
 *                 except Exception as err:
*/
        }
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L39_try_end;
        __pyx_L32_error:;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "cytimes/pddt.py":1868
 *                 try:
 *                     dt = datetime.datetime.strptime(o, fmt)
 *                 except Exception as err:             # <<<<<<<<<<<<<<
 *                     errors.raise_argument_error(
 *                         cls,
*/
        __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
        if (__pyx_t_12) {
          __Pyx_AddTraceback("cytimes.pddt.Pddt.strptime", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_11, &__pyx_t_8) < 0) __PYX_ERR(0, 1868, __pyx_L34_except_error)
          __Pyx_XGOTREF(__pyx_t_7);
          __Pyx_XGOTREF(__pyx_t_11);
          __Pyx_XGOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_11);
          __pyx_v_err = __pyx_t_11;
          /*try:*/ {

            /* "cytimes/pddt.py":1873
 *                         "strptime(dtstr, fmt)",
 *                         "Connot parse element '%s' from %s."
 *                         % (o, type(dtstr).__name__),             # <<<<<<<<<<<<<<
 *                         err,
 *                     )
*/
            __pyx_t_25 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_o), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1873, __pyx_L45_error)
            __Pyx_GOTREF(__pyx_t_25);
            __pyx_t_26 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_dtstr)), __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1873, __pyx_L45_error)
            __Pyx_GOTREF(__pyx_t_26);
            __pyx_t_27 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_26), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1873, __pyx_L45_error)
            __Pyx_GOTREF(__pyx_t_27);
            __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
            __pyx_t_28[0] = __pyx_mstate_global->__pyx_kp_u_Connot_parse_element;
            __pyx_t_28[1] = __pyx_t_25;
            __pyx_t_28[2] = __pyx_mstate_global->__pyx_kp_u_from_3;
            __pyx_t_28[3] = __pyx_t_27;
            __pyx_t_28[4] = __pyx_mstate_global->__pyx_kp_u__2;

            /* "cytimes/pddt.py":1872
 *                         cls,
 *                         "strptime(dtstr, fmt)",
 *                         "Connot parse element '%s' from %s."             # <<<<<<<<<<<<<<
 *                         % (o, type(dtstr).__name__),
 *                         err,
*/
            __pyx_t_26 = __Pyx_PyUnicode_Join(__pyx_t_28, 5, 22 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_25) + 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_27) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_25) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_27));
            if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1872, __pyx_L45_error)
            __Pyx_GOTREF(__pyx_t_26);
            __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
            __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;

            /* "cytimes/pddt.py":1869
 *                     dt = datetime.datetime.strptime(o, fmt)
 *                 except Exception as err:
 *                     errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                         cls,
 *                         "strptime(dtstr, fmt)",
*/
            __pyx_t_2.__pyx_n = 4;
            __pyx_t_2.cls = __pyx_v_cls;
            __pyx_t_2.input_msg = __pyx_mstate_global->__pyx_kp_u_strptime_dtstr_fmt;
            __pyx_t_2.error_msg = ((PyObject*)__pyx_t_26);
            __pyx_t_2.tb_exc = __pyx_v_err;
            __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1869, __pyx_L45_error)
            __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;

            /* "cytimes/pddt.py":1876
 *                         err,
 *                     )
 *                     return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *                 dts.append(dt)
 *             return cls._new(dts, as_unit=as_unit, name=name)
*/
            __Pyx_XDECREF(__pyx_r);
            __pyx_r = Py_None; __Pyx_INCREF(Py_None);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
            goto __pyx_L44_return;
          }

          /* "cytimes/pddt.py":1868
 *                 try:
 *                     dt = datetime.datetime.strptime(o, fmt)
 *                 except Exception as err:             # <<<<<<<<<<<<<<
 *                     errors.raise_argument_error(
 *                         cls,
*/
          /*finally:*/ {
            __pyx_L45_error:;
            /*exception exit:*/{
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0;
              __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
              __Pyx_XDECREF(__pyx_t_26); __pyx_t_26 = 0;
              __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
               __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14);
              if ( unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_18, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_18, &__pyx_t_17);
              __Pyx_XGOTREF(__pyx_t_19);
              __Pyx_XGOTREF(__pyx_t_18);
              __Pyx_XGOTREF(__pyx_t_17);
              __Pyx_XGOTREF(__pyx_t_16);
              __Pyx_XGOTREF(__pyx_t_15);
              __Pyx_XGOTREF(__pyx_t_14);
              __pyx_t_12 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_29 = __pyx_filename;
              {
                __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
              }
              __Pyx_XGIVEREF(__pyx_t_16);
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_XGIVEREF(__pyx_t_14);
              __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_15, __pyx_t_14);
              __Pyx_XGIVEREF(__pyx_t_19);
              __Pyx_XGIVEREF(__pyx_t_18);
              __Pyx_XGIVEREF(__pyx_t_17);
              __Pyx_ErrRestore(__pyx_t_19, __pyx_t_18, __pyx_t_17);
              __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0;
              __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_29;
              goto __pyx_L34_except_error;
            }
            __pyx_L44_return: {
              __pyx_t_14 = __pyx_r;
              __pyx_r = 0;
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
              __pyx_r = __pyx_t_14;
              __pyx_t_14 = 0;
              goto __pyx_L35_except_return;
            }
          }
        }
        goto __pyx_L34_except_error;

        /* "cytimes/pddt.py":1866
 *             dts: list = []
 *             for o in dtstr:
 *                 try:             # <<<<<<<<<<<<<<
 *                     dt = datetime.datetime.strptime(o, fmt)
 *                 except Exception as err:
*/
        __pyx_L34_except_error:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_5);
        __Pyx_XGIVEREF(__pyx_t_4);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4);
        goto __pyx_L1_error;
        __pyx_L35_except_return:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_5);
        __Pyx_XGIVEREF(__pyx_t_4);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4);
        goto __pyx_L0;
        __pyx_L39_try_end:;
      }

      /* "cytimes/pddt.py":1877
 *                     )
 *                     return  # unreachable: suppress compiler warning
 *                 dts.append(dt)             # <<<<<<<<<<<<<<
 *             return cls._new(dts, as_unit=as_unit, name=name)
 * 
*/
      __pyx_t_30 = __Pyx_PyList_Append(__pyx_v_dts, __pyx_v_dt); if (unlikely(__pyx_t_30 == ((int)-1))) __PYX_ERR(0, 1877, __pyx_L1_error)

      /* "cytimes/pddt.py":1865
 *         if isinstance(dtstr, (list, tuple, pd.Index, pd.Series, np.ndarray)):
 *             dts: list = []
 *             for o in dtstr:             # <<<<<<<<<<<<<<
 *                 try:
 *                     dt = datetime.datetime.strptime(o, fmt)
*/
    }
    __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

    /* "cytimes/pddt.py":1878
 *                     return  # unreachable: suppress compiler warning
 *                 dts.append(dt)
 *             return cls._new(dts, as_unit=as_unit, name=name)             # <<<<<<<<<<<<<<
 * 
 *         # Unsupported type
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = __pyx_v_cls;
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_9 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_8, __pyx_v_dts};
      __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1878, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_v_as_unit, __pyx_t_11, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1878, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_v_name, __pyx_t_11, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1878, __pyx_L1_error)
      __pyx_t_22 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1878, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_22);
    }
    __pyx_r = __pyx_t_22;
    __pyx_t_22 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":1863
 * 
 *         # Array-like
 *         if isinstance(dtstr, (list, tuple, pd.Index, pd.Series, np.ndarray)):             # <<<<<<<<<<<<<<
 *             dts: list = []
 *             for o in dtstr:
*/
  }

  /* "cytimes/pddt.py":1884
 *             cls,
 *             "strptime(dtstr)",
 *             "Unsupported 'dtstr' data type %s." % type(dtstr),             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_22 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Unsupported_dtstr_data_type_s, ((PyObject *)Py_TYPE(__pyx_v_dtstr))); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);

  /* "cytimes/pddt.py":1881
 * 
 *         # Unsupported type
 *         errors.raise_type_error(             # <<<<<<<<<<<<<<
 *             cls,
 *             "strptime(dtstr)",
*/
  __pyx_t_31.__pyx_n = 3;
  __pyx_t_31.cls = __pyx_v_cls;
  __pyx_t_31.input_msg = __pyx_mstate_global->__pyx_kp_u_strptime_dtstr;
  __pyx_t_31.error_msg = ((PyObject*)__pyx_t_22);
  __pyx_f_7cytimes_6errors_raise_type_error(0, &__pyx_t_31); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1881, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "cytimes/pddt.py":1810
 *         return cls.fromdatetime(dt64, size=size, tz=tz, as_unit=as_unit, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def strptime(
 *         cls,
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_XDECREF(__pyx_t_26);
  __Pyx_XDECREF(__pyx_t_27);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.strptime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_dts);
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":1888
 * 
 *     # Convertor ----------------------------------------------------------------------------
 *     def ctime(self) -> pd.Index[str]:             # <<<<<<<<<<<<<<
 *         """Return ctime-stype string index `<'Index[str]'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_45ctime(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_44ctime, "Return ctime-stype string index `<'Index[str]'>`.\n\n        - ctime-stype: 'Tue Oct 1 08:19:05 2024'\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_45ctime = {"ctime", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_45ctime, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_44ctime};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_45ctime(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ctime (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1888, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1888, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "ctime", 0) < (0)) __PYX_ERR(0, 1888, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("ctime", 1, 1, 1, i); __PYX_ERR(0, 1888, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1888, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ctime", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1888, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.ctime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_44ctime(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_44ctime(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;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ctime", 0);

  /* "cytimes/pddt.py":1893
 *         - ctime-stype: 'Tue Oct 1 08:19:05 2024'
 *         """
 *         return self.strftime("%a %b %d %H:%M:%S %Y")             # <<<<<<<<<<<<<<
 * 
 *     def strftime(self, fmt: str) -> pd.Index[str]:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_a_b_d_H_M_S_Y};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_strftime, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1893, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":1888
 * 
 *     # Convertor ----------------------------------------------------------------------------
 *     def ctime(self) -> pd.Index[str]:             # <<<<<<<<<<<<<<
 *         """Return ctime-stype string index `<'Index[str]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.ctime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":1895
 *         return self.strftime("%a %b %d %H:%M:%S %Y")
 * 
 *     def strftime(self, fmt: str) -> pd.Index[str]:             # <<<<<<<<<<<<<<
 *         """Format to index of strings according to the given format `<'str'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_47strftime(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_46strftime, "Format to index of strings according to the given format `<'str'>`.\n\n        :param fmt `<'str'>`: The format, e.g.: `'%d/%m/%Y, %H:%M:%S'`.\n        :returns `<'Index[str]'>`: The formatted index of strings.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_47strftime = {"strftime", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_47strftime, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_46strftime};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_47strftime(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_fmt = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("strftime (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_fmt,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1895, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1895, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1895, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "strftime", 0) < (0)) __PYX_ERR(0, 1895, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("strftime", 1, 2, 2, i); __PYX_ERR(0, 1895, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1895, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1895, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_fmt = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("strftime", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1895, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.strftime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fmt), (&PyUnicode_Type), 0, "fmt", 2))) __PYX_ERR(0, 1895, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_46strftime(__pyx_self, __pyx_v_self, __pyx_v_fmt);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_46strftime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fmt) {
  PyObject *__pyx_v_err = 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;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_t_9;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_10;
  int __pyx_t_11;
  char const *__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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("strftime", 0);

  /* "cytimes/pddt.py":1901
 *         :returns `<'Index[str]'>`: The formatted index of strings.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return DatetimeIndex.strftime(self, fmt)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "cytimes/pddt.py":1902
 *         """
 *         try:
 *             return DatetimeIndex.strftime(self, fmt)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "strftime(fmt)", None, err)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DatetimeIndex); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1902, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_strftime); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1902, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_8 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
        __pyx_t_8 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_self, __pyx_v_fmt};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1902, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "cytimes/pddt.py":1901
 *         :returns `<'Index[str]'>`: The formatted index of strings.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return DatetimeIndex.strftime(self, fmt)
 *         except Exception as err:
*/
    }
    __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;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "cytimes/pddt.py":1903
 *         try:
 *             return DatetimeIndex.strftime(self, fmt)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self.__class__, "strftime(fmt)", None, err)
 * 
*/
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_9) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.strftime", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_5) < 0) __PYX_ERR(0, 1903, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_v_err = __pyx_t_7;
      /*try:*/ {

        /* "cytimes/pddt.py":1904
 *             return DatetimeIndex.strftime(self, fmt)
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "strftime(fmt)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     def isoformat(self, sep: str = "T") -> pd.Index[str]:
*/
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1904, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_10.__pyx_n = 4;
        __pyx_t_10.cls = __pyx_t_6;
        __pyx_t_10.input_msg = __pyx_mstate_global->__pyx_kp_u_strftime_fmt;
        __pyx_t_10.error_msg = ((PyObject*)Py_None);
        __pyx_t_10.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1904, __pyx_L14_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }

      /* "cytimes/pddt.py":1903
 *         try:
 *             return DatetimeIndex.strftime(self, fmt)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self.__class__, "strftime(fmt)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L15;
        }
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
          if ( unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __pyx_t_9 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
          __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
          goto __pyx_L5_except_error;
        }
        __pyx_L15:;
      }
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pddt.py":1901
 *         :returns `<'Index[str]'>`: The formatted index of strings.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return DatetimeIndex.strftime(self, fmt)
 *         except Exception as err:
*/
    __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_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_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);
  }

  /* "cytimes/pddt.py":1895
 *         return self.strftime("%a %b %d %H:%M:%S %Y")
 * 
 *     def strftime(self, fmt: str) -> pd.Index[str]:             # <<<<<<<<<<<<<<
 *         """Format to index of strings according to the given format `<'str'>`.
 * 
*/

  /* function exit code */
  __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("cytimes.pddt.Pddt.strftime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":1906
 *             errors.raise_argument_error(self.__class__, "strftime(fmt)", None, err)
 * 
 *     def isoformat(self, sep: str = "T") -> pd.Index[str]:             # <<<<<<<<<<<<<<
 *         """Return the date and time formatted according to ISO format `<'str'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_49isoformat(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_48isoformat, "Return the date and time formatted according to ISO format `<'str'>`.\n\n        :param sep `<'str'>`: The separator between date and time components. Defaults to `'T'`.\n        :returns `<'Index[str]'>`: Index of ISO formatted strings.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_49isoformat = {"isoformat", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_49isoformat, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_48isoformat};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_49isoformat(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_sep = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isoformat (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_sep,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1906, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1906, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1906, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "isoformat", 0) < (0)) __PYX_ERR(0, 1906, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_n_u_T)));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("isoformat", 0, 1, 2, i); __PYX_ERR(0, 1906, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1906, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1906, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_n_u_T)));
    }
    __pyx_v_self = values[0];
    __pyx_v_sep = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("isoformat", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1906, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.isoformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sep), (&PyUnicode_Type), 0, "sep", 2))) __PYX_ERR(0, 1906, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_48isoformat(__pyx_self, __pyx_v_self, __pyx_v_sep);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_48isoformat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_sep) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3[3];
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isoformat", 0);

  /* "cytimes/pddt.py":1912
 *         :returns `<'Index[str]'>`: Index of ISO formatted strings.
 *         """
 *         return self.strftime(f"%Y-%m-%d{sep}%H:%M:%S.%f%z")             # <<<<<<<<<<<<<<
 * 
 *     def timedf(self) -> pd.DataFrame:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3[0] = __pyx_mstate_global->__pyx_kp_u_Y_m_d;
  __pyx_t_3[1] = __pyx_v_sep;
  __pyx_t_3[2] = __pyx_mstate_global->__pyx_kp_u_H_M_S_f_z;
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, 8 + __Pyx_PyUnicode_GET_LENGTH(__pyx_v_sep) + 13, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_sep));
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_strftime, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":1906
 *             errors.raise_argument_error(self.__class__, "strftime(fmt)", None, err)
 * 
 *     def isoformat(self, sep: str = "T") -> pd.Index[str]:             # <<<<<<<<<<<<<<
 *         """Return the date and time formatted according to ISO format `<'str'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.isoformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":1914
 *         return self.strftime(f"%Y-%m-%d{sep}%H:%M:%S.%f%z")
 * 
 *     def timedf(self) -> pd.DataFrame:             # <<<<<<<<<<<<<<
 *         """Return `local` time DataFrame compatible with `time.localtime()` `<'DataFrame'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_51timedf(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_50timedf, "Return `local` time DataFrame compatible with `time.localtime()` `<'DataFrame'>`.\n\n        ## Example\n        >>> pt.timedf()\n        ```\n        _  tm_year  tm_mon  tm_mday  tm_hour  tm_min  tm_sec  tm_wday  tm_yday\n        0     2025      11       12       18      12      42        2      316\n        ...\n        ```\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_51timedf = {"timedf", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_51timedf, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_50timedf};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_51timedf(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("timedf (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1914, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1914, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "timedf", 0) < (0)) __PYX_ERR(0, 1914, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("timedf", 1, 1, 1, i); __PYX_ERR(0, 1914, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1914, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("timedf", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1914, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.timedf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_50timedf(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_50timedf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyArrayObject *__pyx_v_arr = 0;
  int __pyx_v_unit;
  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;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_year __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_month __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_day __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_hour __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_minute __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_second __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_weekday __pyx_t_13;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_day_of_year __pyx_t_14;
  size_t __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("timedf", 0);

  /* "cytimes/pddt.py":1925
 *         ```
 *         """
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         unit: cython.int = utils.get_arr_nptime_unit(arr)
 *         return pd.DataFrame(
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1925, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":1926
 *         """
 *         arr: np.ndarray = self.values_naive
 *         unit: cython.int = utils.get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 *         return pd.DataFrame(
 *             {
*/
  __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1926, __pyx_L1_error)
  __pyx_v_unit = __pyx_t_2;

  /* "cytimes/pddt.py":1927
 *         arr: np.ndarray = self.values_naive
 *         unit: cython.int = utils.get_arr_nptime_unit(arr)
 *         return pd.DataFrame(             # <<<<<<<<<<<<<<
 *             {
 *                 "tm_year": utils.dt64arr_year(arr, unit, 0, True),
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DataFrame); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cytimes/pddt.py":1929
 *         return pd.DataFrame(
 *             {
 *                 "tm_year": utils.dt64arr_year(arr, unit, 0, True),             # <<<<<<<<<<<<<<
 *                 "tm_mon": utils.dt64arr_month(arr, unit, 0, True),
 *                 "tm_mday": utils.dt64arr_day(arr, unit, 0, True),
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7.__pyx_n = 3;
  __pyx_t_7.arr_reso = __pyx_v_unit;
  __pyx_t_7.offset = 0;
  __pyx_t_7.copy = 1;
  __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_year(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_tm_year, __pyx_t_6) < (0)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "cytimes/pddt.py":1930
 *             {
 *                 "tm_year": utils.dt64arr_year(arr, unit, 0, True),
 *                 "tm_mon": utils.dt64arr_month(arr, unit, 0, True),             # <<<<<<<<<<<<<<
 *                 "tm_mday": utils.dt64arr_day(arr, unit, 0, True),
 *                 "tm_hour": utils.dt64arr_hour(arr, unit, 0, True),
*/
  __pyx_t_8.__pyx_n = 3;
  __pyx_t_8.arr_reso = __pyx_v_unit;
  __pyx_t_8.offset = 0;
  __pyx_t_8.copy = 1;
  __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_month(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_tm_mon, __pyx_t_6) < (0)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "cytimes/pddt.py":1931
 *                 "tm_year": utils.dt64arr_year(arr, unit, 0, True),
 *                 "tm_mon": utils.dt64arr_month(arr, unit, 0, True),
 *                 "tm_mday": utils.dt64arr_day(arr, unit, 0, True),             # <<<<<<<<<<<<<<
 *                 "tm_hour": utils.dt64arr_hour(arr, unit, 0, True),
 *                 "tm_min": utils.dt64arr_minute(arr, unit, 0, True),
*/
  __pyx_t_9.__pyx_n = 3;
  __pyx_t_9.arr_reso = __pyx_v_unit;
  __pyx_t_9.offset = 0;
  __pyx_t_9.copy = 1;
  __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_day(__pyx_v_arr, &__pyx_t_9)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_tm_mday, __pyx_t_6) < (0)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "cytimes/pddt.py":1932
 *                 "tm_mon": utils.dt64arr_month(arr, unit, 0, True),
 *                 "tm_mday": utils.dt64arr_day(arr, unit, 0, True),
 *                 "tm_hour": utils.dt64arr_hour(arr, unit, 0, True),             # <<<<<<<<<<<<<<
 *                 "tm_min": utils.dt64arr_minute(arr, unit, 0, True),
 *                 "tm_sec": utils.dt64arr_second(arr, unit, 0, True),
*/
  __pyx_t_10.__pyx_n = 3;
  __pyx_t_10.arr_reso = __pyx_v_unit;
  __pyx_t_10.offset = 0;
  __pyx_t_10.copy = 1;
  __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_hour(__pyx_v_arr, &__pyx_t_10)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_tm_hour, __pyx_t_6) < (0)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "cytimes/pddt.py":1933
 *                 "tm_mday": utils.dt64arr_day(arr, unit, 0, True),
 *                 "tm_hour": utils.dt64arr_hour(arr, unit, 0, True),
 *                 "tm_min": utils.dt64arr_minute(arr, unit, 0, True),             # <<<<<<<<<<<<<<
 *                 "tm_sec": utils.dt64arr_second(arr, unit, 0, True),
 *                 "tm_wday": utils.dt64arr_weekday(arr, unit, 0, True),
*/
  __pyx_t_11.__pyx_n = 3;
  __pyx_t_11.arr_reso = __pyx_v_unit;
  __pyx_t_11.offset = 0;
  __pyx_t_11.copy = 1;
  __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_minute(__pyx_v_arr, &__pyx_t_11)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_tm_min, __pyx_t_6) < (0)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "cytimes/pddt.py":1934
 *                 "tm_hour": utils.dt64arr_hour(arr, unit, 0, True),
 *                 "tm_min": utils.dt64arr_minute(arr, unit, 0, True),
 *                 "tm_sec": utils.dt64arr_second(arr, unit, 0, True),             # <<<<<<<<<<<<<<
 *                 "tm_wday": utils.dt64arr_weekday(arr, unit, 0, True),
 *                 "tm_yday": utils.dt64arr_day_of_year(arr, unit, True),
*/
  __pyx_t_12.__pyx_n = 3;
  __pyx_t_12.arr_reso = __pyx_v_unit;
  __pyx_t_12.offset = 0;
  __pyx_t_12.copy = 1;
  __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_second(__pyx_v_arr, &__pyx_t_12)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_tm_sec, __pyx_t_6) < (0)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "cytimes/pddt.py":1935
 *                 "tm_min": utils.dt64arr_minute(arr, unit, 0, True),
 *                 "tm_sec": utils.dt64arr_second(arr, unit, 0, True),
 *                 "tm_wday": utils.dt64arr_weekday(arr, unit, 0, True),             # <<<<<<<<<<<<<<
 *                 "tm_yday": utils.dt64arr_day_of_year(arr, unit, True),
 *             },
*/
  __pyx_t_13.__pyx_n = 3;
  __pyx_t_13.arr_reso = __pyx_v_unit;
  __pyx_t_13.offset = 0;
  __pyx_t_13.copy = 1;
  __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_weekday(__pyx_v_arr, &__pyx_t_13)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_tm_wday, __pyx_t_6) < (0)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "cytimes/pddt.py":1936
 *                 "tm_sec": utils.dt64arr_second(arr, unit, 0, True),
 *                 "tm_wday": utils.dt64arr_weekday(arr, unit, 0, True),
 *                 "tm_yday": utils.dt64arr_day_of_year(arr, unit, True),             # <<<<<<<<<<<<<<
 *             },
 *         )
*/
  __pyx_t_14.__pyx_n = 2;
  __pyx_t_14.arr_reso = __pyx_v_unit;
  __pyx_t_14.copy = 1;
  __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_day_of_year(__pyx_v_arr, &__pyx_t_14)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_tm_yday, __pyx_t_6) < (0)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_15 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_15 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":1914
 *         return self.strftime(f"%Y-%m-%d{sep}%H:%M:%S.%f%z")
 * 
 *     def timedf(self) -> pd.DataFrame:             # <<<<<<<<<<<<<<
 *         """Return `local` time DataFrame compatible with `time.localtime()` `<'DataFrame'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.timedf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":1940
 *         )
 * 
 *     def utctimedf(self) -> pd.DataFrame:             # <<<<<<<<<<<<<<
 *         """Return `UTC` time DataFrame compatible with `time.gmtime()` `<'DataFrame'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_53utctimedf(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_52utctimedf, "Return `UTC` time DataFrame compatible with `time.gmtime()` `<'DataFrame'>`.\n\n        ## Example\n        >>> pt.timedf()\n        ```\n        _  tm_year  tm_mon  tm_mday  tm_hour  tm_min  tm_sec  tm_wday  tm_yday\n        0     2025      11       12       10      12      42        2      316\n        ...\n        ```\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_53utctimedf = {"utctimedf", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_53utctimedf, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_52utctimedf};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_53utctimedf(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utctimedf (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1940, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1940, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "utctimedf", 0) < (0)) __PYX_ERR(0, 1940, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("utctimedf", 1, 1, 1, i); __PYX_ERR(0, 1940, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1940, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("utctimedf", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1940, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.utctimedf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_52utctimedf(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_52utctimedf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  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("utctimedf", 0);

  /* "cytimes/pddt.py":1951
 *         ```
 *         """
 *         tz: object = self.tzinfo             # <<<<<<<<<<<<<<
 *         if tz is None or tz is utils.UTC:
 *             return self.timedf()
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":1952
 *         """
 *         tz: object = self.tzinfo
 *         if tz is None or tz is utils.UTC:             # <<<<<<<<<<<<<<
 *             return self.timedf()
 *         else:
*/
  __pyx_t_3 = (__pyx_v_tz == Py_None);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__pyx_v_tz == ((PyObject *)__pyx_v_7cytimes_5utils_UTC));
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":1953
 *         tz: object = self.tzinfo
 *         if tz is None or tz is utils.UTC:
 *             return self.timedf()             # <<<<<<<<<<<<<<
 *         else:
 *             return self.tz_convert(utils.UTC).timedf()
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timedf, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1953, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":1952
 *         """
 *         tz: object = self.tzinfo
 *         if tz is None or tz is utils.UTC:             # <<<<<<<<<<<<<<
 *             return self.timedf()
 *         else:
*/
  }

  /* "cytimes/pddt.py":1955
 *             return self.timedf()
 *         else:
 *             return self.tz_convert(utils.UTC).timedf()             # <<<<<<<<<<<<<<
 * 
 *     def toordinal(self) -> pd.Index[np.int64]:
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, ((PyObject *)__pyx_v_7cytimes_5utils_UTC)};
      __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tz_convert, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1955, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __pyx_t_4 = __pyx_t_6;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timedf, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1955, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "cytimes/pddt.py":1940
 *         )
 * 
 *     def utctimedf(self) -> pd.DataFrame:             # <<<<<<<<<<<<<<
 *         """Return `UTC` time DataFrame compatible with `time.gmtime()` `<'DataFrame'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.utctimedf", __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;
}

/* "cytimes/pddt.py":1957
 *             return self.tz_convert(utils.UTC).timedf()
 * 
 *     def toordinal(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return an index of proleptic Gregorian ordinals from the dates `<'Index[int64]'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_55toordinal(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_54toordinal, "Return an index of proleptic Gregorian ordinals from the dates `<'Index[int64]'>`.\n\n        - Only the year, month and day values contribute to the result.\n        - '0001-01-01' is day 1.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_55toordinal = {"toordinal", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_55toordinal, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_54toordinal};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_55toordinal(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("toordinal (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1957, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1957, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "toordinal", 0) < (0)) __PYX_ERR(0, 1957, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("toordinal", 1, 1, 1, i); __PYX_ERR(0, 1957, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1957, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("toordinal", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1957, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.toordinal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_54toordinal(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_54toordinal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyArrayObject *__pyx_v_arr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_to_ord __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("toordinal", 0);

  /* "cytimes/pddt.py":1963
 *         - '0001-01-01' is day 1.
 *         """
 *         arr = utils.dt64arr_to_ord(self.values_naive, -1, 0, True)             # <<<<<<<<<<<<<<
 *         return pd.Index(arr, name="ordinal")
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1963, __pyx_L1_error)
  __pyx_t_3.__pyx_n = 3;
  __pyx_t_3.arr_reso = -1;
  __pyx_t_3.offset = 0;
  __pyx_t_3.copy = 1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_to_ord(((PyArrayObject *)__pyx_t_1), &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":1964
 *         """
 *         arr = utils.dt64arr_to_ord(self.values_naive, -1, 0, True)
 *         return pd.Index(arr, name="ordinal")             # <<<<<<<<<<<<<<
 * 
 *     def toseconds(self, utc: cython.bint = False) -> pd.Index[np.float64]:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_1);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, ((PyObject *)__pyx_v_arr)};
    __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_ordinal, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1964, __pyx_L1_error)
    __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":1957
 *             return self.tz_convert(utils.UTC).timedf()
 * 
 *     def toordinal(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return an index of proleptic Gregorian ordinals from the dates `<'Index[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.toordinal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":1966
 *         return pd.Index(arr, name="ordinal")
 * 
 *     def toseconds(self, utc: cython.bint = False) -> pd.Index[np.float64]:             # <<<<<<<<<<<<<<
 *         """Return an index of total seconds since epoch `<'Index[float64]'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_57toseconds(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_56toseconds, "Return an index of total seconds since epoch `<'Index[float64]'>`.\n\n        :param utc `<'bool'>`: Whether to subtract the UTC offset. Defaults to `False`.\n\n            - When `True` and the datetime index is `timezone-aware`, subtract\n              the UTC offset first (i.e., normalize to UTC) before computing the\n              epoch difference.\n            - For `naive` datetime index this flag is ignored.\n\n        :returns `<'Index[float64]'>`: Seconds since epoch.\n\n        ## Notes\n        - Unlike `timestamp()`, this method never assumes local time for\n          naive datetimes index. Naive values are interpreted `as-is`\n          without any local-time conversion.\n        - For aware datetime index, offset handling (including DST folds/gaps)\n          follows the attached timezone.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_57toseconds = {"toseconds", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_57toseconds, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_56toseconds};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_57toseconds(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_utc;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("toseconds (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_utc,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1966, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1966, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1966, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "toseconds", 0) < (0)) __PYX_ERR(0, 1966, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("toseconds", 0, 1, 2, i); __PYX_ERR(0, 1966, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1966, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1966, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    if (values[1]) {
      __pyx_v_utc = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_utc == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1966, __pyx_L3_error)
    } else {
      __pyx_v_utc = ((int)((int)0));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("toseconds", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1966, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.toseconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_56toseconds(__pyx_self, __pyx_v_self, __pyx_v_utc);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_56toseconds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_utc) {
  PyObject *__pyx_v_arr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_to_ts __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("toseconds", 0);

  /* "cytimes/pddt.py":1985
 *           follows the attached timezone.
 *         """
 *         if self.tzinfo is None:             # <<<<<<<<<<<<<<
 *             arr = self.values
 *         elif not utc:
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1985, __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) {

    /* "cytimes/pddt.py":1986
 *         """
 *         if self.tzinfo is None:
 *             arr = self.values             # <<<<<<<<<<<<<<
 *         elif not utc:
 *             arr = self.values_naive
*/
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_arr = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cytimes/pddt.py":1985
 *           follows the attached timezone.
 *         """
 *         if self.tzinfo is None:             # <<<<<<<<<<<<<<
 *             arr = self.values
 *         elif not utc:
*/
    goto __pyx_L3;
  }

  /* "cytimes/pddt.py":1987
 *         if self.tzinfo is None:
 *             arr = self.values
 *         elif not utc:             # <<<<<<<<<<<<<<
 *             arr = self.values_naive
 *         else:
*/
  __pyx_t_2 = (!__pyx_v_utc);
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":1988
 *             arr = self.values
 *         elif not utc:
 *             arr = self.values_naive             # <<<<<<<<<<<<<<
 *         else:
 *             arr = self.tz_convert(utils.UTC).values_naive
*/
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1988, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_arr = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cytimes/pddt.py":1987
 *         if self.tzinfo is None:
 *             arr = self.values
 *         elif not utc:             # <<<<<<<<<<<<<<
 *             arr = self.values_naive
 *         else:
*/
    goto __pyx_L3;
  }

  /* "cytimes/pddt.py":1990
 *             arr = self.values_naive
 *         else:
 *             arr = self.tz_convert(utils.UTC).values_naive             # <<<<<<<<<<<<<<
 *         return pd.Index(utils.dt64arr_to_ts(arr, -1, True), name="seconds")
 * 
*/
  /*else*/ {
    __pyx_t_3 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_7cytimes_5utils_UTC)};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tz_convert, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1990, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1990, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_arr = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "cytimes/pddt.py":1991
 *         else:
 *             arr = self.tz_convert(utils.UTC).values_naive
 *         return pd.Index(utils.dt64arr_to_ts(arr, -1, True), name="seconds")             # <<<<<<<<<<<<<<
 * 
 *     def tomicroseconds(self, utc: cython.bint = False) -> pd.Index[np.int64]:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1991, __pyx_L1_error)
  __pyx_t_7.__pyx_n = 2;
  __pyx_t_7.arr_reso = -1;
  __pyx_t_7.copy = 1;
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_to_ts(((PyArrayObject *)__pyx_v_arr), &__pyx_t_7)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_1);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_t_5};
    __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1991, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_seconds, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1991, __pyx_L1_error)
    __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1991, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":1966
 *         return pd.Index(arr, name="ordinal")
 * 
 *     def toseconds(self, utc: cython.bint = False) -> pd.Index[np.float64]:             # <<<<<<<<<<<<<<
 *         """Return an index of total seconds since epoch `<'Index[float64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.toseconds", __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;
}

/* "cytimes/pddt.py":1993
 *         return pd.Index(utils.dt64arr_to_ts(arr, -1, True), name="seconds")
 * 
 *     def tomicroseconds(self, utc: cython.bint = False) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return an index of total microseconds since epoch `<'Index[float64]'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_59tomicroseconds(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_58tomicroseconds, "Return an index of total microseconds since epoch `<'Index[float64]'>`.\n\n        :param utc `<'bool'>`: Whether to subtract the UTC offset. Defaults to `False`.\n\n            - When `True` and the datetime index is `timezone-aware`, subtract\n              the UTC offset first (i.e., normalize to UTC) before computing the\n              epoch difference.\n            - For `naive` datetime index this flag is ignored.\n\n        :returns `<'Index[float64]'>`: Microseconds since epoch.\n\n        ## Notes\n        - Unlike `timestamp()`, this method never assumes local time for\n          naive datetimes index. Naive values are interpreted `as-is`\n          without any local-time conversion.\n        - For aware datetime index, offset handling (including DST folds/gaps)\n          follows the attached timezone.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_59tomicroseconds = {"tomicroseconds", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_59tomicroseconds, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_58tomicroseconds};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_59tomicroseconds(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_utc;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tomicroseconds (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_utc,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1993, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1993, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1993, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "tomicroseconds", 0) < (0)) __PYX_ERR(0, 1993, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("tomicroseconds", 0, 1, 2, i); __PYX_ERR(0, 1993, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1993, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1993, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    if (values[1]) {
      __pyx_v_utc = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_utc == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1993, __pyx_L3_error)
    } else {
      __pyx_v_utc = ((int)((int)0));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tomicroseconds", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1993, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.tomicroseconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_58tomicroseconds(__pyx_self, __pyx_v_self, __pyx_v_utc);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_58tomicroseconds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_utc) {
  PyObject *__pyx_v_arr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_us __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tomicroseconds", 0);

  /* "cytimes/pddt.py":2012
 *           follows the attached timezone.
 *         """
 *         if self.tzinfo is None:             # <<<<<<<<<<<<<<
 *             arr = self.values
 *         elif not utc:
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2012, __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) {

    /* "cytimes/pddt.py":2013
 *         """
 *         if self.tzinfo is None:
 *             arr = self.values             # <<<<<<<<<<<<<<
 *         elif not utc:
 *             arr = self.values_naive
*/
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2013, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_arr = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cytimes/pddt.py":2012
 *           follows the attached timezone.
 *         """
 *         if self.tzinfo is None:             # <<<<<<<<<<<<<<
 *             arr = self.values
 *         elif not utc:
*/
    goto __pyx_L3;
  }

  /* "cytimes/pddt.py":2014
 *         if self.tzinfo is None:
 *             arr = self.values
 *         elif not utc:             # <<<<<<<<<<<<<<
 *             arr = self.values_naive
 *         else:
*/
  __pyx_t_2 = (!__pyx_v_utc);
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":2015
 *             arr = self.values
 *         elif not utc:
 *             arr = self.values_naive             # <<<<<<<<<<<<<<
 *         else:
 *             arr = self.tz_convert(utils.UTC).values_naive
*/
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_arr = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cytimes/pddt.py":2014
 *         if self.tzinfo is None:
 *             arr = self.values
 *         elif not utc:             # <<<<<<<<<<<<<<
 *             arr = self.values_naive
 *         else:
*/
    goto __pyx_L3;
  }

  /* "cytimes/pddt.py":2017
 *             arr = self.values_naive
 *         else:
 *             arr = self.tz_convert(utils.UTC).values_naive             # <<<<<<<<<<<<<<
 *         return pd.Index(
 *             utils.dt64arr_as_int64_us(arr, -1, 0, True), name="microseconds"
*/
  /*else*/ {
    __pyx_t_3 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_7cytimes_5utils_UTC)};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tz_convert, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2017, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2017, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_arr = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "cytimes/pddt.py":2018
 *         else:
 *             arr = self.tz_convert(utils.UTC).values_naive
 *         return pd.Index(             # <<<<<<<<<<<<<<
 *             utils.dt64arr_as_int64_us(arr, -1, 0, True), name="microseconds"
 *         )
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pddt.py":2019
 *             arr = self.tz_convert(utils.UTC).values_naive
 *         return pd.Index(
 *             utils.dt64arr_as_int64_us(arr, -1, 0, True), name="microseconds"             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2019, __pyx_L1_error)
  __pyx_t_7.__pyx_n = 3;
  __pyx_t_7.arr_reso = -1;
  __pyx_t_7.offset = 0;
  __pyx_t_7.copy = 1;
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_us(((PyArrayObject *)__pyx_v_arr), &__pyx_t_7)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_1);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_t_5};
    __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_microseconds, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2018, __pyx_L1_error)
    __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":1993
 *         return pd.Index(utils.dt64arr_to_ts(arr, -1, True), name="seconds")
 * 
 *     def tomicroseconds(self, utc: cython.bint = False) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return an index of total microseconds since epoch `<'Index[float64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.tomicroseconds", __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;
}

/* "cytimes/pddt.py":2022
 *         )
 * 
 *     def timestamp(self) -> pd.Index[np.float64]:             # <<<<<<<<<<<<<<
 *         """Return an index of POSIX timestamps `<'Index[float64]'>`."""
 *         # fmt: off
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_61timestamp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_60timestamp, "Return an index of POSIX timestamps `<'Index[float64]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_61timestamp = {"timestamp", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_61timestamp, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_60timestamp};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_61timestamp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("timestamp (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2022, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2022, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "timestamp", 0) < (0)) __PYX_ERR(0, 2022, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("timestamp", 1, 1, 1, i); __PYX_ERR(0, 2022, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2022, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("timestamp", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2022, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_60timestamp(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_60timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_arr = 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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_to_ts __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("timestamp", 0);

  /* "cytimes/pddt.py":2025
 *         """Return an index of POSIX timestamps `<'Index[float64]'>`."""
 *         # fmt: off
 *         if self.tzinfo is None:             # <<<<<<<<<<<<<<
 *             arr = self.tz_localize(utils.tz_local(), "infer", "shift_forward").values
 *         else:
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2025, __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) {

    /* "cytimes/pddt.py":2026
 *         # fmt: off
 *         if self.tzinfo is None:
 *             arr = self.tz_localize(utils.tz_local(), "infer", "shift_forward").values             # <<<<<<<<<<<<<<
 *         else:
 *             arr = self.values
*/
    __pyx_t_3 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = __pyx_f_7cytimes_5utils_tz_local(NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_infer, __pyx_mstate_global->__pyx_n_u_shift_forward};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tz_localize, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2026, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_arr = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2025
 *         """Return an index of POSIX timestamps `<'Index[float64]'>`."""
 *         # fmt: off
 *         if self.tzinfo is None:             # <<<<<<<<<<<<<<
 *             arr = self.tz_localize(utils.tz_local(), "infer", "shift_forward").values
 *         else:
*/
    goto __pyx_L3;
  }

  /* "cytimes/pddt.py":2028
 *             arr = self.tz_localize(utils.tz_local(), "infer", "shift_forward").values
 *         else:
 *             arr = self.values             # <<<<<<<<<<<<<<
 *         # fmt: on
 *         return pd.Index(utils.dt64arr_to_ts(arr, -1, True), name="timestamp")
*/
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2028, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_arr = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_L3:;

  /* "cytimes/pddt.py":2030
 *             arr = self.values
 *         # fmt: on
 *         return pd.Index(utils.dt64arr_to_ts(arr, -1, True), name="timestamp")             # <<<<<<<<<<<<<<
 * 
 *     def datetime(self) -> np.ndarray[Pydt]:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2030, __pyx_L1_error)
  __pyx_t_7.__pyx_n = 2;
  __pyx_t_7.arr_reso = -1;
  __pyx_t_7.copy = 1;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_to_ts(((PyArrayObject *)__pyx_v_arr), &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_1);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_t_3};
    __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2030, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_timestamp, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2030, __pyx_L1_error)
    __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2030, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2022
 *         )
 * 
 *     def timestamp(self) -> pd.Index[np.float64]:             # <<<<<<<<<<<<<<
 *         """Return an index of POSIX timestamps `<'Index[float64]'>`."""
 *         # fmt: off
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.timestamp", __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;
}

/* "cytimes/pddt.py":2032
 *         return pd.Index(utils.dt64arr_to_ts(arr, -1, True), name="timestamp")
 * 
 *     def datetime(self) -> np.ndarray[Pydt]:             # <<<<<<<<<<<<<<
 *         """Return an array of datetime `<'ndarray[Pydt]'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_63datetime(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_62datetime, "Return an array of datetime `<'ndarray[Pydt]'>`.\n\n        - Alias of `to_pydatetime()`, but returns array of `Pydt` instead of `datetime.datetime`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_63datetime = {"datetime", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_63datetime, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_62datetime};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_63datetime(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("datetime (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2032, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2032, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "datetime", 0) < (0)) __PYX_ERR(0, 2032, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("datetime", 1, 1, 1, i); __PYX_ERR(0, 2032, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2032, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("datetime", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2032, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_62datetime(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_62datetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyArrayObject *__pyx_v_arr = 0;
  npy_int64 *__pyx_v_arr_p;
  Py_ssize_t __pyx_v_size_i;
  PyObject *__pyx_v_tz = 0;
  PyArrayObject *__pyx_v_out = 0;
  Py_ssize_t __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_us __pyx_t_3;
  npy_intp __pyx_t_4[1];
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  size_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("datetime", 0);

  /* "cytimes/pddt.py":2038
 *         """
 *         # Convert to microseconds array
 *         arr: np.ndarray = utils.dt64arr_as_int64_us(self.values_naive, -1, 0, True)             # <<<<<<<<<<<<<<
 *         arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *         size_i: cython.Py_ssize_t = arr.shape[0]
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2038, __pyx_L1_error)
  __pyx_t_3.__pyx_n = 3;
  __pyx_t_3.arr_reso = -1;
  __pyx_t_3.offset = 0;
  __pyx_t_3.copy = 1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_us(((PyArrayObject *)__pyx_t_1), &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2039
 *         # Convert to microseconds array
 *         arr: np.ndarray = utils.dt64arr_as_int64_us(self.values_naive, -1, 0, True)
 *         arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))             # <<<<<<<<<<<<<<
 *         size_i: cython.Py_ssize_t = arr.shape[0]
 * 
*/
  __pyx_v_arr_p = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "cytimes/pddt.py":2040
 *         arr: np.ndarray = utils.dt64arr_as_int64_us(self.values_naive, -1, 0, True)
 *         arr_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(arr))
 *         size_i: cython.Py_ssize_t = arr.shape[0]             # <<<<<<<<<<<<<<
 * 
 *         # Setup output array
*/
  __pyx_v_size_i = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]);

  /* "cytimes/pddt.py":2043
 * 
 *         # Setup output array
 *         tz: object = self.tzinfo             # <<<<<<<<<<<<<<
 *         out: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_OBJECT, 0)
 *         i: cython.Py_ssize_t
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_tz = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2044
 *         # Setup output array
 *         tz: object = self.tzinfo
 *         out: np.ndarray = np.PyArray_EMPTY(1, [size_i], np.NPY_TYPES.NPY_OBJECT, 0)             # <<<<<<<<<<<<<<
 *         i: cython.Py_ssize_t
 *         v: np.npy_int64
*/
  __pyx_t_4[0] = __pyx_v_size_i;
  __pyx_t_2 = PyArray_EMPTY(1, __pyx_t_4, NPY_OBJECT, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2044, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2047
 *         i: cython.Py_ssize_t
 *         v: np.npy_int64
 *         for i in range(size_i):             # <<<<<<<<<<<<<<
 *             v = arr_p[i]
 *             # Preserve NaT
*/
  __pyx_t_5 = __pyx_v_size_i;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "cytimes/pddt.py":2048
 *         v: np.npy_int64
 *         for i in range(size_i):
 *             v = arr_p[i]             # <<<<<<<<<<<<<<
 *             # Preserve NaT
 *             if v == utils.LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_arr_p[__pyx_v_i]);

    /* "cytimes/pddt.py":2050
 *             v = arr_p[i]
 *             # Preserve NaT
 *             if v == utils.LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 out[i] = utils.NAT
 *                 continue
*/
    __pyx_t_8 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_8) {

      /* "cytimes/pddt.py":2051
 *             # Preserve NaT
 *             if v == utils.LLONG_MIN:
 *                 out[i] = utils.NAT             # <<<<<<<<<<<<<<
 *                 continue
 *             # Create Pydt
*/
      if (unlikely((__Pyx_SetItemInt(((PyObject *)__pyx_v_out), __pyx_v_i, __pyx_v_7cytimes_5utils_NAT, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 2051, __pyx_L1_error)

      /* "cytimes/pddt.py":2052
 *             if v == utils.LLONG_MIN:
 *                 out[i] = utils.NAT
 *                 continue             # <<<<<<<<<<<<<<
 *             # Create Pydt
 *             out[i] = Pydt.frommicroseconds(v, tz)
*/
      goto __pyx_L3_continue;

      /* "cytimes/pddt.py":2050
 *             v = arr_p[i]
 *             # Preserve NaT
 *             if v == utils.LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 out[i] = utils.NAT
 *                 continue
*/
    }

    /* "cytimes/pddt.py":2054
 *                 continue
 *             # Create Pydt
 *             out[i] = Pydt.frommicroseconds(v, tz)             # <<<<<<<<<<<<<<
 * 
 *         return out
*/
    __pyx_t_1 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_Pydt); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2054, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_frommicroseconds); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2054, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyLong_From_npy_int64(__pyx_v_v); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2054, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_11 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_10);
      assert(__pyx_t_1);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
      __pyx_t_11 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_9, __pyx_v_tz};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_11, (3-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2054, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    if (unlikely((__Pyx_SetItemInt(((PyObject *)__pyx_v_out), __pyx_v_i, __pyx_t_2, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 2054, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_L3_continue:;
  }

  /* "cytimes/pddt.py":2056
 *             out[i] = Pydt.frommicroseconds(v, tz)
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def date(self) -> np.ndarray[datetime.date]:
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = ((PyObject *)__pyx_v_out);
  goto __pyx_L0;

  /* "cytimes/pddt.py":2032
 *         return pd.Index(utils.dt64arr_to_ts(arr, -1, True), name="timestamp")
 * 
 *     def datetime(self) -> np.ndarray[Pydt]:             # <<<<<<<<<<<<<<
 *         """Return an array of datetime `<'ndarray[Pydt]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2058
 *         return out
 * 
 *     def date(self) -> np.ndarray[datetime.date]:             # <<<<<<<<<<<<<<
 *         """Return an array of date `<'ndarray[date]'>`."""
 *         return super(Pddt, self).date
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_65date(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_64date, "Return an array of date `<'ndarray[date]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_65date = {"date", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_65date, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_64date};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_65date(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("date (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2058, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2058, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "date", 0) < (0)) __PYX_ERR(0, 2058, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("date", 1, 1, 1, i); __PYX_ERR(0, 2058, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2058, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("date", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2058, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_64date(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_64date(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;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date", 0);

  /* "cytimes/pddt.py":2060
 *     def date(self) -> np.ndarray[datetime.date]:
 *         """Return an array of date `<'ndarray[date]'>`."""
 *         return super(Pddt, self).date             # <<<<<<<<<<<<<<
 * 
 *     def time(self) -> np.ndarray[datetime.time]:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Pddt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_v_self};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2058
 *         return out
 * 
 *     def date(self) -> np.ndarray[datetime.date]:             # <<<<<<<<<<<<<<
 *         """Return an array of date `<'ndarray[date]'>`."""
 *         return super(Pddt, self).date
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2062
 *         return super(Pddt, self).date
 * 
 *     def time(self) -> np.ndarray[datetime.time]:             # <<<<<<<<<<<<<<
 *         """Return an array of time (without timezone information) `<'ndarray[time]'>`."""
 *         return super(Pddt, self).time
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_67time(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_66time, "Return an array of time (without timezone information) `<'ndarray[time]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_67time = {"time", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_67time, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_66time};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_67time(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("time (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2062, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2062, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "time", 0) < (0)) __PYX_ERR(0, 2062, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("time", 1, 1, 1, i); __PYX_ERR(0, 2062, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2062, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("time", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2062, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_66time(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_66time(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;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time", 0);

  /* "cytimes/pddt.py":2064
 *     def time(self) -> np.ndarray[datetime.time]:
 *         """Return an array of time (without timezone information) `<'ndarray[time]'>`."""
 *         return super(Pddt, self).time             # <<<<<<<<<<<<<<
 * 
 *     def timetz(self) -> np.ndarray[datetime.time]:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Pddt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_v_self};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2064, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2062
 *         return super(Pddt, self).date
 * 
 *     def time(self) -> np.ndarray[datetime.time]:             # <<<<<<<<<<<<<<
 *         """Return an array of time (without timezone information) `<'ndarray[time]'>`."""
 *         return super(Pddt, self).time
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2066
 *         return super(Pddt, self).time
 * 
 *     def timetz(self) -> np.ndarray[datetime.time]:             # <<<<<<<<<<<<<<
 *         """Return an array of time (with the same timezone information) `<'ndarray[time]'>`."""
 *         return super(Pddt, self).timetz
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_69timetz(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_68timetz, "Return an array of time (with the same timezone information) `<'ndarray[time]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_69timetz = {"timetz", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_69timetz, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_68timetz};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_69timetz(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("timetz (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2066, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2066, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "timetz", 0) < (0)) __PYX_ERR(0, 2066, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("timetz", 1, 1, 1, i); __PYX_ERR(0, 2066, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2066, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("timetz", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2066, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.timetz", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_68timetz(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_68timetz(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;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("timetz", 0);

  /* "cytimes/pddt.py":2068
 *     def timetz(self) -> np.ndarray[datetime.time]:
 *         """Return an array of time (with the same timezone information) `<'ndarray[time]'>`."""
 *         return super(Pddt, self).timetz             # <<<<<<<<<<<<<<
 * 
 *     # Manipulator --------------------------------------------------------------------------
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Pddt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_v_self};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2068, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_timetz); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2066
 *         return super(Pddt, self).time
 * 
 *     def timetz(self) -> np.ndarray[datetime.time]:             # <<<<<<<<<<<<<<
 *         """Return an array of time (with the same timezone information) `<'ndarray[time]'>`."""
 *         return super(Pddt, self).timetz
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.timetz", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2071
 * 
 *     # Manipulator --------------------------------------------------------------------------
 *     def replace(             # <<<<<<<<<<<<<<
 *         self,
 *         year: cython.int = -1,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_71replace(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_70replace, "Replace the specified datetime fields with new values `<'Pddt'>`.\n\n        :param year `<'int'>`: Absolute year. Defaults to `SENTINEL` (no change).\n        :param month `<'int'>`: Absolute month. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..12].\n        :param day `<'int'>`: Absolute day. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..maximum days the resulting month].\n        :param hour `<'int'>`: Absolute hour. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..23].\n        :param minute `<'int'>`: Absolute minute. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..59].\n        :param second `<'int'>`: Absolute second. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..59].\n        :param microsecond `<'int'>`: Absolute microsecond. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..999999].\n        :param nanosecond `<'int'>`: Absolute nanosecond. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..999].\n        :param tzinfo `<'tzinfo/None'>`: The timeone. Defaults to `SENTINEL` (no change).\n\n            - `<'None'>`: removes tzinfo (makes datetime index naive).\n            - `<'str'>`: Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>`: A subclass of `datetime.tzinfo`.\n\n        :returns `<'Pddt'>`: The resulting datetime index after applying the specified field replacements.\n\n        ## Behavior\n        - Replacements are `component-wise`:\n            * Any of the date fields may be left as `<= 0` to keep original values.\n            * Any of the time fields may be left as `< 0` to keep original values.\n            * If `tzinfo`"" is left as `SENTINEL`, the original timezone is retained.\n        - Day values are `clamped` to the maximum valid day in the resulting month.\n        - Only time components within the index resolution are modified;\n          e.g., when index is in `'s'` resolution, `microsecond` and `nanosecond`\n          replacements are ignored.\n        - Timezone handling:\n            * If `tzinfo` is `SENTINEL`, the original timezone is retained.\n            * If `tzinfo` is `None`, the resulting datetime index will be localized to `naive`,\n              without affecting the datetime values.\n            * If `tzinfo` is specified and different from the original timezone,\n              the resulting datetime index will be replaced with the new timezone,\n              preserving the original datetime values.\n\n        ## Equivalent\n        >>> datetime.datetime.replace()\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_71replace = {"replace", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_71replace, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_70replace};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_71replace(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_year;
  int __pyx_v_month;
  int __pyx_v_day;
  int __pyx_v_hour;
  int __pyx_v_minute;
  int __pyx_v_second;
  int __pyx_v_microsecond;
  int __pyx_v_nanosecond;
  PyObject *__pyx_v_tzinfo = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("replace (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_year,&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,&__pyx_mstate_global->__pyx_n_u_hour,&__pyx_mstate_global->__pyx_n_u_minute,&__pyx_mstate_global->__pyx_n_u_second,&__pyx_mstate_global->__pyx_n_u_microsecond,&__pyx_mstate_global->__pyx_n_u_nanosecond,&__pyx_mstate_global->__pyx_n_u_tzinfo,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2071, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case 10:
        values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 2071, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 2071, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 2071, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 2071, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 2071, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2071, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2071, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2071, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2071, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2071, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "replace", 0) < (0)) __PYX_ERR(0, 2071, __pyx_L3_error)
      if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_neg_1)));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("replace", 0, 1, 10, i); __PYX_ERR(0, 2071, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case 10:
        values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 2071, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 2071, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 2071, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 2071, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 2071, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2071, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2071, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2071, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2071, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2071, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_neg_1)));
    }
    __pyx_v_self = values[0];
    if (values[1]) {
      __pyx_v_year = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_year == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2073, __pyx_L3_error)
    } else {
      __pyx_v_year = ((int)((int)-1));
    }
    if (values[2]) {
      __pyx_v_month = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_month == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2074, __pyx_L3_error)
    } else {
      __pyx_v_month = ((int)((int)-1));
    }
    if (values[3]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2075, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)((int)-1));
    }
    if (values[4]) {
      __pyx_v_hour = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_hour == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2076, __pyx_L3_error)
    } else {
      __pyx_v_hour = ((int)((int)-1));
    }
    if (values[5]) {
      __pyx_v_minute = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_minute == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2077, __pyx_L3_error)
    } else {
      __pyx_v_minute = ((int)((int)-1));
    }
    if (values[6]) {
      __pyx_v_second = __Pyx_PyLong_As_int(values[6]); if (unlikely((__pyx_v_second == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2078, __pyx_L3_error)
    } else {
      __pyx_v_second = ((int)((int)-1));
    }
    if (values[7]) {
      __pyx_v_microsecond = __Pyx_PyLong_As_int(values[7]); if (unlikely((__pyx_v_microsecond == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2079, __pyx_L3_error)
    } else {
      __pyx_v_microsecond = ((int)((int)-1));
    }
    if (values[8]) {
      __pyx_v_nanosecond = __Pyx_PyLong_As_int(values[8]); if (unlikely((__pyx_v_nanosecond == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2080, __pyx_L3_error)
    } else {
      __pyx_v_nanosecond = ((int)((int)-1));
    }
    __pyx_v_tzinfo = values[9];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("replace", 0, 1, 10, __pyx_nargs); __PYX_ERR(0, 2071, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.replace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_70replace(__pyx_self, __pyx_v_self, __pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_nanosecond, __pyx_v_tzinfo);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_70replace(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_year, int __pyx_v_month, int __pyx_v_day, int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, int __pyx_v_nanosecond, PyObject *__pyx_v_tzinfo) {
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_v_pt = 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;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  size_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("replace", 0);
  __Pyx_INCREF(__pyx_v_tzinfo);

  /* "cytimes/pddt.py":2130
 *         # Fast-path
 *         # . retain timezone
 *         if isinstance(tzinfo, int):             # <<<<<<<<<<<<<<
 *             return self.to_datetime(
 *                 year, month, day, hour, minute, second, microsecond, nanosecond
*/
  __pyx_t_1 = PyLong_Check(__pyx_v_tzinfo); 
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2131
 *         # . retain timezone
 *         if isinstance(tzinfo, int):
 *             return self.to_datetime(             # <<<<<<<<<<<<<<
 *                 year, month, day, hour, minute, second, microsecond, nanosecond
 *             )
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_3);

    /* "cytimes/pddt.py":2132
 *         if isinstance(tzinfo, int):
 *             return self.to_datetime(
 *                 year, month, day, hour, minute, second, microsecond, nanosecond             # <<<<<<<<<<<<<<
 *             )
 *         # . same timezone
*/
    __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_year); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_hour); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_minute); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_second); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_microsecond); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_nanosecond); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_12 = 0;
    {
      PyObject *__pyx_callargs[9] = {__pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_datetime_2, __pyx_callargs+__pyx_t_12, (9-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2131, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":2130
 *         # Fast-path
 *         # . retain timezone
 *         if isinstance(tzinfo, int):             # <<<<<<<<<<<<<<
 *             return self.to_datetime(
 *                 year, month, day, hour, minute, second, microsecond, nanosecond
*/
  }

  /* "cytimes/pddt.py":2135
 *             )
 *         # . same timezone
 *         tzinfo: object = utils.tz_parse(tzinfo)             # <<<<<<<<<<<<<<
 *         tz: object = self.tzinfo
 *         if tzinfo is tz:
*/
  __pyx_t_2 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tzinfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_tzinfo, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2136
 *         # . same timezone
 *         tzinfo: object = utils.tz_parse(tzinfo)
 *         tz: object = self.tzinfo             # <<<<<<<<<<<<<<
 *         if tzinfo is tz:
 *             return self.to_datetime(
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_tz = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2137
 *         tzinfo: object = utils.tz_parse(tzinfo)
 *         tz: object = self.tzinfo
 *         if tzinfo is tz:             # <<<<<<<<<<<<<<
 *             return self.to_datetime(
 *                 year, month, day, hour, minute, second, microsecond, nanosecond
*/
  __pyx_t_1 = (__pyx_v_tzinfo == __pyx_v_tz);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2138
 *         tz: object = self.tzinfo
 *         if tzinfo is tz:
 *             return self.to_datetime(             # <<<<<<<<<<<<<<
 *                 year, month, day, hour, minute, second, microsecond, nanosecond
 *             )
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_11 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_11);

    /* "cytimes/pddt.py":2139
 *         if tzinfo is tz:
 *             return self.to_datetime(
 *                 year, month, day, hour, minute, second, microsecond, nanosecond             # <<<<<<<<<<<<<<
 *             )
 * 
*/
    __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_year); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_hour); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_minute); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_second); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_microsecond); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_nanosecond); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_12 = 0;
    {
      PyObject *__pyx_callargs[9] = {__pyx_t_11, __pyx_t_10, __pyx_t_9, __pyx_t_8, __pyx_t_7, __pyx_t_6, __pyx_t_5, __pyx_t_4, __pyx_t_3};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_datetime_2, __pyx_callargs+__pyx_t_12, (9-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2138, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":2137
 *         tzinfo: object = utils.tz_parse(tzinfo)
 *         tz: object = self.tzinfo
 *         if tzinfo is tz:             # <<<<<<<<<<<<<<
 *             return self.to_datetime(
 *                 year, month, day, hour, minute, second, microsecond, nanosecond
*/
  }

  /* "cytimes/pddt.py":2143
 * 
 *         # Replace datetime (timezone-naive)
 *         pt = self if tz is None else self.tz_localize(None)             # <<<<<<<<<<<<<<
 *         pt = pt.to_datetime(
 *             year, month, day, hour, minute, second, microsecond, nanosecond
*/
  __pyx_t_1 = (__pyx_v_tz == Py_None);
  if (__pyx_t_1) {
    __Pyx_INCREF(__pyx_v_self);
    __pyx_t_2 = __pyx_v_self;
  } else {
    __pyx_t_4 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_12 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, Py_None};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tz_localize, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2143, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_t_2 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_v_pt = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2144
 *         # Replace datetime (timezone-naive)
 *         pt = self if tz is None else self.tz_localize(None)
 *         pt = pt.to_datetime(             # <<<<<<<<<<<<<<
 *             year, month, day, hour, minute, second, microsecond, nanosecond
 *         )
*/
  __pyx_t_3 = __pyx_v_pt;
  __Pyx_INCREF(__pyx_t_3);

  /* "cytimes/pddt.py":2145
 *         pt = self if tz is None else self.tz_localize(None)
 *         pt = pt.to_datetime(
 *             year, month, day, hour, minute, second, microsecond, nanosecond             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_year); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_hour); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_minute); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_second); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_microsecond); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_nanosecond); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = 0;
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_datetime_2, __pyx_callargs+__pyx_t_12, (9-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __Pyx_DECREF_SET(__pyx_v_pt, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2150
 *         # Replace timezone
 *         # . timezone-aware -> naive
 *         if tzinfo is None:             # <<<<<<<<<<<<<<
 *             return pt.tz_localize(None)
 *         # . timezone-naive/aware -> aware
*/
  __pyx_t_1 = (__pyx_v_tzinfo == Py_None);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2151
 *         # . timezone-aware -> naive
 *         if tzinfo is None:
 *             return pt.tz_localize(None)             # <<<<<<<<<<<<<<
 *         # . timezone-naive/aware -> aware
 *         return pt.tz_localize(tzinfo, "infer", "shift_forward")
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_11 = __pyx_v_pt;
    __Pyx_INCREF(__pyx_t_11);
    __pyx_t_12 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_11, Py_None};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tz_localize, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2151, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":2150
 *         # Replace timezone
 *         # . timezone-aware -> naive
 *         if tzinfo is None:             # <<<<<<<<<<<<<<
 *             return pt.tz_localize(None)
 *         # . timezone-naive/aware -> aware
*/
  }

  /* "cytimes/pddt.py":2153
 *             return pt.tz_localize(None)
 *         # . timezone-naive/aware -> aware
 *         return pt.tz_localize(tzinfo, "infer", "shift_forward")             # <<<<<<<<<<<<<<
 * 
 *     # . year
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_11 = __pyx_v_pt;
  __Pyx_INCREF(__pyx_t_11);
  __pyx_t_12 = 0;
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_11, __pyx_v_tzinfo, __pyx_mstate_global->__pyx_n_u_infer, __pyx_mstate_global->__pyx_n_u_shift_forward};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tz_localize, __pyx_callargs+__pyx_t_12, (4-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2071
 * 
 *     # Manipulator --------------------------------------------------------------------------
 *     def replace(             # <<<<<<<<<<<<<<
 *         self,
 *         year: cython.int = -1,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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("cytimes.pddt.Pddt.replace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XDECREF(__pyx_v_pt);
  __Pyx_XDECREF(__pyx_v_tzinfo);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2156
 * 
 *     # . year
 *     def to_curr_year(             # <<<<<<<<<<<<<<
 *         self,
 *         month: int | str | None = None,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_73to_curr_year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_72to_curr_year, "Adjust the date to the specified month and day in the current year `<'Pddt'>`.\n\n        :param month `<'int/str/None'>`: Month value. Defaults to `None`.\n\n            - `<'int'>`  Month number (1=Jan...12=Dec).\n            - `<'str'>`  Month name in lowercase, uppercase or titlecase (e.g., 'Jan', 'februar', '\344\270\211\346\234\210').\n            - `<'None'>` Retains the original month.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n\n        :returns `<'Pddt'>`: The adjusted datetime index in the current year.\n\n        ## Example\n        >>> pt.to_curr_year(month=\"Feb\", day=31)    # The last day of February in the current year\n        >>> pt.to_curr_year(month=11)               # The same day of November in the current year\n        >>> pt.to_curr_year(day=1)                  # The 1st day of the current month\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_73to_curr_year = {"to_curr_year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_73to_curr_year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_72to_curr_year};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_73to_curr_year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_month = 0;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_curr_year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2156, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2156, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2156, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2156, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_curr_year", 0) < (0)) __PYX_ERR(0, 2156, __pyx_L3_error)

      /* "cytimes/pddt.py":2158
 *     def to_curr_year(
 *         self,
 *         month: int | str | None = None,             # <<<<<<<<<<<<<<
 *         day: cython.int = -1,
 *     ) -> Self:
*/
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_curr_year", 0, 1, 3, i); __PYX_ERR(0, 2156, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2156, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2156, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2156, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_self = values[0];
    __pyx_v_month = values[1];
    if (values[2]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2159, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)((int)-1));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_curr_year", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 2156, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_curr_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_72to_curr_year(__pyx_self, __pyx_v_self, __pyx_v_month, __pyx_v_day);

  /* "cytimes/pddt.py":2156
 * 
 *     # . year
 *     def to_curr_year(             # <<<<<<<<<<<<<<
 *         self,
 *         month: int | str | None = None,
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_72to_curr_year(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_month, int __pyx_v_day) {
  int __pyx_v_mm;
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_my_unit = 0;
  int __pyx_v_my_reso;
  PyArrayObject *__pyx_v_times = NULL;
  PyArrayObject *__pyx_v_dateY = NULL;
  PyArrayObject *__pyx_v_dateM = NULL;
  PyArrayObject *__pyx_v_dateD = NULL;
  PyArrayObject *__pyx_v_delta = NULL;
  PyArrayObject *__pyx_v_dates = NULL;
  PyObject *__pyx_v_dtype = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_7cytimes_6parser_parse_month __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_times __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_month __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_day __pyx_t_13;
  struct __pyx_opt_args_7cytimes_5utils_arr_min_arr __pyx_t_14;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_15;
  struct __pyx_opt_args_7cytimes_5utils_arr_min __pyx_t_16;
  int __pyx_t_17;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_18;
  int __pyx_t_19;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_20;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_21;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 __pyx_t_22;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_curr_year", 0);

  /* "cytimes/pddt.py":2180
 *         """
 *         # Fast-path: no month adjustment
 *         mm: cython.int = _parse_month(month, None, True)             # <<<<<<<<<<<<<<
 *         if mm == -1:
 *             return self.to_curr_month(day)
*/
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_2.raise_error = 1;
  __pyx_t_1 = __pyx_f_7cytimes_6parser_parse_month(__pyx_v_month, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-2))) __PYX_ERR(0, 2180, __pyx_L1_error)
  __pyx_v_mm = __pyx_t_1;

  /* "cytimes/pddt.py":2181
 *         # Fast-path: no month adjustment
 *         mm: cython.int = _parse_month(month, None, True)
 *         if mm == -1:             # <<<<<<<<<<<<<<
 *             return self.to_curr_month(day)
 * 
*/
  __pyx_t_3 = (__pyx_v_mm == -1L);
  if (__pyx_t_3) {

    /* "cytimes/pddt.py":2182
 *         mm: cython.int = _parse_month(month, None, True)
 *         if mm == -1:
 *             return self.to_curr_month(day)             # <<<<<<<<<<<<<<
 * 
 *         # Access datetime array & info
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_curr_month, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2182, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":2181
 *         # Fast-path: no month adjustment
 *         mm: cython.int = _parse_month(month, None, True)
 *         if mm == -1:             # <<<<<<<<<<<<<<
 *             return self.to_curr_month(day)
 * 
*/
  }

  /* "cytimes/pddt.py":2185
 * 
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2185, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cytimes/pddt.py":2186
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
 * 
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_4))) __PYX_ERR(0, 2186, __pyx_L1_error)
  __pyx_v_my_unit = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cytimes/pddt.py":2187
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)             # <<<<<<<<<<<<<<
 * 
 *         # Seperate times -> int64[my_unit]
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_my_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2187, __pyx_L1_error)
  __pyx_v_my_reso = __pyx_t_1;

  /* "cytimes/pddt.py":2190
 * 
 *         # Seperate times -> int64[my_unit]
 *         times = utils.dt64arr_times(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 * 
 *         # Adjust dates -> int64[Y] -> int64[M]
*/
  __pyx_t_8.__pyx_n = 3;
  __pyx_t_8.arr_reso = __pyx_v_my_reso;
  __pyx_t_8.offset = 0;
  __pyx_t_8.copy = 1;
  __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_times = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cytimes/pddt.py":2193
 * 
 *         # Adjust dates -> int64[Y] -> int64[M]
 *         dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 *         dateM = utils.dt64arr_as_int64_M(dateY, utils.DT_NPY_UNIT_YY, mm - 1, False)
 *         # . retain original days -> int64[D]
*/
  __pyx_t_9.__pyx_n = 3;
  __pyx_t_9.arr_reso = __pyx_v_my_reso;
  __pyx_t_9.offset = 0;
  __pyx_t_9.copy = 1;
  __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_9)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_dateY = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cytimes/pddt.py":2194
 *         # Adjust dates -> int64[Y] -> int64[M]
 *         dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)
 *         dateM = utils.dt64arr_as_int64_M(dateY, utils.DT_NPY_UNIT_YY, mm - 1, False)             # <<<<<<<<<<<<<<
 *         # . retain original days -> int64[D]
 *         if day < 1:
*/
  __pyx_t_10.__pyx_n = 3;
  __pyx_t_10.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_YY;
  __pyx_t_10.offset = (__pyx_v_mm - 1);
  __pyx_t_10.copy = 0;
  __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(__pyx_v_dateY, &__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_dateM = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cytimes/pddt.py":2196
 *         dateM = utils.dt64arr_as_int64_M(dateY, utils.DT_NPY_UNIT_YY, mm - 1, False)
 *         # . retain original days -> int64[D]
 *         if day < 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
*/
  __pyx_t_3 = (__pyx_v_day < 1);
  if (__pyx_t_3) {

    /* "cytimes/pddt.py":2197
 *         # . retain original days -> int64[D]
 *         if day < 1:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)             # <<<<<<<<<<<<<<
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min_arr(delta, utils.dt64arr_day(arr, my_reso), 0, False)
*/
    __pyx_t_11.__pyx_n = 3;
    __pyx_t_11.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_11)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2198
 *         if day < 1:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)             # <<<<<<<<<<<<<<
 *             delta = utils.arr_min_arr(delta, utils.dt64arr_day(arr, my_reso), 0, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
*/
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_12.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_month(__pyx_v_dateM, &__pyx_t_12)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2199
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min_arr(delta, utils.dt64arr_day(arr, my_reso), 0, False)             # <<<<<<<<<<<<<<
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 *         # . 1st day -> int64[D]
*/
    __pyx_t_13.__pyx_n = 1;
    __pyx_t_13.arr_reso = __pyx_v_my_reso;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_day(__pyx_v_arr, &__pyx_t_13)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_14.__pyx_n = 2;
    __pyx_t_14.offset = 0;
    __pyx_t_14.copy = 0;
    __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_min_arr(__pyx_v_delta, ((PyArrayObject *)__pyx_t_4), &__pyx_t_14)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "cytimes/pddt.py":2200
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min_arr(delta, utils.dt64arr_day(arr, my_reso), 0, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)             # <<<<<<<<<<<<<<
 *         # . 1st day -> int64[D]
 *         elif day == 1:
*/
    __pyx_t_15.__pyx_n = 2;
    __pyx_t_15.offset = -1LL;
    __pyx_t_15.copy = 0;
    __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_15)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "cytimes/pddt.py":2196
 *         dateM = utils.dt64arr_as_int64_M(dateY, utils.DT_NPY_UNIT_YY, mm - 1, False)
 *         # . retain original days -> int64[D]
 *         if day < 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
*/
    goto __pyx_L4;
  }

  /* "cytimes/pddt.py":2202
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 *         # . 1st day -> int64[D]
 *         elif day == 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29
*/
  __pyx_t_3 = (__pyx_v_day == 1);
  if (__pyx_t_3) {

    /* "cytimes/pddt.py":2203
 *         # . 1st day -> int64[D]
 *         elif day == 1:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)             # <<<<<<<<<<<<<<
 *         # . days before 29
 *         elif day < 29:
*/
    __pyx_t_11.__pyx_n = 3;
    __pyx_t_11.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 0;
    __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_11)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "cytimes/pddt.py":2202
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 *         # . 1st day -> int64[D]
 *         elif day == 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29
*/
    goto __pyx_L4;
  }

  /* "cytimes/pddt.py":2205
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29
 *         elif day < 29:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(
 *                 dateM, utils.DT_NPY_UNIT_MM, day - 1, False
*/
  __pyx_t_3 = (__pyx_v_day < 29);
  if (__pyx_t_3) {

    /* "cytimes/pddt.py":2206
 *         # . days before 29
 *         elif day < 29:
 *             dateD = utils.dt64arr_as_int64_D(             # <<<<<<<<<<<<<<
 *                 dateM, utils.DT_NPY_UNIT_MM, day - 1, False
 *             )
*/
    __pyx_t_11.__pyx_n = 3;
    __pyx_t_11.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_11.offset = (__pyx_v_day - 1);
    __pyx_t_11.copy = 0;
    __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_11)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "cytimes/pddt.py":2205
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29
 *         elif day < 29:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(
 *                 dateM, utils.DT_NPY_UNIT_MM, day - 1, False
*/
    goto __pyx_L4;
  }

  /* "cytimes/pddt.py":2210
 *             )
 *         # . days before 31 -> int64[D]
 *         elif day < 31:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
*/
  __pyx_t_3 = (__pyx_v_day < 31);
  if (__pyx_t_3) {

    /* "cytimes/pddt.py":2211
 *         # . days before 31 -> int64[D]
 *         elif day < 31:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)             # <<<<<<<<<<<<<<
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min(delta, day, 0, False)
*/
    __pyx_t_11.__pyx_n = 3;
    __pyx_t_11.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 1;
    __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_11)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "cytimes/pddt.py":2212
 *         elif day < 31:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)             # <<<<<<<<<<<<<<
 *             delta = utils.arr_min(delta, day, 0, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
*/
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_12.copy = 0;
    __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_month(__pyx_v_dateM, &__pyx_t_12)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "cytimes/pddt.py":2213
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min(delta, day, 0, False)             # <<<<<<<<<<<<<<
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 *         # . last day -> int64[D]
*/
    __pyx_t_16.__pyx_n = 2;
    __pyx_t_16.offset = 0;
    __pyx_t_16.copy = 0;
    __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_min(__pyx_v_delta, __pyx_v_day, &__pyx_t_16)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "cytimes/pddt.py":2214
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min(delta, day, 0, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)             # <<<<<<<<<<<<<<
 *         # . last day -> int64[D]
 *         else:
*/
    __pyx_t_15.__pyx_n = 2;
    __pyx_t_15.offset = -1LL;
    __pyx_t_15.copy = 0;
    __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_15)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "cytimes/pddt.py":2210
 *             )
 *         # . days before 31 -> int64[D]
 *         elif day < 31:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
*/
    goto __pyx_L4;
  }

  /* "cytimes/pddt.py":2217
 *         # . last day -> int64[D]
 *         else:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)             # <<<<<<<<<<<<<<
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
*/
  /*else*/ {
    __pyx_t_11.__pyx_n = 3;
    __pyx_t_11.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 1;
    __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_11)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "cytimes/pddt.py":2218
 *         else:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)             # <<<<<<<<<<<<<<
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 * 
*/
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_12.copy = 0;
    __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_month(__pyx_v_dateM, &__pyx_t_12)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "cytimes/pddt.py":2219
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)             # <<<<<<<<<<<<<<
 * 
 *         # Combine dates & times
*/
    __pyx_t_15.__pyx_n = 2;
    __pyx_t_15.offset = -1LL;
    __pyx_t_15.copy = 0;
    __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_15)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_6));
    __pyx_t_6 = 0;
  }
  __pyx_L4:;

  /* "cytimes/pddt.py":2223
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_17 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS);
  if (__pyx_t_17) {
  } else {
    __pyx_t_3 = __pyx_t_17;
    goto __pyx_L6_bool_binop_done;
  }

  /* "cytimes/pddt.py":2224
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *             dateD, utils.DT_NPY_UNIT_DD             # <<<<<<<<<<<<<<
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
*/
  __pyx_t_18.__pyx_n = 1;
  __pyx_t_18.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
  __pyx_t_17 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_dateD, &__pyx_t_18); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 2223, __pyx_L1_error)

  /* "cytimes/pddt.py":2223
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_19 = (!__pyx_t_17);
  __pyx_t_3 = __pyx_t_19;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_3) {

    /* "cytimes/pddt.py":2226
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US
*/
    __pyx_t_20.__pyx_n = 2;
    __pyx_t_20.offset = 0;
    __pyx_t_20.copy = 0;
    __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateD, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_20)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "cytimes/pddt.py":2227
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *             dtype = utils.DT64_DTYPE_US
 *         # . my_unit safe -> int64[my_unit]
*/
    __pyx_t_21.__pyx_n = 2;
    __pyx_t_21.offset = 0;
    __pyx_t_21.copy = 0;
    __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_times, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_21)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "cytimes/pddt.py":2228
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US             # <<<<<<<<<<<<<<
 *         # . my_unit safe -> int64[my_unit]
 *         else:
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
    __pyx_v_dtype = __pyx_v_7cytimes_5utils_DT64_DTYPE_US;

    /* "cytimes/pddt.py":2223
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":2231
 *         # . my_unit safe -> int64[my_unit]
 *         else:
 *             dates = utils.dt64arr_as_int64(             # <<<<<<<<<<<<<<
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
*/
  /*else*/ {

    /* "cytimes/pddt.py":2232
 *         else:
 *             dates = utils.dt64arr_as_int64(
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False             # <<<<<<<<<<<<<<
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
*/
    __pyx_t_22.__pyx_n = 3;
    __pyx_t_22.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
    __pyx_t_22.offset = 0;
    __pyx_t_22.copy = 0;
    __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64(__pyx_v_dateD, __pyx_v_my_unit, &__pyx_t_22)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "cytimes/pddt.py":2234
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)             # <<<<<<<<<<<<<<
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64
 * 
*/
    __pyx_t_6 = __pyx_f_7cytimes_5utils_nptime_unit_str2dt64(__pyx_v_my_unit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_dtype = __pyx_t_6;
    __pyx_t_6 = 0;
  }
  __pyx_L5:;

  /* "cytimes/pddt.py":2235
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
  __pyx_t_15.__pyx_n = 2;
  __pyx_t_15.offset = 0;
  __pyx_t_15.copy = 0;
  __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_15)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_6));
  __pyx_t_6 = 0;

  /* "cytimes/pddt.py":2238
 * 
 *         # New instance
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *     def to_prev_year(
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_23 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_23);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_23, __pyx_v_dtype};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_23);
  __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_4, __pyx_t_5};
    __pyx_t_25 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 2238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_25);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_23, __pyx_t_25, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2238, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_24, __pyx_t_25, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 2238, __pyx_L1_error)
    __pyx_t_6 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_25);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
    __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
    __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2156
 * 
 *     # . year
 *     def to_curr_year(             # <<<<<<<<<<<<<<
 *         self,
 *         month: int | str | None = None,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_23);
  __Pyx_XDECREF(__pyx_t_24);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_curr_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_my_unit);
  __Pyx_XDECREF((PyObject *)__pyx_v_times);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateY);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateM);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateD);
  __Pyx_XDECREF((PyObject *)__pyx_v_delta);
  __Pyx_XDECREF((PyObject *)__pyx_v_dates);
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2240
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_prev_year(             # <<<<<<<<<<<<<<
 *         self,
 *         month: int | str | None = None,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_75to_prev_year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_74to_prev_year, "Adjust the date to the specified month and day in the previous year `<'Pddt'>`.\n\n        :param month `<'int/str/None'>`: Month value. Defaults to `None`.\n\n            - `<'int'>`  Month number (1=Jan...12=Dec).\n            - `<'str'>`  Month name in lowercase, uppercase or titlecase (e.g., 'Jan', 'februar', '\344\270\211\346\234\210').\n            - `<'None'>` Retains the original month.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n\n        :returns `<'Pddt'>`: The adjusted datetime index in the previous year.\n\n        ## Example\n        >>> pt.to_prev_year(month=\"Feb\", day=31)    # The last day of February in the previous year\n        >>> pt.to_prev_year(month=11)               # The same day of November in the previous year\n        >>> pt.to_prev_year(day=1)                  # The 1st day of the previous month\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_75to_prev_year = {"to_prev_year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_75to_prev_year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_74to_prev_year};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_75to_prev_year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_month = 0;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_prev_year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2240, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2240, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2240, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2240, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_prev_year", 0) < (0)) __PYX_ERR(0, 2240, __pyx_L3_error)

      /* "cytimes/pddt.py":2242
 *     def to_prev_year(
 *         self,
 *         month: int | str | None = None,             # <<<<<<<<<<<<<<
 *         day: cython.int = -1,
 *     ) -> Self:
*/
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_prev_year", 0, 1, 3, i); __PYX_ERR(0, 2240, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2240, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2240, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2240, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_self = values[0];
    __pyx_v_month = values[1];
    if (values[2]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2243, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)((int)-1));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_prev_year", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 2240, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_prev_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_74to_prev_year(__pyx_self, __pyx_v_self, __pyx_v_month, __pyx_v_day);

  /* "cytimes/pddt.py":2240
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_prev_year(             # <<<<<<<<<<<<<<
 *         self,
 *         month: int | str | None = None,
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "cytimes/pddt.py":2263
 *         >>> pt.to_prev_year(day=1)                  # The 1st day of the previous month
 *         """
 *         return self.to_year(-1, month, day)             # <<<<<<<<<<<<<<
 * 
 *     def to_next_year(
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_neg_1, __pyx_v_month, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_year, __pyx_callargs+__pyx_t_4, (4-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2240
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_prev_year(             # <<<<<<<<<<<<<<
 *         self,
 *         month: int | str | None = None,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_prev_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2265
 *         return self.to_year(-1, month, day)
 * 
 *     def to_next_year(             # <<<<<<<<<<<<<<
 *         self,
 *         month: int | str | None = None,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_77to_next_year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_76to_next_year, "Adjust the date to the specified month and day in the next year `<'Pddt'>`.\n\n        :param month `<'int/str/None'>`: Month value. Defaults to `None`.\n\n            - `<'int'>`  Month number (1=Jan...12=Dec).\n            - `<'str'>`  Month name in lowercase, uppercase or titlecase (e.g., 'Jan', 'februar', '\344\270\211\346\234\210').\n            - `<'None'>` Retains the original month.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n\n        :returns `<'Pddt'>`: The adjusted datetime index in the next year.\n\n        ## Example\n        >>> pt.to_next_year(month=\"Feb\", day=31)    # The last day of February in the next year\n        >>> pt.to_next_year(month=11)               # The same day of November in the next year\n        >>> pt.to_next_year(day=1)                  # The 1st day of the next month\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_77to_next_year = {"to_next_year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_77to_next_year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_76to_next_year};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_77to_next_year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_month = 0;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_next_year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2265, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2265, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2265, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2265, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_next_year", 0) < (0)) __PYX_ERR(0, 2265, __pyx_L3_error)

      /* "cytimes/pddt.py":2267
 *     def to_next_year(
 *         self,
 *         month: int | str | None = None,             # <<<<<<<<<<<<<<
 *         day: cython.int = -1,
 *     ) -> Self:
*/
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_next_year", 0, 1, 3, i); __PYX_ERR(0, 2265, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2265, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2265, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2265, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_self = values[0];
    __pyx_v_month = values[1];
    if (values[2]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2268, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)((int)-1));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_next_year", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 2265, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_next_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_76to_next_year(__pyx_self, __pyx_v_self, __pyx_v_month, __pyx_v_day);

  /* "cytimes/pddt.py":2265
 *         return self.to_year(-1, month, day)
 * 
 *     def to_next_year(             # <<<<<<<<<<<<<<
 *         self,
 *         month: int | str | None = None,
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "cytimes/pddt.py":2288
 *         >>> pt.to_next_year(day=1)                  # The 1st day of the next month
 *         """
 *         return self.to_year(1, month, day)             # <<<<<<<<<<<<<<
 * 
 *     def to_year(
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_1, __pyx_v_month, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_year, __pyx_callargs+__pyx_t_4, (4-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2265
 *         return self.to_year(-1, month, day)
 * 
 *     def to_next_year(             # <<<<<<<<<<<<<<
 *         self,
 *         month: int | str | None = None,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_next_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2290
 *         return self.to_year(1, month, day)
 * 
 *     def to_year(             # <<<<<<<<<<<<<<
 *         self,
 *         offset: cython.int,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_79to_year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_78to_year, "Adjust the date to the specified month and day in the year (+/-) offset `<'Pddt'>`.\n\n        :param offset `<'int'>`: The year offset (+/-).\n\n        :param month `<'int/str/None'>`: Month value. Defaults to `None`.\n\n            - `<'int'>` Month number (1=Jan...12=Dec).\n            - `<'str'>` Month name (case-insensitive), e.g., 'Jan', 'februar', '\344\270\211\346\234\210'.\n            - `<'None'>` Retains the original month.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n\n        :returns `<'Pddt'>`: The adjusted datetime index.\n\n        ## Example\n        >>> pt.to_year(-2, \"Feb\", 31)  # The last day of February, two years ago\n        >>> pt.to_year(2, 11)          # The same day of November, two years later\n        >>> pt.to_year(2, day=1)       # The 1st day of the current month, two years later\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_79to_year = {"to_year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_79to_year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_78to_year};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_79to_year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_offset;
  PyObject *__pyx_v_month = 0;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_offset,&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2290, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2290, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2290, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2290, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2290, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_year", 0) < (0)) __PYX_ERR(0, 2290, __pyx_L3_error)

      /* "cytimes/pddt.py":2293
 *         self,
 *         offset: cython.int,
 *         month: int | str | None = None,             # <<<<<<<<<<<<<<
 *         day: cython.int = -1,
 *     ) -> Self:
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_year", 0, 2, 4, i); __PYX_ERR(0, 2290, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2290, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2290, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2290, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2290, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_self = values[0];
    __pyx_v_offset = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2292, __pyx_L3_error)
    __pyx_v_month = values[2];
    if (values[3]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2294, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)((int)-1));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_year", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 2290, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_78to_year(__pyx_self, __pyx_v_self, __pyx_v_offset, __pyx_v_month, __pyx_v_day);

  /* "cytimes/pddt.py":2290
 *         return self.to_year(1, month, day)
 * 
 *     def to_year(             # <<<<<<<<<<<<<<
 *         self,
 *         offset: cython.int,
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_78to_year(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_offset, PyObject *__pyx_v_month, int __pyx_v_day) {
  int __pyx_v_mm;
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_my_unit = 0;
  int __pyx_v_my_reso;
  PyArrayObject *__pyx_v_times = NULL;
  PyArrayObject *__pyx_v_dateY = NULL;
  PyArrayObject *__pyx_v_dateM = NULL;
  PyArrayObject *__pyx_v_delta = NULL;
  PyArrayObject *__pyx_v_dateD = NULL;
  PyArrayObject *__pyx_v_dates = NULL;
  PyObject *__pyx_v_dtype = 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_6parser_parse_month __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_times __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_month __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_13;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_14;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_month __pyx_t_15;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_day __pyx_t_16;
  struct __pyx_opt_args_7cytimes_5utils_arr_min_arr __pyx_t_17;
  struct __pyx_opt_args_7cytimes_5utils_arr_min __pyx_t_18;
  int __pyx_t_19;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_20;
  int __pyx_t_21;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_22;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_23;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 __pyx_t_24;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_year", 0);

  /* "cytimes/pddt.py":2317
 *         """
 *         # Fast-path: no offset
 *         if offset == 0:             # <<<<<<<<<<<<<<
 *             return self.to_curr_year(month, day)
 * 
*/
  __pyx_t_1 = (__pyx_v_offset == 0);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2318
 *         # Fast-path: no offset
 *         if offset == 0:
 *             return self.to_curr_year(month, day)             # <<<<<<<<<<<<<<
 * 
 *         # Access datetime array & info
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_month, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_curr_year, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2318, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":2317
 *         """
 *         # Fast-path: no offset
 *         if offset == 0:             # <<<<<<<<<<<<<<
 *             return self.to_curr_year(month, day)
 * 
*/
  }

  /* "cytimes/pddt.py":2321
 * 
 *         # Access datetime array & info
 *         mm: cython.int = _parse_month(month, None, True)             # <<<<<<<<<<<<<<
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit
*/
  __pyx_t_7.__pyx_n = 2;
  __pyx_t_7.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_7.raise_error = 1;
  __pyx_t_6 = __pyx_f_7cytimes_6parser_parse_month(__pyx_v_month, 0, &__pyx_t_7); if (unlikely(__pyx_t_6 == ((int)-2))) __PYX_ERR(0, 2321, __pyx_L1_error)
  __pyx_v_mm = __pyx_t_6;

  /* "cytimes/pddt.py":2322
 *         # Access datetime array & info
 *         mm: cython.int = _parse_month(month, None, True)
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2322, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2323
 *         mm: cython.int = _parse_month(month, None, True)
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
 * 
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 2323, __pyx_L1_error)
  __pyx_v_my_unit = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2324
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)             # <<<<<<<<<<<<<<
 * 
 *         # Seperate times -> int64[my_unit]
*/
  __pyx_t_6 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_my_unit); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 2324, __pyx_L1_error)
  __pyx_v_my_reso = __pyx_t_6;

  /* "cytimes/pddt.py":2327
 * 
 *         # Seperate times -> int64[my_unit]
 *         times = utils.dt64arr_times(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 * 
 *         # Adjust dates -> int64[Y] + offset -> int64[M]
*/
  __pyx_t_8.__pyx_n = 3;
  __pyx_t_8.arr_reso = __pyx_v_my_reso;
  __pyx_t_8.offset = 0;
  __pyx_t_8.copy = 1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_times = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2330
 * 
 *         # Adjust dates -> int64[Y] + offset -> int64[M]
 *         dateY = utils.dt64arr_as_int64_Y(arr, my_reso, offset, True)             # <<<<<<<<<<<<<<
 *         dateM = utils.dt64arr_as_int64_M(dateY, utils.DT_NPY_UNIT_YY, 0, False)
 *         # . retain original month -> int64[M]
*/
  __pyx_t_9.__pyx_n = 3;
  __pyx_t_9.arr_reso = __pyx_v_my_reso;
  __pyx_t_9.offset = __pyx_v_offset;
  __pyx_t_9.copy = 1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_dateY = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2331
 *         # Adjust dates -> int64[Y] + offset -> int64[M]
 *         dateY = utils.dt64arr_as_int64_Y(arr, my_reso, offset, True)
 *         dateM = utils.dt64arr_as_int64_M(dateY, utils.DT_NPY_UNIT_YY, 0, False)             # <<<<<<<<<<<<<<
 *         # . retain original month -> int64[M]
 *         if mm == -1:
*/
  __pyx_t_10.__pyx_n = 3;
  __pyx_t_10.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_YY;
  __pyx_t_10.offset = 0;
  __pyx_t_10.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(__pyx_v_dateY, &__pyx_t_10)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_dateM = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2333
 *         dateM = utils.dt64arr_as_int64_M(dateY, utils.DT_NPY_UNIT_YY, 0, False)
 *         # . retain original month -> int64[M]
 *         if mm == -1:             # <<<<<<<<<<<<<<
 *             delta = utils.dt64arr_month(arr, my_reso, 0, True)
 *             dateM = utils.arr_add_arr(dateM, delta, -1, False)
*/
  __pyx_t_1 = (__pyx_v_mm == -1L);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2334
 *         # . retain original month -> int64[M]
 *         if mm == -1:
 *             delta = utils.dt64arr_month(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 *             dateM = utils.arr_add_arr(dateM, delta, -1, False)
 *         # . replace with new month -> int64[M]
*/
    __pyx_t_11.__pyx_n = 3;
    __pyx_t_11.arr_reso = __pyx_v_my_reso;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_month(__pyx_v_arr, &__pyx_t_11)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2335
 *         if mm == -1:
 *             delta = utils.dt64arr_month(arr, my_reso, 0, True)
 *             dateM = utils.arr_add_arr(dateM, delta, -1, False)             # <<<<<<<<<<<<<<
 *         # . replace with new month -> int64[M]
 *         else:
*/
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.offset = -1LL;
    __pyx_t_12.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateM, __pyx_v_delta, &__pyx_t_12)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_dateM, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2333
 *         dateM = utils.dt64arr_as_int64_M(dateY, utils.DT_NPY_UNIT_YY, 0, False)
 *         # . retain original month -> int64[M]
 *         if mm == -1:             # <<<<<<<<<<<<<<
 *             delta = utils.dt64arr_month(arr, my_reso, 0, True)
 *             dateM = utils.arr_add_arr(dateM, delta, -1, False)
*/
    goto __pyx_L4;
  }

  /* "cytimes/pddt.py":2338
 *         # . replace with new month -> int64[M]
 *         else:
 *             dateM = utils.arr_add(dateM, mm - 1, False)             # <<<<<<<<<<<<<<
 *         # . retain original days -> int64[D]
 *         if day < 1:
*/
  /*else*/ {
    __pyx_t_13.__pyx_n = 1;
    __pyx_t_13.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_dateM, (__pyx_v_mm - 1), &__pyx_t_13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2338, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_dateM, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;
  }
  __pyx_L4:;

  /* "cytimes/pddt.py":2340
 *             dateM = utils.arr_add(dateM, mm - 1, False)
 *         # . retain original days -> int64[D]
 *         if day < 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
*/
  __pyx_t_1 = (__pyx_v_day < 1);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2341
 *         # . retain original days -> int64[D]
 *         if day < 1:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)             # <<<<<<<<<<<<<<
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min_arr(delta, utils.dt64arr_day(arr, my_reso), 0, False)
*/
    __pyx_t_14.__pyx_n = 3;
    __pyx_t_14.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_14.offset = 0;
    __pyx_t_14.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_14)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2342
 *         if day < 1:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)             # <<<<<<<<<<<<<<
 *             delta = utils.arr_min_arr(delta, utils.dt64arr_day(arr, my_reso), 0, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
*/
    __pyx_t_15.__pyx_n = 2;
    __pyx_t_15.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_15.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_month(__pyx_v_dateM, &__pyx_t_15)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2343
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min_arr(delta, utils.dt64arr_day(arr, my_reso), 0, False)             # <<<<<<<<<<<<<<
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 *         # . 1st day -> int64[D]
*/
    __pyx_t_16.__pyx_n = 1;
    __pyx_t_16.arr_reso = __pyx_v_my_reso;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_day(__pyx_v_arr, &__pyx_t_16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_17.__pyx_n = 2;
    __pyx_t_17.offset = 0;
    __pyx_t_17.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_min_arr(__pyx_v_delta, ((PyArrayObject *)__pyx_t_2), &__pyx_t_17)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2344
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min_arr(delta, utils.dt64arr_day(arr, my_reso), 0, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)             # <<<<<<<<<<<<<<
 *         # . 1st day -> int64[D]
 *         elif day == 1:
*/
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.offset = -1LL;
    __pyx_t_12.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_12)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2340
 *             dateM = utils.arr_add(dateM, mm - 1, False)
 *         # . retain original days -> int64[D]
 *         if day < 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":2346
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 *         # . 1st day -> int64[D]
 *         elif day == 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29
*/
  __pyx_t_1 = (__pyx_v_day == 1);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2347
 *         # . 1st day -> int64[D]
 *         elif day == 1:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)             # <<<<<<<<<<<<<<
 *         # . days before 29
 *         elif day < 29:
*/
    __pyx_t_14.__pyx_n = 3;
    __pyx_t_14.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_14.offset = 0;
    __pyx_t_14.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_14)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2347, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2346
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 *         # . 1st day -> int64[D]
 *         elif day == 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":2349
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29
 *         elif day < 29:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(
 *                 dateM, utils.DT_NPY_UNIT_MM, day - 1, False
*/
  __pyx_t_1 = (__pyx_v_day < 29);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2350
 *         # . days before 29
 *         elif day < 29:
 *             dateD = utils.dt64arr_as_int64_D(             # <<<<<<<<<<<<<<
 *                 dateM, utils.DT_NPY_UNIT_MM, day - 1, False
 *             )
*/
    __pyx_t_14.__pyx_n = 3;
    __pyx_t_14.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_14.offset = (__pyx_v_day - 1);
    __pyx_t_14.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_14)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2349
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29
 *         elif day < 29:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(
 *                 dateM, utils.DT_NPY_UNIT_MM, day - 1, False
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":2354
 *             )
 *         # . days before 31 -> int64[D]
 *         elif day < 31:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
*/
  __pyx_t_1 = (__pyx_v_day < 31);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2355
 *         # . days before 31 -> int64[D]
 *         elif day < 31:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)             # <<<<<<<<<<<<<<
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min(delta, day, 0, False)
*/
    __pyx_t_14.__pyx_n = 3;
    __pyx_t_14.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_14.offset = 0;
    __pyx_t_14.copy = 1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_14)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2356
 *         elif day < 31:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)             # <<<<<<<<<<<<<<
 *             delta = utils.arr_min(delta, day, 0, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
*/
    __pyx_t_15.__pyx_n = 2;
    __pyx_t_15.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_15.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_month(__pyx_v_dateM, &__pyx_t_15)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2357
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min(delta, day, 0, False)             # <<<<<<<<<<<<<<
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 *         # . last day -> int64[D]
*/
    __pyx_t_18.__pyx_n = 2;
    __pyx_t_18.offset = 0;
    __pyx_t_18.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_min(__pyx_v_delta, __pyx_v_day, &__pyx_t_18)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2358
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min(delta, day, 0, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)             # <<<<<<<<<<<<<<
 *         # . last day -> int64[D]
 *         else:
*/
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.offset = -1LL;
    __pyx_t_12.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_12)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2354
 *             )
 *         # . days before 31 -> int64[D]
 *         elif day < 31:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":2361
 *         # . last day -> int64[D]
 *         else:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)             # <<<<<<<<<<<<<<
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
*/
  /*else*/ {
    __pyx_t_14.__pyx_n = 3;
    __pyx_t_14.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_14.offset = 0;
    __pyx_t_14.copy = 1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_14)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2361, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2362
 *         else:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)             # <<<<<<<<<<<<<<
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 * 
*/
    __pyx_t_15.__pyx_n = 2;
    __pyx_t_15.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_15.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_month(__pyx_v_dateM, &__pyx_t_15)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2362, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2363
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)             # <<<<<<<<<<<<<<
 * 
 *         # Combine dates & times
*/
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.offset = -1LL;
    __pyx_t_12.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_12)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;
  }
  __pyx_L5:;

  /* "cytimes/pddt.py":2367
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_19 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS);
  if (__pyx_t_19) {
  } else {
    __pyx_t_1 = __pyx_t_19;
    goto __pyx_L7_bool_binop_done;
  }

  /* "cytimes/pddt.py":2368
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *             dateD, utils.DT_NPY_UNIT_DD             # <<<<<<<<<<<<<<
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
*/
  __pyx_t_20.__pyx_n = 1;
  __pyx_t_20.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
  __pyx_t_19 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_dateD, &__pyx_t_20); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 2367, __pyx_L1_error)

  /* "cytimes/pddt.py":2367
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_21 = (!__pyx_t_19);
  __pyx_t_1 = __pyx_t_21;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2370
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US
*/
    __pyx_t_22.__pyx_n = 2;
    __pyx_t_22.offset = 0;
    __pyx_t_22.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateD, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_22)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2371
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *             dtype = utils.DT64_DTYPE_US
 *         # . my_unit safe -> int64[my_unit]
*/
    __pyx_t_23.__pyx_n = 2;
    __pyx_t_23.offset = 0;
    __pyx_t_23.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_times, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_23)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2372
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US             # <<<<<<<<<<<<<<
 *         # . my_unit safe -> int64[my_unit]
 *         else:
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
    __pyx_v_dtype = __pyx_v_7cytimes_5utils_DT64_DTYPE_US;

    /* "cytimes/pddt.py":2367
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
    goto __pyx_L6;
  }

  /* "cytimes/pddt.py":2375
 *         # . my_unit safe -> int64[my_unit]
 *         else:
 *             dates = utils.dt64arr_as_int64(             # <<<<<<<<<<<<<<
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
*/
  /*else*/ {

    /* "cytimes/pddt.py":2376
 *         else:
 *             dates = utils.dt64arr_as_int64(
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False             # <<<<<<<<<<<<<<
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
*/
    __pyx_t_24.__pyx_n = 3;
    __pyx_t_24.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
    __pyx_t_24.offset = 0;
    __pyx_t_24.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64(__pyx_v_dateD, __pyx_v_my_unit, &__pyx_t_24)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2375, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2378
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)             # <<<<<<<<<<<<<<
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64
 * 
*/
    __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_str2dt64(__pyx_v_my_unit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dtype = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_L6:;

  /* "cytimes/pddt.py":2379
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
  __pyx_t_12.__pyx_n = 2;
  __pyx_t_12.offset = 0;
  __pyx_t_12.copy = 0;
  __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_12)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_4));
  __pyx_t_4 = 0;

  /* "cytimes/pddt.py":2382
 * 
 *         # New instance
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *     # . quarter
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_25 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_25);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_25, __pyx_v_dtype};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 2382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 2382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_27 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 2382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_27);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_25, __pyx_t_27, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2382, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_26, __pyx_t_27, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 2382, __pyx_L1_error)
    __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_27);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
    __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
    __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2290
 *         return self.to_year(1, month, day)
 * 
 *     def to_year(             # <<<<<<<<<<<<<<
 *         self,
 *         offset: cython.int,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_XDECREF(__pyx_t_26);
  __Pyx_XDECREF(__pyx_t_27);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_my_unit);
  __Pyx_XDECREF((PyObject *)__pyx_v_times);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateY);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateM);
  __Pyx_XDECREF((PyObject *)__pyx_v_delta);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateD);
  __Pyx_XDECREF((PyObject *)__pyx_v_dates);
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2385
 * 
 *     # . quarter
 *     def to_curr_quarter(self, month: cython.int = -1, day: cython.int = -1) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specified month-of-quarter and day in the current quarter. `<'Pddt'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_81to_curr_quarter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_80to_curr_quarter, "Adjust the date to the specified month-of-quarter and day in the current quarter. `<'Pddt'>`.\n\n        :param month `<'int'>`: Month of the quarter, automatically clamped to `[1..3]`.\n            Defaults to `SENTINEL` (retains the original month-of-quarter).\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pddt'>`: The adjusted datetime index in the current quarter.\n\n        ## Example\n        >>> pt.to_curr_quarter(month=1, day=31) # The last day of the 1st quarter month in the current quarter\n        >>> pt.to_curr_quarter(month=2)         # The same day of the 2nd quarter month in the current quarter\n        >>> pt.to_curr_quarter(day=1)           # The 1st day of the current month-of-quarter in the current quarter\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_81to_curr_quarter = {"to_curr_quarter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_81to_curr_quarter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_80to_curr_quarter};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_81to_curr_quarter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_month;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_curr_quarter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2385, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2385, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2385, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2385, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_curr_quarter", 0) < (0)) __PYX_ERR(0, 2385, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_curr_quarter", 0, 1, 3, i); __PYX_ERR(0, 2385, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2385, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2385, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2385, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    if (values[1]) {
      __pyx_v_month = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_month == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2385, __pyx_L3_error)
    } else {
      __pyx_v_month = ((int)((int)-1));
    }
    if (values[2]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2385, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)((int)-1));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_curr_quarter", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 2385, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_curr_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_80to_curr_quarter(__pyx_self, __pyx_v_self, __pyx_v_month, __pyx_v_day);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_80to_curr_quarter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_month, int __pyx_v_day) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_my_unit = 0;
  int __pyx_v_my_reso;
  PyArrayObject *__pyx_v_times = NULL;
  PyArrayObject *__pyx_v_dateQ = NULL;
  PyArrayObject *__pyx_v_dateM = NULL;
  PyArrayObject *__pyx_v_dateD = NULL;
  PyArrayObject *__pyx_v_delta = NULL;
  PyArrayObject *__pyx_v_dates = NULL;
  PyObject *__pyx_v_dtype = 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_times __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Q __pyx_t_8;
  long __pyx_t_9;
  long __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_month __pyx_t_13;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_day __pyx_t_14;
  struct __pyx_opt_args_7cytimes_5utils_arr_min_arr __pyx_t_15;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_16;
  struct __pyx_opt_args_7cytimes_5utils_arr_min __pyx_t_17;
  int __pyx_t_18;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_19;
  int __pyx_t_20;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_21;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 __pyx_t_22;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_curr_quarter", 0);

  /* "cytimes/pddt.py":2400
 *         """
 *         # Fast-path: no month adjustment
 *         if month < 1:             # <<<<<<<<<<<<<<
 *             return self.to_curr_month(day)
 * 
*/
  __pyx_t_1 = (__pyx_v_month < 1);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2401
 *         # Fast-path: no month adjustment
 *         if month < 1:
 *             return self.to_curr_month(day)             # <<<<<<<<<<<<<<
 * 
 *         # Access datetime array & info
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_curr_month, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2401, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":2400
 *         """
 *         # Fast-path: no month adjustment
 *         if month < 1:             # <<<<<<<<<<<<<<
 *             return self.to_curr_month(day)
 * 
*/
  }

  /* "cytimes/pddt.py":2404
 * 
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2404, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2405
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
 * 
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 2405, __pyx_L1_error)
  __pyx_v_my_unit = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2406
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)             # <<<<<<<<<<<<<<
 * 
 *         # Seperate times -> int64[my_unit]
*/
  __pyx_t_6 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_my_unit); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 2406, __pyx_L1_error)
  __pyx_v_my_reso = __pyx_t_6;

  /* "cytimes/pddt.py":2409
 * 
 *         # Seperate times -> int64[my_unit]
 *         times = utils.dt64arr_times(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 * 
 *         # Adjust dates -> int64[Q] -> int64[M] + offset
*/
  __pyx_t_7.__pyx_n = 3;
  __pyx_t_7.arr_reso = __pyx_v_my_reso;
  __pyx_t_7.offset = 0;
  __pyx_t_7.copy = 1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_times = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2412
 * 
 *         # Adjust dates -> int64[Q] -> int64[M] + offset
 *         dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 *         dateM = utils.arr_mul(dateQ, 3, min(month, 3) - 1, False)
 *         # . retain original days -> int64[D]
*/
  __pyx_t_8.__pyx_n = 3;
  __pyx_t_8.arr_reso = __pyx_v_my_reso;
  __pyx_t_8.offset = 0;
  __pyx_t_8.copy = 1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Q(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_dateQ = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2413
 *         # Adjust dates -> int64[Q] -> int64[M] + offset
 *         dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 0, True)
 *         dateM = utils.arr_mul(dateQ, 3, min(month, 3) - 1, False)             # <<<<<<<<<<<<<<
 *         # . retain original days -> int64[D]
 *         if day < 1:
*/
  __pyx_t_9 = 3;
  __pyx_t_6 = __pyx_v_month;
  __pyx_t_1 = (__pyx_t_9 < __pyx_t_6);
  if (__pyx_t_1) {
    __pyx_t_10 = __pyx_t_9;
  } else {
    __pyx_t_10 = __pyx_t_6;
  }
  __pyx_t_11.__pyx_n = 2;
  __pyx_t_11.offset = (__pyx_t_10 - 1);
  __pyx_t_11.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateQ, 3, &__pyx_t_11)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_dateM = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2415
 *         dateM = utils.arr_mul(dateQ, 3, min(month, 3) - 1, False)
 *         # . retain original days -> int64[D]
 *         if day < 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
*/
  __pyx_t_1 = (__pyx_v_day < 1);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2416
 *         # . retain original days -> int64[D]
 *         if day < 1:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)             # <<<<<<<<<<<<<<
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min_arr(delta, utils.dt64arr_day(arr, my_reso), 0, False)
*/
    __pyx_t_12.__pyx_n = 3;
    __pyx_t_12.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_12.offset = 0;
    __pyx_t_12.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_12)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2417
 *         if day < 1:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)             # <<<<<<<<<<<<<<
 *             delta = utils.arr_min_arr(delta, utils.dt64arr_day(arr, my_reso), 0, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
*/
    __pyx_t_13.__pyx_n = 2;
    __pyx_t_13.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_13.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_month(__pyx_v_dateM, &__pyx_t_13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2418
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min_arr(delta, utils.dt64arr_day(arr, my_reso), 0, False)             # <<<<<<<<<<<<<<
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 *         # . 1st day -> int64[D]
*/
    __pyx_t_14.__pyx_n = 1;
    __pyx_t_14.arr_reso = __pyx_v_my_reso;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_day(__pyx_v_arr, &__pyx_t_14)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_15.__pyx_n = 2;
    __pyx_t_15.offset = 0;
    __pyx_t_15.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_min_arr(__pyx_v_delta, ((PyArrayObject *)__pyx_t_2), &__pyx_t_15)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2419
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min_arr(delta, utils.dt64arr_day(arr, my_reso), 0, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)             # <<<<<<<<<<<<<<
 *         # . 1st day -> int64[D]
 *         elif day == 1:
*/
    __pyx_t_16.__pyx_n = 2;
    __pyx_t_16.offset = -1LL;
    __pyx_t_16.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_16)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2415
 *         dateM = utils.arr_mul(dateQ, 3, min(month, 3) - 1, False)
 *         # . retain original days -> int64[D]
 *         if day < 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
*/
    goto __pyx_L4;
  }

  /* "cytimes/pddt.py":2421
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 *         # . 1st day -> int64[D]
 *         elif day == 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29
*/
  __pyx_t_1 = (__pyx_v_day == 1);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2422
 *         # . 1st day -> int64[D]
 *         elif day == 1:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)             # <<<<<<<<<<<<<<
 *         # . days before 29
 *         elif day < 29:
*/
    __pyx_t_12.__pyx_n = 3;
    __pyx_t_12.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_12.offset = 0;
    __pyx_t_12.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_12)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2421
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 *         # . 1st day -> int64[D]
 *         elif day == 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29
*/
    goto __pyx_L4;
  }

  /* "cytimes/pddt.py":2424
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29
 *         elif day < 29:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(
 *                 dateM, utils.DT_NPY_UNIT_MM, day - 1, False
*/
  __pyx_t_1 = (__pyx_v_day < 29);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2425
 *         # . days before 29
 *         elif day < 29:
 *             dateD = utils.dt64arr_as_int64_D(             # <<<<<<<<<<<<<<
 *                 dateM, utils.DT_NPY_UNIT_MM, day - 1, False
 *             )
*/
    __pyx_t_12.__pyx_n = 3;
    __pyx_t_12.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_12.offset = (__pyx_v_day - 1);
    __pyx_t_12.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_12)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2424
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29
 *         elif day < 29:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(
 *                 dateM, utils.DT_NPY_UNIT_MM, day - 1, False
*/
    goto __pyx_L4;
  }

  /* "cytimes/pddt.py":2429
 *             )
 *         # . days before 31 -> int64[D]
 *         elif day < 31:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
*/
  __pyx_t_1 = (__pyx_v_day < 31);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2430
 *         # . days before 31 -> int64[D]
 *         elif day < 31:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)             # <<<<<<<<<<<<<<
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min(delta, day, 0, False)
*/
    __pyx_t_12.__pyx_n = 3;
    __pyx_t_12.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_12.offset = 0;
    __pyx_t_12.copy = 1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_12)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2431
 *         elif day < 31:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)             # <<<<<<<<<<<<<<
 *             delta = utils.arr_min(delta, day, 0, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
*/
    __pyx_t_13.__pyx_n = 2;
    __pyx_t_13.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_13.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_month(__pyx_v_dateM, &__pyx_t_13)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2432
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min(delta, day, 0, False)             # <<<<<<<<<<<<<<
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 *         # . last day -> int64[D]
*/
    __pyx_t_17.__pyx_n = 2;
    __pyx_t_17.offset = 0;
    __pyx_t_17.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_min(__pyx_v_delta, __pyx_v_day, &__pyx_t_17)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2433
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min(delta, day, 0, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)             # <<<<<<<<<<<<<<
 *         # . last day -> int64[D]
 *         else:
*/
    __pyx_t_16.__pyx_n = 2;
    __pyx_t_16.offset = -1LL;
    __pyx_t_16.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_16)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2429
 *             )
 *         # . days before 31 -> int64[D]
 *         elif day < 31:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
*/
    goto __pyx_L4;
  }

  /* "cytimes/pddt.py":2436
 *         # . last day -> int64[D]
 *         else:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)             # <<<<<<<<<<<<<<
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
*/
  /*else*/ {
    __pyx_t_12.__pyx_n = 3;
    __pyx_t_12.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_12.offset = 0;
    __pyx_t_12.copy = 1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_12)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2436, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2437
 *         else:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)             # <<<<<<<<<<<<<<
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 * 
*/
    __pyx_t_13.__pyx_n = 2;
    __pyx_t_13.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_13.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_month(__pyx_v_dateM, &__pyx_t_13)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2437, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2438
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)             # <<<<<<<<<<<<<<
 * 
 *         # Combine dates & times
*/
    __pyx_t_16.__pyx_n = 2;
    __pyx_t_16.offset = -1LL;
    __pyx_t_16.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_16)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;
  }
  __pyx_L4:;

  /* "cytimes/pddt.py":2442
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_18 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS);
  if (__pyx_t_18) {
  } else {
    __pyx_t_1 = __pyx_t_18;
    goto __pyx_L6_bool_binop_done;
  }

  /* "cytimes/pddt.py":2443
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *             dateD, utils.DT_NPY_UNIT_DD             # <<<<<<<<<<<<<<
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
*/
  __pyx_t_19.__pyx_n = 1;
  __pyx_t_19.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
  __pyx_t_18 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_dateD, &__pyx_t_19); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 2442, __pyx_L1_error)

  /* "cytimes/pddt.py":2442
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_20 = (!__pyx_t_18);
  __pyx_t_1 = __pyx_t_20;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2445
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US
*/
    __pyx_t_11.__pyx_n = 2;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateD, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_11)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2446
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *             dtype = utils.DT64_DTYPE_US
 *         # . my_unit safe -> int64[my_unit]
*/
    __pyx_t_21.__pyx_n = 2;
    __pyx_t_21.offset = 0;
    __pyx_t_21.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_times, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_21)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2447
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US             # <<<<<<<<<<<<<<
 *         # . my_unit safe -> int64[my_unit]
 *         else:
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
    __pyx_v_dtype = __pyx_v_7cytimes_5utils_DT64_DTYPE_US;

    /* "cytimes/pddt.py":2442
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":2450
 *         # . my_unit safe -> int64[my_unit]
 *         else:
 *             dates = utils.dt64arr_as_int64(             # <<<<<<<<<<<<<<
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
*/
  /*else*/ {

    /* "cytimes/pddt.py":2451
 *         else:
 *             dates = utils.dt64arr_as_int64(
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False             # <<<<<<<<<<<<<<
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
*/
    __pyx_t_22.__pyx_n = 3;
    __pyx_t_22.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
    __pyx_t_22.offset = 0;
    __pyx_t_22.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64(__pyx_v_dateD, __pyx_v_my_unit, &__pyx_t_22)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2453
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)             # <<<<<<<<<<<<<<
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64
 * 
*/
    __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_str2dt64(__pyx_v_my_unit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dtype = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_L5:;

  /* "cytimes/pddt.py":2454
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
  __pyx_t_16.__pyx_n = 2;
  __pyx_t_16.offset = 0;
  __pyx_t_16.copy = 0;
  __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_16)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_4));
  __pyx_t_4 = 0;

  /* "cytimes/pddt.py":2457
 * 
 *         # New instance
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *     def to_prev_quarter(self, month: cython.int = -1, day: cython.int = -1) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_23 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_23);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_23, __pyx_v_dtype};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_23);
  __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_25 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 2457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_25);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_23, __pyx_t_25, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2457, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_24, __pyx_t_25, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 2457, __pyx_L1_error)
    __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_25);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
    __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
    __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2385
 * 
 *     # . quarter
 *     def to_curr_quarter(self, month: cython.int = -1, day: cython.int = -1) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specified month-of-quarter and day in the current quarter. `<'Pddt'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_23);
  __Pyx_XDECREF(__pyx_t_24);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_curr_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_my_unit);
  __Pyx_XDECREF((PyObject *)__pyx_v_times);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateQ);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateM);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateD);
  __Pyx_XDECREF((PyObject *)__pyx_v_delta);
  __Pyx_XDECREF((PyObject *)__pyx_v_dates);
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2459
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_prev_quarter(self, month: cython.int = -1, day: cython.int = -1) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specified month-of-quarter and day in the previous quarter. `<'Pddt'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_83to_prev_quarter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_82to_prev_quarter, "Adjust the date to the specified month-of-quarter and day in the previous quarter. `<'Pddt'>`.\n\n        :param month `<'int'>`: Month of the quarter, automatically clamped to `[1..3]`.\n            Defaults to `SENTINEL` (retains the original month-of-quarter).\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pddt'>`: The adjusted datetime index in the previous quarter.\n\n        ## Example\n        >>> pt.to_prev_quarter(month=1, day=31) # The last day of the 1st quarter month in the previous quarter\n        >>> pt.to_prev_quarter(month=2)         # The same day of the 2nd quarter month in the previous quarter\n        >>> pt.to_prev_quarter(day=1)           # The 1st day of the current month-of-quarter in the previous quarter\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_83to_prev_quarter = {"to_prev_quarter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_83to_prev_quarter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_82to_prev_quarter};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_83to_prev_quarter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_month;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_prev_quarter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2459, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2459, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2459, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2459, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_prev_quarter", 0) < (0)) __PYX_ERR(0, 2459, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_prev_quarter", 0, 1, 3, i); __PYX_ERR(0, 2459, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2459, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2459, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2459, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    if (values[1]) {
      __pyx_v_month = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_month == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2459, __pyx_L3_error)
    } else {
      __pyx_v_month = ((int)((int)-1));
    }
    if (values[2]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2459, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)((int)-1));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_prev_quarter", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 2459, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_prev_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_82to_prev_quarter(__pyx_self, __pyx_v_self, __pyx_v_month, __pyx_v_day);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "cytimes/pddt.py":2473
 *         >>> pt.to_prev_quarter(day=1)           # The 1st day of the current month-of-quarter in the previous quarter
 *         """
 *         return self.to_quarter(-1, month, day)             # <<<<<<<<<<<<<<
 * 
 *     def to_next_quarter(self, month: cython.int = -1, day: cython.int = -1) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_neg_1, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_quarter, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2473, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2459
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_prev_quarter(self, month: cython.int = -1, day: cython.int = -1) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specified month-of-quarter and day in the previous quarter. `<'Pddt'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_prev_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2475
 *         return self.to_quarter(-1, month, day)
 * 
 *     def to_next_quarter(self, month: cython.int = -1, day: cython.int = -1) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specified month-of-quarter and day in the next quarter. `<'Pddt'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_85to_next_quarter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_84to_next_quarter, "Adjust the date to the specified month-of-quarter and day in the next quarter. `<'Pddt'>`.\n\n        :param month `<'int'>`: Month of the quarter, automatically clamped to `[1..3]`.\n            Defaults to `SENTINEL` (retains the original month-of-quarter).\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pddt'>`: The adjusted datetime index in the next quarter.\n\n        ## Example\n        >>> pt.to_next_quarter(month=1, day=31) # The last day of the 1st quarter month in the next quarter\n        >>> pt.to_next_quarter(month=2)         # The same day of the 2nd quarter month in the next quarter\n        >>> pt.to_next_quarter(day=1)           # The 1st day of the current month-of-quarter in the next quarter\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_85to_next_quarter = {"to_next_quarter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_85to_next_quarter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_84to_next_quarter};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_85to_next_quarter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_month;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_next_quarter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2475, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2475, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2475, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2475, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_next_quarter", 0) < (0)) __PYX_ERR(0, 2475, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_next_quarter", 0, 1, 3, i); __PYX_ERR(0, 2475, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2475, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2475, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2475, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    if (values[1]) {
      __pyx_v_month = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_month == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2475, __pyx_L3_error)
    } else {
      __pyx_v_month = ((int)((int)-1));
    }
    if (values[2]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2475, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)((int)-1));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_next_quarter", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 2475, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_next_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_84to_next_quarter(__pyx_self, __pyx_v_self, __pyx_v_month, __pyx_v_day);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "cytimes/pddt.py":2489
 *         >>> pt.to_next_quarter(day=1)           # The 1st day of the current month-of-quarter in the next quarter
 *         """
 *         return self.to_quarter(1, month, day)             # <<<<<<<<<<<<<<
 * 
 *     def to_quarter(
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_1, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_quarter, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2489, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2475
 *         return self.to_quarter(-1, month, day)
 * 
 *     def to_next_quarter(self, month: cython.int = -1, day: cython.int = -1) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specified month-of-quarter and day in the next quarter. `<'Pddt'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_next_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2491
 *         return self.to_quarter(1, month, day)
 * 
 *     def to_quarter(             # <<<<<<<<<<<<<<
 *         self,
 *         offset: cython.int,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_87to_quarter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_86to_quarter, "Adjust the date to the specified month-of-quarter and day in the quarter (+/-) offset `<'Pddt'>`.\n\n        :param offset `<'int'>`: The quarter offset (+/-).\n        :param month `<'int'>`: Month of the quarter, automatically clamped to `[1..3]`.\n            Defaults to `SENTINEL` (retains the original month-of-quarter).\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pddt'>`: The adjusted datetime index.\n\n        ## Example\n        >>> pt.to_quarter(-2, 1, 31)  # The last day of the 1st quarter month, two quarters ago\n        >>> pt.to_quarter(2, 2)       # The same day of the 2nd quarter month, two quarters later\n        >>> pt.to_quarter(2, day=1)   # The 1st day of the current month-of-quarter, two quarters later\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_87to_quarter = {"to_quarter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_87to_quarter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_86to_quarter};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_87to_quarter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_offset;
  int __pyx_v_month;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_quarter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_offset,&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2491, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2491, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2491, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2491, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2491, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_quarter", 0) < (0)) __PYX_ERR(0, 2491, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_quarter", 0, 2, 4, i); __PYX_ERR(0, 2491, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2491, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2491, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2491, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2491, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_offset = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2493, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_month = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_month == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2494, __pyx_L3_error)
    } else {
      __pyx_v_month = ((int)((int)-1));
    }
    if (values[3]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2495, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)((int)-1));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_quarter", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 2491, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_86to_quarter(__pyx_self, __pyx_v_self, __pyx_v_offset, __pyx_v_month, __pyx_v_day);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_86to_quarter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_offset, int __pyx_v_month, int __pyx_v_day) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_my_unit = 0;
  int __pyx_v_my_reso;
  PyArrayObject *__pyx_v_times = NULL;
  PyArrayObject *__pyx_v_dateM = NULL;
  PyArrayObject *__pyx_v_dateQ = NULL;
  PyArrayObject *__pyx_v_dateD = NULL;
  PyArrayObject *__pyx_v_delta = NULL;
  PyArrayObject *__pyx_v_dates = NULL;
  PyObject *__pyx_v_dtype = 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;
  size_t __pyx_t_6;
  int __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_times __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Q __pyx_t_10;
  long __pyx_t_11;
  long __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_13;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_14;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_month __pyx_t_15;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_day __pyx_t_16;
  struct __pyx_opt_args_7cytimes_5utils_arr_min_arr __pyx_t_17;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_18;
  struct __pyx_opt_args_7cytimes_5utils_arr_min __pyx_t_19;
  int __pyx_t_20;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_21;
  int __pyx_t_22;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_23;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 __pyx_t_24;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_quarter", 0);

  /* "cytimes/pddt.py":2512
 *         """
 *         # Fast-path: no offset
 *         if offset == 0:             # <<<<<<<<<<<<<<
 *             return self.to_curr_quarter(month, day)
 * 
*/
  __pyx_t_1 = (__pyx_v_offset == 0);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2513
 *         # Fast-path: no offset
 *         if offset == 0:
 *             return self.to_curr_quarter(month, day)             # <<<<<<<<<<<<<<
 * 
 *         # Access datetime array & info
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_4, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_curr_quarter, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2513, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":2512
 *         """
 *         # Fast-path: no offset
 *         if offset == 0:             # <<<<<<<<<<<<<<
 *             return self.to_curr_quarter(month, day)
 * 
*/
  }

  /* "cytimes/pddt.py":2516
 * 
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2516, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2517
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
 * 
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 2517, __pyx_L1_error)
  __pyx_v_my_unit = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2518
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)             # <<<<<<<<<<<<<<
 * 
 *         # Seperate times -> int64[my_unit]
*/
  __pyx_t_7 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_my_unit); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 2518, __pyx_L1_error)
  __pyx_v_my_reso = __pyx_t_7;

  /* "cytimes/pddt.py":2521
 * 
 *         # Seperate times -> int64[my_unit]
 *         times = utils.dt64arr_times(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 * 
 *         # Adjust dates -> int64[M]
*/
  __pyx_t_8.__pyx_n = 3;
  __pyx_t_8.arr_reso = __pyx_v_my_reso;
  __pyx_t_8.offset = 0;
  __pyx_t_8.copy = 1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_times = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2525
 *         # Adjust dates -> int64[M]
 *         # . retain original month-of-quarter
 *         if month < 1:             # <<<<<<<<<<<<<<
 *             dateM = utils.dt64arr_as_int64_M(arr, my_reso, offset * 3, True)
 *         # . replace with new month-of-quarter
*/
  __pyx_t_1 = (__pyx_v_month < 1);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2526
 *         # . retain original month-of-quarter
 *         if month < 1:
 *             dateM = utils.dt64arr_as_int64_M(arr, my_reso, offset * 3, True)             # <<<<<<<<<<<<<<
 *         # . replace with new month-of-quarter
 *         else:
*/
    __pyx_t_9.__pyx_n = 3;
    __pyx_t_9.arr_reso = __pyx_v_my_reso;
    __pyx_t_9.offset = (__pyx_v_offset * 3);
    __pyx_t_9.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(__pyx_v_arr, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateM = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2525
 *         # Adjust dates -> int64[M]
 *         # . retain original month-of-quarter
 *         if month < 1:             # <<<<<<<<<<<<<<
 *             dateM = utils.dt64arr_as_int64_M(arr, my_reso, offset * 3, True)
 *         # . replace with new month-of-quarter
*/
    goto __pyx_L4;
  }

  /* "cytimes/pddt.py":2529
 *         # . replace with new month-of-quarter
 *         else:
 *             dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 *             dateM = utils.arr_mul(dateQ, 3, offset * 3 + min(month, 3) - 1, False)
 *         # . retain original days -> int64[D]
*/
  /*else*/ {
    __pyx_t_10.__pyx_n = 3;
    __pyx_t_10.arr_reso = __pyx_v_my_reso;
    __pyx_t_10.offset = 0;
    __pyx_t_10.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Q(__pyx_v_arr, &__pyx_t_10)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateQ = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2530
 *         else:
 *             dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 0, True)
 *             dateM = utils.arr_mul(dateQ, 3, offset * 3 + min(month, 3) - 1, False)             # <<<<<<<<<<<<<<
 *         # . retain original days -> int64[D]
 *         if day < 1:
*/
    __pyx_t_11 = 3;
    __pyx_t_7 = __pyx_v_month;
    __pyx_t_1 = (__pyx_t_11 < __pyx_t_7);
    if (__pyx_t_1) {
      __pyx_t_12 = __pyx_t_11;
    } else {
      __pyx_t_12 = __pyx_t_7;
    }
    __pyx_t_13.__pyx_n = 2;
    __pyx_t_13.offset = (((__pyx_v_offset * 3) + __pyx_t_12) - 1);
    __pyx_t_13.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateQ, 3, &__pyx_t_13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2530, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateM = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L4:;

  /* "cytimes/pddt.py":2532
 *             dateM = utils.arr_mul(dateQ, 3, offset * 3 + min(month, 3) - 1, False)
 *         # . retain original days -> int64[D]
 *         if day < 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
*/
  __pyx_t_1 = (__pyx_v_day < 1);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2533
 *         # . retain original days -> int64[D]
 *         if day < 1:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)             # <<<<<<<<<<<<<<
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min_arr(delta, utils.dt64arr_day(arr, my_reso), 0, False)
*/
    __pyx_t_14.__pyx_n = 3;
    __pyx_t_14.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_14.offset = 0;
    __pyx_t_14.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_14)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2534
 *         if day < 1:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)             # <<<<<<<<<<<<<<
 *             delta = utils.arr_min_arr(delta, utils.dt64arr_day(arr, my_reso), 0, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
*/
    __pyx_t_15.__pyx_n = 2;
    __pyx_t_15.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_15.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_month(__pyx_v_dateM, &__pyx_t_15)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2535
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min_arr(delta, utils.dt64arr_day(arr, my_reso), 0, False)             # <<<<<<<<<<<<<<
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 *         # . 1st day -> int64[D]
*/
    __pyx_t_16.__pyx_n = 1;
    __pyx_t_16.arr_reso = __pyx_v_my_reso;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_day(__pyx_v_arr, &__pyx_t_16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2535, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_17.__pyx_n = 2;
    __pyx_t_17.offset = 0;
    __pyx_t_17.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_min_arr(__pyx_v_delta, ((PyArrayObject *)__pyx_t_2), &__pyx_t_17)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2535, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "cytimes/pddt.py":2536
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min_arr(delta, utils.dt64arr_day(arr, my_reso), 0, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)             # <<<<<<<<<<<<<<
 *         # . 1st day -> int64[D]
 *         elif day == 1:
*/
    __pyx_t_18.__pyx_n = 2;
    __pyx_t_18.offset = -1LL;
    __pyx_t_18.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_18)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "cytimes/pddt.py":2532
 *             dateM = utils.arr_mul(dateQ, 3, offset * 3 + min(month, 3) - 1, False)
 *         # . retain original days -> int64[D]
 *         if day < 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":2538
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 *         # . 1st day -> int64[D]
 *         elif day == 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29
*/
  __pyx_t_1 = (__pyx_v_day == 1);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2539
 *         # . 1st day -> int64[D]
 *         elif day == 1:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)             # <<<<<<<<<<<<<<
 *         # . days before 29
 *         elif day < 29:
*/
    __pyx_t_14.__pyx_n = 3;
    __pyx_t_14.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_14.offset = 0;
    __pyx_t_14.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_14)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2539, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "cytimes/pddt.py":2538
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 *         # . 1st day -> int64[D]
 *         elif day == 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":2541
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29
 *         elif day < 29:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(
 *                 dateM, utils.DT_NPY_UNIT_MM, day - 1, False
*/
  __pyx_t_1 = (__pyx_v_day < 29);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2542
 *         # . days before 29
 *         elif day < 29:
 *             dateD = utils.dt64arr_as_int64_D(             # <<<<<<<<<<<<<<
 *                 dateM, utils.DT_NPY_UNIT_MM, day - 1, False
 *             )
*/
    __pyx_t_14.__pyx_n = 3;
    __pyx_t_14.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_14.offset = (__pyx_v_day - 1);
    __pyx_t_14.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_14)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "cytimes/pddt.py":2541
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29
 *         elif day < 29:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(
 *                 dateM, utils.DT_NPY_UNIT_MM, day - 1, False
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":2546
 *             )
 *         # . days before 31 -> int64[D]
 *         elif day < 31:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
*/
  __pyx_t_1 = (__pyx_v_day < 31);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2547
 *         # . days before 31 -> int64[D]
 *         elif day < 31:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)             # <<<<<<<<<<<<<<
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min(delta, day, 0, False)
*/
    __pyx_t_14.__pyx_n = 3;
    __pyx_t_14.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_14.offset = 0;
    __pyx_t_14.copy = 1;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_14)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "cytimes/pddt.py":2548
 *         elif day < 31:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)             # <<<<<<<<<<<<<<
 *             delta = utils.arr_min(delta, day, 0, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
*/
    __pyx_t_15.__pyx_n = 2;
    __pyx_t_15.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_15.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_month(__pyx_v_dateM, &__pyx_t_15)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "cytimes/pddt.py":2549
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min(delta, day, 0, False)             # <<<<<<<<<<<<<<
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 *         # . last day -> int64[D]
*/
    __pyx_t_19.__pyx_n = 2;
    __pyx_t_19.offset = 0;
    __pyx_t_19.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_min(__pyx_v_delta, __pyx_v_day, &__pyx_t_19)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2549, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "cytimes/pddt.py":2550
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min(delta, day, 0, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)             # <<<<<<<<<<<<<<
 *         # . last day -> int64[D]
 *         else:
*/
    __pyx_t_18.__pyx_n = 2;
    __pyx_t_18.offset = -1LL;
    __pyx_t_18.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_18)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "cytimes/pddt.py":2546
 *             )
 *         # . days before 31 -> int64[D]
 *         elif day < 31:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":2553
 *         # . last day -> int64[D]
 *         else:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)             # <<<<<<<<<<<<<<
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
*/
  /*else*/ {
    __pyx_t_14.__pyx_n = 3;
    __pyx_t_14.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_14.offset = 0;
    __pyx_t_14.copy = 1;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_14)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2553, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "cytimes/pddt.py":2554
 *         else:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)             # <<<<<<<<<<<<<<
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 * 
*/
    __pyx_t_15.__pyx_n = 2;
    __pyx_t_15.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_15.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_month(__pyx_v_dateM, &__pyx_t_15)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "cytimes/pddt.py":2555
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)             # <<<<<<<<<<<<<<
 * 
 *         # Combine dates & times
*/
    __pyx_t_18.__pyx_n = 2;
    __pyx_t_18.offset = -1LL;
    __pyx_t_18.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_18)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_5));
    __pyx_t_5 = 0;
  }
  __pyx_L5:;

  /* "cytimes/pddt.py":2559
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_20 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS);
  if (__pyx_t_20) {
  } else {
    __pyx_t_1 = __pyx_t_20;
    goto __pyx_L7_bool_binop_done;
  }

  /* "cytimes/pddt.py":2560
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *             dateD, utils.DT_NPY_UNIT_DD             # <<<<<<<<<<<<<<
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
*/
  __pyx_t_21.__pyx_n = 1;
  __pyx_t_21.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
  __pyx_t_20 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_dateD, &__pyx_t_21); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 2559, __pyx_L1_error)

  /* "cytimes/pddt.py":2559
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_22 = (!__pyx_t_20);
  __pyx_t_1 = __pyx_t_22;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2562
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US
*/
    __pyx_t_13.__pyx_n = 2;
    __pyx_t_13.offset = 0;
    __pyx_t_13.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateD, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_13)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "cytimes/pddt.py":2563
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *             dtype = utils.DT64_DTYPE_US
 *         # . my_unit safe -> int64[my_unit]
*/
    __pyx_t_23.__pyx_n = 2;
    __pyx_t_23.offset = 0;
    __pyx_t_23.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_times, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_23)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "cytimes/pddt.py":2564
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US             # <<<<<<<<<<<<<<
 *         # . my_unit safe -> int64[my_unit]
 *         else:
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
    __pyx_v_dtype = __pyx_v_7cytimes_5utils_DT64_DTYPE_US;

    /* "cytimes/pddt.py":2559
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
    goto __pyx_L6;
  }

  /* "cytimes/pddt.py":2567
 *         # . my_unit safe -> int64[my_unit]
 *         else:
 *             dates = utils.dt64arr_as_int64(             # <<<<<<<<<<<<<<
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
*/
  /*else*/ {

    /* "cytimes/pddt.py":2568
 *         else:
 *             dates = utils.dt64arr_as_int64(
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False             # <<<<<<<<<<<<<<
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
*/
    __pyx_t_24.__pyx_n = 3;
    __pyx_t_24.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
    __pyx_t_24.offset = 0;
    __pyx_t_24.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64(__pyx_v_dateD, __pyx_v_my_unit, &__pyx_t_24)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "cytimes/pddt.py":2570
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)             # <<<<<<<<<<<<<<
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64
 * 
*/
    __pyx_t_5 = __pyx_f_7cytimes_5utils_nptime_unit_str2dt64(__pyx_v_my_unit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_dtype = __pyx_t_5;
    __pyx_t_5 = 0;
  }
  __pyx_L6:;

  /* "cytimes/pddt.py":2571
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
  __pyx_t_18.__pyx_n = 2;
  __pyx_t_18.offset = 0;
  __pyx_t_18.copy = 0;
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_18)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
  __pyx_t_5 = 0;

  /* "cytimes/pddt.py":2574
 * 
 *         # New instance
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *     # . month
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_dtype};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2574, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 2574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_26 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 2574, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_26);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_3, __pyx_t_26, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2574, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_25, __pyx_t_26, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 2574, __pyx_L1_error)
    __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_26);
    __Pyx_XDECREF(__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_DECREF(__pyx_t_25); __pyx_t_25 = 0;
    __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2574, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2491
 *         return self.to_quarter(1, month, day)
 * 
 *     def to_quarter(             # <<<<<<<<<<<<<<
 *         self,
 *         offset: cython.int,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_XDECREF(__pyx_t_26);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_my_unit);
  __Pyx_XDECREF((PyObject *)__pyx_v_times);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateM);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateQ);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateD);
  __Pyx_XDECREF((PyObject *)__pyx_v_delta);
  __Pyx_XDECREF((PyObject *)__pyx_v_dates);
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2577
 * 
 *     # . month
 *     def to_curr_month(self, day: cython.int = -1) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specified day of the current month `<'Pddt'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_89to_curr_month(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_88to_curr_month, "Adjust the date to the specified day of the current month `<'Pddt'>`.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n\n        :returns `<'Pddt'>`: The adjusted datetime index in the current month.\n\n        ## Example\n        >>> pt.to_curr_month(31)  # The last day of the current month\n        >>> pt.to_curr_month(1)   # The 1st day of the current month\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_89to_curr_month = {"to_curr_month", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_89to_curr_month, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_88to_curr_month};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_89to_curr_month(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_curr_month (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2577, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2577, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2577, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_curr_month", 0) < (0)) __PYX_ERR(0, 2577, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_curr_month", 0, 1, 2, i); __PYX_ERR(0, 2577, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2577, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2577, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    if (values[1]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2577, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)((int)-1));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_curr_month", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2577, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_curr_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_88to_curr_month(__pyx_self, __pyx_v_self, __pyx_v_day);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_88to_curr_month(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_day) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_my_unit = 0;
  int __pyx_v_my_reso;
  PyArrayObject *__pyx_v_times = NULL;
  PyArrayObject *__pyx_v_dateM = NULL;
  PyArrayObject *__pyx_v_dateD = NULL;
  PyArrayObject *__pyx_v_delta = NULL;
  PyArrayObject *__pyx_v_dates = NULL;
  PyObject *__pyx_v_dtype = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_times __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_month __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_arr_min __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_9;
  int __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_11;
  int __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_13;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_14;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  size_t __pyx_t_19;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_curr_month", 0);

  /* "cytimes/pddt.py":2590
 *         """
 *         # Fast-path: no adjustment
 *         if day < 1:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  __pyx_t_1 = (__pyx_v_day < 1);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2591
 *         # Fast-path: no adjustment
 *         if day < 1:
 *             return self  # exit             # <<<<<<<<<<<<<<
 * 
 *         # Access datetime array & info
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pddt.py":2590
 *         """
 *         # Fast-path: no adjustment
 *         if day < 1:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  }

  /* "cytimes/pddt.py":2594
 * 
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2594, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2595
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
 * 
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 2595, __pyx_L1_error)
  __pyx_v_my_unit = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2596
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)             # <<<<<<<<<<<<<<
 * 
 *         # Seperate times -> int64[my_unit]
*/
  __pyx_t_3 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_my_unit); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 2596, __pyx_L1_error)
  __pyx_v_my_reso = __pyx_t_3;

  /* "cytimes/pddt.py":2599
 * 
 *         # Seperate times -> int64[my_unit]
 *         times = utils.dt64arr_times(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 * 
 *         # Adjust dates -> int64[M]
*/
  __pyx_t_4.__pyx_n = 3;
  __pyx_t_4.arr_reso = __pyx_v_my_reso;
  __pyx_t_4.offset = 0;
  __pyx_t_4.copy = 1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_times = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2602
 * 
 *         # Adjust dates -> int64[M]
 *         dateM = utils.dt64arr_as_int64_M(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 *         # . 1st day -> int64[D]
 *         if day == 1:
*/
  __pyx_t_5.__pyx_n = 3;
  __pyx_t_5.arr_reso = __pyx_v_my_reso;
  __pyx_t_5.offset = 0;
  __pyx_t_5.copy = 1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(__pyx_v_arr, &__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_dateM = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2604
 *         dateM = utils.dt64arr_as_int64_M(arr, my_reso, 0, True)
 *         # . 1st day -> int64[D]
 *         if day == 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29 -> int64[D]
*/
  __pyx_t_1 = (__pyx_v_day == 1);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2605
 *         # . 1st day -> int64[D]
 *         if day == 1:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)             # <<<<<<<<<<<<<<
 *         # . days before 29 -> int64[D]
 *         elif day < 29:
*/
    __pyx_t_6.__pyx_n = 3;
    __pyx_t_6.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_6.offset = 0;
    __pyx_t_6.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2605, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2604
 *         dateM = utils.dt64arr_as_int64_M(arr, my_reso, 0, True)
 *         # . 1st day -> int64[D]
 *         if day == 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29 -> int64[D]
*/
    goto __pyx_L4;
  }

  /* "cytimes/pddt.py":2607
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29 -> int64[D]
 *         elif day < 29:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(
 *                 dateM, utils.DT_NPY_UNIT_MM, day - 1, False
*/
  __pyx_t_1 = (__pyx_v_day < 29);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2608
 *         # . days before 29 -> int64[D]
 *         elif day < 29:
 *             dateD = utils.dt64arr_as_int64_D(             # <<<<<<<<<<<<<<
 *                 dateM, utils.DT_NPY_UNIT_MM, day - 1, False
 *             )
*/
    __pyx_t_6.__pyx_n = 3;
    __pyx_t_6.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_6.offset = (__pyx_v_day - 1);
    __pyx_t_6.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2607
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29 -> int64[D]
 *         elif day < 29:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(
 *                 dateM, utils.DT_NPY_UNIT_MM, day - 1, False
*/
    goto __pyx_L4;
  }

  /* "cytimes/pddt.py":2612
 *             )
 *         # . days before 31 -> int64[D]
 *         elif day < 31:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
*/
  __pyx_t_1 = (__pyx_v_day < 31);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2613
 *         # . days before 31 -> int64[D]
 *         elif day < 31:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)             # <<<<<<<<<<<<<<
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min(delta, day, 0, False)
*/
    __pyx_t_6.__pyx_n = 3;
    __pyx_t_6.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_6.offset = 0;
    __pyx_t_6.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2613, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2614
 *         elif day < 31:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)             # <<<<<<<<<<<<<<
 *             delta = utils.arr_min(delta, day, 0, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
*/
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_7.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_month(__pyx_v_dateM, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2614, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2615
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min(delta, day, 0, False)             # <<<<<<<<<<<<<<
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 *         # . last day -> int64[D]
*/
    __pyx_t_8.__pyx_n = 2;
    __pyx_t_8.offset = 0;
    __pyx_t_8.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_min(__pyx_v_delta, __pyx_v_day, &__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2616
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min(delta, day, 0, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)             # <<<<<<<<<<<<<<
 *         # . last day -> int64[D]
 *         else:
*/
    __pyx_t_9.__pyx_n = 2;
    __pyx_t_9.offset = -1LL;
    __pyx_t_9.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2612
 *             )
 *         # . days before 31 -> int64[D]
 *         elif day < 31:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
*/
    goto __pyx_L4;
  }

  /* "cytimes/pddt.py":2619
 *         # . last day -> int64[D]
 *         else:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)             # <<<<<<<<<<<<<<
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
*/
  /*else*/ {
    __pyx_t_6.__pyx_n = 3;
    __pyx_t_6.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_6.offset = 0;
    __pyx_t_6.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2620
 *         else:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)             # <<<<<<<<<<<<<<
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 * 
*/
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_7.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_month(__pyx_v_dateM, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2621
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)             # <<<<<<<<<<<<<<
 * 
 *         # Combine dates & times
*/
    __pyx_t_9.__pyx_n = 2;
    __pyx_t_9.offset = -1LL;
    __pyx_t_9.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;
  }
  __pyx_L4:;

  /* "cytimes/pddt.py":2625
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_10 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS);
  if (__pyx_t_10) {
  } else {
    __pyx_t_1 = __pyx_t_10;
    goto __pyx_L6_bool_binop_done;
  }

  /* "cytimes/pddt.py":2626
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *             dateD, utils.DT_NPY_UNIT_DD             # <<<<<<<<<<<<<<
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
*/
  __pyx_t_11.__pyx_n = 1;
  __pyx_t_11.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
  __pyx_t_10 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_dateD, &__pyx_t_11); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2625, __pyx_L1_error)

  /* "cytimes/pddt.py":2625
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_12 = (!__pyx_t_10);
  __pyx_t_1 = __pyx_t_12;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2628
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US
*/
    __pyx_t_13.__pyx_n = 2;
    __pyx_t_13.offset = 0;
    __pyx_t_13.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateD, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2628, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2629
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *             dtype = utils.DT64_DTYPE_US
 *         # . my_unit safe -> int64[my_unit]
*/
    __pyx_t_14.__pyx_n = 2;
    __pyx_t_14.offset = 0;
    __pyx_t_14.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_times, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_14)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2630
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US             # <<<<<<<<<<<<<<
 *         # . my_unit safe -> int64[my_unit]
 *         else:
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
    __pyx_v_dtype = __pyx_v_7cytimes_5utils_DT64_DTYPE_US;

    /* "cytimes/pddt.py":2625
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":2633
 *         # . my_unit safe -> int64[my_unit]
 *         else:
 *             dates = utils.dt64arr_as_int64(             # <<<<<<<<<<<<<<
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
*/
  /*else*/ {

    /* "cytimes/pddt.py":2634
 *         else:
 *             dates = utils.dt64arr_as_int64(
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False             # <<<<<<<<<<<<<<
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
*/
    __pyx_t_15.__pyx_n = 3;
    __pyx_t_15.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
    __pyx_t_15.offset = 0;
    __pyx_t_15.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64(__pyx_v_dateD, __pyx_v_my_unit, &__pyx_t_15)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2636
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)             # <<<<<<<<<<<<<<
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64
 * 
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_nptime_unit_str2dt64(__pyx_v_my_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dtype = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L5:;

  /* "cytimes/pddt.py":2637
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
  __pyx_t_9.__pyx_n = 2;
  __pyx_t_9.offset = 0;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2640
 * 
 *         # New instance
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *     def to_prev_month(self, day: cython.int = -1) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_16 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_16);
  __pyx_t_18 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_18);
  __pyx_t_19 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_18, __pyx_v_dtype};
    __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_19, (2-__pyx_t_19) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
  }
  __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 2640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __pyx_t_19 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_16, __pyx_t_17};
    __pyx_t_21 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 2640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_18, __pyx_t_21, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2640, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_20, __pyx_t_21, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 2640, __pyx_L1_error)
    __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_19, (2-__pyx_t_19) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_21);
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2577
 * 
 *     # . month
 *     def to_curr_month(self, day: cython.int = -1) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specified day of the current month `<'Pddt'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_curr_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_my_unit);
  __Pyx_XDECREF((PyObject *)__pyx_v_times);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateM);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateD);
  __Pyx_XDECREF((PyObject *)__pyx_v_delta);
  __Pyx_XDECREF((PyObject *)__pyx_v_dates);
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2642
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_prev_month(self, day: cython.int = -1) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specified day of the previous month `<'Pddt'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_91to_prev_month(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_90to_prev_month, "Adjust the date to the specified day of the previous month `<'Pddt'>`.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n\n        :returns `<'Pddt'>`: The adjusted datetime index in the previous month.\n\n        ## Example\n        >>> pt.to_prev_month(31)  # The last day of the previous month\n        >>> pt.to_prev_month(1)   # The 1st day of the previous month\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_91to_prev_month = {"to_prev_month", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_91to_prev_month, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_90to_prev_month};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_91to_prev_month(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_prev_month (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2642, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2642, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2642, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_prev_month", 0) < (0)) __PYX_ERR(0, 2642, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_prev_month", 0, 1, 2, i); __PYX_ERR(0, 2642, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2642, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2642, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    if (values[1]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2642, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)((int)-1));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_prev_month", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2642, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_prev_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_90to_prev_month(__pyx_self, __pyx_v_self, __pyx_v_day);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "cytimes/pddt.py":2654
 *         >>> pt.to_prev_month(1)   # The 1st day of the previous month
 *         """
 *         return self.to_month(-1, day)             # <<<<<<<<<<<<<<
 * 
 *     def to_next_month(self, day: cython.int = -1) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_neg_1, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_month, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2654, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2642
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_prev_month(self, day: cython.int = -1) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specified day of the previous month `<'Pddt'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_prev_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2656
 *         return self.to_month(-1, day)
 * 
 *     def to_next_month(self, day: cython.int = -1) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specified day of the next month `<'Pddt'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_93to_next_month(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_92to_next_month, "Adjust the date to the specified day of the next month `<'Pddt'>`.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n\n        :returns `<'Pddt'>`: The adjusted datetime index in the next month.\n\n        ## Example\n        >>> pt.to_next_month(31)  # The last day of the next month\n        >>> pt.to_next_month(1)   # The 1st day of the next month\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_93to_next_month = {"to_next_month", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_93to_next_month, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_92to_next_month};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_93to_next_month(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_next_month (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2656, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2656, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2656, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_next_month", 0) < (0)) __PYX_ERR(0, 2656, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_next_month", 0, 1, 2, i); __PYX_ERR(0, 2656, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2656, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2656, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    if (values[1]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2656, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)((int)-1));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_next_month", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2656, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_next_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_92to_next_month(__pyx_self, __pyx_v_self, __pyx_v_day);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "cytimes/pddt.py":2668
 *         >>> pt.to_next_month(1)   # The 1st day of the next month
 *         """
 *         return self.to_month(1, day)             # <<<<<<<<<<<<<<
 * 
 *     def to_month(self, offset: cython.int, day: cython.int = -1) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_1, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_month, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2656
 *         return self.to_month(-1, day)
 * 
 *     def to_next_month(self, day: cython.int = -1) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specified day of the next month `<'Pddt'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_next_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2670
 *         return self.to_month(1, day)
 * 
 *     def to_month(self, offset: cython.int, day: cython.int = -1) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specified day of the month (+/-) offset `<'Pddt'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_95to_month(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_94to_month, "Adjust the date to the specified day of the month (+/-) offset `<'Pddt'>`.\n\n        :param offset `<'int'>`: The month offset (+/-).\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pddt'>`: The adjusted datetime index.\n\n        ## Example\n        >>> pt.to_month(-2, 31)  # The last day of the month, two months ago\n        >>> pt.to_month(2, 1)    # The 1st day of the month, two months later\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_95to_month = {"to_month", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_95to_month, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_94to_month};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_95to_month(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_offset;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_month (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_offset,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2670, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2670, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2670, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2670, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_month", 0) < (0)) __PYX_ERR(0, 2670, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_month", 0, 2, 3, i); __PYX_ERR(0, 2670, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2670, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2670, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2670, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_offset = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2670, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2670, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)((int)-1));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_month", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 2670, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_94to_month(__pyx_self, __pyx_v_self, __pyx_v_offset, __pyx_v_day);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_94to_month(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_offset, int __pyx_v_day) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_my_unit = 0;
  int __pyx_v_my_reso;
  PyArrayObject *__pyx_v_times = NULL;
  PyArrayObject *__pyx_v_dateM = NULL;
  PyArrayObject *__pyx_v_dateD = NULL;
  PyArrayObject *__pyx_v_delta = NULL;
  PyArrayObject *__pyx_v_dates = NULL;
  PyObject *__pyx_v_dtype = 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_times __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_month __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_day __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_arr_min_arr __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_13;
  struct __pyx_opt_args_7cytimes_5utils_arr_min __pyx_t_14;
  int __pyx_t_15;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_16;
  int __pyx_t_17;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_18;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_19;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 __pyx_t_20;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_month", 0);

  /* "cytimes/pddt.py":2683
 *         """
 *         # Fast-path: no offset
 *         if offset == 0:             # <<<<<<<<<<<<<<
 *             return self.to_curr_month(day)
 * 
*/
  __pyx_t_1 = (__pyx_v_offset == 0);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2684
 *         # Fast-path: no offset
 *         if offset == 0:
 *             return self.to_curr_month(day)             # <<<<<<<<<<<<<<
 * 
 *         # Access datetime array & info
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_curr_month, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2684, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":2683
 *         """
 *         # Fast-path: no offset
 *         if offset == 0:             # <<<<<<<<<<<<<<
 *             return self.to_curr_month(day)
 * 
*/
  }

  /* "cytimes/pddt.py":2687
 * 
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2687, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2688
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
 * 
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 2688, __pyx_L1_error)
  __pyx_v_my_unit = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2689
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)             # <<<<<<<<<<<<<<
 * 
 *         # Seperate times -> int64[my_unit]
*/
  __pyx_t_6 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_my_unit); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 2689, __pyx_L1_error)
  __pyx_v_my_reso = __pyx_t_6;

  /* "cytimes/pddt.py":2692
 * 
 *         # Seperate times -> int64[my_unit]
 *         times = utils.dt64arr_times(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 * 
 *         # Adjust dates -> int64[M] + offset
*/
  __pyx_t_7.__pyx_n = 3;
  __pyx_t_7.arr_reso = __pyx_v_my_reso;
  __pyx_t_7.offset = 0;
  __pyx_t_7.copy = 1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_times = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2695
 * 
 *         # Adjust dates -> int64[M] + offset
 *         dateM = utils.dt64arr_as_int64_M(arr, my_reso, offset, True)             # <<<<<<<<<<<<<<
 *         # . retain original days -> int64[D]
 *         if day < 1:
*/
  __pyx_t_8.__pyx_n = 3;
  __pyx_t_8.arr_reso = __pyx_v_my_reso;
  __pyx_t_8.offset = __pyx_v_offset;
  __pyx_t_8.copy = 1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_dateM = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2697
 *         dateM = utils.dt64arr_as_int64_M(arr, my_reso, offset, True)
 *         # . retain original days -> int64[D]
 *         if day < 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
*/
  __pyx_t_1 = (__pyx_v_day < 1);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2698
 *         # . retain original days -> int64[D]
 *         if day < 1:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)             # <<<<<<<<<<<<<<
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min_arr(delta, utils.dt64arr_day(arr, my_reso), 0, False)
*/
    __pyx_t_9.__pyx_n = 3;
    __pyx_t_9.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_9.offset = 0;
    __pyx_t_9.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2699
 *         if day < 1:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)             # <<<<<<<<<<<<<<
 *             delta = utils.arr_min_arr(delta, utils.dt64arr_day(arr, my_reso), 0, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
*/
    __pyx_t_10.__pyx_n = 2;
    __pyx_t_10.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_10.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_month(__pyx_v_dateM, &__pyx_t_10)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2700
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min_arr(delta, utils.dt64arr_day(arr, my_reso), 0, False)             # <<<<<<<<<<<<<<
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 *         # . 1st day -> int64[D]
*/
    __pyx_t_11.__pyx_n = 1;
    __pyx_t_11.arr_reso = __pyx_v_my_reso;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_day(__pyx_v_arr, &__pyx_t_11)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2700, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.offset = 0;
    __pyx_t_12.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_min_arr(__pyx_v_delta, ((PyArrayObject *)__pyx_t_2), &__pyx_t_12)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2700, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2701
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min_arr(delta, utils.dt64arr_day(arr, my_reso), 0, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)             # <<<<<<<<<<<<<<
 *         # . 1st day -> int64[D]
 *         elif day == 1:
*/
    __pyx_t_13.__pyx_n = 2;
    __pyx_t_13.offset = -1LL;
    __pyx_t_13.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_13)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2697
 *         dateM = utils.dt64arr_as_int64_M(arr, my_reso, offset, True)
 *         # . retain original days -> int64[D]
 *         if day < 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
*/
    goto __pyx_L4;
  }

  /* "cytimes/pddt.py":2703
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 *         # . 1st day -> int64[D]
 *         elif day == 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29 -> int64[D]
*/
  __pyx_t_1 = (__pyx_v_day == 1);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2704
 *         # . 1st day -> int64[D]
 *         elif day == 1:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)             # <<<<<<<<<<<<<<
 *         # . days before 29 -> int64[D]
 *         elif day < 29:
*/
    __pyx_t_9.__pyx_n = 3;
    __pyx_t_9.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_9.offset = 0;
    __pyx_t_9.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_9)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2703
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 *         # . 1st day -> int64[D]
 *         elif day == 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29 -> int64[D]
*/
    goto __pyx_L4;
  }

  /* "cytimes/pddt.py":2706
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29 -> int64[D]
 *         elif day < 29:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(
 *                 dateM, utils.DT_NPY_UNIT_MM, day - 1, False
*/
  __pyx_t_1 = (__pyx_v_day < 29);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2707
 *         # . days before 29 -> int64[D]
 *         elif day < 29:
 *             dateD = utils.dt64arr_as_int64_D(             # <<<<<<<<<<<<<<
 *                 dateM, utils.DT_NPY_UNIT_MM, day - 1, False
 *             )
*/
    __pyx_t_9.__pyx_n = 3;
    __pyx_t_9.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_9.offset = (__pyx_v_day - 1);
    __pyx_t_9.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_9)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2706
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 *         # . days before 29 -> int64[D]
 *         elif day < 29:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(
 *                 dateM, utils.DT_NPY_UNIT_MM, day - 1, False
*/
    goto __pyx_L4;
  }

  /* "cytimes/pddt.py":2711
 *             )
 *         # . days before 31 -> int64[D]
 *         elif day < 31:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
*/
  __pyx_t_1 = (__pyx_v_day < 31);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2712
 *         # . days before 31 -> int64[D]
 *         elif day < 31:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)             # <<<<<<<<<<<<<<
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min(delta, day, 0, False)
*/
    __pyx_t_9.__pyx_n = 3;
    __pyx_t_9.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_9.offset = 0;
    __pyx_t_9.copy = 1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_9)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2713
 *         elif day < 31:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)             # <<<<<<<<<<<<<<
 *             delta = utils.arr_min(delta, day, 0, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
*/
    __pyx_t_10.__pyx_n = 2;
    __pyx_t_10.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_10.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_month(__pyx_v_dateM, &__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2714
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min(delta, day, 0, False)             # <<<<<<<<<<<<<<
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 *         # . last day -> int64[D]
*/
    __pyx_t_14.__pyx_n = 2;
    __pyx_t_14.offset = 0;
    __pyx_t_14.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_min(__pyx_v_delta, __pyx_v_day, &__pyx_t_14)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2715
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             delta = utils.arr_min(delta, day, 0, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)             # <<<<<<<<<<<<<<
 *         # . last day -> int64[D]
 *         else:
*/
    __pyx_t_13.__pyx_n = 2;
    __pyx_t_13.offset = -1LL;
    __pyx_t_13.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_13)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2711
 *             )
 *         # . days before 31 -> int64[D]
 *         elif day < 31:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
*/
    goto __pyx_L4;
  }

  /* "cytimes/pddt.py":2718
 *         # . last day -> int64[D]
 *         else:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)             # <<<<<<<<<<<<<<
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
*/
  /*else*/ {
    __pyx_t_9.__pyx_n = 3;
    __pyx_t_9.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_9.offset = 0;
    __pyx_t_9.copy = 1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_9)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2719
 *         else:
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)             # <<<<<<<<<<<<<<
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)
 * 
*/
    __pyx_t_10.__pyx_n = 2;
    __pyx_t_10.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_10.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_month(__pyx_v_dateM, &__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2719, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2720
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, True)
 *             delta = utils.dt64arr_days_in_month(dateM, utils.DT_NPY_UNIT_MM, False)
 *             dateD = utils.arr_add_arr(dateD, delta, -1, False)             # <<<<<<<<<<<<<<
 * 
 *         # Combine dates & times
*/
    __pyx_t_13.__pyx_n = 2;
    __pyx_t_13.offset = -1LL;
    __pyx_t_13.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_13)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;
  }
  __pyx_L4:;

  /* "cytimes/pddt.py":2724
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_15 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS);
  if (__pyx_t_15) {
  } else {
    __pyx_t_1 = __pyx_t_15;
    goto __pyx_L6_bool_binop_done;
  }

  /* "cytimes/pddt.py":2725
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *             dateD, utils.DT_NPY_UNIT_DD             # <<<<<<<<<<<<<<
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
*/
  __pyx_t_16.__pyx_n = 1;
  __pyx_t_16.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
  __pyx_t_15 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_dateD, &__pyx_t_16); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 2724, __pyx_L1_error)

  /* "cytimes/pddt.py":2724
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_17 = (!__pyx_t_15);
  __pyx_t_1 = __pyx_t_17;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2727
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US
*/
    __pyx_t_18.__pyx_n = 2;
    __pyx_t_18.offset = 0;
    __pyx_t_18.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateD, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_18)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2727, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2728
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *             dtype = utils.DT64_DTYPE_US
 *         # . my_unit safe -> int64[my_unit]
*/
    __pyx_t_19.__pyx_n = 2;
    __pyx_t_19.offset = 0;
    __pyx_t_19.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_times, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_19)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2729
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US             # <<<<<<<<<<<<<<
 *         # . my_unit safe -> int64[my_unit]
 *         else:
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
    __pyx_v_dtype = __pyx_v_7cytimes_5utils_DT64_DTYPE_US;

    /* "cytimes/pddt.py":2724
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":2732
 *         # . my_unit safe -> int64[my_unit]
 *         else:
 *             dates = utils.dt64arr_as_int64(             # <<<<<<<<<<<<<<
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
*/
  /*else*/ {

    /* "cytimes/pddt.py":2733
 *         else:
 *             dates = utils.dt64arr_as_int64(
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False             # <<<<<<<<<<<<<<
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
*/
    __pyx_t_20.__pyx_n = 3;
    __pyx_t_20.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
    __pyx_t_20.offset = 0;
    __pyx_t_20.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64(__pyx_v_dateD, __pyx_v_my_unit, &__pyx_t_20)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2735
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)             # <<<<<<<<<<<<<<
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64
 * 
*/
    __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_str2dt64(__pyx_v_my_unit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2735, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dtype = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_L5:;

  /* "cytimes/pddt.py":2736
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
  __pyx_t_13.__pyx_n = 2;
  __pyx_t_13.offset = 0;
  __pyx_t_13.copy = 0;
  __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_13)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_4));
  __pyx_t_4 = 0;

  /* "cytimes/pddt.py":2739
 * 
 *         # New instance
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *     # . weekday
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_21 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_21);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_21, __pyx_v_dtype};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 2739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 2739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_23 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_23);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_21, __pyx_t_23, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2739, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_22, __pyx_t_23, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 2739, __pyx_L1_error)
    __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_23);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
    __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2670
 *         return self.to_month(1, day)
 * 
 *     def to_month(self, offset: cython.int, day: cython.int = -1) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specified day of the month (+/-) offset `<'Pddt'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_XDECREF(__pyx_t_23);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_my_unit);
  __Pyx_XDECREF((PyObject *)__pyx_v_times);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateM);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateD);
  __Pyx_XDECREF((PyObject *)__pyx_v_delta);
  __Pyx_XDECREF((PyObject *)__pyx_v_dates);
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2742
 * 
 *     # . weekday
 *     def to_monday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the `Monday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(0)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_97to_monday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_96to_monday, "Adjust the date to the `Monday` of the current week `<'Pddt'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_97to_monday = {"to_monday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_97to_monday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_96to_monday};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_97to_monday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_monday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2742, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2742, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_monday", 0) < (0)) __PYX_ERR(0, 2742, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_monday", 1, 1, 1, i); __PYX_ERR(0, 2742, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2742, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_monday", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2742, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_monday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_96to_monday(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_96to_monday(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;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_monday", 0);

  /* "cytimes/pddt.py":2744
 *     def to_monday(self) -> Self:
 *         """Adjust the date to the `Monday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(0)             # <<<<<<<<<<<<<<
 * 
 *     def to_tuesday(self) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_0};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_curr_weekday, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2742
 * 
 *     # . weekday
 *     def to_monday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the `Monday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(0)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_monday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2746
 *         return self._to_curr_weekday(0)
 * 
 *     def to_tuesday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the `Tuesday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(1)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_99to_tuesday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_98to_tuesday, "Adjust the date to the `Tuesday` of the current week `<'Pddt'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_99to_tuesday = {"to_tuesday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_99to_tuesday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_98to_tuesday};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_99to_tuesday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_tuesday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2746, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2746, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_tuesday", 0) < (0)) __PYX_ERR(0, 2746, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_tuesday", 1, 1, 1, i); __PYX_ERR(0, 2746, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2746, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_tuesday", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2746, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_tuesday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_98to_tuesday(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_98to_tuesday(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;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_tuesday", 0);

  /* "cytimes/pddt.py":2748
 *     def to_tuesday(self) -> Self:
 *         """Adjust the date to the `Tuesday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(1)             # <<<<<<<<<<<<<<
 * 
 *     def to_wednesday(self) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_1};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_curr_weekday, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2748, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2746
 *         return self._to_curr_weekday(0)
 * 
 *     def to_tuesday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the `Tuesday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(1)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_tuesday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2750
 *         return self._to_curr_weekday(1)
 * 
 *     def to_wednesday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the `Wednesday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(2)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_101to_wednesday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_100to_wednesday, "Adjust the date to the `Wednesday` of the current week `<'Pddt'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_101to_wednesday = {"to_wednesday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_101to_wednesday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_100to_wednesday};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_101to_wednesday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_wednesday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2750, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2750, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_wednesday", 0) < (0)) __PYX_ERR(0, 2750, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_wednesday", 1, 1, 1, i); __PYX_ERR(0, 2750, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2750, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_wednesday", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2750, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_wednesday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_100to_wednesday(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_100to_wednesday(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;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_wednesday", 0);

  /* "cytimes/pddt.py":2752
 *     def to_wednesday(self) -> Self:
 *         """Adjust the date to the `Wednesday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(2)             # <<<<<<<<<<<<<<
 * 
 *     def to_thursday(self) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_2};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_curr_weekday, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2752, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2750
 *         return self._to_curr_weekday(1)
 * 
 *     def to_wednesday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the `Wednesday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(2)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_wednesday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2754
 *         return self._to_curr_weekday(2)
 * 
 *     def to_thursday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the `Thursday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(3)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_103to_thursday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_102to_thursday, "Adjust the date to the `Thursday` of the current week `<'Pddt'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_103to_thursday = {"to_thursday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_103to_thursday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_102to_thursday};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_103to_thursday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_thursday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2754, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2754, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_thursday", 0) < (0)) __PYX_ERR(0, 2754, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_thursday", 1, 1, 1, i); __PYX_ERR(0, 2754, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2754, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_thursday", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2754, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_thursday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_102to_thursday(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_102to_thursday(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;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_thursday", 0);

  /* "cytimes/pddt.py":2756
 *     def to_thursday(self) -> Self:
 *         """Adjust the date to the `Thursday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(3)             # <<<<<<<<<<<<<<
 * 
 *     def to_friday(self) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_3};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_curr_weekday, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2754
 *         return self._to_curr_weekday(2)
 * 
 *     def to_thursday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the `Thursday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(3)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_thursday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2758
 *         return self._to_curr_weekday(3)
 * 
 *     def to_friday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the `Friday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(4)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_105to_friday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_104to_friday, "Adjust the date to the `Friday` of the current week `<'Pddt'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_105to_friday = {"to_friday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_105to_friday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_104to_friday};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_105to_friday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_friday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2758, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2758, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_friday", 0) < (0)) __PYX_ERR(0, 2758, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_friday", 1, 1, 1, i); __PYX_ERR(0, 2758, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2758, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_friday", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2758, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_friday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_104to_friday(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_104to_friday(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;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_friday", 0);

  /* "cytimes/pddt.py":2760
 *     def to_friday(self) -> Self:
 *         """Adjust the date to the `Friday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(4)             # <<<<<<<<<<<<<<
 * 
 *     def to_saturday(self) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_4};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_curr_weekday, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2758
 *         return self._to_curr_weekday(3)
 * 
 *     def to_friday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the `Friday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(4)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_friday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2762
 *         return self._to_curr_weekday(4)
 * 
 *     def to_saturday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the `Saturday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(5)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_107to_saturday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_106to_saturday, "Adjust the date to the `Saturday` of the current week `<'Pddt'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_107to_saturday = {"to_saturday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_107to_saturday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_106to_saturday};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_107to_saturday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_saturday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2762, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2762, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_saturday", 0) < (0)) __PYX_ERR(0, 2762, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_saturday", 1, 1, 1, i); __PYX_ERR(0, 2762, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2762, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_saturday", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2762, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_saturday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_106to_saturday(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_106to_saturday(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;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_saturday", 0);

  /* "cytimes/pddt.py":2764
 *     def to_saturday(self) -> Self:
 *         """Adjust the date to the `Saturday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(5)             # <<<<<<<<<<<<<<
 * 
 *     def to_sunday(self) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_5};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_curr_weekday, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2762
 *         return self._to_curr_weekday(4)
 * 
 *     def to_saturday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the `Saturday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(5)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_saturday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2766
 *         return self._to_curr_weekday(5)
 * 
 *     def to_sunday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the `Sunday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(6)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_109to_sunday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_108to_sunday, "Adjust the date to the `Sunday` of the current week `<'Pddt'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_109to_sunday = {"to_sunday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_109to_sunday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_108to_sunday};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_109to_sunday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_sunday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2766, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2766, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_sunday", 0) < (0)) __PYX_ERR(0, 2766, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_sunday", 1, 1, 1, i); __PYX_ERR(0, 2766, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2766, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_sunday", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2766, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_sunday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_108to_sunday(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_108to_sunday(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;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_sunday", 0);

  /* "cytimes/pddt.py":2768
 *     def to_sunday(self) -> Self:
 *         """Adjust the date to the `Sunday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(6)             # <<<<<<<<<<<<<<
 * 
 *     def to_curr_weekday(self, weekday: int | str | None = None) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_6};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_curr_weekday, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2766
 *         return self._to_curr_weekday(5)
 * 
 *     def to_sunday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the `Sunday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(6)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_sunday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2770
 *         return self._to_curr_weekday(6)
 * 
 *     def to_curr_weekday(self, weekday: int | str | None = None) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specific weekday of the current week `<'Pddt'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_111to_curr_weekday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_110to_curr_weekday, "Adjust the date to the specific weekday of the current week `<'Pddt'>`.\n\n        :param weekday `<'int/str/None'>`: Weekday value. Defaults to `None`.\n\n            - `<'int'>`  Weekday number (0=Mon...6=Sun).\n            - `<'str'>`  Weekday name in lowercase, uppercase or titlecase (e.g., 'Mon', 'dienstag', '\346\230\237\346\234\237\344\270\211').\n            - `<'None'>` Retains the original weekday.\n\n        :returns `<'Pddt'>`: The adjusted datetime index in the current week.\n\n        ## Example\n        >>> pt.to_curr_weekday(0)      # The Monday of the current week\n        >>> pt.to_curr_weekday(\"Tue\")  # The Tuesday of the current week\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_111to_curr_weekday = {"to_curr_weekday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_111to_curr_weekday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_110to_curr_weekday};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_111to_curr_weekday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_weekday = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_curr_weekday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_weekday,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2770, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2770, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2770, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_curr_weekday", 0) < (0)) __PYX_ERR(0, 2770, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_curr_weekday", 0, 1, 2, i); __PYX_ERR(0, 2770, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2770, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2770, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_self = values[0];
    __pyx_v_weekday = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_curr_weekday", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2770, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_curr_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_110to_curr_weekday(__pyx_self, __pyx_v_self, __pyx_v_weekday);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_110to_curr_weekday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weekday) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  struct __pyx_opt_args_7cytimes_6parser_parse_weekday __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_curr_weekday", 0);

  /* "cytimes/pddt.py":2785
 *         >>> pt.to_curr_weekday("Tue")  # The Tuesday of the current week
 *         """
 *         return self._to_curr_weekday(_parse_weekday(weekday, None, True))             # <<<<<<<<<<<<<<
 * 
 *     def to_prev_weekday(self, weekday: int | str | None = None) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_4.raise_error = 1;
  __pyx_t_3 = __pyx_f_7cytimes_6parser_parse_weekday(__pyx_v_weekday, 0, &__pyx_t_4); if (unlikely(__pyx_t_3 == ((int)-2))) __PYX_ERR(0, 2785, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_curr_weekday, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2770
 *         return self._to_curr_weekday(6)
 * 
 *     def to_curr_weekday(self, weekday: int | str | None = None) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specific weekday of the current week `<'Pddt'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_curr_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2787
 *         return self._to_curr_weekday(_parse_weekday(weekday, None, True))
 * 
 *     def to_prev_weekday(self, weekday: int | str | None = None) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specific weekday of the previous week `<'Pddt'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_113to_prev_weekday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_112to_prev_weekday, "Adjust the date to the specific weekday of the previous week `<'Pddt'>`.\n\n        :param weekday `<'int/str/None'>`: Weekday value. Defaults to `None`.\n\n            - `<'int'>`  Weekday number (0=Mon...6=Sun).\n            - `<'str'>`  Weekday name in lowercase, uppercase or titlecase (e.g., 'Mon', 'dienstag', '\346\230\237\346\234\237\344\270\211').\n            - `<'None'>` Retains the original weekday.\n\n        :returns `<'Pddt'>`: The adjusted datetime index in the previous week.\n\n        ## Example\n        >>> pt.to_prev_weekday(0)      # The Monday of the previous week\n        >>> pt.to_prev_weekday(\"Tue\")  # The Tuesday of the previous week\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_113to_prev_weekday = {"to_prev_weekday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_113to_prev_weekday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_112to_prev_weekday};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_113to_prev_weekday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_weekday = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_prev_weekday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_weekday,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2787, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2787, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2787, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_prev_weekday", 0) < (0)) __PYX_ERR(0, 2787, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_prev_weekday", 0, 1, 2, i); __PYX_ERR(0, 2787, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2787, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2787, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_self = values[0];
    __pyx_v_weekday = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_prev_weekday", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2787, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_prev_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_112to_prev_weekday(__pyx_self, __pyx_v_self, __pyx_v_weekday);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "cytimes/pddt.py":2802
 *         >>> pt.to_prev_weekday("Tue")  # The Tuesday of the previous week
 *         """
 *         return self.to_weekday(-1, weekday)             # <<<<<<<<<<<<<<
 * 
 *     def to_next_weekday(self, weekday: int | str | None = None) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_neg_1, __pyx_v_weekday};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_weekday, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2787
 *         return self._to_curr_weekday(_parse_weekday(weekday, None, True))
 * 
 *     def to_prev_weekday(self, weekday: int | str | None = None) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specific weekday of the previous week `<'Pddt'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_prev_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2804
 *         return self.to_weekday(-1, weekday)
 * 
 *     def to_next_weekday(self, weekday: int | str | None = None) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specific weekday of the next week `<'Pddt'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_115to_next_weekday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_114to_next_weekday, "Adjust the date to the specific weekday of the next week `<'Pddt'>`.\n\n        :param weekday `<'int/str/None'>`: Weekday value. Defaults to `None`.\n\n            - `<'int'>`  Weekday number (0=Mon...6=Sun).\n            - `<'str'>`  Weekday name in lowercase, uppercase or titlecase (e.g., 'Mon', 'dienstag', '\346\230\237\346\234\237\344\270\211').\n            - `<'None'>` Retains the original weekday.\n\n        :returns `<'Pddt'>`: The adjusted datetime index in the next week.\n\n        ## Example\n        >>> pt.to_next_weekday(0)      # The Monday of the next week\n        >>> pt.to_next_weekday(\"Tue\")  # The Tuesday of the next week\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_115to_next_weekday = {"to_next_weekday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_115to_next_weekday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_114to_next_weekday};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_115to_next_weekday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_weekday = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_next_weekday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_weekday,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2804, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2804, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2804, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_next_weekday", 0) < (0)) __PYX_ERR(0, 2804, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_next_weekday", 0, 1, 2, i); __PYX_ERR(0, 2804, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2804, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2804, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_self = values[0];
    __pyx_v_weekday = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_next_weekday", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2804, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_next_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_114to_next_weekday(__pyx_self, __pyx_v_self, __pyx_v_weekday);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "cytimes/pddt.py":2819
 *         >>> pt.to_next_weekday("Tue")  # The Tuesday of the next week
 *         """
 *         return self.to_weekday(1, weekday)             # <<<<<<<<<<<<<<
 * 
 *     def to_weekday(self, offset: cython.int, weekday: int | str | None = None) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_1, __pyx_v_weekday};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_weekday, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2804
 *         return self.to_weekday(-1, weekday)
 * 
 *     def to_next_weekday(self, weekday: int | str | None = None) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specific weekday of the next week `<'Pddt'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_next_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2821
 *         return self.to_weekday(1, weekday)
 * 
 *     def to_weekday(self, offset: cython.int, weekday: int | str | None = None) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specific weekday of the week (+/-) offset `<'Pddt'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_117to_weekday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_116to_weekday, "Adjust the date to the specific weekday of the week (+/-) offset `<'Pddt'>`.\n\n        :param offset `<'int'>`: The week offset (+/-).\n\n        :param weekday `<'int/str/None'>`: Weekday value. Defaults to `None`.\n\n            - `<'int'>`  Weekday number (0=Mon...6=Sun).\n            - `<'str'>`  Weekday name in lowercase, uppercase or titlecase (e.g., 'Mon', 'dienstag', '\346\230\237\346\234\237\344\270\211').\n            - `<'None'>` Retains the original weekday.\n\n        :returns `<'Pddt'>`: The adjusted datetime index.\n\n        ## Example\n        >>> pt.to_weekday(-2, 0)     # The Monday of the week, two weeks ago\n        >>> pt.to_weekday(2, \"Tue\")  # The Tuesday of the week, two weeks later\n        >>> pt.to_weekday(2)         # The same weekday of the week, two weeks later\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_117to_weekday = {"to_weekday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_117to_weekday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_116to_weekday};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_117to_weekday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_offset;
  PyObject *__pyx_v_weekday = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_weekday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_offset,&__pyx_mstate_global->__pyx_n_u_weekday,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2821, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2821, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2821, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2821, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_weekday", 0) < (0)) __PYX_ERR(0, 2821, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_weekday", 0, 2, 3, i); __PYX_ERR(0, 2821, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2821, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2821, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2821, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_self = values[0];
    __pyx_v_offset = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2821, __pyx_L3_error)
    __pyx_v_weekday = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_weekday", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 2821, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_116to_weekday(__pyx_self, __pyx_v_self, __pyx_v_offset, __pyx_v_weekday);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_116to_weekday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_offset, PyObject *__pyx_v_weekday) {
  int __pyx_v_wkd;
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_my_unit = 0;
  int __pyx_v_my_reso;
  PyArrayObject *__pyx_v_times = NULL;
  PyArrayObject *__pyx_v_dateD = NULL;
  PyArrayObject *__pyx_v_delta = NULL;
  PyArrayObject *__pyx_v_dates = NULL;
  PyObject *__pyx_v_dtype = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_7cytimes_6parser_parse_weekday __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_times __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_weekday __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_arr_sub_arr __pyx_t_12;
  int __pyx_t_13;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_14;
  int __pyx_t_15;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_16;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_17;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 __pyx_t_18;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_19;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_weekday", 0);

  /* "cytimes/pddt.py":2840
 *         """
 *         # Fast-path: no offset
 *         wkd: cython.int = _parse_weekday(weekday, None, True)             # <<<<<<<<<<<<<<
 *         if offset == 0:
 *             return self._to_curr_weekday(wkd)
*/
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_2.raise_error = 1;
  __pyx_t_1 = __pyx_f_7cytimes_6parser_parse_weekday(__pyx_v_weekday, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-2))) __PYX_ERR(0, 2840, __pyx_L1_error)
  __pyx_v_wkd = __pyx_t_1;

  /* "cytimes/pddt.py":2841
 *         # Fast-path: no offset
 *         wkd: cython.int = _parse_weekday(weekday, None, True)
 *         if offset == 0:             # <<<<<<<<<<<<<<
 *             return self._to_curr_weekday(wkd)
 * 
*/
  __pyx_t_3 = (__pyx_v_offset == 0);
  if (__pyx_t_3) {

    /* "cytimes/pddt.py":2842
 *         wkd: cython.int = _parse_weekday(weekday, None, True)
 *         if offset == 0:
 *             return self._to_curr_weekday(wkd)             # <<<<<<<<<<<<<<
 * 
 *         # Access datetime array & info
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_wkd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_curr_weekday, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2842, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":2841
 *         # Fast-path: no offset
 *         wkd: cython.int = _parse_weekday(weekday, None, True)
 *         if offset == 0:             # <<<<<<<<<<<<<<
 *             return self._to_curr_weekday(wkd)
 * 
*/
  }

  /* "cytimes/pddt.py":2845
 * 
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2845, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cytimes/pddt.py":2846
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
 * 
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_4))) __PYX_ERR(0, 2846, __pyx_L1_error)
  __pyx_v_my_unit = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cytimes/pddt.py":2847
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)             # <<<<<<<<<<<<<<
 * 
 *         # Seperate times -> int64[my_unit]
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_my_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2847, __pyx_L1_error)
  __pyx_v_my_reso = __pyx_t_1;

  /* "cytimes/pddt.py":2850
 * 
 *         # Seperate times -> int64[my_unit]
 *         times = utils.dt64arr_times(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 * 
 *         # Adjust dates -> int64[D]
*/
  __pyx_t_8.__pyx_n = 3;
  __pyx_t_8.arr_reso = __pyx_v_my_reso;
  __pyx_t_8.offset = 0;
  __pyx_t_8.copy = 1;
  __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_times = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cytimes/pddt.py":2853
 * 
 *         # Adjust dates -> int64[D]
 *         dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 *         # . retain original weekday
 *         if wkd == -1:
*/
  __pyx_t_9.__pyx_n = 3;
  __pyx_t_9.arr_reso = __pyx_v_my_reso;
  __pyx_t_9.offset = 0;
  __pyx_t_9.copy = 1;
  __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_9)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_dateD = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cytimes/pddt.py":2855
 *         dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *         # . retain original weekday
 *         if wkd == -1:             # <<<<<<<<<<<<<<
 *             dateD = utils.arr_add(dateD, offset * 7, False)
 *         # . replace with new weekday
*/
  __pyx_t_3 = (__pyx_v_wkd == -1L);
  if (__pyx_t_3) {

    /* "cytimes/pddt.py":2856
 *         # . retain original weekday
 *         if wkd == -1:
 *             dateD = utils.arr_add(dateD, offset * 7, False)             # <<<<<<<<<<<<<<
 *         # . replace with new weekday
 *         else:
*/
    __pyx_t_10.__pyx_n = 1;
    __pyx_t_10.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_dateD, (__pyx_v_offset * 7), &__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2855
 *         dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *         # . retain original weekday
 *         if wkd == -1:             # <<<<<<<<<<<<<<
 *             dateD = utils.arr_add(dateD, offset * 7, False)
 *         # . replace with new weekday
*/
    goto __pyx_L4;
  }

  /* "cytimes/pddt.py":2859
 *         # . replace with new weekday
 *         else:
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)             # <<<<<<<<<<<<<<
 *             dateD = utils.arr_sub_arr(dateD, delta, offset * 7 + wkd, False)
 *             #: days - weekday + target_weekday + (offset * 7)
*/
  /*else*/ {
    __pyx_t_11.__pyx_n = 3;
    __pyx_t_11.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_weekday(__pyx_v_dateD, &__pyx_t_11)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2859, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2860
 *         else:
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
 *             dateD = utils.arr_sub_arr(dateD, delta, offset * 7 + wkd, False)             # <<<<<<<<<<<<<<
 *             #: days - weekday + target_weekday + (offset * 7)
 * 
*/
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.offset = ((__pyx_v_offset * 7) + __pyx_v_wkd);
    __pyx_t_12.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_sub_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_12)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2860, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;
  }
  __pyx_L4:;

  /* "cytimes/pddt.py":2865
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_13 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS);
  if (__pyx_t_13) {
  } else {
    __pyx_t_3 = __pyx_t_13;
    goto __pyx_L6_bool_binop_done;
  }

  /* "cytimes/pddt.py":2866
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *             dateD, utils.DT_NPY_UNIT_DD             # <<<<<<<<<<<<<<
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
*/
  __pyx_t_14.__pyx_n = 1;
  __pyx_t_14.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
  __pyx_t_13 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_dateD, &__pyx_t_14); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 2865, __pyx_L1_error)

  /* "cytimes/pddt.py":2865
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_15 = (!__pyx_t_13);
  __pyx_t_3 = __pyx_t_15;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_3) {

    /* "cytimes/pddt.py":2868
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US
*/
    __pyx_t_16.__pyx_n = 2;
    __pyx_t_16.offset = 0;
    __pyx_t_16.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateD, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_16)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2868, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2869
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *             dtype = utils.DT64_DTYPE_US
 *         # . my_unit safe -> int64[my_unit]
*/
    __pyx_t_17.__pyx_n = 2;
    __pyx_t_17.offset = 0;
    __pyx_t_17.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_times, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_17)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2869, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2870
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US             # <<<<<<<<<<<<<<
 *         # . my_unit safe -> int64[my_unit]
 *         else:
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
    __pyx_v_dtype = __pyx_v_7cytimes_5utils_DT64_DTYPE_US;

    /* "cytimes/pddt.py":2865
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":2873
 *         # . my_unit safe -> int64[my_unit]
 *         else:
 *             dates = utils.dt64arr_as_int64(             # <<<<<<<<<<<<<<
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
*/
  /*else*/ {

    /* "cytimes/pddt.py":2874
 *         else:
 *             dates = utils.dt64arr_as_int64(
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False             # <<<<<<<<<<<<<<
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
*/
    __pyx_t_18.__pyx_n = 3;
    __pyx_t_18.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
    __pyx_t_18.offset = 0;
    __pyx_t_18.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64(__pyx_v_dateD, __pyx_v_my_unit, &__pyx_t_18)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2873, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":2876
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)             # <<<<<<<<<<<<<<
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64
 * 
*/
    __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_str2dt64(__pyx_v_my_unit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2876, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dtype = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_L5:;

  /* "cytimes/pddt.py":2877
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
  __pyx_t_19.__pyx_n = 2;
  __pyx_t_19.offset = 0;
  __pyx_t_19.copy = 0;
  __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_19)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_4));
  __pyx_t_4 = 0;

  /* "cytimes/pddt.py":2880
 * 
 *         # New instance
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *     def _to_curr_weekday(self, weekday: cython.int) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_20 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_20);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_20, __pyx_v_dtype};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 2880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 2880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_6, __pyx_t_5};
    __pyx_t_22 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 2880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_22);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_20, __pyx_t_22, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2880, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_21, __pyx_t_22, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 2880, __pyx_L1_error)
    __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_22);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2821
 *         return self.to_weekday(1, weekday)
 * 
 *     def to_weekday(self, offset: cython.int, weekday: int | str | None = None) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specific weekday of the week (+/-) offset `<'Pddt'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_my_unit);
  __Pyx_XDECREF((PyObject *)__pyx_v_times);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateD);
  __Pyx_XDECREF((PyObject *)__pyx_v_delta);
  __Pyx_XDECREF((PyObject *)__pyx_v_dates);
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2882
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def _to_curr_weekday(self, weekday: cython.int) -> Self:             # <<<<<<<<<<<<<<
 *         """(internal) Adjust the date to the specific weekday of the current week `<'Pddt'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_119_to_curr_weekday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_118_to_curr_weekday, "(internal) Adjust the date to the specific weekday of the current week `<'Pddt'>`.\n\n        :param weekday `<'int'>`: Weekday number (0=Mon...6=Sun).\n            Automatically clamped to [0..6]. If negative, no adjustment is made.\n        :returns `<'Pddt'>`: The adjusted datetime index in the current week.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_119_to_curr_weekday = {"_to_curr_weekday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_119_to_curr_weekday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_118_to_curr_weekday};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_119_to_curr_weekday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_weekday;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_to_curr_weekday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_weekday,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2882, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2882, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2882, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_to_curr_weekday", 0) < (0)) __PYX_ERR(0, 2882, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_to_curr_weekday", 1, 2, 2, i); __PYX_ERR(0, 2882, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2882, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2882, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_weekday = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_weekday == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2882, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_to_curr_weekday", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2882, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt._to_curr_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_118_to_curr_weekday(__pyx_self, __pyx_v_self, __pyx_v_weekday);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_118_to_curr_weekday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_weekday) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_my_unit = 0;
  int __pyx_v_my_reso;
  PyArrayObject *__pyx_v_times = NULL;
  PyArrayObject *__pyx_v_dateD = NULL;
  PyArrayObject *__pyx_v_delta = NULL;
  PyArrayObject *__pyx_v_dates = NULL;
  PyObject *__pyx_v_dtype = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_times __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_weekday __pyx_t_6;
  long __pyx_t_7;
  long __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_sub_arr __pyx_t_9;
  int __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_11;
  int __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_13;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_14;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 __pyx_t_15;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  size_t __pyx_t_20;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_to_curr_weekday", 0);

  /* "cytimes/pddt.py":2890
 *         """
 *         # Fast-path: no adjustment
 *         if weekday < 0:             # <<<<<<<<<<<<<<
 *             return self
 * 
*/
  __pyx_t_1 = (__pyx_v_weekday < 0);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2891
 *         # Fast-path: no adjustment
 *         if weekday < 0:
 *             return self             # <<<<<<<<<<<<<<
 * 
 *         # Access datetime array & info
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pddt.py":2890
 *         """
 *         # Fast-path: no adjustment
 *         if weekday < 0:             # <<<<<<<<<<<<<<
 *             return self
 * 
*/
  }

  /* "cytimes/pddt.py":2894
 * 
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2894, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2895
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
 * 
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 2895, __pyx_L1_error)
  __pyx_v_my_unit = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2896
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)             # <<<<<<<<<<<<<<
 * 
 *         # Seperate times -> int64[my_unit]
*/
  __pyx_t_3 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_my_unit); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 2896, __pyx_L1_error)
  __pyx_v_my_reso = __pyx_t_3;

  /* "cytimes/pddt.py":2899
 * 
 *         # Seperate times -> int64[my_unit]
 *         times = utils.dt64arr_times(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 * 
 *         # Adjust dates -> int64[D]
*/
  __pyx_t_4.__pyx_n = 3;
  __pyx_t_4.arr_reso = __pyx_v_my_reso;
  __pyx_t_4.offset = 0;
  __pyx_t_4.copy = 1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_times = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2902
 * 
 *         # Adjust dates -> int64[D]
 *         dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 *         delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
 *         dateD = utils.arr_sub_arr(dateD, delta, min(weekday, 6), False)
*/
  __pyx_t_5.__pyx_n = 3;
  __pyx_t_5.arr_reso = __pyx_v_my_reso;
  __pyx_t_5.offset = 0;
  __pyx_t_5.copy = 1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2903
 *         # Adjust dates -> int64[D]
 *         dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *         delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)             # <<<<<<<<<<<<<<
 *         dateD = utils.arr_sub_arr(dateD, delta, min(weekday, 6), False)
 *         #: days - weekday + target_weekday
*/
  __pyx_t_6.__pyx_n = 3;
  __pyx_t_6.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
  __pyx_t_6.offset = 0;
  __pyx_t_6.copy = 1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_weekday(__pyx_v_dateD, &__pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_delta = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2904
 *         dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *         delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
 *         dateD = utils.arr_sub_arr(dateD, delta, min(weekday, 6), False)             # <<<<<<<<<<<<<<
 *         #: days - weekday + target_weekday
 * 
*/
  __pyx_t_7 = 6;
  __pyx_t_3 = __pyx_v_weekday;
  __pyx_t_1 = (__pyx_t_7 < __pyx_t_3);
  if (__pyx_t_1) {
    __pyx_t_8 = __pyx_t_7;
  } else {
    __pyx_t_8 = __pyx_t_3;
  }
  __pyx_t_9.__pyx_n = 2;
  __pyx_t_9.offset = __pyx_t_8;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_sub_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2909
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_10 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS);
  if (__pyx_t_10) {
  } else {
    __pyx_t_1 = __pyx_t_10;
    goto __pyx_L5_bool_binop_done;
  }

  /* "cytimes/pddt.py":2910
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *             dateD, utils.DT_NPY_UNIT_DD             # <<<<<<<<<<<<<<
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
*/
  __pyx_t_11.__pyx_n = 1;
  __pyx_t_11.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
  __pyx_t_10 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_dateD, &__pyx_t_11); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2909, __pyx_L1_error)

  /* "cytimes/pddt.py":2909
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_12 = (!__pyx_t_10);
  __pyx_t_1 = __pyx_t_12;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2912
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US
*/
    __pyx_t_13.__pyx_n = 2;
    __pyx_t_13.offset = 0;
    __pyx_t_13.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateD, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2913
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *             dtype = utils.DT64_DTYPE_US
 *         # . my_unit safe -> int64[my_unit]
*/
    __pyx_t_14.__pyx_n = 2;
    __pyx_t_14.offset = 0;
    __pyx_t_14.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_times, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_14)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2913, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2914
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US             # <<<<<<<<<<<<<<
 *         # . my_unit safe -> int64[my_unit]
 *         else:
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
    __pyx_v_dtype = __pyx_v_7cytimes_5utils_DT64_DTYPE_US;

    /* "cytimes/pddt.py":2909
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
    goto __pyx_L4;
  }

  /* "cytimes/pddt.py":2917
 *         # . my_unit safe -> int64[my_unit]
 *         else:
 *             dates = utils.dt64arr_as_int64(             # <<<<<<<<<<<<<<
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
*/
  /*else*/ {

    /* "cytimes/pddt.py":2918
 *         else:
 *             dates = utils.dt64arr_as_int64(
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False             # <<<<<<<<<<<<<<
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
*/
    __pyx_t_15.__pyx_n = 3;
    __pyx_t_15.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
    __pyx_t_15.offset = 0;
    __pyx_t_15.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64(__pyx_v_dateD, __pyx_v_my_unit, &__pyx_t_15)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2920
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)             # <<<<<<<<<<<<<<
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64
 * 
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_nptime_unit_str2dt64(__pyx_v_my_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2920, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dtype = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L4:;

  /* "cytimes/pddt.py":2921
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
  __pyx_t_16.__pyx_n = 2;
  __pyx_t_16.offset = 0;
  __pyx_t_16.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2924
 * 
 *         # New instance
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *     # . day
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_17 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_17);
  __pyx_t_19 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_19);
  __pyx_t_20 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_v_dtype};
    __pyx_t_18 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_20, (2-__pyx_t_20) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
    if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2924, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
  }
  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 2924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_20 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_17, __pyx_t_18};
    __pyx_t_22 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 2924, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_22);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_19, __pyx_t_22, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2924, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_21, __pyx_t_22, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 2924, __pyx_L1_error)
    __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_20, (2-__pyx_t_20) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_22);
    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2924, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2882
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def _to_curr_weekday(self, weekday: cython.int) -> Self:             # <<<<<<<<<<<<<<
 *         """(internal) Adjust the date to the specific weekday of the current week `<'Pddt'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_AddTraceback("cytimes.pddt.Pddt._to_curr_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_my_unit);
  __Pyx_XDECREF((PyObject *)__pyx_v_times);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateD);
  __Pyx_XDECREF((PyObject *)__pyx_v_delta);
  __Pyx_XDECREF((PyObject *)__pyx_v_dates);
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2927
 * 
 *     # . day
 *     def to_yesterday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to `Yesterday` `<'Pddt'>`."""
 *         return self.to_day(-1)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_121to_yesterday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_120to_yesterday, "Adjust the date to `Yesterday` `<'Pddt'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_121to_yesterday = {"to_yesterday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_121to_yesterday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_120to_yesterday};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_121to_yesterday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_yesterday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2927, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2927, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_yesterday", 0) < (0)) __PYX_ERR(0, 2927, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_yesterday", 1, 1, 1, i); __PYX_ERR(0, 2927, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2927, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_yesterday", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2927, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_yesterday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_120to_yesterday(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_120to_yesterday(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;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_yesterday", 0);

  /* "cytimes/pddt.py":2929
 *     def to_yesterday(self) -> Self:
 *         """Adjust the date to `Yesterday` `<'Pddt'>`."""
 *         return self.to_day(-1)             # <<<<<<<<<<<<<<
 * 
 *     def to_tomorrow(self) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_neg_1};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_day, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2929, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2927
 * 
 *     # . day
 *     def to_yesterday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to `Yesterday` `<'Pddt'>`."""
 *         return self.to_day(-1)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_yesterday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2931
 *         return self.to_day(-1)
 * 
 *     def to_tomorrow(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to `Tomorrow` `<'Pddt'>`."""
 *         return self.to_day(1)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_123to_tomorrow(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_122to_tomorrow, "Adjust the date to `Tomorrow` `<'Pddt'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_123to_tomorrow = {"to_tomorrow", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_123to_tomorrow, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_122to_tomorrow};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_123to_tomorrow(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_tomorrow (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2931, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2931, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_tomorrow", 0) < (0)) __PYX_ERR(0, 2931, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_tomorrow", 1, 1, 1, i); __PYX_ERR(0, 2931, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2931, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_tomorrow", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2931, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_tomorrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_122to_tomorrow(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_122to_tomorrow(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;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_tomorrow", 0);

  /* "cytimes/pddt.py":2933
 *     def to_tomorrow(self) -> Self:
 *         """Adjust the date to `Tomorrow` `<'Pddt'>`."""
 *         return self.to_day(1)             # <<<<<<<<<<<<<<
 * 
 *     def to_day(self, offset: cython.int) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_1};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_day, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2931
 *         return self.to_day(-1)
 * 
 *     def to_tomorrow(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to `Tomorrow` `<'Pddt'>`."""
 *         return self.to_day(1)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_tomorrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2935
 *         return self.to_day(1)
 * 
 *     def to_day(self, offset: cython.int) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to day (+/-) offset `<'Pddt'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_125to_day(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_124to_day, "Adjust the date to day (+/-) offset `<'Pddt'>`.\n\n        :param offset `<'int'>`: The day offset (+/-).\n        :returns `<'Pddt'>`: The adjusted datetime index.\n\n        ## Example\n        >>> pt.to_day(-10)  # 10 days ago\n        >>> pt.to_day(10)   # 10 days later\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_125to_day = {"to_day", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_125to_day, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_124to_day};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_125to_day(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_offset;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_day (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_offset,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2935, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2935, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2935, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_day", 0) < (0)) __PYX_ERR(0, 2935, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_day", 1, 2, 2, i); __PYX_ERR(0, 2935, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2935, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2935, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_offset = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2935, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_day", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2935, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_day", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_124to_day(__pyx_self, __pyx_v_self, __pyx_v_offset);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_124to_day(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_offset) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_my_unit = 0;
  int __pyx_v_my_reso;
  PyArrayObject *__pyx_v_times = NULL;
  PyArrayObject *__pyx_v_dateD = NULL;
  PyArrayObject *__pyx_v_dates = NULL;
  PyObject *__pyx_v_dtype = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_times __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_7;
  int __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  size_t __pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_day", 0);

  /* "cytimes/pddt.py":2946
 *         """
 *         # Fast-path: no offset
 *         if offset == 0:             # <<<<<<<<<<<<<<
 *             return self
 * 
*/
  __pyx_t_1 = (__pyx_v_offset == 0);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2947
 *         # Fast-path: no offset
 *         if offset == 0:
 *             return self             # <<<<<<<<<<<<<<
 * 
 *         # Access datetime array & info
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pddt.py":2946
 *         """
 *         # Fast-path: no offset
 *         if offset == 0:             # <<<<<<<<<<<<<<
 *             return self
 * 
*/
  }

  /* "cytimes/pddt.py":2950
 * 
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2950, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2951
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
 * 
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 2951, __pyx_L1_error)
  __pyx_v_my_unit = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2952
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)             # <<<<<<<<<<<<<<
 * 
 *         # Seperate times -> int64[my_unit]
*/
  __pyx_t_3 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_my_unit); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 2952, __pyx_L1_error)
  __pyx_v_my_reso = __pyx_t_3;

  /* "cytimes/pddt.py":2955
 * 
 *         # Seperate times -> int64[my_unit]
 *         times = utils.dt64arr_times(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 * 
 *         # Adjust dates -> int64[D]
*/
  __pyx_t_4.__pyx_n = 3;
  __pyx_t_4.arr_reso = __pyx_v_my_reso;
  __pyx_t_4.offset = 0;
  __pyx_t_4.copy = 1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_times = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2958
 * 
 *         # Adjust dates -> int64[D]
 *         dateD = utils.dt64arr_as_int64_D(arr, my_reso, offset, True)             # <<<<<<<<<<<<<<
 * 
 *         # Combine dates & times
*/
  __pyx_t_5.__pyx_n = 3;
  __pyx_t_5.arr_reso = __pyx_v_my_reso;
  __pyx_t_5.offset = __pyx_v_offset;
  __pyx_t_5.copy = 1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2962
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_6 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS);
  if (__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L5_bool_binop_done;
  }

  /* "cytimes/pddt.py":2963
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *             dateD, utils.DT_NPY_UNIT_DD             # <<<<<<<<<<<<<<
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
  __pyx_t_6 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_dateD, &__pyx_t_7); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 2962, __pyx_L1_error)

  /* "cytimes/pddt.py":2962
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_8 = (!__pyx_t_6);
  __pyx_t_1 = __pyx_t_8;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":2965
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US
*/
    __pyx_t_9.__pyx_n = 2;
    __pyx_t_9.offset = 0;
    __pyx_t_9.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateD, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2966
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *             dtype = utils.DT64_DTYPE_US
 *         # . my_unit safe -> int64[my_unit]
*/
    __pyx_t_10.__pyx_n = 2;
    __pyx_t_10.offset = 0;
    __pyx_t_10.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_times, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_10)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2967
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US             # <<<<<<<<<<<<<<
 *         # . my_unit safe -> int64[my_unit]
 *         else:
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
    __pyx_v_dtype = __pyx_v_7cytimes_5utils_DT64_DTYPE_US;

    /* "cytimes/pddt.py":2962
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
    goto __pyx_L4;
  }

  /* "cytimes/pddt.py":2970
 *         # . my_unit safe -> int64[my_unit]
 *         else:
 *             dates = utils.dt64arr_as_int64(             # <<<<<<<<<<<<<<
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
*/
  /*else*/ {

    /* "cytimes/pddt.py":2971
 *         else:
 *             dates = utils.dt64arr_as_int64(
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False             # <<<<<<<<<<<<<<
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
*/
    __pyx_t_11.__pyx_n = 3;
    __pyx_t_11.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64(__pyx_v_dateD, __pyx_v_my_unit, &__pyx_t_11)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":2973
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)             # <<<<<<<<<<<<<<
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64
 * 
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_nptime_unit_str2dt64(__pyx_v_my_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dtype = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L4:;

  /* "cytimes/pddt.py":2974
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
  __pyx_t_12.__pyx_n = 2;
  __pyx_t_12.offset = 0;
  __pyx_t_12.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_12)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":2977
 * 
 *         # New instance
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *     # . date&time
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_13 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_13);
  __pyx_t_15 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_15);
  __pyx_t_16 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_v_dtype};
    __pyx_t_14 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2977, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
  }
  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_16 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_13, __pyx_t_14};
    __pyx_t_18 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2977, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_15, __pyx_t_18, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2977, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_17, __pyx_t_18, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 2977, __pyx_L1_error)
    __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_18);
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2977, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":2935
 *         return self.to_day(1)
 * 
 *     def to_day(self, offset: cython.int) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to day (+/-) offset `<'Pddt'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_day", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_my_unit);
  __Pyx_XDECREF((PyObject *)__pyx_v_times);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateD);
  __Pyx_XDECREF((PyObject *)__pyx_v_dates);
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2980
 * 
 *     # . date&time
 *     def normalize(self):             # <<<<<<<<<<<<<<
 *         """Set the time fields to midnight (00:00:00) `<'Pddt'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_127normalize(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_126normalize, "Set the time fields to midnight (00:00:00) `<'Pddt'>`.\n\n        - This method is useful in cases, when the time does not matter.\n        - The timezone is unaffected.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_127normalize = {"normalize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_127normalize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_126normalize};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_127normalize(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("normalize (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2980, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2980, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "normalize", 0) < (0)) __PYX_ERR(0, 2980, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("normalize", 1, 1, 1, i); __PYX_ERR(0, 2980, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2980, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("normalize", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2980, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.normalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_126normalize(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

  /* "cytimes/pddt.py":2986
 *         - The timezone is unaffected.
 *         """
 *         return self.to_time(0, 0, 0, 0, 0)             # <<<<<<<<<<<<<<
 * 
 *     def snap(self, freq: object) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_to_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2986, __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;

  /* "cytimes/pddt.py":2980
 * 
 *     # . date&time
 *     def normalize(self):             # <<<<<<<<<<<<<<
 *         """Set the time fields to midnight (00:00:00) `<'Pddt'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.normalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":2988
 *         return self.to_time(0, 0, 0, 0, 0)
 * 
 *     def snap(self, freq: object) -> Self:             # <<<<<<<<<<<<<<
 *         """Snap to nearest occurring frequency `<'Pddt'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_129snap(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_128snap, "Snap to nearest occurring frequency `<'Pddt'>`.\n\n        Examples\n        --------\n        >>> idx = Pddt(['2023-01-01', '2023-01-02', '2023-02-01', '2023-02-02'])\n        >>> idx\n        Pddt(['2023-01-01', '2023-01-02', '2023-02-01', '2023-02-02'],\n        dtype='datetime64[ns]', freq=None)\n        >>> idx.snap('MS')\n        Pddt(['2023-01-01', '2023-01-01', '2023-02-01', '2023-02-01'],\n        dtype='datetime64[ns]', freq=None)\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_129snap = {"snap", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_129snap, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_128snap};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_129snap(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_freq = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("snap (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_freq,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2988, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2988, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2988, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "snap", 0) < (0)) __PYX_ERR(0, 2988, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("snap", 1, 2, 2, i); __PYX_ERR(0, 2988, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2988, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2988, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_freq = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("snap", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2988, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.snap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_128snap(__pyx_self, __pyx_v_self, __pyx_v_freq);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_128snap(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_freq) {
  PyObject *__pyx_v_err = 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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_t_11;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_12;
  int __pyx_t_13;
  char const *__pyx_t_14;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("snap", 0);

  /* "cytimes/pddt.py":3001
 *         dtype='datetime64[ns]', freq=None)
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return self._new(DatetimeIndex.snap(self, freq))
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "cytimes/pddt.py":3002
 *         """
 *         try:
 *             return self._new(DatetimeIndex.snap(self, freq))             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "snap(freq)", None, err)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __pyx_v_self;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_7 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_DatetimeIndex); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3002, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_snap); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3002, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_10 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
        assert(__pyx_t_7);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
        __pyx_t_10 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_self, __pyx_v_freq};
        __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3002, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_6);
      }
      __pyx_t_10 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3002, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "cytimes/pddt.py":3001
 *         dtype='datetime64[ns]', freq=None)
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return self._new(DatetimeIndex.snap(self, freq))
 *         except Exception as err:
*/
    }
    __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;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cytimes/pddt.py":3003
 *         try:
 *             return self._new(DatetimeIndex.snap(self, freq))
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self.__class__, "snap(freq)", None, err)
 * 
*/
    __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_11) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.snap", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 3003, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_err = __pyx_t_6;
      /*try:*/ {

        /* "cytimes/pddt.py":3004
 *             return self._new(DatetimeIndex.snap(self, freq))
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "snap(freq)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     def to_datetime(
*/
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3004, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_12.__pyx_n = 4;
        __pyx_t_12.cls = __pyx_t_9;
        __pyx_t_12.input_msg = __pyx_mstate_global->__pyx_kp_u_snap_freq;
        __pyx_t_12.error_msg = ((PyObject*)Py_None);
        __pyx_t_12.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_12); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3004, __pyx_L14_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }

      /* "cytimes/pddt.py":3003
 *         try:
 *             return self._new(DatetimeIndex.snap(self, freq))
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self.__class__, "snap(freq)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L15;
        }
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          if ( unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __pyx_t_11 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __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_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
          __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
          __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
          goto __pyx_L5_except_error;
        }
        __pyx_L15:;
      }
      __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;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pddt.py":3001
 *         dtype='datetime64[ns]', freq=None)
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return self._new(DatetimeIndex.snap(self, freq))
 *         except Exception as err:
*/
    __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_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_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);
  }

  /* "cytimes/pddt.py":2988
 *         return self.to_time(0, 0, 0, 0, 0)
 * 
 *     def snap(self, freq: object) -> Self:             # <<<<<<<<<<<<<<
 *         """Snap to nearest occurring frequency `<'Pddt'>`.
 * 
*/

  /* function exit code */
  __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_AddTraceback("cytimes.pddt.Pddt.snap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":3006
 *             errors.raise_argument_error(self.__class__, "snap(freq)", None, err)
 * 
 *     def to_datetime(             # <<<<<<<<<<<<<<
 *         self,
 *         year: cython.int = -1,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_131to_datetime(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_130to_datetime, "Adjust the date and time fields with new values,\n        without affecting the timezone `<'Pddt'>`.\n\n        :param year `<'int'>`: Absolute year. Defaults to `SENTINEL` (no change).\n        :param month `<'int'>`: Absolute month. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..12].\n        :param day `<'int'>`: Absolute day. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..maximum days the resulting month].\n        :param hour `<'int'>`: Absolute hour. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..23].\n        :param minute `<'int'>`: Absolute minute. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..59].\n        :param second `<'int'>`: Absolute second. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..59].\n        :param microsecond `<'int'>`: Absolute microsecond. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..999999].\n        :param nanosecond `<'int'>`: Absolute nanosecond. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..999].\n        :returns `<'Pddt'>`: The resulting datetime with new specified field values.\n\n        ## Behavior\n        - Replacements are `component-wise`:\n            * Any of the date fields may be left as `<= 0` to keep original values.\n            * Any of the time fields may be left as `< 0` to keep original values.\n        - Day values are `clamped` to the maximum valid day in the resulting month.\n        - Only time components within the index resolution are modified;\n          e.g., when index is in `'s'` resolution, `microsecond` and `nanosecond`\n          replacements are ignored.\n\n        ## Equivalent\n        >>> dt.repla""ce(\n                year=year,\n                month=month,\n                day=day,\n                hour=hour,\n                minute=minute,\n                second=second,\n                microsecond=microsecond,\n            )\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_131to_datetime = {"to_datetime", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_131to_datetime, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_130to_datetime};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_131to_datetime(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_year;
  int __pyx_v_month;
  int __pyx_v_day;
  int __pyx_v_hour;
  int __pyx_v_minute;
  int __pyx_v_second;
  int __pyx_v_microsecond;
  int __pyx_v_nanosecond;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_datetime (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_year,&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,&__pyx_mstate_global->__pyx_n_u_hour,&__pyx_mstate_global->__pyx_n_u_minute,&__pyx_mstate_global->__pyx_n_u_second,&__pyx_mstate_global->__pyx_n_u_microsecond,&__pyx_mstate_global->__pyx_n_u_nanosecond,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3006, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 3006, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 3006, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 3006, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 3006, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 3006, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3006, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3006, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3006, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3006, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_datetime", 0) < (0)) __PYX_ERR(0, 3006, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_datetime", 0, 1, 9, i); __PYX_ERR(0, 3006, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 3006, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 3006, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 3006, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 3006, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 3006, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3006, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3006, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3006, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3006, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    if (values[1]) {
      __pyx_v_year = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_year == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3008, __pyx_L3_error)
    } else {
      __pyx_v_year = ((int)((int)-1));
    }
    if (values[2]) {
      __pyx_v_month = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_month == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3009, __pyx_L3_error)
    } else {
      __pyx_v_month = ((int)((int)-1));
    }
    if (values[3]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3010, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)((int)-1));
    }
    if (values[4]) {
      __pyx_v_hour = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_hour == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3011, __pyx_L3_error)
    } else {
      __pyx_v_hour = ((int)((int)-1));
    }
    if (values[5]) {
      __pyx_v_minute = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_minute == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3012, __pyx_L3_error)
    } else {
      __pyx_v_minute = ((int)((int)-1));
    }
    if (values[6]) {
      __pyx_v_second = __Pyx_PyLong_As_int(values[6]); if (unlikely((__pyx_v_second == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3013, __pyx_L3_error)
    } else {
      __pyx_v_second = ((int)((int)-1));
    }
    if (values[7]) {
      __pyx_v_microsecond = __Pyx_PyLong_As_int(values[7]); if (unlikely((__pyx_v_microsecond == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3014, __pyx_L3_error)
    } else {
      __pyx_v_microsecond = ((int)((int)-1));
    }
    if (values[8]) {
      __pyx_v_nanosecond = __Pyx_PyLong_As_int(values[8]); if (unlikely((__pyx_v_nanosecond == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3015, __pyx_L3_error)
    } else {
      __pyx_v_nanosecond = ((int)((int)-1));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_datetime", 0, 1, 9, __pyx_nargs); __PYX_ERR(0, 3006, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_130to_datetime(__pyx_self, __pyx_v_self, __pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_nanosecond);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_130to_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_year, int __pyx_v_month, int __pyx_v_day, int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, int __pyx_v_nanosecond) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_my_unit = 0;
  int __pyx_v_my_reso;
  PyArrayObject *__pyx_v_dateD = NULL;
  PyObject *__pyx_v_dtype = NULL;
  PyArrayObject *__pyx_v_times = NULL;
  PyArrayObject *__pyx_v_dates = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_replace_dates __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_13;
  int __pyx_t_14;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_15;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 __pyx_t_16;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_replace_times __pyx_t_17;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_18;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_datetime", 0);

  /* "cytimes/pddt.py":3059
 *         # Fast-path
 *         # fmt: off
 *         if year <= 0 and month <= 0 and day <= 0:             # <<<<<<<<<<<<<<
 *             return self.to_time(hour, minute, second, microsecond, nanosecond)
 *         if hour < 0 and minute < 0 and second < 0 and microsecond < 0 and nanosecond < 0:
*/
  __pyx_t_2 = (__pyx_v_year <= 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_month <= 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_day <= 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3060
 *         # fmt: off
 *         if year <= 0 and month <= 0 and day <= 0:
 *             return self.to_time(hour, minute, second, microsecond, nanosecond)             # <<<<<<<<<<<<<<
 *         if hour < 0 and minute < 0 and second < 0 and microsecond < 0 and nanosecond < 0:
 *             return self.to_date(year, month, day)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_hour); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_minute); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_second); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_microsecond); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_nanosecond); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = 0;
    {
      PyObject *__pyx_callargs[6] = {__pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_time, __pyx_callargs+__pyx_t_10, (6-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__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;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3060, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":3059
 *         # Fast-path
 *         # fmt: off
 *         if year <= 0 and month <= 0 and day <= 0:             # <<<<<<<<<<<<<<
 *             return self.to_time(hour, minute, second, microsecond, nanosecond)
 *         if hour < 0 and minute < 0 and second < 0 and microsecond < 0 and nanosecond < 0:
*/
  }

  /* "cytimes/pddt.py":3061
 *         if year <= 0 and month <= 0 and day <= 0:
 *             return self.to_time(hour, minute, second, microsecond, nanosecond)
 *         if hour < 0 and minute < 0 and second < 0 and microsecond < 0 and nanosecond < 0:             # <<<<<<<<<<<<<<
 *             return self.to_date(year, month, day)
 *         # fmt: on
*/
  __pyx_t_2 = (__pyx_v_hour < 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_minute < 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_second < 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_microsecond < 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_nanosecond < 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L8_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3062
 *             return self.to_time(hour, minute, second, microsecond, nanosecond)
 *         if hour < 0 and minute < 0 and second < 0 and microsecond < 0 and nanosecond < 0:
 *             return self.to_date(year, month, day)             # <<<<<<<<<<<<<<
 *         # fmt: on
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_9 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_9);
    __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_year); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = 0;
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_9, __pyx_t_8, __pyx_t_7, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_date, __pyx_callargs+__pyx_t_10, (4-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3062, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":3061
 *         if year <= 0 and month <= 0 and day <= 0:
 *             return self.to_time(hour, minute, second, microsecond, nanosecond)
 *         if hour < 0 and minute < 0 and second < 0 and microsecond < 0 and nanosecond < 0:             # <<<<<<<<<<<<<<
 *             return self.to_date(year, month, day)
 *         # fmt: on
*/
  }

  /* "cytimes/pddt.py":3066
 * 
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3066, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cytimes/pddt.py":3067
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_3))) __PYX_ERR(0, 3067, __pyx_L1_error)
  __pyx_v_my_unit = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cytimes/pddt.py":3068
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)             # <<<<<<<<<<<<<<
 * 
 *         # Replace dates -> int64[D]
*/
  __pyx_t_11 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_my_unit); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 3068, __pyx_L1_error)
  __pyx_v_my_reso = __pyx_t_11;

  /* "cytimes/pddt.py":3071
 * 
 *         # Replace dates -> int64[D]
 *         dateD = utils.dt64arr_replace_dates(arr, year, month, day, my_reso)             # <<<<<<<<<<<<<<
 * 
 *         # Set time to zero
*/
  __pyx_t_12.__pyx_n = 1;
  __pyx_t_12.arr_reso = __pyx_v_my_reso;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_replace_dates(__pyx_v_arr, __pyx_v_year, __pyx_v_month, __pyx_v_day, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_dateD = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cytimes/pddt.py":3075
 *         # Set time to zero
 *         if (
 *             hour == 0             # <<<<<<<<<<<<<<
 *             and minute == 0
 *             and second == 0
*/
  __pyx_t_2 = (__pyx_v_hour == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L14_bool_binop_done;
  }

  /* "cytimes/pddt.py":3076
 *         if (
 *             hour == 0
 *             and minute == 0             # <<<<<<<<<<<<<<
 *             and second == 0
 *             and microsecond == 0
*/
  __pyx_t_2 = (__pyx_v_minute == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L14_bool_binop_done;
  }

  /* "cytimes/pddt.py":3077
 *             hour == 0
 *             and minute == 0
 *             and second == 0             # <<<<<<<<<<<<<<
 *             and microsecond == 0
 *             and nanosecond == 0
*/
  __pyx_t_2 = (__pyx_v_second == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L14_bool_binop_done;
  }

  /* "cytimes/pddt.py":3078
 *             and minute == 0
 *             and second == 0
 *             and microsecond == 0             # <<<<<<<<<<<<<<
 *             and nanosecond == 0
 *         ):
*/
  __pyx_t_2 = (__pyx_v_microsecond == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L14_bool_binop_done;
  }

  /* "cytimes/pddt.py":3079
 *             and second == 0
 *             and microsecond == 0
 *             and nanosecond == 0             # <<<<<<<<<<<<<<
 *         ):
 *             # Combine dates & times
*/
  __pyx_t_2 = (__pyx_v_nanosecond == 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L14_bool_binop_done:;

  /* "cytimes/pddt.py":3074
 * 
 *         # Set time to zero
 *         if (             # <<<<<<<<<<<<<<
 *             hour == 0
 *             and minute == 0
*/
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3083
 *             # Combine dates & times
 *             # . my_unit[ns] & out of ns range -> int64[us]
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *                 dateD, utils.DT_NPY_UNIT_DD
 *             ):
*/
    __pyx_t_2 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L20_bool_binop_done;
    }

    /* "cytimes/pddt.py":3084
 *             # . my_unit[ns] & out of ns range -> int64[us]
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *                 dateD, utils.DT_NPY_UNIT_DD             # <<<<<<<<<<<<<<
 *             ):
 *                 arr = utils.arr_mul(dateD, utils.US_DAY, 0, False)
*/
    __pyx_t_13.__pyx_n = 1;
    __pyx_t_13.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
    __pyx_t_2 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_dateD, &__pyx_t_13); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 3083, __pyx_L1_error)

    /* "cytimes/pddt.py":3083
 *             # Combine dates & times
 *             # . my_unit[ns] & out of ns range -> int64[us]
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *                 dateD, utils.DT_NPY_UNIT_DD
 *             ):
*/
    __pyx_t_14 = (!__pyx_t_2);
    __pyx_t_1 = __pyx_t_14;
    __pyx_L20_bool_binop_done:;
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":3086
 *                 dateD, utils.DT_NPY_UNIT_DD
 *             ):
 *                 arr = utils.arr_mul(dateD, utils.US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *                 dtype = utils.DT64_DTYPE_US
 *             # . my_unit safe -> int64[my_unit]
*/
      __pyx_t_15.__pyx_n = 2;
      __pyx_t_15.offset = 0;
      __pyx_t_15.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateD, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_15)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3086, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "cytimes/pddt.py":3087
 *             ):
 *                 arr = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *                 dtype = utils.DT64_DTYPE_US             # <<<<<<<<<<<<<<
 *             # . my_unit safe -> int64[my_unit]
 *             else:
*/
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
      __pyx_v_dtype = __pyx_v_7cytimes_5utils_DT64_DTYPE_US;

      /* "cytimes/pddt.py":3083
 *             # Combine dates & times
 *             # . my_unit[ns] & out of ns range -> int64[us]
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *                 dateD, utils.DT_NPY_UNIT_DD
 *             ):
*/
      goto __pyx_L19;
    }

    /* "cytimes/pddt.py":3090
 *             # . my_unit safe -> int64[my_unit]
 *             else:
 *                 arr = utils.dt64arr_as_int64(             # <<<<<<<<<<<<<<
 *                     dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *                 )
*/
    /*else*/ {

      /* "cytimes/pddt.py":3091
 *             else:
 *                 arr = utils.dt64arr_as_int64(
 *                     dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False             # <<<<<<<<<<<<<<
 *                 )
 *                 dtype = utils.nptime_unit_str2dt64(my_unit)
*/
      __pyx_t_16.__pyx_n = 3;
      __pyx_t_16.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
      __pyx_t_16.offset = 0;
      __pyx_t_16.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64(__pyx_v_dateD, __pyx_v_my_unit, &__pyx_t_16)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3090, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "cytimes/pddt.py":3093
 *                     dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *                 )
 *                 dtype = utils.nptime_unit_str2dt64(my_unit)             # <<<<<<<<<<<<<<
 * 
 *         # Replace times -> int64[my_unit]
*/
      __pyx_t_3 = __pyx_f_7cytimes_5utils_nptime_unit_str2dt64(__pyx_v_my_unit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3093, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_dtype = __pyx_t_3;
      __pyx_t_3 = 0;
    }
    __pyx_L19:;

    /* "cytimes/pddt.py":3074
 * 
 *         # Set time to zero
 *         if (             # <<<<<<<<<<<<<<
 *             hour == 0
 *             and minute == 0
*/
    goto __pyx_L13;
  }

  /* "cytimes/pddt.py":3097
 *         # Replace times -> int64[my_unit]
 *         else:
 *             times = utils.dt64arr_replace_times(             # <<<<<<<<<<<<<<
 *                 arr, hour, minute, second, microsecond, nanosecond, my_reso
 *             )
*/
  /*else*/ {

    /* "cytimes/pddt.py":3098
 *         else:
 *             times = utils.dt64arr_replace_times(
 *                 arr, hour, minute, second, microsecond, nanosecond, my_reso             # <<<<<<<<<<<<<<
 *             )
 * 
*/
    __pyx_t_17.__pyx_n = 1;
    __pyx_t_17.arr_reso = __pyx_v_my_reso;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_replace_times(__pyx_v_arr, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_nanosecond, &__pyx_t_17)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3097, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_times = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "cytimes/pddt.py":3103
 *             # Combine dates & times
 *             # . my_unit[ns] & out of ns range -> int64[us]
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *                 dateD, utils.DT_NPY_UNIT_DD
 *             ):
*/
    __pyx_t_14 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS);
    if (__pyx_t_14) {
    } else {
      __pyx_t_1 = __pyx_t_14;
      goto __pyx_L23_bool_binop_done;
    }

    /* "cytimes/pddt.py":3104
 *             # . my_unit[ns] & out of ns range -> int64[us]
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *                 dateD, utils.DT_NPY_UNIT_DD             # <<<<<<<<<<<<<<
 *             ):
 *                 dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
*/
    __pyx_t_13.__pyx_n = 1;
    __pyx_t_13.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
    __pyx_t_14 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_dateD, &__pyx_t_13); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 3103, __pyx_L1_error)

    /* "cytimes/pddt.py":3103
 *             # Combine dates & times
 *             # . my_unit[ns] & out of ns range -> int64[us]
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *                 dateD, utils.DT_NPY_UNIT_DD
 *             ):
*/
    __pyx_t_2 = (!__pyx_t_14);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L23_bool_binop_done:;
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":3106
 *                 dateD, utils.DT_NPY_UNIT_DD
 *             ):
 *                 dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *                 times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *                 dtype = utils.DT64_DTYPE_US
*/
      __pyx_t_15.__pyx_n = 2;
      __pyx_t_15.offset = 0;
      __pyx_t_15.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateD, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_15)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3106, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_dates = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "cytimes/pddt.py":3107
 *             ):
 *                 dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *                 times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 dtype = utils.DT64_DTYPE_US
 *             # . my_unit safe -> int64[my_unit]
*/
      __pyx_t_18.__pyx_n = 2;
      __pyx_t_18.offset = 0;
      __pyx_t_18.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_times, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_18)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3107, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "cytimes/pddt.py":3108
 *                 dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *                 times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *                 dtype = utils.DT64_DTYPE_US             # <<<<<<<<<<<<<<
 *             # . my_unit safe -> int64[my_unit]
 *             else:
*/
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
      __pyx_v_dtype = __pyx_v_7cytimes_5utils_DT64_DTYPE_US;

      /* "cytimes/pddt.py":3103
 *             # Combine dates & times
 *             # . my_unit[ns] & out of ns range -> int64[us]
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *                 dateD, utils.DT_NPY_UNIT_DD
 *             ):
*/
      goto __pyx_L22;
    }

    /* "cytimes/pddt.py":3111
 *             # . my_unit safe -> int64[my_unit]
 *             else:
 *                 dates = utils.dt64arr_as_int64(             # <<<<<<<<<<<<<<
 *                     dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *                 )
*/
    /*else*/ {

      /* "cytimes/pddt.py":3112
 *             else:
 *                 dates = utils.dt64arr_as_int64(
 *                     dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False             # <<<<<<<<<<<<<<
 *                 )
 *                 dtype = utils.nptime_unit_str2dt64(my_unit)
*/
      __pyx_t_16.__pyx_n = 3;
      __pyx_t_16.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
      __pyx_t_16.offset = 0;
      __pyx_t_16.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64(__pyx_v_dateD, __pyx_v_my_unit, &__pyx_t_16)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3111, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_dates = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "cytimes/pddt.py":3114
 *                     dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *                 )
 *                 dtype = utils.nptime_unit_str2dt64(my_unit)             # <<<<<<<<<<<<<<
 *             arr = utils.arr_add_arr(dates, times, 0, False)  # int64
 * 
*/
      __pyx_t_3 = __pyx_f_7cytimes_5utils_nptime_unit_str2dt64(__pyx_v_my_unit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3114, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_dtype = __pyx_t_3;
      __pyx_t_3 = 0;
    }
    __pyx_L22:;

    /* "cytimes/pddt.py":3115
 *                 )
 *                 dtype = utils.nptime_unit_str2dt64(my_unit)
 *             arr = utils.arr_add_arr(dates, times, 0, False)  # int64             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
    __pyx_t_19.__pyx_n = 2;
    __pyx_t_19.offset = 0;
    __pyx_t_19.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_19)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;
  }
  __pyx_L13:;

  /* "cytimes/pddt.py":3118
 * 
 *         # New instance
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *     def to_date(
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_8 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_10 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_dtype};
    __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_6, __pyx_t_7};
    __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_8, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3118, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_9, __pyx_t_5, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 3118, __pyx_L1_error)
    __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":3006
 *             errors.raise_argument_error(self.__class__, "snap(freq)", None, err)
 * 
 *     def to_datetime(             # <<<<<<<<<<<<<<
 *         self,
 *         year: cython.int = -1,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_my_unit);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateD);
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XDECREF((PyObject *)__pyx_v_times);
  __Pyx_XDECREF((PyObject *)__pyx_v_dates);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":3120
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_date(             # <<<<<<<<<<<<<<
 *         self,
 *         year: cython.int = -1,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_133to_date(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_132to_date, "Adjust the date with new values, without affecting other fields `<'Pddt'>`.\n\n        :param year `<'int'>`: Absolute year. Defaults to `SENTINEL` (no change).\n        :param month `<'int'>`: Absolute month. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..12].\n        :param day `<'int'>`: Absolute day. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..maximum days the resulting month].\n        :returns `<'Pddt'>`: The resulting datetime index with new specified date field values.\n\n        ## Behavior\n        - Replacements are `component-wise`: any of the date fields may be left\n          as `<= 0` to keep original values.\n        - Day values are `clamped` to the maximum valid day in the resulting month.\n\n        ## Equivalent\n        >>> pt.replace(year=year, month=month, day=day)\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_133to_date = {"to_date", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_133to_date, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_132to_date};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_133to_date(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_year;
  int __pyx_v_month;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_date (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_year,&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3120, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3120, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3120, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3120, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3120, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_date", 0) < (0)) __PYX_ERR(0, 3120, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_date", 0, 1, 4, i); __PYX_ERR(0, 3120, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3120, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3120, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3120, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3120, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    if (values[1]) {
      __pyx_v_year = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_year == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3122, __pyx_L3_error)
    } else {
      __pyx_v_year = ((int)((int)-1));
    }
    if (values[2]) {
      __pyx_v_month = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_month == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3123, __pyx_L3_error)
    } else {
      __pyx_v_month = ((int)((int)-1));
    }
    if (values[3]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3124, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)((int)-1));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_date", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 3120, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_132to_date(__pyx_self, __pyx_v_self, __pyx_v_year, __pyx_v_month, __pyx_v_day);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_132to_date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_my_unit = 0;
  int __pyx_v_my_reso;
  PyArrayObject *__pyx_v_times = NULL;
  PyArrayObject *__pyx_v_dateD = NULL;
  PyArrayObject *__pyx_v_dates = NULL;
  PyObject *__pyx_v_dtype = 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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_times __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_replace_dates __pyx_t_9;
  int __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_11;
  int __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_13;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_14;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 __pyx_t_15;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_date", 0);

  /* "cytimes/pddt.py":3144
 *         """
 *         # Fast-path
 *         if year <= 0:             # <<<<<<<<<<<<<<
 *             # Repalce day
 *             if month <= 0:
*/
  __pyx_t_1 = (__pyx_v_year <= 0);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3146
 *         if year <= 0:
 *             # Repalce day
 *             if month <= 0:             # <<<<<<<<<<<<<<
 *                 return self.to_curr_month(day)
 *             # Replace month & day
*/
    __pyx_t_1 = (__pyx_v_month <= 0);
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":3147
 *             # Repalce day
 *             if month <= 0:
 *                 return self.to_curr_month(day)             # <<<<<<<<<<<<<<
 *             # Replace month & day
 *             return self.to_curr_year(month, day)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __pyx_v_self;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_curr_month, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3147, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "cytimes/pddt.py":3146
 *         if year <= 0:
 *             # Repalce day
 *             if month <= 0:             # <<<<<<<<<<<<<<
 *                 return self.to_curr_month(day)
 *             # Replace month & day
*/
    }

    /* "cytimes/pddt.py":3149
 *                 return self.to_curr_month(day)
 *             # Replace month & day
 *             return self.to_curr_year(month, day)             # <<<<<<<<<<<<<<
 * 
 *         # Access datetime array & info
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_3, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_curr_year, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":3144
 *         """
 *         # Fast-path
 *         if year <= 0:             # <<<<<<<<<<<<<<
 *             # Repalce day
 *             if month <= 0:
*/
  }

  /* "cytimes/pddt.py":3152
 * 
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3152, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":3153
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
 * 
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 3153, __pyx_L1_error)
  __pyx_v_my_unit = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":3154
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)             # <<<<<<<<<<<<<<
 * 
 *         # Seperate times -> int64[my_unit]
*/
  __pyx_t_7 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_my_unit); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 3154, __pyx_L1_error)
  __pyx_v_my_reso = __pyx_t_7;

  /* "cytimes/pddt.py":3157
 * 
 *         # Seperate times -> int64[my_unit]
 *         times = utils.dt64arr_times(arr, my_reso)  # int64[my_unit]             # <<<<<<<<<<<<<<
 * 
 *         # Replace date -> int64[D]
*/
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.arr_reso = __pyx_v_my_reso;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_times = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":3160
 * 
 *         # Replace date -> int64[D]
 *         dateD = utils.dt64arr_replace_dates(arr, year, month, day, my_reso)             # <<<<<<<<<<<<<<
 * 
 *         # Combine dates & times
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.arr_reso = __pyx_v_my_reso;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_replace_dates(__pyx_v_arr, __pyx_v_year, __pyx_v_month, __pyx_v_day, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":3164
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_10 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS);
  if (__pyx_t_10) {
  } else {
    __pyx_t_1 = __pyx_t_10;
    goto __pyx_L6_bool_binop_done;
  }

  /* "cytimes/pddt.py":3165
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *             dateD, utils.DT_NPY_UNIT_DD             # <<<<<<<<<<<<<<
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
*/
  __pyx_t_11.__pyx_n = 1;
  __pyx_t_11.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
  __pyx_t_10 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_dateD, &__pyx_t_11); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 3164, __pyx_L1_error)

  /* "cytimes/pddt.py":3164
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_12 = (!__pyx_t_10);
  __pyx_t_1 = __pyx_t_12;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3167
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US
*/
    __pyx_t_13.__pyx_n = 2;
    __pyx_t_13.offset = 0;
    __pyx_t_13.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateD, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3168
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *             dtype = utils.DT64_DTYPE_US
 *         # . my_unit safe -> int64[my_unit]
*/
    __pyx_t_14.__pyx_n = 2;
    __pyx_t_14.offset = 0;
    __pyx_t_14.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_times, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_14)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3169
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US             # <<<<<<<<<<<<<<
 *         # . my_unit safe -> int64[my_unit]
 *         else:
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
    __pyx_v_dtype = __pyx_v_7cytimes_5utils_DT64_DTYPE_US;

    /* "cytimes/pddt.py":3164
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":3172
 *         # . my_unit safe -> int64[my_unit]
 *         else:
 *             dates = utils.dt64arr_as_int64(             # <<<<<<<<<<<<<<
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
*/
  /*else*/ {

    /* "cytimes/pddt.py":3173
 *         else:
 *             dates = utils.dt64arr_as_int64(
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False             # <<<<<<<<<<<<<<
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
*/
    __pyx_t_15.__pyx_n = 3;
    __pyx_t_15.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
    __pyx_t_15.offset = 0;
    __pyx_t_15.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64(__pyx_v_dateD, __pyx_v_my_unit, &__pyx_t_15)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3175
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)             # <<<<<<<<<<<<<<
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64
 * 
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_nptime_unit_str2dt64(__pyx_v_my_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dtype = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L5:;

  /* "cytimes/pddt.py":3176
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
  __pyx_t_16.__pyx_n = 2;
  __pyx_t_16.offset = 0;
  __pyx_t_16.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":3179
 * 
 *         # New instance
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *     def to_time(
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_4 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_dtype};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_6, __pyx_t_3};
    __pyx_t_18 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_4, __pyx_t_18, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3179, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_17, __pyx_t_18, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 3179, __pyx_L1_error)
    __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_18);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":3120
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_date(             # <<<<<<<<<<<<<<
 *         self,
 *         year: cython.int = -1,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_my_unit);
  __Pyx_XDECREF((PyObject *)__pyx_v_times);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateD);
  __Pyx_XDECREF((PyObject *)__pyx_v_dates);
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":3181
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_time(             # <<<<<<<<<<<<<<
 *         self,
 *         hour: cython.int = -1,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_135to_time(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_134to_time, "Adjust the time fields with new values, without affecting other fields `<'Pddt'>`.\n\n        :param hour `<'int'>`: Absolute hour. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..23].\n        :param minute `<'int'>`: Absolute minute. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..59].\n        :param second `<'int'>`: Absolute second. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..59].\n        :param microsecond `<'int'>`: Absolute microsecond. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..999999].\n        :param nanosecond `<'int'>`: Absolute nanosecond. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..999].\n        :returns `<'Pddt'>`: The resulting datetime index with new specified time field values.\n\n        ## Behavior\n        - Replacements are `component-wise`: any of time fields may be left as `< 0`\n          to keep original values.\n        - Only time components within the index resolution are modified;\n          e.g., when index is in `'s'` resolution, `microsecond` and `nanosecond`\n          replacements are ignored.\n\n        ## Equivalent\n        >>> pt.replace(\n                hour=hour,\n                minute=minute,\n                second=second,\n                microsecond=microsecond,\n                nanosecond=nanosecond,\n            )\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_135to_time = {"to_time", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_135to_time, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_134to_time};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_135to_time(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_hour;
  int __pyx_v_minute;
  int __pyx_v_second;
  int __pyx_v_microsecond;
  int __pyx_v_nanosecond;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_time (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_hour,&__pyx_mstate_global->__pyx_n_u_minute,&__pyx_mstate_global->__pyx_n_u_second,&__pyx_mstate_global->__pyx_n_u_microsecond,&__pyx_mstate_global->__pyx_n_u_nanosecond,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3181, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 3181, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 3181, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3181, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3181, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3181, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3181, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_time", 0) < (0)) __PYX_ERR(0, 3181, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_time", 0, 1, 6, i); __PYX_ERR(0, 3181, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 3181, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 3181, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3181, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3181, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3181, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3181, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    if (values[1]) {
      __pyx_v_hour = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_hour == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3183, __pyx_L3_error)
    } else {
      __pyx_v_hour = ((int)((int)-1));
    }
    if (values[2]) {
      __pyx_v_minute = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_minute == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3184, __pyx_L3_error)
    } else {
      __pyx_v_minute = ((int)((int)-1));
    }
    if (values[3]) {
      __pyx_v_second = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_second == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3185, __pyx_L3_error)
    } else {
      __pyx_v_second = ((int)((int)-1));
    }
    if (values[4]) {
      __pyx_v_microsecond = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_microsecond == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3186, __pyx_L3_error)
    } else {
      __pyx_v_microsecond = ((int)((int)-1));
    }
    if (values[5]) {
      __pyx_v_nanosecond = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_nanosecond == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3187, __pyx_L3_error)
    } else {
      __pyx_v_nanosecond = ((int)((int)-1));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_time", 0, 1, 6, __pyx_nargs); __PYX_ERR(0, 3181, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_134to_time(__pyx_self, __pyx_v_self, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_nanosecond);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_134to_time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, int __pyx_v_nanosecond) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_my_unit = 0;
  int __pyx_v_my_reso;
  PyArrayObject *__pyx_v_dateD = NULL;
  PyObject *__pyx_v_dtype = NULL;
  PyArrayObject *__pyx_v_times = NULL;
  PyArrayObject *__pyx_v_dates = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_6;
  int __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_replace_times __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  size_t __pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_time", 0);

  /* "cytimes/pddt.py":3221
 *         # Fast-path: no changes
 *         if (
 *             hour < 0             # <<<<<<<<<<<<<<
 *             and minute < 0
 *             and second < 0
*/
  __pyx_t_2 = (__pyx_v_hour < 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":3222
 *         if (
 *             hour < 0
 *             and minute < 0             # <<<<<<<<<<<<<<
 *             and second < 0
 *             and microsecond < 0
*/
  __pyx_t_2 = (__pyx_v_minute < 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":3223
 *             hour < 0
 *             and minute < 0
 *             and second < 0             # <<<<<<<<<<<<<<
 *             and microsecond < 0
 *             and nanosecond < 0
*/
  __pyx_t_2 = (__pyx_v_second < 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":3224
 *             and minute < 0
 *             and second < 0
 *             and microsecond < 0             # <<<<<<<<<<<<<<
 *             and nanosecond < 0
 *         ):
*/
  __pyx_t_2 = (__pyx_v_microsecond < 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":3225
 *             and second < 0
 *             and microsecond < 0
 *             and nanosecond < 0             # <<<<<<<<<<<<<<
 *         ):
 *             return self
*/
  __pyx_t_2 = (__pyx_v_nanosecond < 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;

  /* "cytimes/pddt.py":3220
 *         """
 *         # Fast-path: no changes
 *         if (             # <<<<<<<<<<<<<<
 *             hour < 0
 *             and minute < 0
*/
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3227
 *             and nanosecond < 0
 *         ):
 *             return self             # <<<<<<<<<<<<<<
 * 
 *         # Access datetime array & info
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pddt.py":3220
 *         """
 *         # Fast-path: no changes
 *         if (             # <<<<<<<<<<<<<<
 *             hour < 0
 *             and minute < 0
*/
  }

  /* "cytimes/pddt.py":3230
 * 
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3230, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cytimes/pddt.py":3231
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_3))) __PYX_ERR(0, 3231, __pyx_L1_error)
  __pyx_v_my_unit = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cytimes/pddt.py":3232
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)             # <<<<<<<<<<<<<<
 * 
 *         # Seperate dates -> int64[D]
*/
  __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_my_unit); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 3232, __pyx_L1_error)
  __pyx_v_my_reso = __pyx_t_4;

  /* "cytimes/pddt.py":3235
 * 
 *         # Seperate dates -> int64[D]
 *         dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 * 
 *         # Set time to zero
*/
  __pyx_t_5.__pyx_n = 3;
  __pyx_t_5.arr_reso = __pyx_v_my_reso;
  __pyx_t_5.offset = 0;
  __pyx_t_5.copy = 1;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_dateD = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cytimes/pddt.py":3239
 *         # Set time to zero
 *         if (
 *             hour == 0             # <<<<<<<<<<<<<<
 *             and minute == 0
 *             and second == 0
*/
  __pyx_t_2 = (__pyx_v_hour == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L10_bool_binop_done;
  }

  /* "cytimes/pddt.py":3240
 *         if (
 *             hour == 0
 *             and minute == 0             # <<<<<<<<<<<<<<
 *             and second == 0
 *             and microsecond == 0
*/
  __pyx_t_2 = (__pyx_v_minute == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L10_bool_binop_done;
  }

  /* "cytimes/pddt.py":3241
 *             hour == 0
 *             and minute == 0
 *             and second == 0             # <<<<<<<<<<<<<<
 *             and microsecond == 0
 *             and nanosecond == 0
*/
  __pyx_t_2 = (__pyx_v_second == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L10_bool_binop_done;
  }

  /* "cytimes/pddt.py":3242
 *             and minute == 0
 *             and second == 0
 *             and microsecond == 0             # <<<<<<<<<<<<<<
 *             and nanosecond == 0
 *         ):
*/
  __pyx_t_2 = (__pyx_v_microsecond == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L10_bool_binop_done;
  }

  /* "cytimes/pddt.py":3243
 *             and second == 0
 *             and microsecond == 0
 *             and nanosecond == 0             # <<<<<<<<<<<<<<
 *         ):
 *             # Combine dates & times
*/
  __pyx_t_2 = (__pyx_v_nanosecond == 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L10_bool_binop_done:;

  /* "cytimes/pddt.py":3238
 * 
 *         # Set time to zero
 *         if (             # <<<<<<<<<<<<<<
 *             hour == 0
 *             and minute == 0
*/
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3247
 *             # Combine dates & times
 *             # . my_unit[ns] & out of ns range -> int64[us]
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *                 dateD, utils.DT_NPY_UNIT_DD
 *             ):
*/
    __pyx_t_2 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L16_bool_binop_done;
    }

    /* "cytimes/pddt.py":3248
 *             # . my_unit[ns] & out of ns range -> int64[us]
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *                 dateD, utils.DT_NPY_UNIT_DD             # <<<<<<<<<<<<<<
 *             ):
 *                 arr = utils.arr_mul(dateD, utils.US_DAY, 0, False)
*/
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
    __pyx_t_2 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_dateD, &__pyx_t_6); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 3247, __pyx_L1_error)

    /* "cytimes/pddt.py":3247
 *             # Combine dates & times
 *             # . my_unit[ns] & out of ns range -> int64[us]
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *                 dateD, utils.DT_NPY_UNIT_DD
 *             ):
*/
    __pyx_t_7 = (!__pyx_t_2);
    __pyx_t_1 = __pyx_t_7;
    __pyx_L16_bool_binop_done:;
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":3250
 *                 dateD, utils.DT_NPY_UNIT_DD
 *             ):
 *                 arr = utils.arr_mul(dateD, utils.US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *                 dtype = utils.DT64_DTYPE_US
 *             # . my_unit safe -> int64[my_unit]
*/
      __pyx_t_8.__pyx_n = 2;
      __pyx_t_8.offset = 0;
      __pyx_t_8.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateD, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3250, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "cytimes/pddt.py":3251
 *             ):
 *                 arr = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *                 dtype = utils.DT64_DTYPE_US             # <<<<<<<<<<<<<<
 *             # . my_unit safe -> int64[my_unit]
 *             else:
*/
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
      __pyx_v_dtype = __pyx_v_7cytimes_5utils_DT64_DTYPE_US;

      /* "cytimes/pddt.py":3247
 *             # Combine dates & times
 *             # . my_unit[ns] & out of ns range -> int64[us]
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *                 dateD, utils.DT_NPY_UNIT_DD
 *             ):
*/
      goto __pyx_L15;
    }

    /* "cytimes/pddt.py":3254
 *             # . my_unit safe -> int64[my_unit]
 *             else:
 *                 arr = utils.dt64arr_as_int64(             # <<<<<<<<<<<<<<
 *                     dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *                 )
*/
    /*else*/ {

      /* "cytimes/pddt.py":3255
 *             else:
 *                 arr = utils.dt64arr_as_int64(
 *                     dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False             # <<<<<<<<<<<<<<
 *                 )
 *                 dtype = utils.nptime_unit_str2dt64(my_unit)
*/
      __pyx_t_9.__pyx_n = 3;
      __pyx_t_9.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
      __pyx_t_9.offset = 0;
      __pyx_t_9.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64(__pyx_v_dateD, __pyx_v_my_unit, &__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3254, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "cytimes/pddt.py":3257
 *                     dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *                 )
 *                 dtype = utils.nptime_unit_str2dt64(my_unit)             # <<<<<<<<<<<<<<
 * 
 *         # Replace times -> int64[my_unit]
*/
      __pyx_t_3 = __pyx_f_7cytimes_5utils_nptime_unit_str2dt64(__pyx_v_my_unit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3257, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_dtype = __pyx_t_3;
      __pyx_t_3 = 0;
    }
    __pyx_L15:;

    /* "cytimes/pddt.py":3238
 * 
 *         # Set time to zero
 *         if (             # <<<<<<<<<<<<<<
 *             hour == 0
 *             and minute == 0
*/
    goto __pyx_L9;
  }

  /* "cytimes/pddt.py":3261
 *         # Replace times -> int64[my_unit]
 *         else:
 *             times = utils.dt64arr_replace_times(             # <<<<<<<<<<<<<<
 *                 arr, hour, minute, second, microsecond, nanosecond, my_reso
 *             )
*/
  /*else*/ {

    /* "cytimes/pddt.py":3262
 *         else:
 *             times = utils.dt64arr_replace_times(
 *                 arr, hour, minute, second, microsecond, nanosecond, my_reso             # <<<<<<<<<<<<<<
 *             )
 * 
*/
    __pyx_t_10.__pyx_n = 1;
    __pyx_t_10.arr_reso = __pyx_v_my_reso;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_replace_times(__pyx_v_arr, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_nanosecond, &__pyx_t_10)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_times = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "cytimes/pddt.py":3267
 *             # Combine dates & times
 *             # . my_unit[ns] & out of ns range -> int64[us]
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *                 dateD, utils.DT_NPY_UNIT_DD
 *             ):
*/
    __pyx_t_7 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS);
    if (__pyx_t_7) {
    } else {
      __pyx_t_1 = __pyx_t_7;
      goto __pyx_L19_bool_binop_done;
    }

    /* "cytimes/pddt.py":3268
 *             # . my_unit[ns] & out of ns range -> int64[us]
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *                 dateD, utils.DT_NPY_UNIT_DD             # <<<<<<<<<<<<<<
 *             ):
 *                 dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
*/
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
    __pyx_t_7 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_dateD, &__pyx_t_6); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 3267, __pyx_L1_error)

    /* "cytimes/pddt.py":3267
 *             # Combine dates & times
 *             # . my_unit[ns] & out of ns range -> int64[us]
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *                 dateD, utils.DT_NPY_UNIT_DD
 *             ):
*/
    __pyx_t_2 = (!__pyx_t_7);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L19_bool_binop_done:;
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":3270
 *                 dateD, utils.DT_NPY_UNIT_DD
 *             ):
 *                 dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *                 times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *                 dtype = utils.DT64_DTYPE_US
*/
      __pyx_t_8.__pyx_n = 2;
      __pyx_t_8.offset = 0;
      __pyx_t_8.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateD, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3270, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_dates = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "cytimes/pddt.py":3271
 *             ):
 *                 dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *                 times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 dtype = utils.DT64_DTYPE_US
 *             # . my_unit safe -> int64[my_unit]
*/
      __pyx_t_11.__pyx_n = 2;
      __pyx_t_11.offset = 0;
      __pyx_t_11.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_times, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_11)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3271, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "cytimes/pddt.py":3272
 *                 dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *                 times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *                 dtype = utils.DT64_DTYPE_US             # <<<<<<<<<<<<<<
 *             # . my_unit safe -> int64[my_unit]
 *             else:
*/
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
      __pyx_v_dtype = __pyx_v_7cytimes_5utils_DT64_DTYPE_US;

      /* "cytimes/pddt.py":3267
 *             # Combine dates & times
 *             # . my_unit[ns] & out of ns range -> int64[us]
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *                 dateD, utils.DT_NPY_UNIT_DD
 *             ):
*/
      goto __pyx_L18;
    }

    /* "cytimes/pddt.py":3275
 *             # . my_unit safe -> int64[my_unit]
 *             else:
 *                 dates = utils.dt64arr_as_int64(             # <<<<<<<<<<<<<<
 *                     dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *                 )
*/
    /*else*/ {

      /* "cytimes/pddt.py":3276
 *             else:
 *                 dates = utils.dt64arr_as_int64(
 *                     dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False             # <<<<<<<<<<<<<<
 *                 )
 *                 dtype = utils.nptime_unit_str2dt64(my_unit)
*/
      __pyx_t_9.__pyx_n = 3;
      __pyx_t_9.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
      __pyx_t_9.offset = 0;
      __pyx_t_9.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64(__pyx_v_dateD, __pyx_v_my_unit, &__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3275, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_dates = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "cytimes/pddt.py":3278
 *                     dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *                 )
 *                 dtype = utils.nptime_unit_str2dt64(my_unit)             # <<<<<<<<<<<<<<
 *             arr = utils.arr_add_arr(dates, times, 0, False)  # int64
 * 
*/
      __pyx_t_3 = __pyx_f_7cytimes_5utils_nptime_unit_str2dt64(__pyx_v_my_unit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3278, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_dtype = __pyx_t_3;
      __pyx_t_3 = 0;
    }
    __pyx_L18:;

    /* "cytimes/pddt.py":3279
 *                 )
 *                 dtype = utils.nptime_unit_str2dt64(my_unit)
 *             arr = utils.arr_add_arr(dates, times, 0, False)  # int64             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.offset = 0;
    __pyx_t_12.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;
  }
  __pyx_L9:;

  /* "cytimes/pddt.py":3282
 * 
 *         # New instance
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *     def to_first_of(self, unit: str) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_13 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_13);
  __pyx_t_15 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_15);
  __pyx_t_16 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_v_dtype};
    __pyx_t_14 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
  }
  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_16 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_13, __pyx_t_14};
    __pyx_t_18 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_15, __pyx_t_18, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3282, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_17, __pyx_t_18, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 3282, __pyx_L1_error)
    __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_18);
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":3181
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_time(             # <<<<<<<<<<<<<<
 *         self,
 *         hour: cython.int = -1,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_my_unit);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateD);
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XDECREF((PyObject *)__pyx_v_times);
  __Pyx_XDECREF((PyObject *)__pyx_v_dates);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":3284
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_first_of(self, unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date fields to the first day of the specified datetime unit,
 *         without affecting the time fields `<'Pddt'>`.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_137to_first_of(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_136to_first_of, "Adjust the date fields to the first day of the specified datetime unit,\n        without affecting the time fields `<'Pddt'>`.\n\n        :param unit `<'str'>`: The datetime unit:\n\n            - `'Y'` \342\206\222 First day of the year: `YYYY-01-01`\n            - `'Q'` \342\206\222 First day of the quarter: `YYYY-MM-01`\n            - `'M'` \342\206\222 First day of the month: `YYYY-MM-01`\n            - `'W'` \342\206\222 First day (Monday) of the week: `YYYY-MM-DD`\n            - `Month` (e.g., `'Jan'`, `'February'`, `'\344\270\211\346\234\210'`)\n                    \342\206\222 First day of the specifed month: `YYYY-MM-01`\n\n        :returns `<'Pddt'>`: The adjusted datetime index.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_137to_first_of = {"to_first_of", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_137to_first_of, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_136to_first_of};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_137to_first_of(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_unit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_first_of (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_unit,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3284, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3284, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3284, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_first_of", 0) < (0)) __PYX_ERR(0, 3284, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_first_of", 1, 2, 2, i); __PYX_ERR(0, 3284, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3284, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3284, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_unit = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_first_of", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3284, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_first_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 3284, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_136to_first_of(__pyx_self, __pyx_v_self, __pyx_v_unit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_136to_first_of(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit) {
  Py_ssize_t __pyx_v_unit_len;
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_my_unit = 0;
  int __pyx_v_my_reso;
  PyArrayObject *__pyx_v_times = NULL;
  Py_UCS4 __pyx_v_ch0;
  PyArrayObject *__pyx_v_dateD = NULL;
  PyArrayObject *__pyx_v_delta = NULL;
  PyArrayObject *__pyx_v_dateM = NULL;
  PyArrayObject *__pyx_v_dateQ = NULL;
  PyArrayObject *__pyx_v_dateY = NULL;
  int __pyx_v_val;
  PyArrayObject *__pyx_v_dates = NULL;
  PyObject *__pyx_v_dtype = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_3;
  int __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_times __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_weekday __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_sub_arr __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Q __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_13;
  struct __pyx_opt_args_7cytimes_6parser_parse_month __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_16;
  int __pyx_t_17;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_18;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 __pyx_t_19;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_20;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  size_t __pyx_t_23;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_first_of", 0);

  /* "cytimes/pddt.py":3300
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  __pyx_t_1 = (__pyx_v_unit == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3302
 *         if unit is None:
 *             errors.raise_argument_error(
 *                 self.__class__,             # <<<<<<<<<<<<<<
 *                 "to_first_of(unit)",
 *                 "Supports: 'Y', 'Q', 'M', 'W' or Month name; got None.",
*/
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3302, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cytimes/pddt.py":3301
 *         # Guard
 *         if unit is None:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self.__class__,
 *                 "to_first_of(unit)",
*/
    __pyx_t_3.__pyx_n = 3;
    __pyx_t_3.cls = __pyx_t_2;
    __pyx_t_3.input_msg = __pyx_mstate_global->__pyx_kp_u_to_first_of_unit;
    __pyx_t_3.error_msg = __pyx_mstate_global->__pyx_kp_u_Supports_Y_Q_M_W_or_Month_name_g;
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3301, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3300
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  }

  /* "cytimes/pddt.py":3306
 *                 "Supports: 'Y', 'Q', 'M', 'W' or Month name; got None.",
 *             )
 *         unit_len: cython.Py_ssize_t = str_len(unit)             # <<<<<<<<<<<<<<
 *         if unit_len == 0:
 *             errors.raise_argument_error(
*/
  __pyx_v_unit_len = PyUnicode_GET_LENGTH(__pyx_v_unit);

  /* "cytimes/pddt.py":3307
 *             )
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 0:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  __pyx_t_1 = (__pyx_v_unit_len == 0);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3309
 *         if unit_len == 0:
 *             errors.raise_argument_error(
 *                 self.__class__,             # <<<<<<<<<<<<<<
 *                 "to_first_of(unit)",
 *                 "Supports: 'Y', 'Q', 'M', 'W' or Month name; got empty string.",
*/
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cytimes/pddt.py":3308
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 0:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self.__class__,
 *                 "to_first_of(unit)",
*/
    __pyx_t_3.__pyx_n = 3;
    __pyx_t_3.cls = __pyx_t_2;
    __pyx_t_3.input_msg = __pyx_mstate_global->__pyx_kp_u_to_first_of_unit;
    __pyx_t_3.error_msg = __pyx_mstate_global->__pyx_kp_u_Supports_Y_Q_M_W_or_Month_name_g_2;
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3308, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3307
 *             )
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 0:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  }

  /* "cytimes/pddt.py":3315
 * 
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3315, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":3316
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
 * 
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 3316, __pyx_L1_error)
  __pyx_v_my_unit = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":3317
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)             # <<<<<<<<<<<<<<
 * 
 *         # Seperate times -> int64[my_unit]
*/
  __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_my_unit); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 3317, __pyx_L1_error)
  __pyx_v_my_reso = __pyx_t_4;

  /* "cytimes/pddt.py":3320
 * 
 *         # Seperate times -> int64[my_unit]
 *         times = utils.dt64arr_times(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 * 
 *         # To weekday -> int64[D]
*/
  __pyx_t_5.__pyx_n = 3;
  __pyx_t_5.arr_reso = __pyx_v_my_reso;
  __pyx_t_5.offset = 0;
  __pyx_t_5.copy = 1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_times = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":3323
 * 
 *         # To weekday -> int64[D]
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *         if ch0 == "W" and unit_len == 1:
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
*/
  __pyx_v_ch0 = PyUnicode_READ_CHAR(__pyx_v_unit, 0);

  /* "cytimes/pddt.py":3324
 *         # To weekday -> int64[D]
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)
 *         if ch0 == "W" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
*/
  __pyx_t_6 = (__pyx_v_ch0 == 87);
  if (__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_6 = (__pyx_v_unit_len == 1);
  __pyx_t_1 = __pyx_t_6;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3325
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)
 *         if ch0 == "W" and unit_len == 1:
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
 *             dateD = utils.arr_sub_arr(dateD, delta, 0, False)
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = __pyx_v_my_reso;
    __pyx_t_7.offset = 0;
    __pyx_t_7.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3326
 *         if ch0 == "W" and unit_len == 1:
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)             # <<<<<<<<<<<<<<
 *             dateD = utils.arr_sub_arr(dateD, delta, 0, False)
 * 
*/
    __pyx_t_8.__pyx_n = 3;
    __pyx_t_8.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
    __pyx_t_8.offset = 0;
    __pyx_t_8.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_weekday(__pyx_v_dateD, &__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3327
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
 *             dateD = utils.arr_sub_arr(dateD, delta, 0, False)             # <<<<<<<<<<<<<<
 * 
 *         # To month -> int64[M] -> int64[D]
*/
    __pyx_t_9.__pyx_n = 2;
    __pyx_t_9.offset = 0;
    __pyx_t_9.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_sub_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3324
 *         # To weekday -> int64[D]
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)
 *         if ch0 == "W" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":3330
 * 
 *         # To month -> int64[M] -> int64[D]
 *         elif ch0 == "M" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateM = utils.dt64arr_as_int64_M(arr, my_reso, 0, True)
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
*/
  __pyx_t_6 = (__pyx_v_ch0 == 77);
  if (__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_6 = (__pyx_v_unit_len == 1);
  __pyx_t_1 = __pyx_t_6;
  __pyx_L8_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3331
 *         # To month -> int64[M] -> int64[D]
 *         elif ch0 == "M" and unit_len == 1:
 *             dateM = utils.dt64arr_as_int64_M(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 * 
*/
    __pyx_t_10.__pyx_n = 3;
    __pyx_t_10.arr_reso = __pyx_v_my_reso;
    __pyx_t_10.offset = 0;
    __pyx_t_10.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(__pyx_v_arr, &__pyx_t_10)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateM = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3332
 *         elif ch0 == "M" and unit_len == 1:
 *             dateM = utils.dt64arr_as_int64_M(arr, my_reso, 0, True)
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)             # <<<<<<<<<<<<<<
 * 
 *         # To quarter -> int64[Q] -> int64[M] -> int64[D]
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_7.offset = 0;
    __pyx_t_7.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3332, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3330
 * 
 *         # To month -> int64[M] -> int64[D]
 *         elif ch0 == "M" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateM = utils.dt64arr_as_int64_M(arr, my_reso, 0, True)
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":3335
 * 
 *         # To quarter -> int64[Q] -> int64[M] -> int64[D]
 *         elif ch0 == "Q" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 0, True)
 *             dateM = utils.arr_mul(dateQ, 3, 0, False)
*/
  __pyx_t_6 = (__pyx_v_ch0 == 81);
  if (__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_6 = (__pyx_v_unit_len == 1);
  __pyx_t_1 = __pyx_t_6;
  __pyx_L10_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3336
 *         # To quarter -> int64[Q] -> int64[M] -> int64[D]
 *         elif ch0 == "Q" and unit_len == 1:
 *             dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 *             dateM = utils.arr_mul(dateQ, 3, 0, False)
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
*/
    __pyx_t_11.__pyx_n = 3;
    __pyx_t_11.arr_reso = __pyx_v_my_reso;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Q(__pyx_v_arr, &__pyx_t_11)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3336, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateQ = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3337
 *         elif ch0 == "Q" and unit_len == 1:
 *             dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 0, True)
 *             dateM = utils.arr_mul(dateQ, 3, 0, False)             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 * 
*/
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.offset = 0;
    __pyx_t_12.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateQ, 3, &__pyx_t_12)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3337, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateM = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3338
 *             dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 0, True)
 *             dateM = utils.arr_mul(dateQ, 3, 0, False)
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)             # <<<<<<<<<<<<<<
 * 
 *         # To year -> int64[Y] -> int64[D]
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_7.offset = 0;
    __pyx_t_7.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3338, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3335
 * 
 *         # To quarter -> int64[Q] -> int64[M] -> int64[D]
 *         elif ch0 == "Q" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 0, True)
 *             dateM = utils.arr_mul(dateQ, 3, 0, False)
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":3341
 * 
 *         # To year -> int64[Y] -> int64[D]
 *         elif ch0 == "Y" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)
 *             dateD = utils.dt64arr_as_int64_D(dateY, utils.DT_NPY_UNIT_YY, 0, False)
*/
  __pyx_t_6 = (__pyx_v_ch0 == 89);
  if (__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L12_bool_binop_done;
  }
  __pyx_t_6 = (__pyx_v_unit_len == 1);
  __pyx_t_1 = __pyx_t_6;
  __pyx_L12_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3342
 *         # To year -> int64[Y] -> int64[D]
 *         elif ch0 == "Y" and unit_len == 1:
 *             dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateY, utils.DT_NPY_UNIT_YY, 0, False)
 * 
*/
    __pyx_t_13.__pyx_n = 3;
    __pyx_t_13.arr_reso = __pyx_v_my_reso;
    __pyx_t_13.offset = 0;
    __pyx_t_13.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateY = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3343
 *         elif ch0 == "Y" and unit_len == 1:
 *             dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)
 *             dateD = utils.dt64arr_as_int64_D(dateY, utils.DT_NPY_UNIT_YY, 0, False)             # <<<<<<<<<<<<<<
 * 
 *         # Special
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_YY;
    __pyx_t_7.offset = 0;
    __pyx_t_7.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateY, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3341
 * 
 *         # To year -> int64[Y] -> int64[D]
 *         elif ch0 == "Y" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)
 *             dateD = utils.dt64arr_as_int64_D(dateY, utils.DT_NPY_UNIT_YY, 0, False)
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":3348
 *         else:
 *             # Month name -> int64[Y] -> int64[M] -> int64[D]
 *             val: cython.int = _parse_month(unit, None, False)             # <<<<<<<<<<<<<<
 *             if val != -1:
 *                 dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)
*/
  /*else*/ {
    __pyx_t_14.__pyx_n = 2;
    __pyx_t_14.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
    __pyx_t_14.raise_error = 0;
    __pyx_t_4 = __pyx_f_7cytimes_6parser_parse_month(__pyx_v_unit, 0, &__pyx_t_14); if (unlikely(__pyx_t_4 == ((int)-2))) __PYX_ERR(0, 3348, __pyx_L1_error)
    __pyx_v_val = __pyx_t_4;

    /* "cytimes/pddt.py":3349
 *             # Month name -> int64[Y] -> int64[M] -> int64[D]
 *             val: cython.int = _parse_month(unit, None, False)
 *             if val != -1:             # <<<<<<<<<<<<<<
 *                 dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)
 *                 dateM = utils.arr_mul(dateY, 12, val - 1, False)
*/
    __pyx_t_1 = (__pyx_v_val != -1L);
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":3350
 *             val: cython.int = _parse_month(unit, None, False)
 *             if val != -1:
 *                 dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 *                 dateM = utils.arr_mul(dateY, 12, val - 1, False)
 *                 dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
*/
      __pyx_t_13.__pyx_n = 3;
      __pyx_t_13.arr_reso = __pyx_v_my_reso;
      __pyx_t_13.offset = 0;
      __pyx_t_13.copy = 1;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3350, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_dateY = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "cytimes/pddt.py":3351
 *             if val != -1:
 *                 dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)
 *                 dateM = utils.arr_mul(dateY, 12, val - 1, False)             # <<<<<<<<<<<<<<
 *                 dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)
 * 
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = (__pyx_v_val - 1);
      __pyx_t_12.copy = 0;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateY, 12, &__pyx_t_12)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3351, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_dateM = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "cytimes/pddt.py":3352
 *                 dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)
 *                 dateM = utils.arr_mul(dateY, 12, val - 1, False)
 *                 dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, 0, False)             # <<<<<<<<<<<<<<
 * 
 *             # Unsupported unit
*/
      __pyx_t_7.__pyx_n = 3;
      __pyx_t_7.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
      __pyx_t_7.offset = 0;
      __pyx_t_7.copy = 0;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3352, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "cytimes/pddt.py":3349
 *             # Month name -> int64[Y] -> int64[M] -> int64[D]
 *             val: cython.int = _parse_month(unit, None, False)
 *             if val != -1:             # <<<<<<<<<<<<<<
 *                 dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)
 *                 dateM = utils.arr_mul(dateY, 12, val - 1, False)
*/
      goto __pyx_L14;
    }

    /* "cytimes/pddt.py":3356
 *             # Unsupported unit
 *             else:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     self.__class__,
 *                     "to_first_of(unit)",
*/
    /*else*/ {

      /* "cytimes/pddt.py":3357
 *             else:
 *                 errors.raise_argument_error(
 *                     self.__class__,             # <<<<<<<<<<<<<<
 *                     "to_first_of(unit)",
 *                     "Supports: 'Y', 'Q', 'M', 'W' or Month name; got '%s'." % unit,
*/
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3357, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "cytimes/pddt.py":3359
 *                     self.__class__,
 *                     "to_first_of(unit)",
 *                     "Supports: 'Y', 'Q', 'M', 'W' or Month name; got '%s'." % unit,             # <<<<<<<<<<<<<<
 *                 )
 *                 return  # unreachable: suppress compiler warning
*/
      __pyx_t_15 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Supports_Y_Q_M_W_or_Month_name_g_3, __pyx_v_unit); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3359, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);

      /* "cytimes/pddt.py":3356
 *             # Unsupported unit
 *             else:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     self.__class__,
 *                     "to_first_of(unit)",
*/
      __pyx_t_3.__pyx_n = 3;
      __pyx_t_3.cls = __pyx_t_2;
      __pyx_t_3.input_msg = __pyx_mstate_global->__pyx_kp_u_to_first_of_unit;
      __pyx_t_3.error_msg = ((PyObject*)__pyx_t_15);
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3356, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

      /* "cytimes/pddt.py":3361
 *                     "Supports: 'Y', 'Q', 'M', 'W' or Month name; got '%s'." % unit,
 *                 )
 *                 return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 * 
 *         # Combine dates & times
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
    }
    __pyx_L14:;
  }
  __pyx_L5:;

  /* "cytimes/pddt.py":3365
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_6 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS);
  if (__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L16_bool_binop_done;
  }

  /* "cytimes/pddt.py":3366
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *             dateD, utils.DT_NPY_UNIT_DD             # <<<<<<<<<<<<<<
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
*/
  __pyx_t_16.__pyx_n = 1;
  __pyx_t_16.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
  __pyx_t_6 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_dateD, &__pyx_t_16); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 3365, __pyx_L1_error)

  /* "cytimes/pddt.py":3365
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_17 = (!__pyx_t_6);
  __pyx_t_1 = __pyx_t_17;
  __pyx_L16_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3368
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US
*/
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.offset = 0;
    __pyx_t_12.copy = 0;
    __pyx_t_15 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateD, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3368, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_15);
    __pyx_t_15 = 0;

    /* "cytimes/pddt.py":3369
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *             dtype = utils.DT64_DTYPE_US
 *         # . my_unit safe -> int64[my_unit]
*/
    __pyx_t_18.__pyx_n = 2;
    __pyx_t_18.offset = 0;
    __pyx_t_18.copy = 0;
    __pyx_t_15 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_times, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_18)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_15));
    __pyx_t_15 = 0;

    /* "cytimes/pddt.py":3370
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US             # <<<<<<<<<<<<<<
 *         # . my_unit safe -> int64[my_unit]
 *         else:
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
    __pyx_v_dtype = __pyx_v_7cytimes_5utils_DT64_DTYPE_US;

    /* "cytimes/pddt.py":3365
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
    goto __pyx_L15;
  }

  /* "cytimes/pddt.py":3373
 *         # . my_unit safe -> int64[my_unit]
 *         else:
 *             dates = utils.dt64arr_as_int64(             # <<<<<<<<<<<<<<
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
*/
  /*else*/ {

    /* "cytimes/pddt.py":3374
 *         else:
 *             dates = utils.dt64arr_as_int64(
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False             # <<<<<<<<<<<<<<
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
*/
    __pyx_t_19.__pyx_n = 3;
    __pyx_t_19.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
    __pyx_t_19.offset = 0;
    __pyx_t_19.copy = 0;
    __pyx_t_15 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64(__pyx_v_dateD, __pyx_v_my_unit, &__pyx_t_19)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_15);
    __pyx_t_15 = 0;

    /* "cytimes/pddt.py":3376
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)             # <<<<<<<<<<<<<<
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64
 * 
*/
    __pyx_t_15 = __pyx_f_7cytimes_5utils_nptime_unit_str2dt64(__pyx_v_my_unit); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3376, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_v_dtype = __pyx_t_15;
    __pyx_t_15 = 0;
  }
  __pyx_L15:;

  /* "cytimes/pddt.py":3377
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
  __pyx_t_20.__pyx_n = 2;
  __pyx_t_20.offset = 0;
  __pyx_t_20.copy = 0;
  __pyx_t_15 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_20)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_15));
  __pyx_t_15 = 0;

  /* "cytimes/pddt.py":3380
 * 
 *         # New instance
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *     def to_last_of(self, unit: str) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_22 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_22);
  __pyx_t_23 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_22, __pyx_v_dtype};
    __pyx_t_21 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_23, (2-__pyx_t_23) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
    if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 3380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
  }
  __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 3380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 3380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __pyx_t_23 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, __pyx_t_21};
    __pyx_t_25 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 3380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_25);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_22, __pyx_t_25, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3380, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_24, __pyx_t_25, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 3380, __pyx_L1_error)
    __pyx_t_15 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_23, (2-__pyx_t_23) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_25);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
    __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
    __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
    if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
  }
  __pyx_r = __pyx_t_15;
  __pyx_t_15 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":3284
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_first_of(self, unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date fields to the first day of the specified datetime unit,
 *         without affecting the time fields `<'Pddt'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_XDECREF(__pyx_t_24);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_first_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_my_unit);
  __Pyx_XDECREF((PyObject *)__pyx_v_times);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateD);
  __Pyx_XDECREF((PyObject *)__pyx_v_delta);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateM);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateQ);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateY);
  __Pyx_XDECREF((PyObject *)__pyx_v_dates);
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":3382
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_last_of(self, unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date fields to the last day of the specified datetime unit,
 *         without affecting the time fields `<'Pddt'>`.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_139to_last_of(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_138to_last_of, "Adjust the date fields to the last day of the specified datetime unit,\n        without affecting the time fields `<'Pddt'>`.\n\n        :param unit `<'str'>`: The datetime unit:\n\n            - `'Y'` \342\206\222 Last day of the year: `YYYY-12-31`\n            - `'Q'` \342\206\222 Last day of the quarter: `YYYY-MM-(30..31)`\n            - `'M'` \342\206\222 Last day of the month: `YYYY-MM-(28..31)`\n            - `'W'` \342\206\222 Last day (Sunday) of the week: `YYYY-MM-DD`\n            - `Month` (e.g., `'Jan'`, `'February'`, `'\344\270\211\346\234\210'`)\n                    \342\206\222 Last day of the specifed month: `YYYY-MM-(28..31)`\n\n        :returns `<'Pddt'>`: The adjusted datetime index.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_139to_last_of = {"to_last_of", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_139to_last_of, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_138to_last_of};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_139to_last_of(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_unit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_last_of (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_unit,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3382, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3382, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3382, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_last_of", 0) < (0)) __PYX_ERR(0, 3382, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_last_of", 1, 2, 2, i); __PYX_ERR(0, 3382, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3382, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3382, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_unit = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_last_of", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3382, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_last_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 3382, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_138to_last_of(__pyx_self, __pyx_v_self, __pyx_v_unit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_138to_last_of(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit) {
  Py_ssize_t __pyx_v_unit_len;
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_my_unit = 0;
  int __pyx_v_my_reso;
  PyArrayObject *__pyx_v_times = NULL;
  Py_UCS4 __pyx_v_ch0;
  PyArrayObject *__pyx_v_dateD = NULL;
  PyArrayObject *__pyx_v_delta = NULL;
  PyArrayObject *__pyx_v_dateM = NULL;
  PyArrayObject *__pyx_v_dateQ = NULL;
  PyArrayObject *__pyx_v_dateY = NULL;
  int __pyx_v_val;
  PyArrayObject *__pyx_v_dates = NULL;
  PyObject *__pyx_v_dtype = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_3;
  int __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_times __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_weekday __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_sub_arr __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Q __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_13;
  struct __pyx_opt_args_7cytimes_6parser_parse_month __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_16;
  int __pyx_t_17;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_18;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 __pyx_t_19;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_20;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  size_t __pyx_t_23;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_last_of", 0);

  /* "cytimes/pddt.py":3398
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  __pyx_t_1 = (__pyx_v_unit == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3400
 *         if unit is None:
 *             errors.raise_argument_error(
 *                 self.__class__,             # <<<<<<<<<<<<<<
 *                 "to_last_of(unit)",
 *                 "Supports: 'Y', 'Q', 'M', 'W' or Month name; got None.",
*/
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cytimes/pddt.py":3399
 *         # Guard
 *         if unit is None:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self.__class__,
 *                 "to_last_of(unit)",
*/
    __pyx_t_3.__pyx_n = 3;
    __pyx_t_3.cls = __pyx_t_2;
    __pyx_t_3.input_msg = __pyx_mstate_global->__pyx_kp_u_to_last_of_unit;
    __pyx_t_3.error_msg = __pyx_mstate_global->__pyx_kp_u_Supports_Y_Q_M_W_or_Month_name_g;
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3399, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3398
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  }

  /* "cytimes/pddt.py":3404
 *                 "Supports: 'Y', 'Q', 'M', 'W' or Month name; got None.",
 *             )
 *         unit_len: cython.Py_ssize_t = str_len(unit)             # <<<<<<<<<<<<<<
 *         if unit_len == 0:
 *             errors.raise_argument_error(
*/
  __pyx_v_unit_len = PyUnicode_GET_LENGTH(__pyx_v_unit);

  /* "cytimes/pddt.py":3405
 *             )
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 0:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  __pyx_t_1 = (__pyx_v_unit_len == 0);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3407
 *         if unit_len == 0:
 *             errors.raise_argument_error(
 *                 self.__class__,             # <<<<<<<<<<<<<<
 *                 "to_last_of(unit)",
 *                 "Supports: 'Y', 'Q', 'M', 'W' or Month name; got empty string.",
*/
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cytimes/pddt.py":3406
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 0:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self.__class__,
 *                 "to_last_of(unit)",
*/
    __pyx_t_3.__pyx_n = 3;
    __pyx_t_3.cls = __pyx_t_2;
    __pyx_t_3.input_msg = __pyx_mstate_global->__pyx_kp_u_to_last_of_unit;
    __pyx_t_3.error_msg = __pyx_mstate_global->__pyx_kp_u_Supports_Y_Q_M_W_or_Month_name_g_2;
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3406, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3405
 *             )
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 0:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  }

  /* "cytimes/pddt.py":3413
 * 
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3413, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":3414
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
 * 
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 3414, __pyx_L1_error)
  __pyx_v_my_unit = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":3415
 *         arr: np.ndarray = self.values_naive
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)             # <<<<<<<<<<<<<<
 * 
 *         # Seperate times -> int64[my_unit]
*/
  __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_my_unit); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 3415, __pyx_L1_error)
  __pyx_v_my_reso = __pyx_t_4;

  /* "cytimes/pddt.py":3418
 * 
 *         # Seperate times -> int64[my_unit]
 *         times = utils.dt64arr_times(arr, my_reso)  # int64[my_unit]             # <<<<<<<<<<<<<<
 * 
 *         # To weekday -> int64[D]
*/
  __pyx_t_5.__pyx_n = 1;
  __pyx_t_5.arr_reso = __pyx_v_my_reso;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_times = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":3421
 * 
 *         # To weekday -> int64[D]
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *         if ch0 == "W" and unit_len == 1:
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
*/
  __pyx_v_ch0 = PyUnicode_READ_CHAR(__pyx_v_unit, 0);

  /* "cytimes/pddt.py":3422
 *         # To weekday -> int64[D]
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)
 *         if ch0 == "W" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
*/
  __pyx_t_6 = (__pyx_v_ch0 == 87);
  if (__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_6 = (__pyx_v_unit_len == 1);
  __pyx_t_1 = __pyx_t_6;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3423
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)
 *         if ch0 == "W" and unit_len == 1:
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
 *             dateD = utils.arr_sub_arr(dateD, delta, 6, False)
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = __pyx_v_my_reso;
    __pyx_t_7.offset = 0;
    __pyx_t_7.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3424
 *         if ch0 == "W" and unit_len == 1:
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)             # <<<<<<<<<<<<<<
 *             dateD = utils.arr_sub_arr(dateD, delta, 6, False)
 *             #: days - weekday + 6
*/
    __pyx_t_8.__pyx_n = 3;
    __pyx_t_8.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
    __pyx_t_8.offset = 0;
    __pyx_t_8.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_weekday(__pyx_v_dateD, &__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3425
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
 *             dateD = utils.arr_sub_arr(dateD, delta, 6, False)             # <<<<<<<<<<<<<<
 *             #: days - weekday + 6
 * 
*/
    __pyx_t_9.__pyx_n = 2;
    __pyx_t_9.offset = 6;
    __pyx_t_9.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_sub_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3422
 *         # To weekday -> int64[D]
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)
 *         if ch0 == "W" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":3429
 * 
 *         # To month -> int64[M]+1 -> int64[D]-1
 *         elif ch0 == "M" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateM = utils.dt64arr_as_int64_M(arr, my_reso, 1, True)
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, -1, False)
*/
  __pyx_t_6 = (__pyx_v_ch0 == 77);
  if (__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_6 = (__pyx_v_unit_len == 1);
  __pyx_t_1 = __pyx_t_6;
  __pyx_L8_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3430
 *         # To month -> int64[M]+1 -> int64[D]-1
 *         elif ch0 == "M" and unit_len == 1:
 *             dateM = utils.dt64arr_as_int64_M(arr, my_reso, 1, True)             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, -1, False)
 * 
*/
    __pyx_t_10.__pyx_n = 3;
    __pyx_t_10.arr_reso = __pyx_v_my_reso;
    __pyx_t_10.offset = 1;
    __pyx_t_10.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(__pyx_v_arr, &__pyx_t_10)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateM = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3431
 *         elif ch0 == "M" and unit_len == 1:
 *             dateM = utils.dt64arr_as_int64_M(arr, my_reso, 1, True)
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, -1, False)             # <<<<<<<<<<<<<<
 * 
 *         # To quarter -> int64[Q]+1 -> int64[M] -> int64[D]-1
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_7.offset = -1LL;
    __pyx_t_7.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3429
 * 
 *         # To month -> int64[M]+1 -> int64[D]-1
 *         elif ch0 == "M" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateM = utils.dt64arr_as_int64_M(arr, my_reso, 1, True)
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, -1, False)
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":3434
 * 
 *         # To quarter -> int64[Q]+1 -> int64[M] -> int64[D]-1
 *         elif ch0 == "Q" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 1, True)
 *             dateM = utils.arr_mul(dateQ, 3, 0, False)
*/
  __pyx_t_6 = (__pyx_v_ch0 == 81);
  if (__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_6 = (__pyx_v_unit_len == 1);
  __pyx_t_1 = __pyx_t_6;
  __pyx_L10_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3435
 *         # To quarter -> int64[Q]+1 -> int64[M] -> int64[D]-1
 *         elif ch0 == "Q" and unit_len == 1:
 *             dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 1, True)             # <<<<<<<<<<<<<<
 *             dateM = utils.arr_mul(dateQ, 3, 0, False)
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, -1, False)
*/
    __pyx_t_11.__pyx_n = 3;
    __pyx_t_11.arr_reso = __pyx_v_my_reso;
    __pyx_t_11.offset = 1;
    __pyx_t_11.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Q(__pyx_v_arr, &__pyx_t_11)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateQ = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3436
 *         elif ch0 == "Q" and unit_len == 1:
 *             dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 1, True)
 *             dateM = utils.arr_mul(dateQ, 3, 0, False)             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, -1, False)
 * 
*/
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.offset = 0;
    __pyx_t_12.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateQ, 3, &__pyx_t_12)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3436, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateM = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3437
 *             dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 1, True)
 *             dateM = utils.arr_mul(dateQ, 3, 0, False)
 *             dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, -1, False)             # <<<<<<<<<<<<<<
 * 
 *         # To year -> int64[Y]+1 -> int64[D]-1
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
    __pyx_t_7.offset = -1LL;
    __pyx_t_7.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3437, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3434
 * 
 *         # To quarter -> int64[Q]+1 -> int64[M] -> int64[D]-1
 *         elif ch0 == "Q" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 1, True)
 *             dateM = utils.arr_mul(dateQ, 3, 0, False)
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":3440
 * 
 *         # To year -> int64[Y]+1 -> int64[D]-1
 *         elif ch0 == "Y" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 1, True)
 *             dateD = utils.dt64arr_as_int64_D(dateY, utils.DT_NPY_UNIT_YY, -1, False)
*/
  __pyx_t_6 = (__pyx_v_ch0 == 89);
  if (__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L12_bool_binop_done;
  }
  __pyx_t_6 = (__pyx_v_unit_len == 1);
  __pyx_t_1 = __pyx_t_6;
  __pyx_L12_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3441
 *         # To year -> int64[Y]+1 -> int64[D]-1
 *         elif ch0 == "Y" and unit_len == 1:
 *             dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 1, True)             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(dateY, utils.DT_NPY_UNIT_YY, -1, False)
 * 
*/
    __pyx_t_13.__pyx_n = 3;
    __pyx_t_13.arr_reso = __pyx_v_my_reso;
    __pyx_t_13.offset = 1;
    __pyx_t_13.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateY = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3442
 *         elif ch0 == "Y" and unit_len == 1:
 *             dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 1, True)
 *             dateD = utils.dt64arr_as_int64_D(dateY, utils.DT_NPY_UNIT_YY, -1, False)             # <<<<<<<<<<<<<<
 * 
 *         # Special
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_YY;
    __pyx_t_7.offset = -1LL;
    __pyx_t_7.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateY, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3440
 * 
 *         # To year -> int64[Y]+1 -> int64[D]-1
 *         elif ch0 == "Y" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 1, True)
 *             dateD = utils.dt64arr_as_int64_D(dateY, utils.DT_NPY_UNIT_YY, -1, False)
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":3447
 *         else:
 *             # Month name -> int64[Y] -> int64[M]+1 -> int64[D]-1
 *             val: cython.int = _parse_month(unit, None, False)             # <<<<<<<<<<<<<<
 *             if val != -1:
 *                 dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)
*/
  /*else*/ {
    __pyx_t_14.__pyx_n = 2;
    __pyx_t_14.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
    __pyx_t_14.raise_error = 0;
    __pyx_t_4 = __pyx_f_7cytimes_6parser_parse_month(__pyx_v_unit, 0, &__pyx_t_14); if (unlikely(__pyx_t_4 == ((int)-2))) __PYX_ERR(0, 3447, __pyx_L1_error)
    __pyx_v_val = __pyx_t_4;

    /* "cytimes/pddt.py":3448
 *             # Month name -> int64[Y] -> int64[M]+1 -> int64[D]-1
 *             val: cython.int = _parse_month(unit, None, False)
 *             if val != -1:             # <<<<<<<<<<<<<<
 *                 dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)
 *                 dateM = utils.arr_mul(dateY, 12, val, False)
*/
    __pyx_t_1 = (__pyx_v_val != -1L);
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":3449
 *             val: cython.int = _parse_month(unit, None, False)
 *             if val != -1:
 *                 dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 *                 dateM = utils.arr_mul(dateY, 12, val, False)
 *                 dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, -1, False)
*/
      __pyx_t_13.__pyx_n = 3;
      __pyx_t_13.arr_reso = __pyx_v_my_reso;
      __pyx_t_13.offset = 0;
      __pyx_t_13.copy = 1;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3449, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_dateY = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "cytimes/pddt.py":3450
 *             if val != -1:
 *                 dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)
 *                 dateM = utils.arr_mul(dateY, 12, val, False)             # <<<<<<<<<<<<<<
 *                 dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, -1, False)
 * 
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = __pyx_v_val;
      __pyx_t_12.copy = 0;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateY, 12, &__pyx_t_12)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3450, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_dateM = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "cytimes/pddt.py":3451
 *                 dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)
 *                 dateM = utils.arr_mul(dateY, 12, val, False)
 *                 dateD = utils.dt64arr_as_int64_D(dateM, utils.DT_NPY_UNIT_MM, -1, False)             # <<<<<<<<<<<<<<
 * 
 *             # Unsupported unit
*/
      __pyx_t_7.__pyx_n = 3;
      __pyx_t_7.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
      __pyx_t_7.offset = -1LL;
      __pyx_t_7.copy = 0;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3451, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "cytimes/pddt.py":3448
 *             # Month name -> int64[Y] -> int64[M]+1 -> int64[D]-1
 *             val: cython.int = _parse_month(unit, None, False)
 *             if val != -1:             # <<<<<<<<<<<<<<
 *                 dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)
 *                 dateM = utils.arr_mul(dateY, 12, val, False)
*/
      goto __pyx_L14;
    }

    /* "cytimes/pddt.py":3455
 *             # Unsupported unit
 *             else:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     self.__class__,
 *                     "to_last_of(unit)",
*/
    /*else*/ {

      /* "cytimes/pddt.py":3456
 *             else:
 *                 errors.raise_argument_error(
 *                     self.__class__,             # <<<<<<<<<<<<<<
 *                     "to_last_of(unit)",
 *                     "Supports: 'Y', 'Q', 'M', 'W' or Month name; got '%s'." % unit,
*/
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3456, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "cytimes/pddt.py":3458
 *                     self.__class__,
 *                     "to_last_of(unit)",
 *                     "Supports: 'Y', 'Q', 'M', 'W' or Month name; got '%s'." % unit,             # <<<<<<<<<<<<<<
 *                 )
 *                 return  # unreachable: suppress compiler warning
*/
      __pyx_t_15 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Supports_Y_Q_M_W_or_Month_name_g_3, __pyx_v_unit); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3458, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);

      /* "cytimes/pddt.py":3455
 *             # Unsupported unit
 *             else:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     self.__class__,
 *                     "to_last_of(unit)",
*/
      __pyx_t_3.__pyx_n = 3;
      __pyx_t_3.cls = __pyx_t_2;
      __pyx_t_3.input_msg = __pyx_mstate_global->__pyx_kp_u_to_last_of_unit;
      __pyx_t_3.error_msg = ((PyObject*)__pyx_t_15);
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3455, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

      /* "cytimes/pddt.py":3460
 *                     "Supports: 'Y', 'Q', 'M', 'W' or Month name; got '%s'." % unit,
 *                 )
 *                 return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 * 
 *         # Combine dates & times
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
    }
    __pyx_L14:;
  }
  __pyx_L5:;

  /* "cytimes/pddt.py":3464
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_6 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS);
  if (__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L16_bool_binop_done;
  }

  /* "cytimes/pddt.py":3465
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *             dateD, utils.DT_NPY_UNIT_DD             # <<<<<<<<<<<<<<
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
*/
  __pyx_t_16.__pyx_n = 1;
  __pyx_t_16.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
  __pyx_t_6 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_dateD, &__pyx_t_16); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 3464, __pyx_L1_error)

  /* "cytimes/pddt.py":3464
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
  __pyx_t_17 = (!__pyx_t_6);
  __pyx_t_1 = __pyx_t_17;
  __pyx_L16_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3467
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US
*/
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.offset = 0;
    __pyx_t_12.copy = 0;
    __pyx_t_15 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateD, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_15);
    __pyx_t_15 = 0;

    /* "cytimes/pddt.py":3468
 *         ):
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *             dtype = utils.DT64_DTYPE_US
 *         # . my_unit safe -> int64[my_unit]
*/
    __pyx_t_18.__pyx_n = 2;
    __pyx_t_18.offset = 0;
    __pyx_t_18.copy = 0;
    __pyx_t_15 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_times, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_18)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_15));
    __pyx_t_15 = 0;

    /* "cytimes/pddt.py":3469
 *             dates = utils.arr_mul(dateD, utils.US_DAY, 0, False)
 *             times = utils.arr_div_floor(times, utils.NS_MICROSECOND, 0, False)
 *             dtype = utils.DT64_DTYPE_US             # <<<<<<<<<<<<<<
 *         # . my_unit safe -> int64[my_unit]
 *         else:
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
    __pyx_v_dtype = __pyx_v_7cytimes_5utils_DT64_DTYPE_US;

    /* "cytimes/pddt.py":3464
 *         # Combine dates & times
 *         # . my_unit[ns] & out of ns range -> int64[us]
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             dateD, utils.DT_NPY_UNIT_DD
 *         ):
*/
    goto __pyx_L15;
  }

  /* "cytimes/pddt.py":3472
 *         # . my_unit safe -> int64[my_unit]
 *         else:
 *             dates = utils.dt64arr_as_int64(             # <<<<<<<<<<<<<<
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
*/
  /*else*/ {

    /* "cytimes/pddt.py":3473
 *         else:
 *             dates = utils.dt64arr_as_int64(
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False             # <<<<<<<<<<<<<<
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
*/
    __pyx_t_19.__pyx_n = 3;
    __pyx_t_19.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
    __pyx_t_19.offset = 0;
    __pyx_t_19.copy = 0;
    __pyx_t_15 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64(__pyx_v_dateD, __pyx_v_my_unit, &__pyx_t_19)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_15);
    __pyx_t_15 = 0;

    /* "cytimes/pddt.py":3475
 *                 dateD, my_unit, utils.DT_NPY_UNIT_DD, 0, False
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)             # <<<<<<<<<<<<<<
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64
 * 
*/
    __pyx_t_15 = __pyx_f_7cytimes_5utils_nptime_unit_str2dt64(__pyx_v_my_unit); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_v_dtype = __pyx_t_15;
    __pyx_t_15 = 0;
  }
  __pyx_L15:;

  /* "cytimes/pddt.py":3476
 *             )
 *             dtype = utils.nptime_unit_str2dt64(my_unit)
 *         arr = utils.arr_add_arr(dates, times, 0, False)  # int64             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
  __pyx_t_20.__pyx_n = 2;
  __pyx_t_20.offset = 0;
  __pyx_t_20.copy = 0;
  __pyx_t_15 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_20)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_15));
  __pyx_t_15 = 0;

  /* "cytimes/pddt.py":3479
 * 
 *         # New instance
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *     def to_start_of(self, unit: str) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_22 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_22);
  __pyx_t_23 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_22, __pyx_v_dtype};
    __pyx_t_21 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_23, (2-__pyx_t_23) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
    if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 3479, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
  }
  __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 3479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 3479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __pyx_t_23 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, __pyx_t_21};
    __pyx_t_25 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 3479, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_25);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_22, __pyx_t_25, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3479, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_24, __pyx_t_25, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 3479, __pyx_L1_error)
    __pyx_t_15 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_23, (2-__pyx_t_23) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_25);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
    __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
    __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
    if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3479, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
  }
  __pyx_r = __pyx_t_15;
  __pyx_t_15 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":3382
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_last_of(self, unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date fields to the last day of the specified datetime unit,
 *         without affecting the time fields `<'Pddt'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_XDECREF(__pyx_t_24);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_last_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_my_unit);
  __Pyx_XDECREF((PyObject *)__pyx_v_times);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateD);
  __Pyx_XDECREF((PyObject *)__pyx_v_delta);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateM);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateQ);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateY);
  __Pyx_XDECREF((PyObject *)__pyx_v_dates);
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":3481
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_start_of(self, unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date & time fields to the start of the specified datetime unit `<'Pddt'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_141to_start_of(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_140to_start_of, "Adjust the date & time fields to the start of the specified datetime unit `<'Pddt'>`.\n\n        :param unit `<'str'>`: The datetime unit:\n\n            - `'Y'`  \342\206\222 Start of year: `YYYY-01-01 00:00:00`\n            - `'Q'`  \342\206\222 Start of quarter: `YYYY-MM-01 00:00:00`\n            - `'M'`  \342\206\222 Start of month: `YYYY-MM-01 00:00:00`\n            - `'W'`  \342\206\222 Start of week (Monday): `YYYY-MM-DD 00:00:00`\n            - `'D'`  \342\206\222 Start of day: `YYYY-MM-DD 00:00:00`\n            - `'h'`  \342\206\222 Start of hour: `YYYY-MM-DD hh:00:00`\n            - `'m'`  \342\206\222 Start of minute: `YYYY-MM-DD hh:mm:00`\n            - `'s'`  \342\206\222 Start of second: `YYYY-MM-DD hh:mm:ss.000000`\n            - `'ms'` \342\206\222 Start of millisecond: `YYYY-MM-DD hh:mm:ss.uuu000`\n            - `'us'` \342\206\222 Start of microsecond: `YYYY-MM-DD hh:mm:ss.uuuuuu`\n            - `'ns'` \342\206\222 Return the instance `as-is`.\n            - `Month` (e.g., `'Jan'`, `'February'`, `'\344\270\211\346\234\210'`)\n                     \342\206\222 Start of the specifed month: `YYYY-MM-01 00:00:00`\n            - `Weekday` (e.g., `'Mon'`, `'Tuesday'`, `'\346\230\237\346\234\237\344\270\211'`)\n                     \342\206\222 Start of the specifed weekday: `YYYY-MM-DD 00:00:00`\n\n        :returns `<'Pddt'>`: The adjusted datetime index.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_141to_start_of = {"to_start_of", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_141to_start_of, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_140to_start_of};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_141to_start_of(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_unit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_start_of (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_unit,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3481, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3481, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3481, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_start_of", 0) < (0)) __PYX_ERR(0, 3481, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_start_of", 1, 2, 2, i); __PYX_ERR(0, 3481, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3481, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3481, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_unit = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_start_of", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3481, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_start_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 3481, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_140to_start_of(__pyx_self, __pyx_v_self, __pyx_v_unit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_140to_start_of(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit) {
  Py_ssize_t __pyx_v_unit_len;
  Py_UCS4 __pyx_v_ch0;
  PyObject *__pyx_v_my_unit = 0;
  int __pyx_v_my_reso;
  int __pyx_v_to_reso;
  PyArrayObject *__pyx_v_arr = 0;
  PyArrayObject *__pyx_v_dateD = NULL;
  PyArrayObject *__pyx_v_delta = NULL;
  PyArrayObject *__pyx_v_dates = NULL;
  PyArrayObject *__pyx_v_dateQ = NULL;
  int __pyx_v_val;
  PyArrayObject *__pyx_v_dateY = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_unit __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  size_t __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_14;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_weekday __pyx_t_15;
  struct __pyx_opt_args_7cytimes_5utils_arr_sub_arr __pyx_t_16;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Q __pyx_t_17;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_18;
  struct __pyx_opt_args_7cytimes_6parser_parse_month __pyx_t_19;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_20;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M __pyx_t_21;
  struct __pyx_opt_args_7cytimes_6parser_parse_weekday __pyx_t_22;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_start_of", 0);

  /* "cytimes/pddt.py":3505
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  __pyx_t_1 = (__pyx_v_unit == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3507
 *         if unit is None:
 *             errors.raise_argument_error(
 *                 self.__class__,             # <<<<<<<<<<<<<<
 *                 "to_start_of(unit)",
 *                 "Supports: 'Y', 'Q', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns' "
*/
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cytimes/pddt.py":3506
 *         # Guard
 *         if unit is None:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self.__class__,
 *                 "to_start_of(unit)",
*/
    __pyx_t_3.__pyx_n = 3;
    __pyx_t_3.cls = __pyx_t_2;
    __pyx_t_3.input_msg = __pyx_mstate_global->__pyx_kp_u_to_start_of_unit;
    __pyx_t_3.error_msg = __pyx_mstate_global->__pyx_kp_u_Supports_Y_Q_M_W_D_h_m_s_ms_us_n;
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3506, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3505
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  }

  /* "cytimes/pddt.py":3512
 *                 "or Month/Weekday name; got None.",
 *             )
 *         unit_len: cython.Py_ssize_t = str_len(unit)             # <<<<<<<<<<<<<<
 *         if unit_len == 0:
 *             errors.raise_argument_error(
*/
  __pyx_v_unit_len = PyUnicode_GET_LENGTH(__pyx_v_unit);

  /* "cytimes/pddt.py":3513
 *             )
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 0:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  __pyx_t_1 = (__pyx_v_unit_len == 0);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3515
 *         if unit_len == 0:
 *             errors.raise_argument_error(
 *                 self.__class__,             # <<<<<<<<<<<<<<
 *                 "to_start_of(unit)",
 *                 "Supports: 'Y', 'Q', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns' "
*/
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cytimes/pddt.py":3514
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 0:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self.__class__,
 *                 "to_start_of(unit)",
*/
    __pyx_t_3.__pyx_n = 3;
    __pyx_t_3.cls = __pyx_t_2;
    __pyx_t_3.input_msg = __pyx_mstate_global->__pyx_kp_u_to_start_of_unit;
    __pyx_t_3.error_msg = __pyx_mstate_global->__pyx_kp_u_Supports_Y_Q_M_W_D_h_m_s_ms_us_n_2;
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3514, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3513
 *             )
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 0:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  }

  /* "cytimes/pddt.py":3522
 * 
 *         # Fast-path: 'ns' as-is
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *         if ch0 == "n" and unit_len == 2 and str_read(unit, 1) == "s":
 *             return self  # exit
*/
  __pyx_v_ch0 = PyUnicode_READ_CHAR(__pyx_v_unit, 0);

  /* "cytimes/pddt.py":3523
 *         # Fast-path: 'ns' as-is
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)
 *         if ch0 == "n" and unit_len == 2 and str_read(unit, 1) == "s":             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  __pyx_t_4 = (__pyx_v_ch0 == 0x6E);
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_4 = (__pyx_v_unit_len == 2);
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_4 = (PyUnicode_READ_CHAR(__pyx_v_unit, 1) == 0x73);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3524
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)
 *         if ch0 == "n" and unit_len == 2 and str_read(unit, 1) == "s":
 *             return self  # exit             # <<<<<<<<<<<<<<
 * 
 *         # General approach: 'Y', 'M', 'D', 'h', 'm', 's', 'ms', 'us'
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pddt.py":3523
 *         # Fast-path: 'ns' as-is
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)
 *         if ch0 == "n" and unit_len == 2 and str_read(unit, 1) == "s":             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  }

  /* "cytimes/pddt.py":3527
 * 
 *         # General approach: 'Y', 'M', 'D', 'h', 'm', 's', 'ms', 'us'
 *         my_unit: str = self.unit             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
 *         to_reso: cython.int
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 3527, __pyx_L1_error)
  __pyx_v_my_unit = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":3528
 *         # General approach: 'Y', 'M', 'D', 'h', 'm', 's', 'ms', 'us'
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)             # <<<<<<<<<<<<<<
 *         to_reso: cython.int
 *         if (
*/
  __pyx_t_5 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_my_unit); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3528, __pyx_L1_error)
  __pyx_v_my_reso = __pyx_t_5;

  /* "cytimes/pddt.py":3532
 *         if (
 *             #: 'Y', 'M', 'D', 'h', 'm', 's'
 *             (unit_len == 1 and ch0 in ("Y", "M", "D", "h", "m", "s"))             # <<<<<<<<<<<<<<
 *             #: 'ms', 'us'
 *             or (unit_len == 2 and ch0 in ("m", "u") and str_read(unit, 1) == "s")
*/
  __pyx_t_4 = (__pyx_v_unit_len == 1);
  if (!__pyx_t_4) {
    goto __pyx_L11_next_or;
  } else {
  }
  switch (__pyx_v_ch0) {
    case 89:
    case 77:
    case 68:
    case 0x68:
    case 0x6D:
    case 0x73:
    __pyx_t_4 = 1;
    break;
    default:
    __pyx_t_4 = 0;
    break;
  }
  __pyx_t_6 = __pyx_t_4;
  if (!__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_L11_next_or:;

  /* "cytimes/pddt.py":3534
 *             (unit_len == 1 and ch0 in ("Y", "M", "D", "h", "m", "s"))
 *             #: 'ms', 'us'
 *             or (unit_len == 2 and ch0 in ("m", "u") and str_read(unit, 1) == "s")             # <<<<<<<<<<<<<<
 *             #: 'min'
 *             or (
*/
  __pyx_t_6 = (__pyx_v_unit_len == 2);
  if (!__pyx_t_6) {
    goto __pyx_L13_next_or;
  } else {
  }
  switch (__pyx_v_ch0) {
    case 0x6D:
    case 0x75:
    __pyx_t_6 = 1;
    break;
    default:
    __pyx_t_6 = 0;
    break;
  }
  __pyx_t_4 = __pyx_t_6;
  if (!__pyx_t_4) {
    goto __pyx_L13_next_or;
  } else {
  }
  __pyx_t_4 = (PyUnicode_READ_CHAR(__pyx_v_unit, 1) == 0x73);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_L13_next_or:;

  /* "cytimes/pddt.py":3537
 *             #: 'min'
 *             or (
 *                 unit_len == 3             # <<<<<<<<<<<<<<
 *                 and ch0 == "m"
 *                 and str_read(unit, 1) == "i"
*/
  __pyx_t_4 = (__pyx_v_unit_len == 3);
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L10_bool_binop_done;
  }

  /* "cytimes/pddt.py":3538
 *             or (
 *                 unit_len == 3
 *                 and ch0 == "m"             # <<<<<<<<<<<<<<
 *                 and str_read(unit, 1) == "i"
 *                 and str_read(unit, 2) == "n"
*/
  __pyx_t_4 = (__pyx_v_ch0 == 0x6D);
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L10_bool_binop_done;
  }

  /* "cytimes/pddt.py":3539
 *                 unit_len == 3
 *                 and ch0 == "m"
 *                 and str_read(unit, 1) == "i"             # <<<<<<<<<<<<<<
 *                 and str_read(unit, 2) == "n"
 *             )
*/
  __pyx_t_4 = (PyUnicode_READ_CHAR(__pyx_v_unit, 1) == 0x69);
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L10_bool_binop_done;
  }

  /* "cytimes/pddt.py":3540
 *                 and ch0 == "m"
 *                 and str_read(unit, 1) == "i"
 *                 and str_read(unit, 2) == "n"             # <<<<<<<<<<<<<<
 *             )
 *         ):
*/
  __pyx_t_4 = (PyUnicode_READ_CHAR(__pyx_v_unit, 2) == 0x6E);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L10_bool_binop_done:;

  /* "cytimes/pddt.py":3530
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
 *         to_reso: cython.int
 *         if (             # <<<<<<<<<<<<<<
 *             #: 'Y', 'M', 'D', 'h', 'm', 's'
 *             (unit_len == 1 and ch0 in ("Y", "M", "D", "h", "m", "s"))
*/
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3543
 *             )
 *         ):
 *             to_reso = utils.nptime_unit_str2int(unit)             # <<<<<<<<<<<<<<
 *             if my_reso <= to_reso:
 *                 return self  # exit: already at or finer than target resolution
*/
    __pyx_t_5 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_unit); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3543, __pyx_L1_error)
    __pyx_v_to_reso = __pyx_t_5;

    /* "cytimes/pddt.py":3544
 *         ):
 *             to_reso = utils.nptime_unit_str2int(unit)
 *             if my_reso <= to_reso:             # <<<<<<<<<<<<<<
 *                 return self  # exit: already at or finer than target resolution
 *             arr: np.ndarray = self.values_naive
*/
    __pyx_t_1 = (__pyx_v_my_reso <= __pyx_v_to_reso);
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":3545
 *             to_reso = utils.nptime_unit_str2int(unit)
 *             if my_reso <= to_reso:
 *                 return self  # exit: already at or finer than target resolution             # <<<<<<<<<<<<<<
 *             arr: np.ndarray = self.values_naive
 *             arr = utils.dt64arr_as_int64(arr, unit, my_reso, 0, True)
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_self);
      __pyx_r = __pyx_v_self;
      goto __pyx_L0;

      /* "cytimes/pddt.py":3544
 *         ):
 *             to_reso = utils.nptime_unit_str2int(unit)
 *             if my_reso <= to_reso:             # <<<<<<<<<<<<<<
 *                 return self  # exit: already at or finer than target resolution
 *             arr: np.ndarray = self.values_naive
*/
    }

    /* "cytimes/pddt.py":3546
 *             if my_reso <= to_reso:
 *                 return self  # exit: already at or finer than target resolution
 *             arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *             arr = utils.dt64arr_as_int64(arr, unit, my_reso, 0, True)
 *             arr = utils.dt64arr_as_unit(arr, my_unit, to_reso, False, False)
*/
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3546, __pyx_L1_error)
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3547
 *                 return self  # exit: already at or finer than target resolution
 *             arr: np.ndarray = self.values_naive
 *             arr = utils.dt64arr_as_int64(arr, unit, my_reso, 0, True)             # <<<<<<<<<<<<<<
 *             arr = utils.dt64arr_as_unit(arr, my_unit, to_reso, False, False)
 *             return self._new(arr, tz=self.tz, name=self.name)
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = __pyx_v_my_reso;
    __pyx_t_7.offset = 0;
    __pyx_t_7.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64(__pyx_v_arr, __pyx_v_unit, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3548
 *             arr: np.ndarray = self.values_naive
 *             arr = utils.dt64arr_as_int64(arr, unit, my_reso, 0, True)
 *             arr = utils.dt64arr_as_unit(arr, my_unit, to_reso, False, False)             # <<<<<<<<<<<<<<
 *             return self._new(arr, tz=self.tz, name=self.name)
 * 
*/
    __pyx_t_8.__pyx_n = 3;
    __pyx_t_8.arr_reso = __pyx_v_to_reso;
    __pyx_t_8.limit = 0;
    __pyx_t_8.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_unit(__pyx_v_arr, __pyx_v_my_unit, &__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3549
 *             arr = utils.dt64arr_as_int64(arr, unit, my_reso, 0, True)
 *             arr = utils.dt64arr_as_unit(arr, my_unit, to_reso, False, False)
 *             return self._new(arr, tz=self.tz, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *         # To weekday -> int64[D]-weekday
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_9 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3549, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3549, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_12 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_9, ((PyObject *)__pyx_v_arr)};
      __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3549, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_10, __pyx_t_13, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3549, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_11, __pyx_t_13, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 3549, __pyx_L1_error)
      __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3549, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":3530
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
 *         to_reso: cython.int
 *         if (             # <<<<<<<<<<<<<<
 *             #: 'Y', 'M', 'D', 'h', 'm', 's'
 *             (unit_len == 1 and ch0 in ("Y", "M", "D", "h", "m", "s"))
*/
  }

  /* "cytimes/pddt.py":3552
 * 
 *         # To weekday -> int64[D]-weekday
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         if ch0 == "W" and unit_len == 1:
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3552, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":3553
 *         # To weekday -> int64[D]-weekday
 *         arr: np.ndarray = self.values_naive
 *         if ch0 == "W" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
*/
  __pyx_t_4 = (__pyx_v_ch0 == 87);
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L21_bool_binop_done;
  }
  __pyx_t_4 = (__pyx_v_unit_len == 1);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L21_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3554
 *         arr: np.ndarray = self.values_naive
 *         if ch0 == "W" and unit_len == 1:
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
 *             dates = utils.arr_sub_arr(dateD, delta, 0, False)
*/
    __pyx_t_14.__pyx_n = 3;
    __pyx_t_14.arr_reso = __pyx_v_my_reso;
    __pyx_t_14.offset = 0;
    __pyx_t_14.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_14)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3555
 *         if ch0 == "W" and unit_len == 1:
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)             # <<<<<<<<<<<<<<
 *             dates = utils.arr_sub_arr(dateD, delta, 0, False)
 *             to_reso = utils.DT_NPY_UNIT_DD
*/
    __pyx_t_15.__pyx_n = 3;
    __pyx_t_15.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
    __pyx_t_15.offset = 0;
    __pyx_t_15.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_weekday(__pyx_v_dateD, &__pyx_t_15)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3556
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
 *             dates = utils.arr_sub_arr(dateD, delta, 0, False)             # <<<<<<<<<<<<<<
 *             to_reso = utils.DT_NPY_UNIT_DD
 * 
*/
    __pyx_t_16.__pyx_n = 2;
    __pyx_t_16.offset = 0;
    __pyx_t_16.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_sub_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3557
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
 *             dates = utils.arr_sub_arr(dateD, delta, 0, False)
 *             to_reso = utils.DT_NPY_UNIT_DD             # <<<<<<<<<<<<<<
 * 
 *         # To quarter -> int64[Q] -> int64[M]
*/
    __pyx_v_to_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;

    /* "cytimes/pddt.py":3553
 *         # To weekday -> int64[D]-weekday
 *         arr: np.ndarray = self.values_naive
 *         if ch0 == "W" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
*/
    goto __pyx_L20;
  }

  /* "cytimes/pddt.py":3560
 * 
 *         # To quarter -> int64[Q] -> int64[M]
 *         elif ch0 == "Q" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 0, True)
 *             dates = utils.arr_mul(dateQ, 3, 0, False)
*/
  __pyx_t_4 = (__pyx_v_ch0 == 81);
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L23_bool_binop_done;
  }
  __pyx_t_4 = (__pyx_v_unit_len == 1);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L23_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3561
 *         # To quarter -> int64[Q] -> int64[M]
 *         elif ch0 == "Q" and unit_len == 1:
 *             dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 *             dates = utils.arr_mul(dateQ, 3, 0, False)
 *             to_reso = utils.DT_NPY_UNIT_MM
*/
    __pyx_t_17.__pyx_n = 3;
    __pyx_t_17.arr_reso = __pyx_v_my_reso;
    __pyx_t_17.offset = 0;
    __pyx_t_17.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Q(__pyx_v_arr, &__pyx_t_17)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateQ = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3562
 *         elif ch0 == "Q" and unit_len == 1:
 *             dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 0, True)
 *             dates = utils.arr_mul(dateQ, 3, 0, False)             # <<<<<<<<<<<<<<
 *             to_reso = utils.DT_NPY_UNIT_MM
 * 
*/
    __pyx_t_18.__pyx_n = 2;
    __pyx_t_18.offset = 0;
    __pyx_t_18.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateQ, 3, &__pyx_t_18)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3563
 *             dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 0, True)
 *             dates = utils.arr_mul(dateQ, 3, 0, False)
 *             to_reso = utils.DT_NPY_UNIT_MM             # <<<<<<<<<<<<<<
 * 
 *         # Special
*/
    __pyx_v_to_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;

    /* "cytimes/pddt.py":3560
 * 
 *         # To quarter -> int64[Q] -> int64[M]
 *         elif ch0 == "Q" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 0, True)
 *             dates = utils.arr_mul(dateQ, 3, 0, False)
*/
    goto __pyx_L20;
  }

  /* "cytimes/pddt.py":3567
 *         # Special
 *         else:
 *             val: cython.int             # <<<<<<<<<<<<<<
 *             # Month name -> int64[Y] -> int64[M]
 *             if (val := _parse_month(unit, None, False)) != -1:
*/
  /*else*/ {

    /* "cytimes/pddt.py":3569
 *             val: cython.int
 *             # Month name -> int64[Y] -> int64[M]
 *             if (val := _parse_month(unit, None, False)) != -1:             # <<<<<<<<<<<<<<
 *                 dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)
 *                 dates = utils.dt64arr_as_int64_M(
*/
    __pyx_t_19.__pyx_n = 2;
    __pyx_t_19.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
    __pyx_t_19.raise_error = 0;
    __pyx_t_5 = __pyx_f_7cytimes_6parser_parse_month(__pyx_v_unit, 0, &__pyx_t_19); if (unlikely(__pyx_t_5 == ((int)-2))) __PYX_ERR(0, 3569, __pyx_L1_error)
    __pyx_v_val = __pyx_t_5;
    __pyx_t_1 = (__pyx_t_5 != -1L);
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":3570
 *             # Month name -> int64[Y] -> int64[M]
 *             if (val := _parse_month(unit, None, False)) != -1:
 *                 dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 *                 dates = utils.dt64arr_as_int64_M(
 *                     dateY, utils.DT_NPY_UNIT_YY, val - 1, False
*/
      __pyx_t_20.__pyx_n = 3;
      __pyx_t_20.arr_reso = __pyx_v_my_reso;
      __pyx_t_20.offset = 0;
      __pyx_t_20.copy = 1;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_20)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_dateY = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "cytimes/pddt.py":3571
 *             if (val := _parse_month(unit, None, False)) != -1:
 *                 dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)
 *                 dates = utils.dt64arr_as_int64_M(             # <<<<<<<<<<<<<<
 *                     dateY, utils.DT_NPY_UNIT_YY, val - 1, False
 *                 )
*/
      __pyx_t_21.__pyx_n = 3;
      __pyx_t_21.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_YY;
      __pyx_t_21.offset = (__pyx_v_val - 1);
      __pyx_t_21.copy = 0;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(__pyx_v_dateY, &__pyx_t_21)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_dates = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "cytimes/pddt.py":3574
 *                     dateY, utils.DT_NPY_UNIT_YY, val - 1, False
 *                 )
 *                 to_reso = utils.DT_NPY_UNIT_MM             # <<<<<<<<<<<<<<
 * 
 *             # Weekday name -> int64[D]
*/
      __pyx_v_to_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;

      /* "cytimes/pddt.py":3569
 *             val: cython.int
 *             # Month name -> int64[Y] -> int64[M]
 *             if (val := _parse_month(unit, None, False)) != -1:             # <<<<<<<<<<<<<<
 *                 dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)
 *                 dates = utils.dt64arr_as_int64_M(
*/
      goto __pyx_L25;
    }

    /* "cytimes/pddt.py":3577
 * 
 *             # Weekday name -> int64[D]
 *             elif (val := _parse_weekday(unit, None, False)) != -1:             # <<<<<<<<<<<<<<
 *                 dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *                 delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
*/
    __pyx_t_22.__pyx_n = 2;
    __pyx_t_22.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
    __pyx_t_22.raise_error = 0;
    __pyx_t_5 = __pyx_f_7cytimes_6parser_parse_weekday(__pyx_v_unit, 0, &__pyx_t_22); if (unlikely(__pyx_t_5 == ((int)-2))) __PYX_ERR(0, 3577, __pyx_L1_error)
    __pyx_v_val = __pyx_t_5;
    __pyx_t_1 = (__pyx_t_5 != -1L);
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":3578
 *             # Weekday name -> int64[D]
 *             elif (val := _parse_weekday(unit, None, False)) != -1:
 *                 dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 *                 delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
 *                 dates = utils.arr_sub_arr(dateD, delta, val, False)
*/
      __pyx_t_14.__pyx_n = 3;
      __pyx_t_14.arr_reso = __pyx_v_my_reso;
      __pyx_t_14.offset = 0;
      __pyx_t_14.copy = 1;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_14)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3578, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "cytimes/pddt.py":3579
 *             elif (val := _parse_weekday(unit, None, False)) != -1:
 *                 dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *                 delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)             # <<<<<<<<<<<<<<
 *                 dates = utils.arr_sub_arr(dateD, delta, val, False)
 *                 to_reso = utils.DT_NPY_UNIT_DD
*/
      __pyx_t_15.__pyx_n = 3;
      __pyx_t_15.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
      __pyx_t_15.offset = 0;
      __pyx_t_15.copy = 1;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_weekday(__pyx_v_dateD, &__pyx_t_15)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3579, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_delta = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "cytimes/pddt.py":3580
 *                 dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *                 delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
 *                 dates = utils.arr_sub_arr(dateD, delta, val, False)             # <<<<<<<<<<<<<<
 *                 to_reso = utils.DT_NPY_UNIT_DD
 *                 #: days - weekday + val
*/
      __pyx_t_16.__pyx_n = 2;
      __pyx_t_16.offset = __pyx_v_val;
      __pyx_t_16.copy = 0;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_sub_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_dates = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "cytimes/pddt.py":3581
 *                 delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
 *                 dates = utils.arr_sub_arr(dateD, delta, val, False)
 *                 to_reso = utils.DT_NPY_UNIT_DD             # <<<<<<<<<<<<<<
 *                 #: days - weekday + val
 * 
*/
      __pyx_v_to_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;

      /* "cytimes/pddt.py":3577
 * 
 *             # Weekday name -> int64[D]
 *             elif (val := _parse_weekday(unit, None, False)) != -1:             # <<<<<<<<<<<<<<
 *                 dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *                 delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
*/
      goto __pyx_L25;
    }

    /* "cytimes/pddt.py":3586
 *             # Unsupported unit
 *             else:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     self.__class__,
 *                     "to_start_of(unit)",
*/
    /*else*/ {

      /* "cytimes/pddt.py":3587
 *             else:
 *                 errors.raise_argument_error(
 *                     self.__class__,             # <<<<<<<<<<<<<<
 *                     "to_start_of(unit)",
 *                     "Supports: 'Y', 'Q', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns' "
*/
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3587, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "cytimes/pddt.py":3590
 *                     "to_start_of(unit)",
 *                     "Supports: 'Y', 'Q', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns' "
 *                     "or Month/Weekday name; got '%s'." % unit,             # <<<<<<<<<<<<<<
 *                 )
 *                 return  # unreachable: suppress compiler warning
*/
      __pyx_t_13 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Supports_Y_Q_M_W_D_h_m_s_ms_us_n_3, __pyx_v_unit); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3590, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);

      /* "cytimes/pddt.py":3586
 *             # Unsupported unit
 *             else:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     self.__class__,
 *                     "to_start_of(unit)",
*/
      __pyx_t_3.__pyx_n = 3;
      __pyx_t_3.cls = __pyx_t_2;
      __pyx_t_3.input_msg = __pyx_mstate_global->__pyx_kp_u_to_start_of_unit;
      __pyx_t_3.error_msg = ((PyObject*)__pyx_t_13);
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3586, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

      /* "cytimes/pddt.py":3592
 *                     "or Month/Weekday name; got '%s'." % unit,
 *                 )
 *                 return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
    }
    __pyx_L25:;
  }
  __pyx_L20:;

  /* "cytimes/pddt.py":3595
 * 
 *         # New instance
 *         arr = utils.dt64arr_as_unit(dates, my_unit, to_reso, False, False)             # <<<<<<<<<<<<<<
 *         return self._new(arr, tz=self.tz, name=self.name)
 * 
*/
  __pyx_t_8.__pyx_n = 3;
  __pyx_t_8.arr_reso = __pyx_v_to_reso;
  __pyx_t_8.limit = 0;
  __pyx_t_8.copy = 0;
  __pyx_t_13 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_unit(__pyx_v_dates, __pyx_v_my_unit, &__pyx_t_8)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_13));
  __pyx_t_13 = 0;

  /* "cytimes/pddt.py":3596
 *         # New instance
 *         arr = utils.dt64arr_as_unit(dates, my_unit, to_reso, False, False)
 *         return self._new(arr, tz=self.tz, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *     def to_end_of(self, unit: str) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_12 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, ((PyObject *)__pyx_v_arr)};
    __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_11, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3596, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_10, __pyx_t_9, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 3596, __pyx_L1_error)
    __pyx_t_13 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
  }
  __pyx_r = __pyx_t_13;
  __pyx_t_13 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":3481
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_start_of(self, unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date & time fields to the start of the specified datetime unit `<'Pddt'>`.
 * 
*/

  /* function exit code */
  __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_13);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_start_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_my_unit);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateD);
  __Pyx_XDECREF((PyObject *)__pyx_v_delta);
  __Pyx_XDECREF((PyObject *)__pyx_v_dates);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateQ);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateY);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":3598
 *         return self._new(arr, tz=self.tz, name=self.name)
 * 
 *     def to_end_of(self, unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date & time fields to the end of the specified datetime unit `<'Pddt'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_143to_end_of(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_142to_end_of, "Adjust the date & time fields to the end of the specified datetime unit `<'Pddt'>`.\n\n        :param unit `<'str'>`: The datetime unit:\n\n            - `'Y'`  \342\206\222 End of year: `YYYY-12-31 23:59:59.999999999`\n            - `'Q'`  \342\206\222 End of quarter: `YYYY-MM-(30..31) 23:59:59.999999999`\n            - `'M'`  \342\206\222 End of month: `YYYY-MM-(28..31) 23:59:59.999999999`\n            - `'W'`  \342\206\222 End of week (Sunday): `YYYY-MM-DD 23:59:59.999999999`\n            - `'D'`  \342\206\222 End of day: `YYYY-MM-DD 23:59:59.999999999`\n            - `'h'`  \342\206\222 End of hour: `YYYY-MM-DD hh:59:59.999999999`\n            - `'m'`  \342\206\222 End of minute: `YYYY-MM-DD hh:mm:59.999999999`\n            - `'s'`  \342\206\222 End of second: `YYYY-MM-DD hh:mm:ss.999999999`\n            - `'ms'` \342\206\222 End of millisecond: `YYYY-MM-DD hh:mm:ss.uuu999999`\n            - `'us'` \342\206\222 End of millisecond: `YYYY-MM-DD hh:mm:ss.uuuuuu999`\n            - `'ns'` \342\206\222 Return the instance `as-is`.\n            - `Month` (e.g., `'Jan'`, `'February'`, `'\344\270\211\346\234\210'`)\n                     \342\206\222 End of the specifed month: `YYYY-MM-(28..31) 23:59:59.999999`\n            - `Weekday` (e.g., `'Mon'`, `'Tuesday'`, `'\346\230\237\346\234\237\344\270\211'`)\n                     \342\206\222 End of the specifed weekday: `YYYY-MM-DD 23:59:59.999999`\n\n        :returns `<'Pddt'>`: The adjusted datetime index.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_143to_end_of = {"to_end_of", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_143to_end_of, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_142to_end_of};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_143to_end_of(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_unit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_end_of (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_unit,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3598, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3598, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3598, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_end_of", 0) < (0)) __PYX_ERR(0, 3598, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_end_of", 1, 2, 2, i); __PYX_ERR(0, 3598, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3598, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3598, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_unit = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_end_of", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3598, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_end_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 3598, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_142to_end_of(__pyx_self, __pyx_v_self, __pyx_v_unit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_142to_end_of(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit) {
  Py_ssize_t __pyx_v_unit_len;
  Py_UCS4 __pyx_v_ch0;
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_my_unit = 0;
  int __pyx_v_my_reso;
  int __pyx_v_to_reso;
  PyArrayObject *__pyx_v_dateD = NULL;
  PyArrayObject *__pyx_v_delta = NULL;
  PyArrayObject *__pyx_v_dates = NULL;
  PyArrayObject *__pyx_v_dateQ = NULL;
  int __pyx_v_val;
  PyArrayObject *__pyx_v_dateY = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_unit __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  size_t __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_15;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_weekday __pyx_t_16;
  struct __pyx_opt_args_7cytimes_5utils_arr_sub_arr __pyx_t_17;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Q __pyx_t_18;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_19;
  struct __pyx_opt_args_7cytimes_6parser_parse_month __pyx_t_20;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_21;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M __pyx_t_22;
  struct __pyx_opt_args_7cytimes_6parser_parse_weekday __pyx_t_23;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_end_of", 0);

  /* "cytimes/pddt.py":3622
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  __pyx_t_1 = (__pyx_v_unit == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3624
 *         if unit is None:
 *             errors.raise_argument_error(
 *                 self.__class__,             # <<<<<<<<<<<<<<
 *                 "to_end_of(unit)",
 *                 "Supports: 'Y', 'Q', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns' "
*/
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cytimes/pddt.py":3623
 *         # Guard
 *         if unit is None:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self.__class__,
 *                 "to_end_of(unit)",
*/
    __pyx_t_3.__pyx_n = 3;
    __pyx_t_3.cls = __pyx_t_2;
    __pyx_t_3.input_msg = __pyx_mstate_global->__pyx_kp_u_to_end_of_unit;
    __pyx_t_3.error_msg = __pyx_mstate_global->__pyx_kp_u_Supports_Y_Q_M_W_D_h_m_s_ms_us_n;
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3623, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3622
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  }

  /* "cytimes/pddt.py":3629
 *                 "or Month/Weekday name; got None.",
 *             )
 *         unit_len: cython.Py_ssize_t = str_len(unit)             # <<<<<<<<<<<<<<
 *         if unit_len == 0:
 *             errors.raise_argument_error(
*/
  __pyx_v_unit_len = PyUnicode_GET_LENGTH(__pyx_v_unit);

  /* "cytimes/pddt.py":3630
 *             )
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 0:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  __pyx_t_1 = (__pyx_v_unit_len == 0);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3632
 *         if unit_len == 0:
 *             errors.raise_argument_error(
 *                 self.__class__,             # <<<<<<<<<<<<<<
 *                 "to_end_of(unit)",
 *                 "Supports: 'Y', 'Q', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns' "
*/
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cytimes/pddt.py":3631
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 0:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self.__class__,
 *                 "to_end_of(unit)",
*/
    __pyx_t_3.__pyx_n = 3;
    __pyx_t_3.cls = __pyx_t_2;
    __pyx_t_3.input_msg = __pyx_mstate_global->__pyx_kp_u_to_end_of_unit;
    __pyx_t_3.error_msg = __pyx_mstate_global->__pyx_kp_u_Supports_Y_Q_M_W_D_h_m_s_ms_us_n_2;
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3631, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3630
 *             )
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 0:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  }

  /* "cytimes/pddt.py":3639
 * 
 *         # Fast-path: 'ns' as-is
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *         if ch0 == "n" and unit_len == 2 and str_read(unit, 1) == "s":
 *             return self  # exit
*/
  __pyx_v_ch0 = PyUnicode_READ_CHAR(__pyx_v_unit, 0);

  /* "cytimes/pddt.py":3640
 *         # Fast-path: 'ns' as-is
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)
 *         if ch0 == "n" and unit_len == 2 and str_read(unit, 1) == "s":             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  __pyx_t_4 = (__pyx_v_ch0 == 0x6E);
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_4 = (__pyx_v_unit_len == 2);
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_4 = (PyUnicode_READ_CHAR(__pyx_v_unit, 1) == 0x73);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3641
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)
 *         if ch0 == "n" and unit_len == 2 and str_read(unit, 1) == "s":
 *             return self  # exit             # <<<<<<<<<<<<<<
 * 
 *         # Access datetime array & info
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pddt.py":3640
 *         # Fast-path: 'ns' as-is
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)
 *         if ch0 == "n" and unit_len == 2 and str_read(unit, 1) == "s":             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  }

  /* "cytimes/pddt.py":3644
 * 
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 * 
 *         # General approach: 'Y', 'M', 'D', 'h', 'm', 's', 'ms', 'us'
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3644, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":3647
 * 
 *         # General approach: 'Y', 'M', 'D', 'h', 'm', 's', 'ms', 'us'
 *         my_unit: str = self.unit             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
 *         to_reso: cython.int
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 3647, __pyx_L1_error)
  __pyx_v_my_unit = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":3648
 *         # General approach: 'Y', 'M', 'D', 'h', 'm', 's', 'ms', 'us'
 *         my_unit: str = self.unit
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)             # <<<<<<<<<<<<<<
 *         to_reso: cython.int
 *         if (
*/
  __pyx_t_5 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_my_unit); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3648, __pyx_L1_error)
  __pyx_v_my_reso = __pyx_t_5;

  /* "cytimes/pddt.py":3652
 *         if (
 *             #: 'Y', 'M', 'D', 'h', 'm', 's'
 *             (unit_len == 1 and ch0 in ("Y", "M", "D", "h", "m", "s"))             # <<<<<<<<<<<<<<
 *             #: 'ms', 'us'
 *             or (unit_len == 2 and ch0 in ("m", "u") and str_read(unit, 1) == "s")
*/
  __pyx_t_4 = (__pyx_v_unit_len == 1);
  if (!__pyx_t_4) {
    goto __pyx_L11_next_or;
  } else {
  }
  switch (__pyx_v_ch0) {
    case 89:
    case 77:
    case 68:
    case 0x68:
    case 0x6D:
    case 0x73:
    __pyx_t_4 = 1;
    break;
    default:
    __pyx_t_4 = 0;
    break;
  }
  __pyx_t_6 = __pyx_t_4;
  if (!__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_L11_next_or:;

  /* "cytimes/pddt.py":3654
 *             (unit_len == 1 and ch0 in ("Y", "M", "D", "h", "m", "s"))
 *             #: 'ms', 'us'
 *             or (unit_len == 2 and ch0 in ("m", "u") and str_read(unit, 1) == "s")             # <<<<<<<<<<<<<<
 *             #: 'min'
 *             or (
*/
  __pyx_t_6 = (__pyx_v_unit_len == 2);
  if (!__pyx_t_6) {
    goto __pyx_L13_next_or;
  } else {
  }
  switch (__pyx_v_ch0) {
    case 0x6D:
    case 0x75:
    __pyx_t_6 = 1;
    break;
    default:
    __pyx_t_6 = 0;
    break;
  }
  __pyx_t_4 = __pyx_t_6;
  if (!__pyx_t_4) {
    goto __pyx_L13_next_or;
  } else {
  }
  __pyx_t_4 = (PyUnicode_READ_CHAR(__pyx_v_unit, 1) == 0x73);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_L13_next_or:;

  /* "cytimes/pddt.py":3657
 *             #: 'min'
 *             or (
 *                 unit_len == 3             # <<<<<<<<<<<<<<
 *                 and ch0 == "m"
 *                 and str_read(unit, 1) == "i"
*/
  __pyx_t_4 = (__pyx_v_unit_len == 3);
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L10_bool_binop_done;
  }

  /* "cytimes/pddt.py":3658
 *             or (
 *                 unit_len == 3
 *                 and ch0 == "m"             # <<<<<<<<<<<<<<
 *                 and str_read(unit, 1) == "i"
 *                 and str_read(unit, 2) == "n"
*/
  __pyx_t_4 = (__pyx_v_ch0 == 0x6D);
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L10_bool_binop_done;
  }

  /* "cytimes/pddt.py":3659
 *                 unit_len == 3
 *                 and ch0 == "m"
 *                 and str_read(unit, 1) == "i"             # <<<<<<<<<<<<<<
 *                 and str_read(unit, 2) == "n"
 *             )
*/
  __pyx_t_4 = (PyUnicode_READ_CHAR(__pyx_v_unit, 1) == 0x69);
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L10_bool_binop_done;
  }

  /* "cytimes/pddt.py":3660
 *                 and ch0 == "m"
 *                 and str_read(unit, 1) == "i"
 *                 and str_read(unit, 2) == "n"             # <<<<<<<<<<<<<<
 *             )
 *         ):
*/
  __pyx_t_4 = (PyUnicode_READ_CHAR(__pyx_v_unit, 2) == 0x6E);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L10_bool_binop_done:;

  /* "cytimes/pddt.py":3650
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
 *         to_reso: cython.int
 *         if (             # <<<<<<<<<<<<<<
 *             #: 'Y', 'M', 'D', 'h', 'm', 's'
 *             (unit_len == 1 and ch0 in ("Y", "M", "D", "h", "m", "s"))
*/
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3663
 *             )
 *         ):
 *             to_reso = utils.nptime_unit_str2int(unit)             # <<<<<<<<<<<<<<
 *             if my_reso <= to_reso:
 *                 return self  # exit: already at or finer than target resolution
*/
    __pyx_t_5 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_unit); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3663, __pyx_L1_error)
    __pyx_v_to_reso = __pyx_t_5;

    /* "cytimes/pddt.py":3664
 *         ):
 *             to_reso = utils.nptime_unit_str2int(unit)
 *             if my_reso <= to_reso:             # <<<<<<<<<<<<<<
 *                 return self  # exit: already at or finer than target resolution
 *             arr: np.ndarray = self.values_naive
*/
    __pyx_t_1 = (__pyx_v_my_reso <= __pyx_v_to_reso);
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":3665
 *             to_reso = utils.nptime_unit_str2int(unit)
 *             if my_reso <= to_reso:
 *                 return self  # exit: already at or finer than target resolution             # <<<<<<<<<<<<<<
 *             arr: np.ndarray = self.values_naive
 *             arr = utils.dt64arr_as_int64(arr, unit, my_reso, 1, True)  # +1
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_self);
      __pyx_r = __pyx_v_self;
      goto __pyx_L0;

      /* "cytimes/pddt.py":3664
 *         ):
 *             to_reso = utils.nptime_unit_str2int(unit)
 *             if my_reso <= to_reso:             # <<<<<<<<<<<<<<
 *                 return self  # exit: already at or finer than target resolution
 *             arr: np.ndarray = self.values_naive
*/
    }

    /* "cytimes/pddt.py":3666
 *             if my_reso <= to_reso:
 *                 return self  # exit: already at or finer than target resolution
 *             arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *             arr = utils.dt64arr_as_int64(arr, unit, my_reso, 1, True)  # +1
 *             arr = utils.dt64arr_as_unit(arr, my_unit, to_reso, False, False)
*/
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3666, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3667
 *                 return self  # exit: already at or finer than target resolution
 *             arr: np.ndarray = self.values_naive
 *             arr = utils.dt64arr_as_int64(arr, unit, my_reso, 1, True)  # +1             # <<<<<<<<<<<<<<
 *             arr = utils.dt64arr_as_unit(arr, my_unit, to_reso, False, False)
 *             arr = utils.arr_add(arr, -1, False)  # -1 -> jump to the end
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = __pyx_v_my_reso;
    __pyx_t_7.offset = 1;
    __pyx_t_7.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64(__pyx_v_arr, __pyx_v_unit, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3668
 *             arr: np.ndarray = self.values_naive
 *             arr = utils.dt64arr_as_int64(arr, unit, my_reso, 1, True)  # +1
 *             arr = utils.dt64arr_as_unit(arr, my_unit, to_reso, False, False)             # <<<<<<<<<<<<<<
 *             arr = utils.arr_add(arr, -1, False)  # -1 -> jump to the end
 *             return self._new(arr, tz=self.tz, name=self.name)
*/
    __pyx_t_8.__pyx_n = 3;
    __pyx_t_8.arr_reso = __pyx_v_to_reso;
    __pyx_t_8.limit = 0;
    __pyx_t_8.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_unit(__pyx_v_arr, __pyx_v_my_unit, &__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3669
 *             arr = utils.dt64arr_as_int64(arr, unit, my_reso, 1, True)  # +1
 *             arr = utils.dt64arr_as_unit(arr, my_unit, to_reso, False, False)
 *             arr = utils.arr_add(arr, -1, False)  # -1 -> jump to the end             # <<<<<<<<<<<<<<
 *             return self._new(arr, tz=self.tz, name=self.name)
 * 
*/
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, -1LL, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3670
 *             arr = utils.dt64arr_as_unit(arr, my_unit, to_reso, False, False)
 *             arr = utils.arr_add(arr, -1, False)  # -1 -> jump to the end
 *             return self._new(arr, tz=self.tz, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *         # To weekday -> int64[D]-weekday+1week
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_10);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_13 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_10, ((PyObject *)__pyx_v_arr)};
      __pyx_t_14 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3670, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_11, __pyx_t_14, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3670, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_12, __pyx_t_14, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 3670, __pyx_L1_error)
      __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_14);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3670, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":3650
 *         my_reso: cython.int = utils.nptime_unit_str2int(my_unit)
 *         to_reso: cython.int
 *         if (             # <<<<<<<<<<<<<<
 *             #: 'Y', 'M', 'D', 'h', 'm', 's'
 *             (unit_len == 1 and ch0 in ("Y", "M", "D", "h", "m", "s"))
*/
  }

  /* "cytimes/pddt.py":3673
 * 
 *         # To weekday -> int64[D]-weekday+1week
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         if ch0 == "W" and unit_len == 1:
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3673, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":3674
 *         # To weekday -> int64[D]-weekday+1week
 *         arr: np.ndarray = self.values_naive
 *         if ch0 == "W" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
*/
  __pyx_t_4 = (__pyx_v_ch0 == 87);
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L21_bool_binop_done;
  }
  __pyx_t_4 = (__pyx_v_unit_len == 1);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L21_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3675
 *         arr: np.ndarray = self.values_naive
 *         if ch0 == "W" and unit_len == 1:
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
 *             dates = utils.arr_sub_arr(dateD, delta, 7, False)
*/
    __pyx_t_15.__pyx_n = 3;
    __pyx_t_15.arr_reso = __pyx_v_my_reso;
    __pyx_t_15.offset = 0;
    __pyx_t_15.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_15)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3676
 *         if ch0 == "W" and unit_len == 1:
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)             # <<<<<<<<<<<<<<
 *             dates = utils.arr_sub_arr(dateD, delta, 7, False)
 *             to_reso = utils.DT_NPY_UNIT_DD
*/
    __pyx_t_16.__pyx_n = 3;
    __pyx_t_16.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
    __pyx_t_16.offset = 0;
    __pyx_t_16.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_weekday(__pyx_v_dateD, &__pyx_t_16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3676, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3677
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
 *             dates = utils.arr_sub_arr(dateD, delta, 7, False)             # <<<<<<<<<<<<<<
 *             to_reso = utils.DT_NPY_UNIT_DD
 * 
*/
    __pyx_t_17.__pyx_n = 2;
    __pyx_t_17.offset = 7;
    __pyx_t_17.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_sub_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_17)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3678
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
 *             dates = utils.arr_sub_arr(dateD, delta, 7, False)
 *             to_reso = utils.DT_NPY_UNIT_DD             # <<<<<<<<<<<<<<
 * 
 *         # To quarter -> int64[Q]+1 -> int64[M]
*/
    __pyx_v_to_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;

    /* "cytimes/pddt.py":3674
 *         # To weekday -> int64[D]-weekday+1week
 *         arr: np.ndarray = self.values_naive
 *         if ch0 == "W" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *             delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
*/
    goto __pyx_L20;
  }

  /* "cytimes/pddt.py":3681
 * 
 *         # To quarter -> int64[Q]+1 -> int64[M]
 *         elif ch0 == "Q" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 1, True)
 *             dates = utils.arr_mul(dateQ, 3, 0, False)
*/
  __pyx_t_4 = (__pyx_v_ch0 == 81);
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L23_bool_binop_done;
  }
  __pyx_t_4 = (__pyx_v_unit_len == 1);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L23_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3682
 *         # To quarter -> int64[Q]+1 -> int64[M]
 *         elif ch0 == "Q" and unit_len == 1:
 *             dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 1, True)             # <<<<<<<<<<<<<<
 *             dates = utils.arr_mul(dateQ, 3, 0, False)
 *             to_reso = utils.DT_NPY_UNIT_MM
*/
    __pyx_t_18.__pyx_n = 3;
    __pyx_t_18.arr_reso = __pyx_v_my_reso;
    __pyx_t_18.offset = 1;
    __pyx_t_18.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Q(__pyx_v_arr, &__pyx_t_18)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dateQ = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3683
 *         elif ch0 == "Q" and unit_len == 1:
 *             dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 1, True)
 *             dates = utils.arr_mul(dateQ, 3, 0, False)             # <<<<<<<<<<<<<<
 *             to_reso = utils.DT_NPY_UNIT_MM
 * 
*/
    __pyx_t_19.__pyx_n = 2;
    __pyx_t_19.offset = 0;
    __pyx_t_19.copy = 0;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateQ, 3, &__pyx_t_19)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_dates = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pddt.py":3684
 *             dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 1, True)
 *             dates = utils.arr_mul(dateQ, 3, 0, False)
 *             to_reso = utils.DT_NPY_UNIT_MM             # <<<<<<<<<<<<<<
 * 
 *         # Special
*/
    __pyx_v_to_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;

    /* "cytimes/pddt.py":3681
 * 
 *         # To quarter -> int64[Q]+1 -> int64[M]
 *         elif ch0 == "Q" and unit_len == 1:             # <<<<<<<<<<<<<<
 *             dateQ = utils.dt64arr_as_int64_Q(arr, my_reso, 1, True)
 *             dates = utils.arr_mul(dateQ, 3, 0, False)
*/
    goto __pyx_L20;
  }

  /* "cytimes/pddt.py":3688
 *         # Special
 *         else:
 *             val: cython.int             # <<<<<<<<<<<<<<
 *             # Month name -> int64[Y] -> int64[M]+MM (MM is 0-based; so no +1)
 *             if (val := _parse_month(unit, None, False)) != -1:
*/
  /*else*/ {

    /* "cytimes/pddt.py":3690
 *             val: cython.int
 *             # Month name -> int64[Y] -> int64[M]+MM (MM is 0-based; so no +1)
 *             if (val := _parse_month(unit, None, False)) != -1:             # <<<<<<<<<<<<<<
 *                 dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)
 *                 dates = utils.dt64arr_as_int64_M(
*/
    __pyx_t_20.__pyx_n = 2;
    __pyx_t_20.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
    __pyx_t_20.raise_error = 0;
    __pyx_t_5 = __pyx_f_7cytimes_6parser_parse_month(__pyx_v_unit, 0, &__pyx_t_20); if (unlikely(__pyx_t_5 == ((int)-2))) __PYX_ERR(0, 3690, __pyx_L1_error)
    __pyx_v_val = __pyx_t_5;
    __pyx_t_1 = (__pyx_t_5 != -1L);
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":3691
 *             # Month name -> int64[Y] -> int64[M]+MM (MM is 0-based; so no +1)
 *             if (val := _parse_month(unit, None, False)) != -1:
 *                 dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 *                 dates = utils.dt64arr_as_int64_M(
 *                     dateY, utils.DT_NPY_UNIT_YY, val, False
*/
      __pyx_t_21.__pyx_n = 3;
      __pyx_t_21.arr_reso = __pyx_v_my_reso;
      __pyx_t_21.offset = 0;
      __pyx_t_21.copy = 1;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_21)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_dateY = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "cytimes/pddt.py":3692
 *             if (val := _parse_month(unit, None, False)) != -1:
 *                 dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)
 *                 dates = utils.dt64arr_as_int64_M(             # <<<<<<<<<<<<<<
 *                     dateY, utils.DT_NPY_UNIT_YY, val, False
 *                 )
*/
      __pyx_t_22.__pyx_n = 3;
      __pyx_t_22.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_YY;
      __pyx_t_22.offset = __pyx_v_val;
      __pyx_t_22.copy = 0;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(__pyx_v_dateY, &__pyx_t_22)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_dates = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "cytimes/pddt.py":3695
 *                     dateY, utils.DT_NPY_UNIT_YY, val, False
 *                 )
 *                 to_reso = utils.DT_NPY_UNIT_MM             # <<<<<<<<<<<<<<
 * 
 *             # Weekday name -> int64[D]-weekday+DD+1
*/
      __pyx_v_to_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;

      /* "cytimes/pddt.py":3690
 *             val: cython.int
 *             # Month name -> int64[Y] -> int64[M]+MM (MM is 0-based; so no +1)
 *             if (val := _parse_month(unit, None, False)) != -1:             # <<<<<<<<<<<<<<
 *                 dateY = utils.dt64arr_as_int64_Y(arr, my_reso, 0, True)
 *                 dates = utils.dt64arr_as_int64_M(
*/
      goto __pyx_L25;
    }

    /* "cytimes/pddt.py":3698
 * 
 *             # Weekday name -> int64[D]-weekday+DD+1
 *             elif (val := _parse_weekday(unit, None, False)) != -1:             # <<<<<<<<<<<<<<
 *                 dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *                 delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
*/
    __pyx_t_23.__pyx_n = 2;
    __pyx_t_23.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
    __pyx_t_23.raise_error = 0;
    __pyx_t_5 = __pyx_f_7cytimes_6parser_parse_weekday(__pyx_v_unit, 0, &__pyx_t_23); if (unlikely(__pyx_t_5 == ((int)-2))) __PYX_ERR(0, 3698, __pyx_L1_error)
    __pyx_v_val = __pyx_t_5;
    __pyx_t_1 = (__pyx_t_5 != -1L);
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":3699
 *             # Weekday name -> int64[D]-weekday+DD+1
 *             elif (val := _parse_weekday(unit, None, False)) != -1:
 *                 dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 *                 delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
 *                 dates = utils.arr_sub_arr(dateD, delta, val + 1, False)
*/
      __pyx_t_15.__pyx_n = 3;
      __pyx_t_15.arr_reso = __pyx_v_my_reso;
      __pyx_t_15.offset = 0;
      __pyx_t_15.copy = 1;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_15)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3699, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_dateD = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "cytimes/pddt.py":3700
 *             elif (val := _parse_weekday(unit, None, False)) != -1:
 *                 dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *                 delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)             # <<<<<<<<<<<<<<
 *                 dates = utils.arr_sub_arr(dateD, delta, val + 1, False)
 *                 to_reso = utils.DT_NPY_UNIT_DD
*/
      __pyx_t_16.__pyx_n = 3;
      __pyx_t_16.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
      __pyx_t_16.offset = 0;
      __pyx_t_16.copy = 1;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_weekday(__pyx_v_dateD, &__pyx_t_16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3700, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_delta = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "cytimes/pddt.py":3701
 *                 dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *                 delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
 *                 dates = utils.arr_sub_arr(dateD, delta, val + 1, False)             # <<<<<<<<<<<<<<
 *                 to_reso = utils.DT_NPY_UNIT_DD
 * 
*/
      __pyx_t_17.__pyx_n = 2;
      __pyx_t_17.offset = (__pyx_v_val + 1);
      __pyx_t_17.copy = 0;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_sub_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_17)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3701, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_dates = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "cytimes/pddt.py":3702
 *                 delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
 *                 dates = utils.arr_sub_arr(dateD, delta, val + 1, False)
 *                 to_reso = utils.DT_NPY_UNIT_DD             # <<<<<<<<<<<<<<
 * 
 *             # Invalid
*/
      __pyx_v_to_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;

      /* "cytimes/pddt.py":3698
 * 
 *             # Weekday name -> int64[D]-weekday+DD+1
 *             elif (val := _parse_weekday(unit, None, False)) != -1:             # <<<<<<<<<<<<<<
 *                 dateD = utils.dt64arr_as_int64_D(arr, my_reso, 0, True)
 *                 delta = utils.dt64arr_weekday(dateD, utils.DT_NPY_UNIT_DD, 0, True)
*/
      goto __pyx_L25;
    }

    /* "cytimes/pddt.py":3706
 *             # Invalid
 *             else:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     self.__class__,
 *                     "to_end_of(unit)",
*/
    /*else*/ {

      /* "cytimes/pddt.py":3707
 *             else:
 *                 errors.raise_argument_error(
 *                     self.__class__,             # <<<<<<<<<<<<<<
 *                     "to_end_of(unit)",
 *                     "Supports: 'Y', 'Q', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns' "
*/
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3707, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "cytimes/pddt.py":3710
 *                     "to_end_of(unit)",
 *                     "Supports: 'Y', 'Q', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns' "
 *                     "or Month/Weekday name; got '%s'." % unit,             # <<<<<<<<<<<<<<
 *                 )
 *                 return  # unreachable: suppress compiler warning
*/
      __pyx_t_14 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Supports_Y_Q_M_W_D_h_m_s_ms_us_n_3, __pyx_v_unit); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);

      /* "cytimes/pddt.py":3706
 *             # Invalid
 *             else:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     self.__class__,
 *                     "to_end_of(unit)",
*/
      __pyx_t_3.__pyx_n = 3;
      __pyx_t_3.cls = __pyx_t_2;
      __pyx_t_3.input_msg = __pyx_mstate_global->__pyx_kp_u_to_end_of_unit;
      __pyx_t_3.error_msg = ((PyObject*)__pyx_t_14);
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3706, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

      /* "cytimes/pddt.py":3712
 *                     "or Month/Weekday name; got '%s'." % unit,
 *                 )
 *                 return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
    }
    __pyx_L25:;
  }
  __pyx_L20:;

  /* "cytimes/pddt.py":3715
 * 
 *         # New instance
 *         arr = utils.dt64arr_as_unit(dates, my_unit, to_reso, False, False)             # <<<<<<<<<<<<<<
 *         arr = utils.arr_add(arr, -1, False)  # -1 -> jump to the end
 *         return self._new(arr, tz=self.tz, name=self.name)
*/
  __pyx_t_8.__pyx_n = 3;
  __pyx_t_8.arr_reso = __pyx_v_to_reso;
  __pyx_t_8.limit = 0;
  __pyx_t_8.copy = 0;
  __pyx_t_14 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_unit(__pyx_v_dates, __pyx_v_my_unit, &__pyx_t_8)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_14));
  __pyx_t_14 = 0;

  /* "cytimes/pddt.py":3716
 *         # New instance
 *         arr = utils.dt64arr_as_unit(dates, my_unit, to_reso, False, False)
 *         arr = utils.arr_add(arr, -1, False)  # -1 -> jump to the end             # <<<<<<<<<<<<<<
 *         return self._new(arr, tz=self.tz, name=self.name)
 * 
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = 0;
  __pyx_t_14 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, -1LL, &__pyx_t_9)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_14));
  __pyx_t_14 = 0;

  /* "cytimes/pddt.py":3717
 *         arr = utils.dt64arr_as_unit(dates, my_unit, to_reso, False, False)
 *         arr = utils.arr_add(arr, -1, False)  # -1 -> jump to the end
 *         return self._new(arr, tz=self.tz, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *     def is_first_of(self, unit: str) -> pd.Index[bool]:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_13 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, ((PyObject *)__pyx_v_arr)};
    __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_12, __pyx_t_10, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3717, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_11, __pyx_t_10, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 3717, __pyx_L1_error)
    __pyx_t_14 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
  }
  __pyx_r = __pyx_t_14;
  __pyx_t_14 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":3598
 *         return self._new(arr, tz=self.tz, name=self.name)
 * 
 *     def to_end_of(self, unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date & time fields to the end of the specified datetime unit `<'Pddt'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.to_end_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_my_unit);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateD);
  __Pyx_XDECREF((PyObject *)__pyx_v_delta);
  __Pyx_XDECREF((PyObject *)__pyx_v_dates);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateQ);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateY);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":3719
 *         return self._new(arr, tz=self.tz, name=self.name)
 * 
 *     def is_first_of(self, unit: str) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether the date fields are on the first day
 *         of the specified datetime unit `<'Index[bool]'>`.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_145is_first_of(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_144is_first_of, "Element-wise check whether the date fields are on the first day\n        of the specified datetime unit `<'Index[bool]'>`.\n\n        :param unit `<'str'>`: The datetime unit:\n\n            - `'Y'` \342\206\222 First day of the year: `YYYY-01-01`\n            - `'Q'` \342\206\222 First day of the quarter: `YYYY-MM-01`\n            - `'M'` \342\206\222 First day of the month: `YYYY-MM-01`\n            - `'W'` \342\206\222 First day (Monday) of the week: `YYYY-MM-DD`\n            - `Month` (e.g., `'Jan'`, `'February'`, `'\344\270\211\346\234\210'`)\n                    \342\206\222 First day of the specifed month: `YYYY-MM-01`\n\n        :return `<'Index[bool]'>`: True if the element is on the first day\n            of the specified datetime unit; Otherwise False.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_145is_first_of = {"is_first_of", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_145is_first_of, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_144is_first_of};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_145is_first_of(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_unit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_first_of (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_unit,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3719, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3719, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3719, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_first_of", 0) < (0)) __PYX_ERR(0, 3719, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_first_of", 1, 2, 2, i); __PYX_ERR(0, 3719, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3719, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3719, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_unit = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_first_of", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3719, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_first_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 3719, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_144is_first_of(__pyx_self, __pyx_v_self, __pyx_v_unit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_144is_first_of(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit) {
  PyObject *__pyx_v_pt = NULL;
  PyArrayObject *__pyx_v_pt_dateD = NULL;
  PyArrayObject *__pyx_v_my_dateD = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __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("is_first_of", 0);

  /* "cytimes/pddt.py":3736
 *         """
 *         # To first of
 *         pt = self.to_first_of(unit)             # <<<<<<<<<<<<<<
 * 
 *         # Compare dates
*/
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_unit};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_first_of, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_pt = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":3739
 * 
 *         # Compare dates
 *         pt_dateD = utils.dt64arr_as_int64_D(pt.values, -1, True)             # <<<<<<<<<<<<<<
 *         my_dateD = utils.dt64arr_as_int64_D(self.values, -1, True)
 *         return pd.Index(utils.arr_eq_arr(my_dateD, pt_dateD), name="is_first_of")
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pt, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3739, __pyx_L1_error)
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.arr_reso = -1;
  __pyx_t_4.offset = 1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(((PyArrayObject *)__pyx_t_1), &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_pt_dateD = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":3740
 *         # Compare dates
 *         pt_dateD = utils.dt64arr_as_int64_D(pt.values, -1, True)
 *         my_dateD = utils.dt64arr_as_int64_D(self.values, -1, True)             # <<<<<<<<<<<<<<
 *         return pd.Index(utils.arr_eq_arr(my_dateD, pt_dateD), name="is_first_of")
 * 
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3740, __pyx_L1_error)
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.arr_reso = -1;
  __pyx_t_4.offset = 1;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(((PyArrayObject *)__pyx_t_2), &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_my_dateD = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":3741
 *         pt_dateD = utils.dt64arr_as_int64_D(pt.values, -1, True)
 *         my_dateD = utils.dt64arr_as_int64_D(self.values, -1, True)
 *         return pd.Index(utils.arr_eq_arr(my_dateD, pt_dateD), name="is_first_of")             # <<<<<<<<<<<<<<
 * 
 *     def is_last_of(self, unit: str) -> pd.Index[bool]:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_eq_arr(__pyx_v_my_dateD, __pyx_v_pt_dateD)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_3 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_is_first_of, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3741, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":3719
 *         return self._new(arr, tz=self.tz, name=self.name)
 * 
 *     def is_first_of(self, unit: str) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether the date fields are on the first day
 *         of the specified datetime unit `<'Index[bool]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_first_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pt);
  __Pyx_XDECREF((PyObject *)__pyx_v_pt_dateD);
  __Pyx_XDECREF((PyObject *)__pyx_v_my_dateD);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":3743
 *         return pd.Index(utils.arr_eq_arr(my_dateD, pt_dateD), name="is_first_of")
 * 
 *     def is_last_of(self, unit: str) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether the date fields are on the last day
 *         of the specified datetime unit `<'Index[bool]'>`.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_147is_last_of(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_146is_last_of, "Element-wise check whether the date fields are on the last day\n        of the specified datetime unit `<'Index[bool]'>`.\n\n        :param unit `<'str'>`: The datetime unit:\n\n            - `'Y'` \342\206\222 Last day of the year: `YYYY-12-31`\n            - `'Q'` \342\206\222 Last day of the quarter: `YYYY-MM-(30..31)`\n            - `'M'` \342\206\222 Last day of the month: `YYYY-MM-(28..31)`\n            - `'W'` \342\206\222 Last day (Sunday) of the week: `YYYY-MM-DD`\n            - `Month` (e.g., `'Jan'`, `'February'`, `'\344\270\211\346\234\210'`)\n                    \342\206\222 Last day of the specifed month: `YYYY-MM-(28..31)`\n\n        :return `<'Index[bool]'>`: True if the element is on the last day\n            of the specified datetime unit; Otherwise False.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_147is_last_of = {"is_last_of", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_147is_last_of, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_146is_last_of};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_147is_last_of(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_unit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_last_of (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_unit,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3743, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3743, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3743, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_last_of", 0) < (0)) __PYX_ERR(0, 3743, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_last_of", 1, 2, 2, i); __PYX_ERR(0, 3743, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3743, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3743, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_unit = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_last_of", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3743, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_last_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 3743, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_146is_last_of(__pyx_self, __pyx_v_self, __pyx_v_unit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_146is_last_of(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit) {
  PyObject *__pyx_v_pt = NULL;
  PyArrayObject *__pyx_v_pt_dateD = NULL;
  PyArrayObject *__pyx_v_my_dateD = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __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("is_last_of", 0);

  /* "cytimes/pddt.py":3760
 *         """
 *         # To last of
 *         pt = self.to_last_of(unit)             # <<<<<<<<<<<<<<
 * 
 *         # Compare dates
*/
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_unit};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_last_of, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_pt = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":3763
 * 
 *         # Compare dates
 *         pt_dateD = utils.dt64arr_as_int64_D(pt.values, -1, True)             # <<<<<<<<<<<<<<
 *         my_dateD = utils.dt64arr_as_int64_D(self.values, -1, True)
 *         return pd.Index(utils.arr_eq_arr(my_dateD, pt_dateD), name="is_last_of")
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pt, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3763, __pyx_L1_error)
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.arr_reso = -1;
  __pyx_t_4.offset = 1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(((PyArrayObject *)__pyx_t_1), &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_pt_dateD = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":3764
 *         # Compare dates
 *         pt_dateD = utils.dt64arr_as_int64_D(pt.values, -1, True)
 *         my_dateD = utils.dt64arr_as_int64_D(self.values, -1, True)             # <<<<<<<<<<<<<<
 *         return pd.Index(utils.arr_eq_arr(my_dateD, pt_dateD), name="is_last_of")
 * 
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3764, __pyx_L1_error)
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.arr_reso = -1;
  __pyx_t_4.offset = 1;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(((PyArrayObject *)__pyx_t_2), &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_my_dateD = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":3765
 *         pt_dateD = utils.dt64arr_as_int64_D(pt.values, -1, True)
 *         my_dateD = utils.dt64arr_as_int64_D(self.values, -1, True)
 *         return pd.Index(utils.arr_eq_arr(my_dateD, pt_dateD), name="is_last_of")             # <<<<<<<<<<<<<<
 * 
 *     def is_start_of(self, unit: str) -> pd.Index[bool]:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_eq_arr(__pyx_v_my_dateD, __pyx_v_pt_dateD)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_3 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3765, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_is_last_of, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3765, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3765, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":3743
 *         return pd.Index(utils.arr_eq_arr(my_dateD, pt_dateD), name="is_first_of")
 * 
 *     def is_last_of(self, unit: str) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether the date fields are on the last day
 *         of the specified datetime unit `<'Index[bool]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_last_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pt);
  __Pyx_XDECREF((PyObject *)__pyx_v_pt_dateD);
  __Pyx_XDECREF((PyObject *)__pyx_v_my_dateD);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":3767
 *         return pd.Index(utils.arr_eq_arr(my_dateD, pt_dateD), name="is_last_of")
 * 
 *     def is_start_of(self, unit: str) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether date & time fileds are the
 *         start of the specified datetime unit `<'Index[bool]'>`.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_149is_start_of(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_148is_start_of, "Element-wise check whether date & time fileds are the\n        start of the specified datetime unit `<'Index[bool]'>`.\n\n        :param unit `<'str'>`: The datetime unit:\n\n            - `'Y'`  \342\206\222 Start of year: `YYYY-01-01 00:00:00`\n            - `'Q'`  \342\206\222 Start of quarter: `YYYY-MM-01 00:00:00`\n            - `'M'`  \342\206\222 Start of month: `YYYY-MM-01 00:00:00`\n            - `'W'`  \342\206\222 Start of week (Monday): `YYYY-MM-DD 00:00:00`\n            - `'D'`  \342\206\222 Start of day: `YYYY-MM-DD 00:00:00`\n            - `'h'`  \342\206\222 Start of hour: `YYYY-MM-DD hh:00:00`\n            - `'m'`  \342\206\222 Start of minute: `YYYY-MM-DD hh:mm:00`\n            - `'s'`  \342\206\222 Start of second: `YYYY-MM-DD hh:mm:ss.000000`\n            - `'ms'` \342\206\222 Start of millisecond: `YYYY-MM-DD hh:mm:ss.uuu000`\n            - `'us'` \342\206\222 Return the instance `as-is`.\n            - `Month` (e.g., `'Jan'`, `'February'`, `'\344\270\211\346\234\210'`)\n                     \342\206\222 Start of the specifed month: `YYYY-MM-01 00:00:00`\n            - `Weekday` (e.g., `'Mon'`, `'Tuesday'`, `'\346\230\237\346\234\237\344\270\211'`)\n                     \342\206\222 Start of the specifed weekday: `YYYY-MM-DD 00:00:00`\n\n        :return `<'Index[bool]'>`: True if the element is at the start\n            of the specified datetime unit; Otherwise False.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_149is_start_of = {"is_start_of", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_149is_start_of, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_148is_start_of};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_149is_start_of(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_unit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_start_of (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_unit,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3767, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3767, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3767, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_start_of", 0) < (0)) __PYX_ERR(0, 3767, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_start_of", 1, 2, 2, i); __PYX_ERR(0, 3767, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3767, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3767, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_unit = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_start_of", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3767, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_start_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 3767, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_148is_start_of(__pyx_self, __pyx_v_self, __pyx_v_unit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_148is_start_of(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit) {
  PyObject *__pyx_v_pt = NULL;
  PyObject *__pyx_v_pt_unit = 0;
  int __pyx_v_pt_reso;
  int __pyx_v_my_reso;
  PyArrayObject *__pyx_v_arr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_unit __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_start_of", 0);

  /* "cytimes/pddt.py":3792
 *         """
 *         # To start of
 *         pt = self.to_start_of(unit)             # <<<<<<<<<<<<<<
 * 
 *         # Compare values
*/
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_unit};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_start_of, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_pt = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":3795
 * 
 *         # Compare values
 *         pt_unit: str = pt.unit             # <<<<<<<<<<<<<<
 *         pt_reso: cython.int = utils.nptime_unit_str2int(pt_unit)
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pt, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 3795, __pyx_L1_error)
  __pyx_v_pt_unit = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":3796
 *         # Compare values
 *         pt_unit: str = pt.unit
 *         pt_reso: cython.int = utils.nptime_unit_str2int(pt_unit)             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         if pt_reso == my_reso:
*/
  __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_pt_unit); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 3796, __pyx_L1_error)
  __pyx_v_pt_reso = __pyx_t_4;

  /* "cytimes/pddt.py":3797
 *         pt_unit: str = pt.unit
 *         pt_reso: cython.int = utils.nptime_unit_str2int(pt_unit)
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)             # <<<<<<<<<<<<<<
 *         if pt_reso == my_reso:
 *             arr = utils.arr_eq_arr(self.values, pt.values)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 3797, __pyx_L1_error)
  __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(((PyObject*)__pyx_t_1)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 3797, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_my_reso = __pyx_t_4;

  /* "cytimes/pddt.py":3798
 *         pt_reso: cython.int = utils.nptime_unit_str2int(pt_unit)
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         if pt_reso == my_reso:             # <<<<<<<<<<<<<<
 *             arr = utils.arr_eq_arr(self.values, pt.values)
 *         else:
*/
  __pyx_t_5 = (__pyx_v_pt_reso == __pyx_v_my_reso);
  if (__pyx_t_5) {

    /* "cytimes/pddt.py":3799
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         if pt_reso == my_reso:
 *             arr = utils.arr_eq_arr(self.values, pt.values)             # <<<<<<<<<<<<<<
 *         else:
 *             arr = utils.arr_eq_arr(
*/
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3799, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3799, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_pt, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3799, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3799, __pyx_L1_error)
    __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_eq_arr(((PyArrayObject *)__pyx_t_1), ((PyArrayObject *)__pyx_t_2))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3799, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "cytimes/pddt.py":3798
 *         pt_reso: cython.int = utils.nptime_unit_str2int(pt_unit)
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         if pt_reso == my_reso:             # <<<<<<<<<<<<<<
 *             arr = utils.arr_eq_arr(self.values, pt.values)
 *         else:
*/
    goto __pyx_L3;
  }

  /* "cytimes/pddt.py":3801
 *             arr = utils.arr_eq_arr(self.values, pt.values)
 *         else:
 *             arr = utils.arr_eq_arr(             # <<<<<<<<<<<<<<
 *                 utils.dt64arr_as_unit(self.values, pt_unit, my_reso, True, True),
 *                 pt.values,
*/
  /*else*/ {

    /* "cytimes/pddt.py":3802
 *         else:
 *             arr = utils.arr_eq_arr(
 *                 utils.dt64arr_as_unit(self.values, pt_unit, my_reso, True, True),             # <<<<<<<<<<<<<<
 *                 pt.values,
 *             )
*/
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3802, __pyx_L1_error)
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = __pyx_v_my_reso;
    __pyx_t_7.limit = 1;
    __pyx_t_7.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_unit(((PyArrayObject *)__pyx_t_6), __pyx_v_pt_unit, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "cytimes/pddt.py":3803
 *             arr = utils.arr_eq_arr(
 *                 utils.dt64arr_as_unit(self.values, pt_unit, my_reso, True, True),
 *                 pt.values,             # <<<<<<<<<<<<<<
 *             )
 *         return pd.Index(arr, name="is_start_of")
*/
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_pt, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3803, __pyx_L1_error)

    /* "cytimes/pddt.py":3801
 *             arr = utils.arr_eq_arr(self.values, pt.values)
 *         else:
 *             arr = utils.arr_eq_arr(             # <<<<<<<<<<<<<<
 *                 utils.dt64arr_as_unit(self.values, pt_unit, my_reso, True, True),
 *                 pt.values,
*/
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_eq_arr(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3801, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "cytimes/pddt.py":3805
 *                 pt.values,
 *             )
 *         return pd.Index(arr, name="is_start_of")             # <<<<<<<<<<<<<<
 * 
 *     def is_end_of(self, unit: str) -> pd.Index[bool]:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
    __pyx_t_3 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, ((PyObject *)__pyx_v_arr)};
    __pyx_t_2 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_is_start_of, __pyx_t_2, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3805, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_2);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":3767
 *         return pd.Index(utils.arr_eq_arr(my_dateD, pt_dateD), name="is_last_of")
 * 
 *     def is_start_of(self, unit: str) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether date & time fileds are the
 *         start of the specified datetime unit `<'Index[bool]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_start_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pt);
  __Pyx_XDECREF(__pyx_v_pt_unit);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":3807
 *         return pd.Index(arr, name="is_start_of")
 * 
 *     def is_end_of(self, unit: str) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether date & time fileds are the
 *         end of the specified datetime unit `<'Index[bool]'>`.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_151is_end_of(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_150is_end_of, "Element-wise check whether date & time fileds are the\n        end of the specified datetime unit `<'Index[bool]'>`.\n\n        :param unit `<'str'>`: The datetime unit:\n\n            - `'Y'`  \342\206\222 End of year: `YYYY-12-31 23:59:59.999999`\n            - `'Q'`  \342\206\222 End of quarter: `YYYY-MM-(30..31) 23:59:59.999999`\n            - `'M'`  \342\206\222 End of month: `YYYY-MM-(28..31) 23:59:59.999999`\n            - `'W'`  \342\206\222 End of week (Sunday): `YYYY-MM-DD 23:59:59.999999`\n            - `'D'`  \342\206\222 End of day: `YYYY-MM-DD 23:59:59.999999`\n            - `'h'`  \342\206\222 End of hour: `YYYY-MM-DD hh:59:59.999999`\n            - `'m'`  \342\206\222 End of minute: `YYYY-MM-DD hh:mm:59.999999`\n            - `'s'`  \342\206\222 End of second: `YYYY-MM-DD hh:mm:ss.999999`\n            - `'ms'` \342\206\222 End of millisecond: `YYYY-MM-DD hh:mm:ss.uuu999`\n            - `'us'` \342\206\222 Return the instance `as-is`.\n            - `Month` (e.g., `'Jan'`, `'February'`, `'\344\270\211\346\234\210'`)\n                     \342\206\222 End of the specifed month: `YYYY-MM-(28..31) 23:59:59.999999`\n            - `Weekday` (e.g., `'Mon'`, `'Tuesday'`, `'\346\230\237\346\234\237\344\270\211'`)\n                     \342\206\222 End of the specifed weekday: `YYYY-MM-DD 23:59:59.999999`\n\n        :return `<'Index[bool]'>`: True if the element is at the end\n            of the specified datetime unit; Otherwise False.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_151is_end_of = {"is_end_of", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_151is_end_of, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_150is_end_of};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_151is_end_of(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_unit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_end_of (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_unit,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3807, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3807, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3807, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_end_of", 0) < (0)) __PYX_ERR(0, 3807, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_end_of", 1, 2, 2, i); __PYX_ERR(0, 3807, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3807, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3807, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_unit = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_end_of", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3807, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_end_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 3807, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_150is_end_of(__pyx_self, __pyx_v_self, __pyx_v_unit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_150is_end_of(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit) {
  PyObject *__pyx_v_pt = NULL;
  PyObject *__pyx_v_pt_unit = 0;
  int __pyx_v_pt_reso;
  int __pyx_v_my_reso;
  PyArrayObject *__pyx_v_arr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_unit __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_end_of", 0);

  /* "cytimes/pddt.py":3832
 *         """
 *         # To end of
 *         pt = self.to_end_of(unit)             # <<<<<<<<<<<<<<
 * 
 *         # Compare values
*/
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_unit};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_end_of, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_pt = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":3835
 * 
 *         # Compare values
 *         pt_unit: str = pt.unit             # <<<<<<<<<<<<<<
 *         pt_reso: cython.int = utils.nptime_unit_str2int(pt_unit)
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pt, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 3835, __pyx_L1_error)
  __pyx_v_pt_unit = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":3836
 *         # Compare values
 *         pt_unit: str = pt.unit
 *         pt_reso: cython.int = utils.nptime_unit_str2int(pt_unit)             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         if pt_reso == my_reso:
*/
  __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_pt_unit); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 3836, __pyx_L1_error)
  __pyx_v_pt_reso = __pyx_t_4;

  /* "cytimes/pddt.py":3837
 *         pt_unit: str = pt.unit
 *         pt_reso: cython.int = utils.nptime_unit_str2int(pt_unit)
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)             # <<<<<<<<<<<<<<
 *         if pt_reso == my_reso:
 *             arr = utils.arr_eq_arr(self.values, pt.values)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 3837, __pyx_L1_error)
  __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(((PyObject*)__pyx_t_1)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 3837, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_my_reso = __pyx_t_4;

  /* "cytimes/pddt.py":3838
 *         pt_reso: cython.int = utils.nptime_unit_str2int(pt_unit)
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         if pt_reso == my_reso:             # <<<<<<<<<<<<<<
 *             arr = utils.arr_eq_arr(self.values, pt.values)
 *         else:
*/
  __pyx_t_5 = (__pyx_v_pt_reso == __pyx_v_my_reso);
  if (__pyx_t_5) {

    /* "cytimes/pddt.py":3839
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         if pt_reso == my_reso:
 *             arr = utils.arr_eq_arr(self.values, pt.values)             # <<<<<<<<<<<<<<
 *         else:
 *             arr = utils.arr_eq_arr(
*/
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3839, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_pt, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3839, __pyx_L1_error)
    __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_eq_arr(((PyArrayObject *)__pyx_t_1), ((PyArrayObject *)__pyx_t_2))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "cytimes/pddt.py":3838
 *         pt_reso: cython.int = utils.nptime_unit_str2int(pt_unit)
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         if pt_reso == my_reso:             # <<<<<<<<<<<<<<
 *             arr = utils.arr_eq_arr(self.values, pt.values)
 *         else:
*/
    goto __pyx_L3;
  }

  /* "cytimes/pddt.py":3841
 *             arr = utils.arr_eq_arr(self.values, pt.values)
 *         else:
 *             arr = utils.arr_eq_arr(             # <<<<<<<<<<<<<<
 *                 utils.dt64arr_as_unit(self.values, pt_unit, my_reso, True, True),
 *                 pt.values,
*/
  /*else*/ {

    /* "cytimes/pddt.py":3842
 *         else:
 *             arr = utils.arr_eq_arr(
 *                 utils.dt64arr_as_unit(self.values, pt_unit, my_reso, True, True),             # <<<<<<<<<<<<<<
 *                 pt.values,
 *             )
*/
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3842, __pyx_L1_error)
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = __pyx_v_my_reso;
    __pyx_t_7.limit = 1;
    __pyx_t_7.copy = 1;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_unit(((PyArrayObject *)__pyx_t_6), __pyx_v_pt_unit, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "cytimes/pddt.py":3843
 *             arr = utils.arr_eq_arr(
 *                 utils.dt64arr_as_unit(self.values, pt_unit, my_reso, True, True),
 *                 pt.values,             # <<<<<<<<<<<<<<
 *             )
 *         return pd.Index(arr, name="is_end_of")
*/
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_pt, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3843, __pyx_L1_error)

    /* "cytimes/pddt.py":3841
 *             arr = utils.arr_eq_arr(self.values, pt.values)
 *         else:
 *             arr = utils.arr_eq_arr(             # <<<<<<<<<<<<<<
 *                 utils.dt64arr_as_unit(self.values, pt_unit, my_reso, True, True),
 *                 pt.values,
*/
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_eq_arr(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3841, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "cytimes/pddt.py":3845
 *                 pt.values,
 *             )
 *         return pd.Index(arr, name="is_end_of")             # <<<<<<<<<<<<<<
 * 
 *     # . round / ceil / floor
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
    __pyx_t_3 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, ((PyObject *)__pyx_v_arr)};
    __pyx_t_2 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3845, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_is_end_of, __pyx_t_2, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3845, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_2);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3845, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":3807
 *         return pd.Index(arr, name="is_start_of")
 * 
 *     def is_end_of(self, unit: str) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether date & time fileds are the
 *         end of the specified datetime unit `<'Index[bool]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_end_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pt);
  __Pyx_XDECREF(__pyx_v_pt_unit);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":3848
 * 
 *     # . round / ceil / floor
 *     def round(self, unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Perform round operation to the specified datetime unit `<'Pddt'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_153round(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_152round, "Perform round operation to the specified datetime unit `<'Pddt'>`.\n\n        :param unit `<'str'>`: The datetime unit to round to, supports:\n            `'D', 'h', 'm', 's', 'ms', 'us', 'ns'`.\n        :returns `<'Pddt'>`: The resulting datetime index.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_153round = {"round", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_153round, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_152round};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_153round(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_unit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("round (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_unit,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3848, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3848, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3848, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "round", 0) < (0)) __PYX_ERR(0, 3848, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("round", 1, 2, 2, i); __PYX_ERR(0, 3848, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3848, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3848, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_unit = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("round", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3848, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.round", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 3848, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_152round(__pyx_self, __pyx_v_self, __pyx_v_unit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_152round(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit) {
  int __pyx_v_to_reso;
  PyObject *__pyx_v_err = NULL;
  int __pyx_v_my_reso;
  PyArrayObject *__pyx_v_arr = 0;
  PyArrayObject *__pyx_v_out = 0;
  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;
  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[5];
  PyObject *__pyx_t_14 = NULL;
  size_t __pyx_t_15;
  int __pyx_t_16;
  char const *__pyx_t_17;
  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;
  int __pyx_t_24;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_round __pyx_t_25;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_26;
  char const *__pyx_t_27;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("round", 0);

  /* "cytimes/pddt.py":3856
 *         """
 *         # Validate unit
 *         try:             # <<<<<<<<<<<<<<
 *             to_reso: cython.int = utils.nptime_unit_str2int(unit)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "cytimes/pddt.py":3857
 *         # Validate unit
 *         try:
 *             to_reso: cython.int = utils.nptime_unit_str2int(unit)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             raise errors.InvalidArgumentError(
*/
      __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_unit); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 3857, __pyx_L3_error)
      __pyx_v_to_reso = __pyx_t_4;

      /* "cytimes/pddt.py":3856
 *         """
 *         # Validate unit
 *         try:             # <<<<<<<<<<<<<<
 *             to_reso: cython.int = utils.nptime_unit_str2int(unit)
 *         except Exception as err:
*/
    }
    __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_L8_try_end;
    __pyx_L3_error:;

    /* "cytimes/pddt.py":3858
 *         try:
 *             to_reso: cython.int = utils.nptime_unit_str2int(unit)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise errors.InvalidArgumentError(
 *                 "<'%s'> Invalid 'round(unit)' input.\n"
*/
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.round", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 3858, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_err = __pyx_t_6;
      /*try:*/ {

        /* "cytimes/pddt.py":3859
 *             to_reso: cython.int = utils.nptime_unit_str2int(unit)
 *         except Exception as err:
 *             raise errors.InvalidArgumentError(             # <<<<<<<<<<<<<<
 *                 "<'%s'> Invalid 'round(unit)' input.\n"
 *                 "Supports: 'D', 'h', 'm', 's', 'ms', 'us', 'ns'; got %r."
*/
        __pyx_t_9 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3859, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_InvalidArgumentError); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3859, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

        /* "cytimes/pddt.py":3862
 *                 "<'%s'> Invalid 'round(unit)' input.\n"
 *                 "Supports: 'D', 'h', 'm', 's', 'ms', 'us', 'ns'; got %r."
 *                 % (self.__class__.__name__, unit)             # <<<<<<<<<<<<<<
 *             ) from err
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
*/
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3862, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3862, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_12), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3862, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_unit), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3862, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13[0] = __pyx_mstate_global->__pyx_kp_u__13;
        __pyx_t_13[1] = __pyx_t_10;
        __pyx_t_13[2] = __pyx_mstate_global->__pyx_kp_u_Invalid_round_unit_input_Suppor;
        __pyx_t_13[3] = __pyx_t_12;
        __pyx_t_13[4] = __pyx_mstate_global->__pyx_kp_u__2;

        /* "cytimes/pddt.py":3860
 *         except Exception as err:
 *             raise errors.InvalidArgumentError(
 *                 "<'%s'> Invalid 'round(unit)' input.\n"             # <<<<<<<<<<<<<<
 *                 "Supports: 'D', 'h', 'm', 's', 'ms', 'us', 'ns'; got %r."
 *                 % (self.__class__.__name__, unit)
*/
        __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_13, 5, 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 84 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12));
        if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3860, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_15 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_11);
          assert(__pyx_t_9);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
          __pyx_t_15 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_14};
          __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3859, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_8);
        }

        /* "cytimes/pddt.py":3863
 *                 "Supports: 'D', 'h', 'm', 's', 'ms', 'us', 'ns'; got %r."
 *                 % (self.__class__.__name__, unit)
 *             ) from err             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 * 
*/
        __Pyx_Raise(__pyx_t_8, 0, 0, __pyx_v_err);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 3859, __pyx_L14_error)
      }

      /* "cytimes/pddt.py":3858
 *         try:
 *             to_reso: cython.int = utils.nptime_unit_str2int(unit)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise errors.InvalidArgumentError(
 *                 "<'%s'> Invalid 'round(unit)' input.\n"
*/
      /*finally:*/ {
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
          if ( unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __pyx_t_4 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17;
          goto __pyx_L5_except_error;
        }
      }
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pddt.py":3856
 *         """
 *         # Validate unit
 *         try:             # <<<<<<<<<<<<<<
 *             to_reso: cython.int = utils.nptime_unit_str2int(unit)
 *         except Exception as err:
*/
    __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_L8_try_end:;
  }

  /* "cytimes/pddt.py":3864
 *                 % (self.__class__.__name__, unit)
 *             ) from err
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)             # <<<<<<<<<<<<<<
 * 
 *         # Fast-path: source is coarser or equal to target
*/
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_7))) __PYX_ERR(0, 3864, __pyx_L1_error)
  __pyx_t_16 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(((PyObject*)__pyx_t_7)); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 3864, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_my_reso = __pyx_t_16;

  /* "cytimes/pddt.py":3867
 * 
 *         # Fast-path: source is coarser or equal to target
 *         if my_reso <= to_reso:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  __pyx_t_24 = (__pyx_v_my_reso <= __pyx_v_to_reso);
  if (__pyx_t_24) {

    /* "cytimes/pddt.py":3868
 *         # Fast-path: source is coarser or equal to target
 *         if my_reso <= to_reso:
 *             return self  # exit             # <<<<<<<<<<<<<<
 * 
 *         # Round operation
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pddt.py":3867
 * 
 *         # Fast-path: source is coarser or equal to target
 *         if my_reso <= to_reso:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  }

  /* "cytimes/pddt.py":3871
 * 
 *         # Round operation
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         try:
 *             out: np.ndarray = utils.dt64arr_round(arr, unit, my_reso, True)
*/
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3871, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cytimes/pddt.py":3872
 *         # Round operation
 *         arr: np.ndarray = self.values_naive
 *         try:             # <<<<<<<<<<<<<<
 *             out: np.ndarray = utils.dt64arr_round(arr, unit, my_reso, True)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "cytimes/pddt.py":3873
 *         arr: np.ndarray = self.values_naive
 *         try:
 *             out: np.ndarray = utils.dt64arr_round(arr, unit, my_reso, True)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "round(unit)", None, err)
*/
      __pyx_t_25.__pyx_n = 2;
      __pyx_t_25.arr_reso = __pyx_v_my_reso;
      __pyx_t_25.copy = 1;
      __pyx_t_7 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_round(__pyx_v_arr, __pyx_v_unit, &__pyx_t_25)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3873, __pyx_L21_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_v_out = ((PyArrayObject *)__pyx_t_7);
      __pyx_t_7 = 0;

      /* "cytimes/pddt.py":3872
 *         # Round operation
 *         arr: np.ndarray = self.values_naive
 *         try:             # <<<<<<<<<<<<<<
 *             out: np.ndarray = utils.dt64arr_round(arr, unit, my_reso, True)
 *         except Exception as err:
*/
    }
    __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_L26_try_end;
    __pyx_L21_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 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;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cytimes/pddt.py":3874
 *         try:
 *             out: np.ndarray = utils.dt64arr_round(arr, unit, my_reso, True)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self.__class__, "round(unit)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
    __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_16) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.round", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 3874, __pyx_L23_except_error)
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_err = __pyx_t_6;
      /*try:*/ {

        /* "cytimes/pddt.py":3875
 *             out: np.ndarray = utils.dt64arr_round(arr, unit, my_reso, True)
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "round(unit)", None, err)             # <<<<<<<<<<<<<<
 *             return  # unreachable: suppress compiler warning
 *         if arr is out:
*/
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3875, __pyx_L32_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_26.__pyx_n = 4;
        __pyx_t_26.cls = __pyx_t_8;
        __pyx_t_26.input_msg = __pyx_mstate_global->__pyx_kp_u_round_unit;
        __pyx_t_26.error_msg = ((PyObject*)Py_None);
        __pyx_t_26.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_26); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3875, __pyx_L32_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "cytimes/pddt.py":3876
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "round(unit)", None, err)
 *             return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *         if arr is out:
 *             return self  # exit
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L31_return;
      }

      /* "cytimes/pddt.py":3874
 *         try:
 *             out: np.ndarray = utils.dt64arr_round(arr, unit, my_reso, True)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self.__class__, "round(unit)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
      /*finally:*/ {
        __pyx_L32_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18);
          if ( unlikely(__Pyx_GetException(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_18);
          __pyx_t_16 = __pyx_lineno; __pyx_t_4 = __pyx_clineno; __pyx_t_27 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_19, __pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_23, __pyx_t_22, __pyx_t_21);
          __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
          __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_4; __pyx_filename = __pyx_t_27;
          goto __pyx_L23_except_error;
        }
        __pyx_L31_return: {
          __pyx_t_18 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          __pyx_r = __pyx_t_18;
          __pyx_t_18 = 0;
          goto __pyx_L24_except_return;
        }
      }
    }
    goto __pyx_L23_except_error;

    /* "cytimes/pddt.py":3872
 *         # Round operation
 *         arr: np.ndarray = self.values_naive
 *         try:             # <<<<<<<<<<<<<<
 *             out: np.ndarray = utils.dt64arr_round(arr, unit, my_reso, True)
 *         except Exception as err:
*/
    __pyx_L23_except_error:;
    __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_L24_except_return:;
    __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_L0;
    __pyx_L26_try_end:;
  }

  /* "cytimes/pddt.py":3877
 *             errors.raise_argument_error(self.__class__, "round(unit)", None, err)
 *             return  # unreachable: suppress compiler warning
 *         if arr is out:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  __pyx_t_24 = (__pyx_v_arr == __pyx_v_out);
  if (__pyx_t_24) {

    /* "cytimes/pddt.py":3878
 *             return  # unreachable: suppress compiler warning
 *         if arr is out:
 *             return self  # exit             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pddt.py":3877
 *             errors.raise_argument_error(self.__class__, "round(unit)", None, err)
 *             return  # unreachable: suppress compiler warning
 *         if arr is out:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  }

  /* "cytimes/pddt.py":3881
 * 
 *         # New instance
 *         return self._new(out, tz=self.tz, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *     def ceil(self, unit: str) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_15 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_6, ((PyObject *)__pyx_v_out)};
    __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3881, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_7, __pyx_t_11, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3881, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_8, __pyx_t_11, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 3881, __pyx_L1_error)
    __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3881, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":3848
 * 
 *     # . round / ceil / floor
 *     def round(self, unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Perform round operation to the specified datetime unit `<'Pddt'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __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_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.round", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":3883
 *         return self._new(out, tz=self.tz, name=self.name)
 * 
 *     def ceil(self, unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Perform ceil operation to the specified datetime unit `<'Pddt'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_155ceil(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_154ceil, "Perform ceil operation to the specified datetime unit `<'Pddt'>`.\n\n        :param unit `<'str'>`: The datetime unit to ceil to, supports:\n            `'D', 'h', 'm', 's', 'ms', 'us', 'ns'`.\n        :returns `<'Pddt'>`: The resulting datetime index.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_155ceil = {"ceil", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_155ceil, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_154ceil};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_155ceil(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_unit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ceil (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_unit,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3883, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3883, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3883, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "ceil", 0) < (0)) __PYX_ERR(0, 3883, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("ceil", 1, 2, 2, i); __PYX_ERR(0, 3883, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3883, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3883, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_unit = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ceil", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3883, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.ceil", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 3883, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_154ceil(__pyx_self, __pyx_v_self, __pyx_v_unit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_154ceil(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit) {
  int __pyx_v_to_reso;
  PyObject *__pyx_v_err = NULL;
  int __pyx_v_my_reso;
  PyArrayObject *__pyx_v_arr = 0;
  PyArrayObject *__pyx_v_out = 0;
  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;
  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[5];
  PyObject *__pyx_t_14 = NULL;
  size_t __pyx_t_15;
  int __pyx_t_16;
  char const *__pyx_t_17;
  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;
  int __pyx_t_24;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_ceil __pyx_t_25;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_26;
  char const *__pyx_t_27;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ceil", 0);

  /* "cytimes/pddt.py":3891
 *         """
 *         # Validate unit
 *         try:             # <<<<<<<<<<<<<<
 *             to_reso: cython.int = utils.nptime_unit_str2int(unit)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "cytimes/pddt.py":3892
 *         # Validate unit
 *         try:
 *             to_reso: cython.int = utils.nptime_unit_str2int(unit)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             raise errors.InvalidArgumentError(
*/
      __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_unit); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 3892, __pyx_L3_error)
      __pyx_v_to_reso = __pyx_t_4;

      /* "cytimes/pddt.py":3891
 *         """
 *         # Validate unit
 *         try:             # <<<<<<<<<<<<<<
 *             to_reso: cython.int = utils.nptime_unit_str2int(unit)
 *         except Exception as err:
*/
    }
    __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_L8_try_end;
    __pyx_L3_error:;

    /* "cytimes/pddt.py":3893
 *         try:
 *             to_reso: cython.int = utils.nptime_unit_str2int(unit)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise errors.InvalidArgumentError(
 *                 "<'%s'> Invalid 'ceil(unit)' input.\n"
*/
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.ceil", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 3893, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_err = __pyx_t_6;
      /*try:*/ {

        /* "cytimes/pddt.py":3894
 *             to_reso: cython.int = utils.nptime_unit_str2int(unit)
 *         except Exception as err:
 *             raise errors.InvalidArgumentError(             # <<<<<<<<<<<<<<
 *                 "<'%s'> Invalid 'ceil(unit)' input.\n"
 *                 "Supports: 'D', 'h', 'm', 's', 'ms', 'us', 'ns'; got %r."
*/
        __pyx_t_9 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3894, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_InvalidArgumentError); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3894, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

        /* "cytimes/pddt.py":3897
 *                 "<'%s'> Invalid 'ceil(unit)' input.\n"
 *                 "Supports: 'D', 'h', 'm', 's', 'ms', 'us', 'ns'; got %r."
 *                 % (self.__class__.__name__, unit)             # <<<<<<<<<<<<<<
 *             ) from err
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
*/
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3897, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3897, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_12), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3897, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_unit), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3897, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13[0] = __pyx_mstate_global->__pyx_kp_u__13;
        __pyx_t_13[1] = __pyx_t_10;
        __pyx_t_13[2] = __pyx_mstate_global->__pyx_kp_u_Invalid_ceil_unit_input_Support;
        __pyx_t_13[3] = __pyx_t_12;
        __pyx_t_13[4] = __pyx_mstate_global->__pyx_kp_u__2;

        /* "cytimes/pddt.py":3895
 *         except Exception as err:
 *             raise errors.InvalidArgumentError(
 *                 "<'%s'> Invalid 'ceil(unit)' input.\n"             # <<<<<<<<<<<<<<
 *                 "Supports: 'D', 'h', 'm', 's', 'ms', 'us', 'ns'; got %r."
 *                 % (self.__class__.__name__, unit)
*/
        __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_13, 5, 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 83 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12));
        if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3895, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_15 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_11);
          assert(__pyx_t_9);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
          __pyx_t_15 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_14};
          __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3894, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_8);
        }

        /* "cytimes/pddt.py":3898
 *                 "Supports: 'D', 'h', 'm', 's', 'ms', 'us', 'ns'; got %r."
 *                 % (self.__class__.__name__, unit)
 *             ) from err             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 * 
*/
        __Pyx_Raise(__pyx_t_8, 0, 0, __pyx_v_err);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 3894, __pyx_L14_error)
      }

      /* "cytimes/pddt.py":3893
 *         try:
 *             to_reso: cython.int = utils.nptime_unit_str2int(unit)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise errors.InvalidArgumentError(
 *                 "<'%s'> Invalid 'ceil(unit)' input.\n"
*/
      /*finally:*/ {
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
          if ( unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __pyx_t_4 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17;
          goto __pyx_L5_except_error;
        }
      }
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pddt.py":3891
 *         """
 *         # Validate unit
 *         try:             # <<<<<<<<<<<<<<
 *             to_reso: cython.int = utils.nptime_unit_str2int(unit)
 *         except Exception as err:
*/
    __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_L8_try_end:;
  }

  /* "cytimes/pddt.py":3899
 *                 % (self.__class__.__name__, unit)
 *             ) from err
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)             # <<<<<<<<<<<<<<
 * 
 *         # Fast-path: source is coarser or equal to target
*/
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_7))) __PYX_ERR(0, 3899, __pyx_L1_error)
  __pyx_t_16 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(((PyObject*)__pyx_t_7)); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 3899, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_my_reso = __pyx_t_16;

  /* "cytimes/pddt.py":3902
 * 
 *         # Fast-path: source is coarser or equal to target
 *         if my_reso <= to_reso:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  __pyx_t_24 = (__pyx_v_my_reso <= __pyx_v_to_reso);
  if (__pyx_t_24) {

    /* "cytimes/pddt.py":3903
 *         # Fast-path: source is coarser or equal to target
 *         if my_reso <= to_reso:
 *             return self  # exit             # <<<<<<<<<<<<<<
 * 
 *         # Ceil operation
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pddt.py":3902
 * 
 *         # Fast-path: source is coarser or equal to target
 *         if my_reso <= to_reso:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  }

  /* "cytimes/pddt.py":3906
 * 
 *         # Ceil operation
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         try:
 *             out: np.ndarray = utils.dt64arr_ceil(arr, unit, my_reso, True)
*/
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3906, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cytimes/pddt.py":3907
 *         # Ceil operation
 *         arr: np.ndarray = self.values_naive
 *         try:             # <<<<<<<<<<<<<<
 *             out: np.ndarray = utils.dt64arr_ceil(arr, unit, my_reso, True)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "cytimes/pddt.py":3908
 *         arr: np.ndarray = self.values_naive
 *         try:
 *             out: np.ndarray = utils.dt64arr_ceil(arr, unit, my_reso, True)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "ceil(unit)", None, err)
*/
      __pyx_t_25.__pyx_n = 2;
      __pyx_t_25.arr_reso = __pyx_v_my_reso;
      __pyx_t_25.copy = 1;
      __pyx_t_7 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_ceil(__pyx_v_arr, __pyx_v_unit, &__pyx_t_25)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3908, __pyx_L21_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_v_out = ((PyArrayObject *)__pyx_t_7);
      __pyx_t_7 = 0;

      /* "cytimes/pddt.py":3907
 *         # Ceil operation
 *         arr: np.ndarray = self.values_naive
 *         try:             # <<<<<<<<<<<<<<
 *             out: np.ndarray = utils.dt64arr_ceil(arr, unit, my_reso, True)
 *         except Exception as err:
*/
    }
    __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_L26_try_end;
    __pyx_L21_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 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;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cytimes/pddt.py":3909
 *         try:
 *             out: np.ndarray = utils.dt64arr_ceil(arr, unit, my_reso, True)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self.__class__, "ceil(unit)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
    __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_16) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.ceil", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 3909, __pyx_L23_except_error)
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_err = __pyx_t_6;
      /*try:*/ {

        /* "cytimes/pddt.py":3910
 *             out: np.ndarray = utils.dt64arr_ceil(arr, unit, my_reso, True)
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "ceil(unit)", None, err)             # <<<<<<<<<<<<<<
 *             return  # unreachable: suppress compiler warning
 *         if arr is out:
*/
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3910, __pyx_L32_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_26.__pyx_n = 4;
        __pyx_t_26.cls = __pyx_t_8;
        __pyx_t_26.input_msg = __pyx_mstate_global->__pyx_kp_u_ceil_unit;
        __pyx_t_26.error_msg = ((PyObject*)Py_None);
        __pyx_t_26.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_26); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3910, __pyx_L32_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "cytimes/pddt.py":3911
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "ceil(unit)", None, err)
 *             return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *         if arr is out:
 *             return self  # exit
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L31_return;
      }

      /* "cytimes/pddt.py":3909
 *         try:
 *             out: np.ndarray = utils.dt64arr_ceil(arr, unit, my_reso, True)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self.__class__, "ceil(unit)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
      /*finally:*/ {
        __pyx_L32_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18);
          if ( unlikely(__Pyx_GetException(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_18);
          __pyx_t_16 = __pyx_lineno; __pyx_t_4 = __pyx_clineno; __pyx_t_27 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_19, __pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_23, __pyx_t_22, __pyx_t_21);
          __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
          __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_4; __pyx_filename = __pyx_t_27;
          goto __pyx_L23_except_error;
        }
        __pyx_L31_return: {
          __pyx_t_18 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          __pyx_r = __pyx_t_18;
          __pyx_t_18 = 0;
          goto __pyx_L24_except_return;
        }
      }
    }
    goto __pyx_L23_except_error;

    /* "cytimes/pddt.py":3907
 *         # Ceil operation
 *         arr: np.ndarray = self.values_naive
 *         try:             # <<<<<<<<<<<<<<
 *             out: np.ndarray = utils.dt64arr_ceil(arr, unit, my_reso, True)
 *         except Exception as err:
*/
    __pyx_L23_except_error:;
    __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_L24_except_return:;
    __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_L0;
    __pyx_L26_try_end:;
  }

  /* "cytimes/pddt.py":3912
 *             errors.raise_argument_error(self.__class__, "ceil(unit)", None, err)
 *             return  # unreachable: suppress compiler warning
 *         if arr is out:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  __pyx_t_24 = (__pyx_v_arr == __pyx_v_out);
  if (__pyx_t_24) {

    /* "cytimes/pddt.py":3913
 *             return  # unreachable: suppress compiler warning
 *         if arr is out:
 *             return self  # exit             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pddt.py":3912
 *             errors.raise_argument_error(self.__class__, "ceil(unit)", None, err)
 *             return  # unreachable: suppress compiler warning
 *         if arr is out:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  }

  /* "cytimes/pddt.py":3916
 * 
 *         # New instance
 *         return self._new(out, tz=self.tz, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *     def floor(self, unit: str) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_15 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_6, ((PyObject *)__pyx_v_out)};
    __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3916, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_7, __pyx_t_11, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3916, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_8, __pyx_t_11, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 3916, __pyx_L1_error)
    __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3916, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":3883
 *         return self._new(out, tz=self.tz, name=self.name)
 * 
 *     def ceil(self, unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Perform ceil operation to the specified datetime unit `<'Pddt'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __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_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.ceil", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":3918
 *         return self._new(out, tz=self.tz, name=self.name)
 * 
 *     def floor(self, unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Perform floor operation to the specified datetime unit `<'Pddt'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_157floor(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_156floor, "Perform floor operation to the specified datetime unit `<'Pddt'>`.\n\n        :param unit `<'str'>`: The datetime unit to floor to, supports:\n            `'D', 'h', 'm', 's', 'ms', 'us', 'ns'`.\n        :returns `<'Pddt'>`: The resulting datetime index.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_157floor = {"floor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_157floor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_156floor};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_157floor(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_unit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("floor (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_unit,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3918, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3918, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3918, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "floor", 0) < (0)) __PYX_ERR(0, 3918, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("floor", 1, 2, 2, i); __PYX_ERR(0, 3918, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3918, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3918, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_unit = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("floor", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3918, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.floor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 3918, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_156floor(__pyx_self, __pyx_v_self, __pyx_v_unit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_156floor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit) {
  int __pyx_v_to_reso;
  PyObject *__pyx_v_err = NULL;
  int __pyx_v_my_reso;
  PyArrayObject *__pyx_v_arr = 0;
  PyArrayObject *__pyx_v_out = 0;
  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;
  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[5];
  PyObject *__pyx_t_14 = NULL;
  size_t __pyx_t_15;
  int __pyx_t_16;
  char const *__pyx_t_17;
  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;
  int __pyx_t_24;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_floor __pyx_t_25;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_26;
  char const *__pyx_t_27;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("floor", 0);

  /* "cytimes/pddt.py":3926
 *         """
 *         # Validate unit
 *         try:             # <<<<<<<<<<<<<<
 *             to_reso: cython.int = utils.nptime_unit_str2int(unit)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "cytimes/pddt.py":3927
 *         # Validate unit
 *         try:
 *             to_reso: cython.int = utils.nptime_unit_str2int(unit)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             raise errors.InvalidArgumentError(
*/
      __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_unit); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 3927, __pyx_L3_error)
      __pyx_v_to_reso = __pyx_t_4;

      /* "cytimes/pddt.py":3926
 *         """
 *         # Validate unit
 *         try:             # <<<<<<<<<<<<<<
 *             to_reso: cython.int = utils.nptime_unit_str2int(unit)
 *         except Exception as err:
*/
    }
    __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_L8_try_end;
    __pyx_L3_error:;

    /* "cytimes/pddt.py":3928
 *         try:
 *             to_reso: cython.int = utils.nptime_unit_str2int(unit)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise errors.InvalidArgumentError(
 *                 "<'%s'> Invalid 'floor(unit)' input.\n"
*/
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.floor", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 3928, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_err = __pyx_t_6;
      /*try:*/ {

        /* "cytimes/pddt.py":3929
 *             to_reso: cython.int = utils.nptime_unit_str2int(unit)
 *         except Exception as err:
 *             raise errors.InvalidArgumentError(             # <<<<<<<<<<<<<<
 *                 "<'%s'> Invalid 'floor(unit)' input.\n"
 *                 "Supports: 'D', 'h', 'm', 's', 'ms', 'us', 'ns'; got %r."
*/
        __pyx_t_9 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3929, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_InvalidArgumentError); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3929, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

        /* "cytimes/pddt.py":3932
 *                 "<'%s'> Invalid 'floor(unit)' input.\n"
 *                 "Supports: 'D', 'h', 'm', 's', 'ms', 'us', 'ns'; got %r."
 *                 % (self.__class__.__name__, unit)             # <<<<<<<<<<<<<<
 *             ) from err
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
*/
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3932, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3932, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_12), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3932, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_unit), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3932, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13[0] = __pyx_mstate_global->__pyx_kp_u__13;
        __pyx_t_13[1] = __pyx_t_10;
        __pyx_t_13[2] = __pyx_mstate_global->__pyx_kp_u_Invalid_floor_unit_input_Suppor;
        __pyx_t_13[3] = __pyx_t_12;
        __pyx_t_13[4] = __pyx_mstate_global->__pyx_kp_u__2;

        /* "cytimes/pddt.py":3930
 *         except Exception as err:
 *             raise errors.InvalidArgumentError(
 *                 "<'%s'> Invalid 'floor(unit)' input.\n"             # <<<<<<<<<<<<<<
 *                 "Supports: 'D', 'h', 'm', 's', 'ms', 'us', 'ns'; got %r."
 *                 % (self.__class__.__name__, unit)
*/
        __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_13, 5, 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 84 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12));
        if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3930, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_15 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_11);
          assert(__pyx_t_9);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
          __pyx_t_15 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_14};
          __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3929, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_8);
        }

        /* "cytimes/pddt.py":3933
 *                 "Supports: 'D', 'h', 'm', 's', 'ms', 'us', 'ns'; got %r."
 *                 % (self.__class__.__name__, unit)
 *             ) from err             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 * 
*/
        __Pyx_Raise(__pyx_t_8, 0, 0, __pyx_v_err);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 3929, __pyx_L14_error)
      }

      /* "cytimes/pddt.py":3928
 *         try:
 *             to_reso: cython.int = utils.nptime_unit_str2int(unit)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise errors.InvalidArgumentError(
 *                 "<'%s'> Invalid 'floor(unit)' input.\n"
*/
      /*finally:*/ {
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
          if ( unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __pyx_t_4 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17;
          goto __pyx_L5_except_error;
        }
      }
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pddt.py":3926
 *         """
 *         # Validate unit
 *         try:             # <<<<<<<<<<<<<<
 *             to_reso: cython.int = utils.nptime_unit_str2int(unit)
 *         except Exception as err:
*/
    __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_L8_try_end:;
  }

  /* "cytimes/pddt.py":3934
 *                 % (self.__class__.__name__, unit)
 *             ) from err
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)             # <<<<<<<<<<<<<<
 * 
 *         # Fast-path: source is coarser or equal to target
*/
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_7))) __PYX_ERR(0, 3934, __pyx_L1_error)
  __pyx_t_16 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(((PyObject*)__pyx_t_7)); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 3934, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_my_reso = __pyx_t_16;

  /* "cytimes/pddt.py":3937
 * 
 *         # Fast-path: source is coarser or equal to target
 *         if my_reso <= to_reso:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  __pyx_t_24 = (__pyx_v_my_reso <= __pyx_v_to_reso);
  if (__pyx_t_24) {

    /* "cytimes/pddt.py":3938
 *         # Fast-path: source is coarser or equal to target
 *         if my_reso <= to_reso:
 *             return self  # exit             # <<<<<<<<<<<<<<
 * 
 *         # Floor operation
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pddt.py":3937
 * 
 *         # Fast-path: source is coarser or equal to target
 *         if my_reso <= to_reso:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  }

  /* "cytimes/pddt.py":3941
 * 
 *         # Floor operation
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         try:
 *             out: np.ndarray = utils.dt64arr_floor(arr, unit, my_reso, True)
*/
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3941, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cytimes/pddt.py":3942
 *         # Floor operation
 *         arr: np.ndarray = self.values_naive
 *         try:             # <<<<<<<<<<<<<<
 *             out: np.ndarray = utils.dt64arr_floor(arr, unit, my_reso, True)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "cytimes/pddt.py":3943
 *         arr: np.ndarray = self.values_naive
 *         try:
 *             out: np.ndarray = utils.dt64arr_floor(arr, unit, my_reso, True)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "floor(unit)", None, err)
*/
      __pyx_t_25.__pyx_n = 2;
      __pyx_t_25.arr_reso = __pyx_v_my_reso;
      __pyx_t_25.copy = 1;
      __pyx_t_7 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_floor(__pyx_v_arr, __pyx_v_unit, &__pyx_t_25)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3943, __pyx_L21_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_v_out = ((PyArrayObject *)__pyx_t_7);
      __pyx_t_7 = 0;

      /* "cytimes/pddt.py":3942
 *         # Floor operation
 *         arr: np.ndarray = self.values_naive
 *         try:             # <<<<<<<<<<<<<<
 *             out: np.ndarray = utils.dt64arr_floor(arr, unit, my_reso, True)
 *         except Exception as err:
*/
    }
    __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_L26_try_end;
    __pyx_L21_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 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;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cytimes/pddt.py":3944
 *         try:
 *             out: np.ndarray = utils.dt64arr_floor(arr, unit, my_reso, True)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self.__class__, "floor(unit)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
    __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_16) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.floor", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 3944, __pyx_L23_except_error)
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_err = __pyx_t_6;
      /*try:*/ {

        /* "cytimes/pddt.py":3945
 *             out: np.ndarray = utils.dt64arr_floor(arr, unit, my_reso, True)
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "floor(unit)", None, err)             # <<<<<<<<<<<<<<
 *             return  # unreachable: suppress compiler warning
 *         if arr is out:
*/
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3945, __pyx_L32_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_26.__pyx_n = 4;
        __pyx_t_26.cls = __pyx_t_8;
        __pyx_t_26.input_msg = __pyx_mstate_global->__pyx_kp_u_floor_unit;
        __pyx_t_26.error_msg = ((PyObject*)Py_None);
        __pyx_t_26.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_26); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3945, __pyx_L32_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "cytimes/pddt.py":3946
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "floor(unit)", None, err)
 *             return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *         if arr is out:
 *             return self  # exit
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L31_return;
      }

      /* "cytimes/pddt.py":3944
 *         try:
 *             out: np.ndarray = utils.dt64arr_floor(arr, unit, my_reso, True)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self.__class__, "floor(unit)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
      /*finally:*/ {
        __pyx_L32_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18);
          if ( unlikely(__Pyx_GetException(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_18);
          __pyx_t_16 = __pyx_lineno; __pyx_t_4 = __pyx_clineno; __pyx_t_27 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_19, __pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_23, __pyx_t_22, __pyx_t_21);
          __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
          __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_4; __pyx_filename = __pyx_t_27;
          goto __pyx_L23_except_error;
        }
        __pyx_L31_return: {
          __pyx_t_18 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          __pyx_r = __pyx_t_18;
          __pyx_t_18 = 0;
          goto __pyx_L24_except_return;
        }
      }
    }
    goto __pyx_L23_except_error;

    /* "cytimes/pddt.py":3942
 *         # Floor operation
 *         arr: np.ndarray = self.values_naive
 *         try:             # <<<<<<<<<<<<<<
 *             out: np.ndarray = utils.dt64arr_floor(arr, unit, my_reso, True)
 *         except Exception as err:
*/
    __pyx_L23_except_error:;
    __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_L24_except_return:;
    __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_L0;
    __pyx_L26_try_end:;
  }

  /* "cytimes/pddt.py":3947
 *             errors.raise_argument_error(self.__class__, "floor(unit)", None, err)
 *             return  # unreachable: suppress compiler warning
 *         if arr is out:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  __pyx_t_24 = (__pyx_v_arr == __pyx_v_out);
  if (__pyx_t_24) {

    /* "cytimes/pddt.py":3948
 *             return  # unreachable: suppress compiler warning
 *         if arr is out:
 *             return self  # exit             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pddt.py":3947
 *             errors.raise_argument_error(self.__class__, "floor(unit)", None, err)
 *             return  # unreachable: suppress compiler warning
 *         if arr is out:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  }

  /* "cytimes/pddt.py":3951
 * 
 *         # New instance
 *         return self._new(out, tz=self.tz, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *     # . fsp (fractional seconds precision)
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_15 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_6, ((PyObject *)__pyx_v_out)};
    __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_7, __pyx_t_11, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3951, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_8, __pyx_t_11, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 3951, __pyx_L1_error)
    __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":3918
 *         return self._new(out, tz=self.tz, name=self.name)
 * 
 *     def floor(self, unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Perform floor operation to the specified datetime unit `<'Pddt'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __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_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.floor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":3954
 * 
 *     # . fsp (fractional seconds precision)
 *     def fsp(self, precision: cython.int) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust to the specified fractional seconds precision `<'Pddt'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_159fsp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_158fsp, "Adjust to the specified fractional seconds precision `<'Pddt'>`.\n\n        :param precision `<'int'>`: The target fractional seconds precision (0-9).\n        :returns `<'Pddt'>`: The datetime index with adjusted fractional seconds precision.\n            If the instance's resolution is coarser than the specified\n            precision, return `as-is`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_159fsp = {"fsp", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_159fsp, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_158fsp};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_159fsp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_precision;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fsp (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_precision,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3954, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3954, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3954, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fsp", 0) < (0)) __PYX_ERR(0, 3954, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fsp", 1, 2, 2, i); __PYX_ERR(0, 3954, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3954, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3954, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_precision = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_precision == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3954, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fsp", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3954, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.fsp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_158fsp(__pyx_self, __pyx_v_self, __pyx_v_precision);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_158fsp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_precision) {
  int __pyx_v_my_reso;
  PY_LONG_LONG __pyx_v_f;
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_8;
  int __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_us __pyx_t_10;
  size_t __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor_mul __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fsp", 0);

  /* "cytimes/pddt.py":3963
 *         """
 *         # Validate
 *         if precision < 0:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  __pyx_t_1 = (__pyx_v_precision < 0);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3965
 *         if precision < 0:
 *             errors.raise_argument_error(
 *                 self.__class__,             # <<<<<<<<<<<<<<
 *                 "fsp(precision)",
 *                 "Fractional seconds precision must be "
*/
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cytimes/pddt.py":3968
 *                 "fsp(precision)",
 *                 "Fractional seconds precision must be "
 *                 "between 0...9, instead got %d." % precision,             # <<<<<<<<<<<<<<
 *             )
 *         # Fast-path
*/
    __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_precision); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3968, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Fractional_seconds_precision_mus, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3968, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cytimes/pddt.py":3964
 *         # Validate
 *         if precision < 0:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self.__class__,
 *                 "fsp(precision)",
*/
    __pyx_t_5.__pyx_n = 3;
    __pyx_t_5.cls = __pyx_t_2;
    __pyx_t_5.input_msg = __pyx_mstate_global->__pyx_kp_u_fsp_precision;
    __pyx_t_5.error_msg = ((PyObject*)__pyx_t_4);
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3964, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytimes/pddt.py":3963
 *         """
 *         # Validate
 *         if precision < 0:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  }

  /* "cytimes/pddt.py":3971
 *             )
 *         # Fast-path
 *         if precision >= 9:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  __pyx_t_1 = (__pyx_v_precision >= 9);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3972
 *         # Fast-path
 *         if precision >= 9:
 *             return self  # exit             # <<<<<<<<<<<<<<
 * 
 *         # Calcualte factor
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pddt.py":3971
 *             )
 *         # Fast-path
 *         if precision >= 9:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  }

  /* "cytimes/pddt.py":3975
 * 
 *         # Calcualte factor
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)             # <<<<<<<<<<<<<<
 *         f: cython.longlong  # fsp factor
 *         # . nanosecond
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_4))) __PYX_ERR(0, 3975, __pyx_L1_error)
  __pyx_t_6 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(((PyObject*)__pyx_t_4)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 3975, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_my_reso = __pyx_t_6;

  /* "cytimes/pddt.py":3978
 *         f: cython.longlong  # fsp factor
 *         # . nanosecond
 *         if my_reso == utils.DT_NPY_UNIT_NS:             # <<<<<<<<<<<<<<
 *             f = int(10 ** (9 - precision))
 *         # . microsecond
*/
  __pyx_t_1 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3979
 *         # . nanosecond
 *         if my_reso == utils.DT_NPY_UNIT_NS:
 *             f = int(10 ** (9 - precision))             # <<<<<<<<<<<<<<
 *         # . microsecond
 *         elif my_reso == utils.DT_NPY_UNIT_US:
*/
    __pyx_v_f = ((PY_LONG_LONG)pow(10.0, ((double)(9 - __pyx_v_precision))));

    /* "cytimes/pddt.py":3978
 *         f: cython.longlong  # fsp factor
 *         # . nanosecond
 *         if my_reso == utils.DT_NPY_UNIT_NS:             # <<<<<<<<<<<<<<
 *             f = int(10 ** (9 - precision))
 *         # . microsecond
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":3981
 *             f = int(10 ** (9 - precision))
 *         # . microsecond
 *         elif my_reso == utils.DT_NPY_UNIT_US:             # <<<<<<<<<<<<<<
 *             if precision >= 6:
 *                 return self  # exit
*/
  __pyx_t_1 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_US);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3982
 *         # . microsecond
 *         elif my_reso == utils.DT_NPY_UNIT_US:
 *             if precision >= 6:             # <<<<<<<<<<<<<<
 *                 return self  # exit
 *             f = int(10 ** (6 - precision))
*/
    __pyx_t_1 = (__pyx_v_precision >= 6);
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":3983
 *         elif my_reso == utils.DT_NPY_UNIT_US:
 *             if precision >= 6:
 *                 return self  # exit             # <<<<<<<<<<<<<<
 *             f = int(10 ** (6 - precision))
 *         # . millisecond
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_self);
      __pyx_r = __pyx_v_self;
      goto __pyx_L0;

      /* "cytimes/pddt.py":3982
 *         # . microsecond
 *         elif my_reso == utils.DT_NPY_UNIT_US:
 *             if precision >= 6:             # <<<<<<<<<<<<<<
 *                 return self  # exit
 *             f = int(10 ** (6 - precision))
*/
    }

    /* "cytimes/pddt.py":3984
 *             if precision >= 6:
 *                 return self  # exit
 *             f = int(10 ** (6 - precision))             # <<<<<<<<<<<<<<
 *         # . millisecond
 *         elif my_reso == utils.DT_NPY_UNIT_MS:
*/
    __pyx_v_f = ((PY_LONG_LONG)pow(10.0, ((double)(6 - __pyx_v_precision))));

    /* "cytimes/pddt.py":3981
 *             f = int(10 ** (9 - precision))
 *         # . microsecond
 *         elif my_reso == utils.DT_NPY_UNIT_US:             # <<<<<<<<<<<<<<
 *             if precision >= 6:
 *                 return self  # exit
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":3986
 *             f = int(10 ** (6 - precision))
 *         # . millisecond
 *         elif my_reso == utils.DT_NPY_UNIT_MS:             # <<<<<<<<<<<<<<
 *             if precision >= 3:
 *                 return self  # exit
*/
  __pyx_t_1 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MS);
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3987
 *         # . millisecond
 *         elif my_reso == utils.DT_NPY_UNIT_MS:
 *             if precision >= 3:             # <<<<<<<<<<<<<<
 *                 return self  # exit
 *             f = int(10 ** (3 - precision))
*/
    __pyx_t_1 = (__pyx_v_precision >= 3);
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":3988
 *         elif my_reso == utils.DT_NPY_UNIT_MS:
 *             if precision >= 3:
 *                 return self  # exit             # <<<<<<<<<<<<<<
 *             f = int(10 ** (3 - precision))
 *         # . second
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_self);
      __pyx_r = __pyx_v_self;
      goto __pyx_L0;

      /* "cytimes/pddt.py":3987
 *         # . millisecond
 *         elif my_reso == utils.DT_NPY_UNIT_MS:
 *             if precision >= 3:             # <<<<<<<<<<<<<<
 *                 return self  # exit
 *             f = int(10 ** (3 - precision))
*/
    }

    /* "cytimes/pddt.py":3989
 *             if precision >= 3:
 *                 return self  # exit
 *             f = int(10 ** (3 - precision))             # <<<<<<<<<<<<<<
 *         # . second
 *         else:
*/
    __pyx_v_f = ((PY_LONG_LONG)pow(10.0, ((double)(3 - __pyx_v_precision))));

    /* "cytimes/pddt.py":3986
 *             f = int(10 ** (6 - precision))
 *         # . millisecond
 *         elif my_reso == utils.DT_NPY_UNIT_MS:             # <<<<<<<<<<<<<<
 *             if precision >= 3:
 *                 return self  # exit
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":3992
 *         # . second
 *         else:
 *             return self  # exit             # <<<<<<<<<<<<<<
 * 
 *         # Adjust precision
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;
  }
  __pyx_L5:;

  /* "cytimes/pddt.py":3995
 * 
 *         # Adjust precision
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *             arr, utils.DT_NPY_UNIT_NS
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3995, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cytimes/pddt.py":3996
 *         # Adjust precision
 *         arr: np.ndarray = self.values_naive
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             arr, utils.DT_NPY_UNIT_NS
 *         ):
*/
  __pyx_t_7 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS);
  if (__pyx_t_7) {
  } else {
    __pyx_t_1 = __pyx_t_7;
    goto __pyx_L9_bool_binop_done;
  }

  /* "cytimes/pddt.py":3997
 *         arr: np.ndarray = self.values_naive
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *             arr, utils.DT_NPY_UNIT_NS             # <<<<<<<<<<<<<<
 *         ):
 *             arr = utils.dt64arr_as_int64_us(arr, my_reso, 0, True)
*/
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS;
  __pyx_t_7 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_8); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 3996, __pyx_L1_error)

  /* "cytimes/pddt.py":3996
 *         # Adjust precision
 *         arr: np.ndarray = self.values_naive
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             arr, utils.DT_NPY_UNIT_NS
 *         ):
*/
  __pyx_t_9 = (!__pyx_t_7);
  __pyx_t_1 = __pyx_t_9;
  __pyx_L9_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":3999
 *             arr, utils.DT_NPY_UNIT_NS
 *         ):
 *             arr = utils.dt64arr_as_int64_us(arr, my_reso, 0, True)             # <<<<<<<<<<<<<<
 *             arr = arr.astype(utils.DT64_DTYPE_US)
 *             if precision < 6:
*/
    __pyx_t_10.__pyx_n = 3;
    __pyx_t_10.arr_reso = __pyx_v_my_reso;
    __pyx_t_10.offset = 0;
    __pyx_t_10.copy = 1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_us(__pyx_v_arr, &__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3999, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":4000
 *         ):
 *             arr = utils.dt64arr_as_int64_us(arr, my_reso, 0, True)
 *             arr = arr.astype(utils.DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             if precision < 6:
 *                 f //= 1_000
*/
    __pyx_t_2 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_11 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4000, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4000, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/pddt.py":4001
 *             arr = utils.dt64arr_as_int64_us(arr, my_reso, 0, True)
 *             arr = arr.astype(utils.DT64_DTYPE_US)
 *             if precision < 6:             # <<<<<<<<<<<<<<
 *                 f //= 1_000
 *                 arr = utils.arr_div_floor_mul(arr, f, f, 0, False)
*/
    __pyx_t_1 = (__pyx_v_precision < 6);
    if (__pyx_t_1) {

      /* "cytimes/pddt.py":4002
 *             arr = arr.astype(utils.DT64_DTYPE_US)
 *             if precision < 6:
 *                 f //= 1_000             # <<<<<<<<<<<<<<
 *                 arr = utils.arr_div_floor_mul(arr, f, f, 0, False)
 *         else:
*/
      __pyx_v_f = __Pyx_div_PY_LONG_LONG(__pyx_v_f, 0x3E8, 1);

      /* "cytimes/pddt.py":4003
 *             if precision < 6:
 *                 f //= 1_000
 *                 arr = utils.arr_div_floor_mul(arr, f, f, 0, False)             # <<<<<<<<<<<<<<
 *         else:
 *             arr = utils.arr_div_floor_mul(arr, f, f, 0, True)
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_f, __pyx_v_f, &__pyx_t_12)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4003, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "cytimes/pddt.py":4001
 *             arr = utils.dt64arr_as_int64_us(arr, my_reso, 0, True)
 *             arr = arr.astype(utils.DT64_DTYPE_US)
 *             if precision < 6:             # <<<<<<<<<<<<<<
 *                 f //= 1_000
 *                 arr = utils.arr_div_floor_mul(arr, f, f, 0, False)
*/
    }

    /* "cytimes/pddt.py":3996
 *         # Adjust precision
 *         arr: np.ndarray = self.values_naive
 *         if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *             arr, utils.DT_NPY_UNIT_NS
 *         ):
*/
    goto __pyx_L8;
  }

  /* "cytimes/pddt.py":4005
 *                 arr = utils.arr_div_floor_mul(arr, f, f, 0, False)
 *         else:
 *             arr = utils.arr_div_floor_mul(arr, f, f, 0, True)             # <<<<<<<<<<<<<<
 *         #: 'arr' is dt64 dtype
 * 
*/
  /*else*/ {
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.offset = 0;
    __pyx_t_12.copy = 1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_f, __pyx_v_f, &__pyx_t_12)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4005, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;
  }
  __pyx_L8:;

  /* "cytimes/pddt.py":4009
 * 
 *         # New instance
 *         return self._new(arr, tz=self.tz, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *     # Calendar -----------------------------------------------------------------------------
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tz); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_11 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, ((PyObject *)__pyx_v_arr)};
    __pyx_t_14 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_3, __pyx_t_14, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4009, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_13, __pyx_t_14, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 4009, __pyx_L1_error)
    __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_14);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":3954
 * 
 *     # . fsp (fractional seconds precision)
 *     def fsp(self, precision: cython.int) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust to the specified fractional seconds precision `<'Pddt'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.fsp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4013
 *     # Calendar -----------------------------------------------------------------------------
 *     # . iso
 *     def isocalendar(self) -> pd.DataFrame:             # <<<<<<<<<<<<<<
 *         """Return the ISO calendar `<'DateFrame'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_161isocalendar(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_160isocalendar, "Return the ISO calendar `<'DateFrame'>`.\n\n        ## Example:\n        >>> pt.isocalendar()\n        ```\n        _                              year  week  weekday\n        1677-09-21 00:12:43.145224193  1677    38        2\n        2262-04-11 23:47:16.854775807  2262    15        5\n        ```\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_161isocalendar = {"isocalendar", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_161isocalendar, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_160isocalendar};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_161isocalendar(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isocalendar (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4013, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4013, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "isocalendar", 0) < (0)) __PYX_ERR(0, 4013, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("isocalendar", 1, 1, 1, i); __PYX_ERR(0, 4013, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4013, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("isocalendar", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4013, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.isocalendar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_160isocalendar(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_160isocalendar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyArrayObject *__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;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isocalendar", 0);

  /* "cytimes/pddt.py":4024
 *         ```
 *         """
 *         arr = utils.dt64arr_isocalendar(self.values_naive)             # <<<<<<<<<<<<<<
 *         return pd.DataFrame(arr, columns=["year", "week", "weekday"], index=self)
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4024, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4024, __pyx_L1_error)
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_isocalendar(((PyArrayObject *)__pyx_t_1), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4024, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":4025
 *         """
 *         arr = utils.dt64arr_isocalendar(self.values_naive)
 *         return pd.DataFrame(arr, columns=["year", "week", "weekday"], index=self)             # <<<<<<<<<<<<<<
 * 
 *     def isoyear(self) -> pd.Index[np.int64]:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DataFrame); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_year);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_year);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_mstate_global->__pyx_n_u_year) != (0)) __PYX_ERR(0, 4025, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_week);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_week);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_n_u_week) != (0)) __PYX_ERR(0, 4025, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_weekday);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_weekday);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_mstate_global->__pyx_n_u_weekday) != (0)) __PYX_ERR(0, 4025, __pyx_L1_error);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_1);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_1, ((PyObject *)__pyx_v_arr)};
    __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4025, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_columns, __pyx_t_3, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4025, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_index, __pyx_v_self, __pyx_t_6, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 4025, __pyx_L1_error)
    __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4025, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4013
 *     # Calendar -----------------------------------------------------------------------------
 *     # . iso
 *     def isocalendar(self) -> pd.DataFrame:             # <<<<<<<<<<<<<<
 *         """Return the ISO calendar `<'DateFrame'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.isocalendar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4027
 *         return pd.DataFrame(arr, columns=["year", "week", "weekday"], index=self)
 * 
 *     def isoyear(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the ISO calendar years `<'Index[int64]'>`."""
 *         arr = utils.dt64arr_isoyear(self.values_naive)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_163isoyear(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_162isoyear, "Return the ISO calendar years `<'Index[int64]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_163isoyear = {"isoyear", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_163isoyear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_162isoyear};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_163isoyear(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isoyear (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4027, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4027, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "isoyear", 0) < (0)) __PYX_ERR(0, 4027, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("isoyear", 1, 1, 1, i); __PYX_ERR(0, 4027, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4027, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("isoyear", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4027, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.isoyear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_162isoyear(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_162isoyear(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyArrayObject *__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;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isoyear", 0);

  /* "cytimes/pddt.py":4029
 *     def isoyear(self) -> pd.Index[np.int64]:
 *         """Return the ISO calendar years `<'Index[int64]'>`."""
 *         arr = utils.dt64arr_isoyear(self.values_naive)             # <<<<<<<<<<<<<<
 *         return pd.Index(arr, name="isoyear")
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4029, __pyx_L1_error)
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_isoyear(((PyArrayObject *)__pyx_t_1), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":4030
 *         """Return the ISO calendar years `<'Index[int64]'>`."""
 *         arr = utils.dt64arr_isoyear(self.values_naive)
 *         return pd.Index(arr, name="isoyear")             # <<<<<<<<<<<<<<
 * 
 *     def isoweek(self) -> pd.Index[np.int64]:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_1);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, ((PyObject *)__pyx_v_arr)};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4030, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_isoyear, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4030, __pyx_L1_error)
    __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4030, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4027
 *         return pd.DataFrame(arr, columns=["year", "week", "weekday"], index=self)
 * 
 *     def isoyear(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the ISO calendar years `<'Index[int64]'>`."""
 *         arr = utils.dt64arr_isoyear(self.values_naive)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.isoyear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4032
 *         return pd.Index(arr, name="isoyear")
 * 
 *     def isoweek(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the ISO calendar week numbers (1-53) `<'Index[int64]'>`."""
 *         arr = utils.dt64arr_isoweek(self.values_naive)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_165isoweek(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_164isoweek, "Return the ISO calendar week numbers (1-53) `<'Index[int64]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_165isoweek = {"isoweek", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_165isoweek, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_164isoweek};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_165isoweek(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isoweek (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4032, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4032, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "isoweek", 0) < (0)) __PYX_ERR(0, 4032, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("isoweek", 1, 1, 1, i); __PYX_ERR(0, 4032, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4032, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("isoweek", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4032, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.isoweek", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_164isoweek(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_164isoweek(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyArrayObject *__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;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isoweek", 0);

  /* "cytimes/pddt.py":4034
 *     def isoweek(self) -> pd.Index[np.int64]:
 *         """Return the ISO calendar week numbers (1-53) `<'Index[int64]'>`."""
 *         arr = utils.dt64arr_isoweek(self.values_naive)             # <<<<<<<<<<<<<<
 *         return pd.Index(arr, name="isoweek")
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4034, __pyx_L1_error)
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_isoweek(((PyArrayObject *)__pyx_t_1), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":4035
 *         """Return the ISO calendar week numbers (1-53) `<'Index[int64]'>`."""
 *         arr = utils.dt64arr_isoweek(self.values_naive)
 *         return pd.Index(arr, name="isoweek")             # <<<<<<<<<<<<<<
 * 
 *     def isoweekday(self) -> pd.Index[np.int64]:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_1);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, ((PyObject *)__pyx_v_arr)};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_isoweek, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4035, __pyx_L1_error)
    __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4032
 *         return pd.Index(arr, name="isoyear")
 * 
 *     def isoweek(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the ISO calendar week numbers (1-53) `<'Index[int64]'>`."""
 *         arr = utils.dt64arr_isoweek(self.values_naive)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.isoweek", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4037
 *         return pd.Index(arr, name="isoweek")
 * 
 *     def isoweekday(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the ISO calendar weekdays (1=Mon...7=Sun) `<'Index[int64]'>`."""
 *         arr = utils.dt64arr_isoweekday(self.values_naive)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_167isoweekday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_166isoweekday, "Return the ISO calendar weekdays (1=Mon...7=Sun) `<'Index[int64]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_167isoweekday = {"isoweekday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_167isoweekday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_166isoweekday};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_167isoweekday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isoweekday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4037, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4037, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "isoweekday", 0) < (0)) __PYX_ERR(0, 4037, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("isoweekday", 1, 1, 1, i); __PYX_ERR(0, 4037, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4037, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("isoweekday", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4037, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.isoweekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_166isoweekday(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_166isoweekday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyArrayObject *__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;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isoweekday", 0);

  /* "cytimes/pddt.py":4039
 *     def isoweekday(self) -> pd.Index[np.int64]:
 *         """Return the ISO calendar weekdays (1=Mon...7=Sun) `<'Index[int64]'>`."""
 *         arr = utils.dt64arr_isoweekday(self.values_naive)             # <<<<<<<<<<<<<<
 *         return pd.Index(arr, name="isoweekday")
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4039, __pyx_L1_error)
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_isoweekday(((PyArrayObject *)__pyx_t_1), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":4040
 *         """Return the ISO calendar weekdays (1=Mon...7=Sun) `<'Index[int64]'>`."""
 *         arr = utils.dt64arr_isoweekday(self.values_naive)
 *         return pd.Index(arr, name="isoweekday")             # <<<<<<<<<<<<<<
 * 
 *     # . year
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_1);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, ((PyObject *)__pyx_v_arr)};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4040, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_isoweekday, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4040, __pyx_L1_error)
    __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4040, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4037
 *         return pd.Index(arr, name="isoweek")
 * 
 *     def isoweekday(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the ISO calendar weekdays (1=Mon...7=Sun) `<'Index[int64]'>`."""
 *         arr = utils.dt64arr_isoweekday(self.values_naive)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.isoweekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4043
 * 
 *     # . year
 *     @property             # <<<<<<<<<<<<<<
 *     def year(self) -> pd.Index[np.int64]:
 *         """The years `<'Index[int64]'>`."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_169year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_168year, "The years `<'Index[int64]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_169year = {"year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_169year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_168year};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_169year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4043, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4043, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "year", 0) < (0)) __PYX_ERR(0, 4043, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("year", 1, 1, 1, i); __PYX_ERR(0, 4043, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4043, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("year", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4043, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_168year(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_168year(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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("year", 0);

  /* "cytimes/pddt.py":4046
 *     def year(self) -> pd.Index[np.int64]:
 *         """The years `<'Index[int64]'>`."""
 *         return pd.Index(utils.dt64arr_year(self.values_naive), name="year")             # <<<<<<<<<<<<<<
 * 
 *     def is_year(self, year: cython.int) -> pd.Index[bool]:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4046, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_year(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_year, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4046, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4043
 * 
 *     # . year
 *     @property             # <<<<<<<<<<<<<<
 *     def year(self) -> pd.Index[np.int64]:
 *         """The years `<'Index[int64]'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4048
 *         return pd.Index(utils.dt64arr_year(self.values_naive), name="year")
 * 
 *     def is_year(self, year: cython.int) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether is the exact `year` `<'Index[bool]'>."""
 *         return pd.Index(
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_171is_year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_170is_year, "Element-wise check whether is the exact `year` `<'Index[bool]'>.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_171is_year = {"is_year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_171is_year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_170is_year};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_171is_year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_year;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_year,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4048, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4048, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4048, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_year", 0) < (0)) __PYX_ERR(0, 4048, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_year", 1, 2, 2, i); __PYX_ERR(0, 4048, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4048, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4048, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_year = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_year == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4048, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_year", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4048, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_170is_year(__pyx_self, __pyx_v_self, __pyx_v_year);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_170is_year(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_year) {
  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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_year", 0);

  /* "cytimes/pddt.py":4050
 *     def is_year(self, year: cython.int) -> pd.Index[bool]:
 *         """Element-wise check whether is the exact `year` `<'Index[bool]'>."""
 *         return pd.Index(             # <<<<<<<<<<<<<<
 *             utils.arr_eq(utils.dt64arr_year(self.values_naive), year), name="is_year"
 *         )
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cytimes/pddt.py":4051
 *         """Element-wise check whether is the exact `year` `<'Index[bool]'>."""
 *         return pd.Index(
 *             utils.arr_eq(utils.dt64arr_year(self.values_naive), year), name="is_year"             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4051, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_year(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_eq(((PyArrayObject *)__pyx_t_5), __pyx_v_year)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_is_year, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4050, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4048
 *         return pd.Index(utils.dt64arr_year(self.values_naive), name="year")
 * 
 *     def is_year(self, year: cython.int) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether is the exact `year` `<'Index[bool]'>."""
 *         return pd.Index(
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4054
 *         )
 * 
 *     def is_leap_year(self) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether is in leap year `<'Index[bool]'>."""
 *         return pd.Index(
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_173is_leap_year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_172is_leap_year, "Element-wise check whether is in leap year `<'Index[bool]'>.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_173is_leap_year = {"is_leap_year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_173is_leap_year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_172is_leap_year};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_173is_leap_year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_leap_year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4054, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4054, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_leap_year", 0) < (0)) __PYX_ERR(0, 4054, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_leap_year", 1, 1, 1, i); __PYX_ERR(0, 4054, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4054, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_leap_year", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4054, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_leap_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_172is_leap_year(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_172is_leap_year(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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_leap_year", 0);

  /* "cytimes/pddt.py":4056
 *     def is_leap_year(self) -> pd.Index[bool]:
 *         """Element-wise check whether is in leap year `<'Index[bool]'>."""
 *         return pd.Index(             # <<<<<<<<<<<<<<
 *             utils.dt64arr_is_leap_year(self.values_naive), name="is_leap_year"
 *         )
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cytimes/pddt.py":4057
 *         """Element-wise check whether is in leap year `<'Index[bool]'>."""
 *         return pd.Index(
 *             utils.dt64arr_is_leap_year(self.values_naive), name="is_leap_year"             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4057, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_is_leap_year(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_is_leap_year, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4056, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4054
 *         )
 * 
 *     def is_leap_year(self) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether is in leap year `<'Index[bool]'>."""
 *         return pd.Index(
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_leap_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4060
 *         )
 * 
 *     def is_long_year(self) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether is in long year `<'Index[bool]'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_175is_long_year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_174is_long_year, "Element-wise check whether is in long year `<'Index[bool]'>`.\n\n        - Long year: maximum ISO week number is 53.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_175is_long_year = {"is_long_year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_175is_long_year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_174is_long_year};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_175is_long_year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_long_year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4060, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4060, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_long_year", 0) < (0)) __PYX_ERR(0, 4060, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_long_year", 1, 1, 1, i); __PYX_ERR(0, 4060, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4060, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_long_year", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4060, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_long_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_174is_long_year(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_174is_long_year(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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_long_year", 0);

  /* "cytimes/pddt.py":4065
 *         - Long year: maximum ISO week number is 53.
 *         """
 *         return pd.Index(             # <<<<<<<<<<<<<<
 *             utils.dt64arr_is_long_year(self.values_naive), name="is_long_year"
 *         )
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cytimes/pddt.py":4066
 *         """
 *         return pd.Index(
 *             utils.dt64arr_is_long_year(self.values_naive), name="is_long_year"             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4066, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_is_long_year(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_is_long_year, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4065, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4060
 *         )
 * 
 *     def is_long_year(self) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether is in long year `<'Index[bool]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_long_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4069
 *         )
 * 
 *     def leap_bt_year(self, year: cython.int) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Compute the total number of leap years between `year` and each element `<'Index[int64]'>`."""
 *         return pd.Index(
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_177leap_bt_year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_176leap_bt_year, "Compute the total number of leap years between `year` and each element `<'Index[int64]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_177leap_bt_year = {"leap_bt_year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_177leap_bt_year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_176leap_bt_year};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_177leap_bt_year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_year;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("leap_bt_year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_year,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4069, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4069, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4069, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "leap_bt_year", 0) < (0)) __PYX_ERR(0, 4069, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("leap_bt_year", 1, 2, 2, i); __PYX_ERR(0, 4069, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4069, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4069, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_year = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_year == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4069, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("leap_bt_year", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4069, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.leap_bt_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_176leap_bt_year(__pyx_self, __pyx_v_self, __pyx_v_year);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_176leap_bt_year(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_year) {
  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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("leap_bt_year", 0);

  /* "cytimes/pddt.py":4071
 *     def leap_bt_year(self, year: cython.int) -> pd.Index[np.int64]:
 *         """Compute the total number of leap years between `year` and each element `<'Index[int64]'>`."""
 *         return pd.Index(             # <<<<<<<<<<<<<<
 *             utils.dt64arr_leap_bt_years(self.values_naive, year),
 *             name="leap_bt_year",
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cytimes/pddt.py":4072
 *         """Compute the total number of leap years between `year` and each element `<'Index[int64]'>`."""
 *         return pd.Index(
 *             utils.dt64arr_leap_bt_years(self.values_naive, year),             # <<<<<<<<<<<<<<
 *             name="leap_bt_year",
 *         )
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4072, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_leap_bt_years(((PyArrayObject *)__pyx_t_3), __pyx_v_year, NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_leap_bt_year, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4071, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4069
 *         )
 * 
 *     def leap_bt_year(self, year: cython.int) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Compute the total number of leap years between `year` and each element `<'Index[int64]'>`."""
 *         return pd.Index(
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.leap_bt_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4076
 *         )
 * 
 *     def days_in_year(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the maximum number of days (365, 366) in the year `<'Index[int64]'>`."""
 *         return pd.Index(
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_179days_in_year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_178days_in_year, "Return the maximum number of days (365, 366) in the year `<'Index[int64]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_179days_in_year = {"days_in_year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_179days_in_year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_178days_in_year};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_179days_in_year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("days_in_year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4076, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4076, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "days_in_year", 0) < (0)) __PYX_ERR(0, 4076, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("days_in_year", 1, 1, 1, i); __PYX_ERR(0, 4076, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4076, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("days_in_year", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4076, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.days_in_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_178days_in_year(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_178days_in_year(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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("days_in_year", 0);

  /* "cytimes/pddt.py":4078
 *     def days_in_year(self) -> pd.Index[np.int64]:
 *         """Return the maximum number of days (365, 366) in the year `<'Index[int64]'>`."""
 *         return pd.Index(             # <<<<<<<<<<<<<<
 *             utils.dt64arr_days_in_year(self.values_naive), name="days_in_year"
 *         )
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cytimes/pddt.py":4079
 *         """Return the maximum number of days (365, 366) in the year `<'Index[int64]'>`."""
 *         return pd.Index(
 *             utils.dt64arr_days_in_year(self.values_naive), name="days_in_year"             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4079, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_year(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4078, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_days_in_year, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4078, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4078, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4076
 *         )
 * 
 *     def days_in_year(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the maximum number of days (365, 366) in the year `<'Index[int64]'>`."""
 *         return pd.Index(
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.days_in_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4082
 *         )
 * 
 *     def days_bf_year(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the number of days strictly before January 1 of year `<'Index[int64]'>`."""
 *         return pd.Index(
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_181days_bf_year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_180days_bf_year, "Return the number of days strictly before January 1 of year `<'Index[int64]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_181days_bf_year = {"days_bf_year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_181days_bf_year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_180days_bf_year};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_181days_bf_year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("days_bf_year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4082, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4082, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "days_bf_year", 0) < (0)) __PYX_ERR(0, 4082, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("days_bf_year", 1, 1, 1, i); __PYX_ERR(0, 4082, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4082, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("days_bf_year", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4082, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.days_bf_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_180days_bf_year(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_180days_bf_year(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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("days_bf_year", 0);

  /* "cytimes/pddt.py":4084
 *     def days_bf_year(self) -> pd.Index[np.int64]:
 *         """Return the number of days strictly before January 1 of year `<'Index[int64]'>`."""
 *         return pd.Index(             # <<<<<<<<<<<<<<
 *             utils.dt64arr_days_bf_year(self.values_naive), name="days_bf_year"
 *         )
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cytimes/pddt.py":4085
 *         """Return the number of days strictly before January 1 of year `<'Index[int64]'>`."""
 *         return pd.Index(
 *             utils.dt64arr_days_bf_year(self.values_naive), name="days_bf_year"             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4085, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_bf_year(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4084, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_days_bf_year, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4084, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4084, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4082
 *         )
 * 
 *     def days_bf_year(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the number of days strictly before January 1 of year `<'Index[int64]'>`."""
 *         return pd.Index(
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.days_bf_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4088
 *         )
 * 
 *     def day_of_year(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the number of days since the 1st day of the year `<'Index[int64]'>`."""
 *         return pd.Index(
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_183day_of_year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_182day_of_year, "Return the number of days since the 1st day of the year `<'Index[int64]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_183day_of_year = {"day_of_year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_183day_of_year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_182day_of_year};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_183day_of_year(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("day_of_year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4088, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4088, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "day_of_year", 0) < (0)) __PYX_ERR(0, 4088, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("day_of_year", 1, 1, 1, i); __PYX_ERR(0, 4088, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4088, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("day_of_year", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4088, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.day_of_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_182day_of_year(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_182day_of_year(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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("day_of_year", 0);

  /* "cytimes/pddt.py":4090
 *     def day_of_year(self) -> pd.Index[np.int64]:
 *         """Return the number of days since the 1st day of the year `<'Index[int64]'>`."""
 *         return pd.Index(             # <<<<<<<<<<<<<<
 *             utils.dt64arr_day_of_year(self.values_naive), name="day_of_year"
 *         )
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cytimes/pddt.py":4091
 *         """Return the number of days since the 1st day of the year `<'Index[int64]'>`."""
 *         return pd.Index(
 *             utils.dt64arr_day_of_year(self.values_naive), name="day_of_year"             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4091, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_day_of_year(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4090, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_day_of_year, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4090, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4090, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4088
 *         )
 * 
 *     def day_of_year(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the number of days since the 1st day of the year `<'Index[int64]'>`."""
 *         return pd.Index(
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.day_of_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4095
 * 
 *     # . quarter
 *     @property             # <<<<<<<<<<<<<<
 *     def quarter(self) -> pd.Index[np.int64]:
 *         """The quarters (1-4) `<'Index[int64]'>`."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_185quarter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_184quarter, "The quarters (1-4) `<'Index[int64]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_185quarter = {"quarter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_185quarter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_184quarter};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_185quarter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("quarter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4095, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4095, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "quarter", 0) < (0)) __PYX_ERR(0, 4095, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("quarter", 1, 1, 1, i); __PYX_ERR(0, 4095, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4095, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("quarter", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4095, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_184quarter(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_184quarter(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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("quarter", 0);

  /* "cytimes/pddt.py":4098
 *     def quarter(self) -> pd.Index[np.int64]:
 *         """The quarters (1-4) `<'Index[int64]'>`."""
 *         return pd.Index(utils.dt64arr_quarter(self.values_naive), name="quarter")             # <<<<<<<<<<<<<<
 * 
 *     def is_quarter(self, quarter: cython.int) -> pd.Index[bool]:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4098, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_quarter(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4098, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_quarter, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4098, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4098, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4095
 * 
 *     # . quarter
 *     @property             # <<<<<<<<<<<<<<
 *     def quarter(self) -> pd.Index[np.int64]:
 *         """The quarters (1-4) `<'Index[int64]'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4100
 *         return pd.Index(utils.dt64arr_quarter(self.values_naive), name="quarter")
 * 
 *     def is_quarter(self, quarter: cython.int) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether is the exact `quarter` `<'Index[bool]'>`."""
 *         return pd.Index(
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_187is_quarter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_186is_quarter, "Element-wise check whether is the exact `quarter` `<'Index[bool]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_187is_quarter = {"is_quarter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_187is_quarter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_186is_quarter};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_187is_quarter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_quarter;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_quarter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_quarter,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4100, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4100, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4100, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_quarter", 0) < (0)) __PYX_ERR(0, 4100, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_quarter", 1, 2, 2, i); __PYX_ERR(0, 4100, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4100, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4100, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_quarter = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_quarter == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4100, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_quarter", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4100, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_186is_quarter(__pyx_self, __pyx_v_self, __pyx_v_quarter);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_186is_quarter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_quarter) {
  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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_quarter", 0);

  /* "cytimes/pddt.py":4102
 *     def is_quarter(self, quarter: cython.int) -> pd.Index[bool]:
 *         """Element-wise check whether is the exact `quarter` `<'Index[bool]'>`."""
 *         return pd.Index(             # <<<<<<<<<<<<<<
 *             utils.arr_eq(utils.dt64arr_quarter(self.values_naive), quarter),
 *             name="is_quarter",
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cytimes/pddt.py":4103
 *         """Element-wise check whether is the exact `quarter` `<'Index[bool]'>`."""
 *         return pd.Index(
 *             utils.arr_eq(utils.dt64arr_quarter(self.values_naive), quarter),             # <<<<<<<<<<<<<<
 *             name="is_quarter",
 *         )
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4103, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_quarter(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_eq(((PyArrayObject *)__pyx_t_5), __pyx_v_quarter)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_is_quarter, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4102, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4100
 *         return pd.Index(utils.dt64arr_quarter(self.values_naive), name="quarter")
 * 
 *     def is_quarter(self, quarter: cython.int) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether is the exact `quarter` `<'Index[bool]'>`."""
 *         return pd.Index(
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4107
 *         )
 * 
 *     def days_in_quarter(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the maximum number of days (90-92) in the quarter `<'Index[int64]'>`."""
 *         return pd.Index(
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_189days_in_quarter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_188days_in_quarter, "Return the maximum number of days (90-92) in the quarter `<'Index[int64]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_189days_in_quarter = {"days_in_quarter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_189days_in_quarter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_188days_in_quarter};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_189days_in_quarter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("days_in_quarter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4107, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4107, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "days_in_quarter", 0) < (0)) __PYX_ERR(0, 4107, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("days_in_quarter", 1, 1, 1, i); __PYX_ERR(0, 4107, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4107, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("days_in_quarter", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4107, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.days_in_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_188days_in_quarter(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_188days_in_quarter(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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("days_in_quarter", 0);

  /* "cytimes/pddt.py":4109
 *     def days_in_quarter(self) -> pd.Index[np.int64]:
 *         """Return the maximum number of days (90-92) in the quarter `<'Index[int64]'>`."""
 *         return pd.Index(             # <<<<<<<<<<<<<<
 *             utils.dt64arr_days_in_quarter(self.values_naive), name="days_in_quarter"
 *         )
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cytimes/pddt.py":4110
 *         """Return the maximum number of days (90-92) in the quarter `<'Index[int64]'>`."""
 *         return pd.Index(
 *             utils.dt64arr_days_in_quarter(self.values_naive), name="days_in_quarter"             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4110, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_quarter(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_days_in_quarter, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4109, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4107
 *         )
 * 
 *     def days_in_quarter(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the maximum number of days (90-92) in the quarter `<'Index[int64]'>`."""
 *         return pd.Index(
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.days_in_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4113
 *         )
 * 
 *     def days_bf_quarter(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the number of days strictly before the first day
 *         of the calendar quarter `<'Index[int64]'>`.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_191days_bf_quarter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_190days_bf_quarter, "Return the number of days strictly before the first day\n        of the calendar quarter `<'Index[int64]'>`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_191days_bf_quarter = {"days_bf_quarter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_191days_bf_quarter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_190days_bf_quarter};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_191days_bf_quarter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("days_bf_quarter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4113, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4113, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "days_bf_quarter", 0) < (0)) __PYX_ERR(0, 4113, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("days_bf_quarter", 1, 1, 1, i); __PYX_ERR(0, 4113, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4113, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("days_bf_quarter", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4113, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.days_bf_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_190days_bf_quarter(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_190days_bf_quarter(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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("days_bf_quarter", 0);

  /* "cytimes/pddt.py":4117
 *         of the calendar quarter `<'Index[int64]'>`.
 *         """
 *         return pd.Index(             # <<<<<<<<<<<<<<
 *             utils.dt64arr_days_bf_quarter(self.values_naive), name="days_bf_quarter"
 *         )
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cytimes/pddt.py":4118
 *         """
 *         return pd.Index(
 *             utils.dt64arr_days_bf_quarter(self.values_naive), name="days_bf_quarter"             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4118, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_bf_quarter(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_days_bf_quarter, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4117, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4113
 *         )
 * 
 *     def days_bf_quarter(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the number of days strictly before the first day
 *         of the calendar quarter `<'Index[int64]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.days_bf_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4121
 *         )
 * 
 *     def day_of_quarter(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the number of days since the 1st day of the quarter `<'Index[int64]'>`."""
 *         return pd.Index(
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_193day_of_quarter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_192day_of_quarter, "Return the number of days since the 1st day of the quarter `<'Index[int64]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_193day_of_quarter = {"day_of_quarter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_193day_of_quarter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_192day_of_quarter};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_193day_of_quarter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("day_of_quarter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4121, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4121, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "day_of_quarter", 0) < (0)) __PYX_ERR(0, 4121, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("day_of_quarter", 1, 1, 1, i); __PYX_ERR(0, 4121, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4121, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("day_of_quarter", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4121, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.day_of_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_192day_of_quarter(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_192day_of_quarter(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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("day_of_quarter", 0);

  /* "cytimes/pddt.py":4123
 *     def day_of_quarter(self) -> pd.Index[np.int64]:
 *         """Return the number of days since the 1st day of the quarter `<'Index[int64]'>`."""
 *         return pd.Index(             # <<<<<<<<<<<<<<
 *             utils.dt64arr_day_of_quarter(self.values_naive), name="day_of_quarter"
 *         )
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cytimes/pddt.py":4124
 *         """Return the number of days since the 1st day of the quarter `<'Index[int64]'>`."""
 *         return pd.Index(
 *             utils.dt64arr_day_of_quarter(self.values_naive), name="day_of_quarter"             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4124, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_day_of_quarter(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_day_of_quarter, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4123, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4121
 *         )
 * 
 *     def day_of_quarter(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the number of days since the 1st day of the quarter `<'Index[int64]'>`."""
 *         return pd.Index(
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.day_of_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4128
 * 
 *     # . month
 *     @property             # <<<<<<<<<<<<<<
 *     def month(self) -> pd.Index[np.int64]:
 *         """The months (1-12) `<'Index[int64]'>`."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_195month(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_194month, "The months (1-12) `<'Index[int64]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_195month = {"month", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_195month, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_194month};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_195month(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("month (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4128, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4128, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "month", 0) < (0)) __PYX_ERR(0, 4128, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("month", 1, 1, 1, i); __PYX_ERR(0, 4128, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4128, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("month", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4128, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_194month(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_194month(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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("month", 0);

  /* "cytimes/pddt.py":4131
 *     def month(self) -> pd.Index[np.int64]:
 *         """The months (1-12) `<'Index[int64]'>`."""
 *         return pd.Index(utils.dt64arr_month(self.values_naive), name="month")             # <<<<<<<<<<<<<<
 * 
 *     def is_month(self, month: str | int) -> pd.Index[bool]:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4131, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_month(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_month, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4131, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4128
 * 
 *     # . month
 *     @property             # <<<<<<<<<<<<<<
 *     def month(self) -> pd.Index[np.int64]:
 *         """The months (1-12) `<'Index[int64]'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4133
 *         return pd.Index(utils.dt64arr_month(self.values_naive), name="month")
 * 
 *     def is_month(self, month: str | int) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether is the exact `month` `<'Index[bool]'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_197is_month(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_196is_month, "Element-wise check whether is the exact `month` `<'Index[bool]'>`.\n\n        :param month `<'int/str'>`: Month value.\n\n            - `<'int'>`  Month number (1=Jan...12=Dec).\n            - `<'str'>`  Month name in lowercase, uppercase or titlecase (e.g., 'Jan', 'februar', '\344\270\211\346\234\210').\n\n        :return `<'Index[bool]'>`: True if `month` is recognized and matched\n            with index instances' month; Otherwise False.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_197is_month = {"is_month", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_197is_month, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_196is_month};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_197is_month(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_month = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_month (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_month,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4133, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4133, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4133, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_month", 0) < (0)) __PYX_ERR(0, 4133, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_month", 1, 2, 2, i); __PYX_ERR(0, 4133, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4133, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4133, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_month = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_month", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4133, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_196is_month(__pyx_self, __pyx_v_self, __pyx_v_month);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_196is_month(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_month) {
  int __pyx_v_mm;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_7cytimes_6parser_parse_month __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;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_month", 0);

  /* "cytimes/pddt.py":4144
 *             with index instances' month; Otherwise False.
 *         """
 *         mm: cython.int = _parse_month(month, None, True)             # <<<<<<<<<<<<<<
 *         return pd.Index(
 *             utils.arr_eq(utils.dt64arr_month(self.values_naive), mm), name="is_month"
*/
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_2.raise_error = 1;
  __pyx_t_1 = __pyx_f_7cytimes_6parser_parse_month(__pyx_v_month, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-2))) __PYX_ERR(0, 4144, __pyx_L1_error)
  __pyx_v_mm = __pyx_t_1;

  /* "cytimes/pddt.py":4145
 *         """
 *         mm: cython.int = _parse_month(month, None, True)
 *         return pd.Index(             # <<<<<<<<<<<<<<
 *             utils.arr_eq(utils.dt64arr_month(self.values_naive), mm), name="is_month"
 *         )
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pddt.py":4146
 *         mm: cython.int = _parse_month(month, None, True)
 *         return pd.Index(
 *             utils.arr_eq(utils.dt64arr_month(self.values_naive), mm), name="is_month"             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4146, __pyx_L1_error)
  __pyx_t_7 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_month(((PyArrayObject *)__pyx_t_5), NULL)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_eq(((PyArrayObject *)__pyx_t_7), __pyx_v_mm)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_t_5};
    __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_is_month, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4145, __pyx_L1_error)
    __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4133
 *         return pd.Index(utils.dt64arr_month(self.values_naive), name="month")
 * 
 *     def is_month(self, month: str | int) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether is the exact `month` `<'Index[bool]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4149
 *         )
 * 
 *     def days_in_month(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the maximum number of days (28-31) in the month `<'Index[int64]'>`."""
 *         return pd.Index(
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_199days_in_month(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_198days_in_month, "Return the maximum number of days (28-31) in the month `<'Index[int64]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_199days_in_month = {"days_in_month", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_199days_in_month, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_198days_in_month};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_199days_in_month(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("days_in_month (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4149, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4149, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "days_in_month", 0) < (0)) __PYX_ERR(0, 4149, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("days_in_month", 1, 1, 1, i); __PYX_ERR(0, 4149, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4149, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("days_in_month", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4149, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.days_in_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_198days_in_month(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_198days_in_month(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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("days_in_month", 0);

  /* "cytimes/pddt.py":4151
 *     def days_in_month(self) -> pd.Index[np.int64]:
 *         """Return the maximum number of days (28-31) in the month `<'Index[int64]'>`."""
 *         return pd.Index(             # <<<<<<<<<<<<<<
 *             utils.dt64arr_days_in_month(self.values_naive), name="days_in_month"
 *         )
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cytimes/pddt.py":4152
 *         """Return the maximum number of days (28-31) in the month `<'Index[int64]'>`."""
 *         return pd.Index(
 *             utils.dt64arr_days_in_month(self.values_naive), name="days_in_month"             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4152, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_month(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_days_in_month, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4151, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4149
 *         )
 * 
 *     def days_in_month(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the maximum number of days (28-31) in the month `<'Index[int64]'>`."""
 *         return pd.Index(
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.days_in_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4155
 *         )
 * 
 *     def days_bf_month(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the number of days strictly before the first day
 *         of the calendar month `<'Index[int64]'>`.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_201days_bf_month(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_200days_bf_month, "Return the number of days strictly before the first day\n        of the calendar month `<'Index[int64]'>`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_201days_bf_month = {"days_bf_month", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_201days_bf_month, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_200days_bf_month};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_201days_bf_month(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("days_bf_month (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4155, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4155, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "days_bf_month", 0) < (0)) __PYX_ERR(0, 4155, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("days_bf_month", 1, 1, 1, i); __PYX_ERR(0, 4155, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4155, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("days_bf_month", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4155, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.days_bf_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_200days_bf_month(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_200days_bf_month(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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("days_bf_month", 0);

  /* "cytimes/pddt.py":4159
 *         of the calendar month `<'Index[int64]'>`.
 *         """
 *         return pd.Index(             # <<<<<<<<<<<<<<
 *             utils.dt64arr_days_bf_month(self.values_naive), name="days_bf_month"
 *         )
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cytimes/pddt.py":4160
 *         """
 *         return pd.Index(
 *             utils.dt64arr_days_bf_month(self.values_naive), name="days_bf_month"             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4160, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_bf_month(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_days_bf_month, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4159, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4155
 *         )
 * 
 *     def days_bf_month(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the number of days strictly before the first day
 *         of the calendar month `<'Index[int64]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.days_bf_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4163
 *         )
 * 
 *     def day_of_month(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the number of days since the 1st day of the month `<'Index[int64]'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_203day_of_month(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_202day_of_month, "Return the number of days since the 1st day of the month `<'Index[int64]'>`.\n\n        ## Equivalent\n        >>> pt.day\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_203day_of_month = {"day_of_month", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_203day_of_month, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_202day_of_month};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_203day_of_month(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("day_of_month (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4163, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4163, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "day_of_month", 0) < (0)) __PYX_ERR(0, 4163, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("day_of_month", 1, 1, 1, i); __PYX_ERR(0, 4163, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4163, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("day_of_month", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4163, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.day_of_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_202day_of_month(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_202day_of_month(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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("day_of_month", 0);

  /* "cytimes/pddt.py":4169
 *         >>> pt.day
 *         """
 *         return pd.Index(utils.dt64arr_day(self.values_naive), name="day_of_month")             # <<<<<<<<<<<<<<
 * 
 *     def month_name(self, locale: str | None = None) -> pd.Index[str]:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4169, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_day(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_day_of_month, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4169, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4163
 *         )
 * 
 *     def day_of_month(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the number of days since the 1st day of the month `<'Index[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.day_of_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4171
 *         return pd.Index(utils.dt64arr_day(self.values_naive), name="day_of_month")
 * 
 *     def month_name(self, locale: str | None = None) -> pd.Index[str]:             # <<<<<<<<<<<<<<
 *         """Return the month names with specified locale `<'Index[str]'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_205month_name(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_204month_name, "Return the month names with specified locale `<'Index[str]'>`.\n\n        :param locale `<'str/None'>`: The locale to use for month name. Defaults to `None`.\n\n            - Locale determining the language in which to return the month name.\n              If `None` uses English locale (`'en_US'`).\n            - Use the command `locale -a` on Unix systems terminal to\n              find locale language code.\n\n        :return `<'Index[str]'>`: The month names.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_205month_name = {"month_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_205month_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_204month_name};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_205month_name(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_locale = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("month_name (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_locale,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4171, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4171, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4171, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "month_name", 0) < (0)) __PYX_ERR(0, 4171, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject*)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("month_name", 0, 1, 2, i); __PYX_ERR(0, 4171, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4171, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4171, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject*)Py_None));
    }
    __pyx_v_self = values[0];
    __pyx_v_locale = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("month_name", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 4171, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.month_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_locale), (&PyUnicode_Type), 1, "locale", 2))) __PYX_ERR(0, 4171, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_204month_name(__pyx_self, __pyx_v_self, __pyx_v_locale);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_204month_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_locale) {
  PyObject *__pyx_v_err = 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;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_t_9;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_10;
  int __pyx_t_11;
  char const *__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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("month_name", 0);

  /* "cytimes/pddt.py":4183
 *         :return `<'Index[str]'>`: The month names.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return DatetimeIndex.month_name(self, locale=locale)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "cytimes/pddt.py":4184
 *         """
 *         try:
 *             return DatetimeIndex.month_name(self, locale=locale)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "month_name(locale)", None, err)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DatetimeIndex); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4184, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_month_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4184, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_8 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
        __pyx_t_8 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, __pyx_v_self};
        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4184, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_locale, __pyx_v_locale, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4184, __pyx_L3_error)
        __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4184, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "cytimes/pddt.py":4183
 *         :return `<'Index[str]'>`: The month names.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return DatetimeIndex.month_name(self, locale=locale)
 *         except Exception as err:
*/
    }
    __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;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "cytimes/pddt.py":4185
 *         try:
 *             return DatetimeIndex.month_name(self, locale=locale)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self.__class__, "month_name(locale)", None, err)
 * 
*/
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_9) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.month_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 4185, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_v_err = __pyx_t_7;
      /*try:*/ {

        /* "cytimes/pddt.py":4186
 *             return DatetimeIndex.month_name(self, locale=locale)
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "month_name(locale)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     # . weekday
*/
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4186, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_10.__pyx_n = 4;
        __pyx_t_10.cls = __pyx_t_5;
        __pyx_t_10.input_msg = __pyx_mstate_global->__pyx_kp_u_month_name_locale;
        __pyx_t_10.error_msg = ((PyObject*)Py_None);
        __pyx_t_10.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4186, __pyx_L14_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }

      /* "cytimes/pddt.py":4185
 *         try:
 *             return DatetimeIndex.month_name(self, locale=locale)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self.__class__, "month_name(locale)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L15;
        }
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
          if ( unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __pyx_t_9 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
          __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
          goto __pyx_L5_except_error;
        }
        __pyx_L15:;
      }
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pddt.py":4183
 *         :return `<'Index[str]'>`: The month names.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return DatetimeIndex.month_name(self, locale=locale)
 *         except Exception as err:
*/
    __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_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_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);
  }

  /* "cytimes/pddt.py":4171
 *         return pd.Index(utils.dt64arr_day(self.values_naive), name="day_of_month")
 * 
 *     def month_name(self, locale: str | None = None) -> pd.Index[str]:             # <<<<<<<<<<<<<<
 *         """Return the month names with specified locale `<'Index[str]'>`.
 * 
*/

  /* function exit code */
  __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("cytimes.pddt.Pddt.month_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4189
 * 
 *     # . weekday
 *     @property             # <<<<<<<<<<<<<<
 *     def weekday(self) -> pd.Index[np.int64]:
 *         """The weekdays (0=Mon...6=Sun) `<'Index[int64]'>`."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_207weekday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_206weekday, "The weekdays (0=Mon...6=Sun) `<'Index[int64]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_207weekday = {"weekday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_207weekday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_206weekday};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_207weekday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("weekday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4189, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4189, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "weekday", 0) < (0)) __PYX_ERR(0, 4189, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("weekday", 1, 1, 1, i); __PYX_ERR(0, 4189, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4189, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("weekday", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4189, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_206weekday(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_206weekday(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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("weekday", 0);

  /* "cytimes/pddt.py":4192
 *     def weekday(self) -> pd.Index[np.int64]:
 *         """The weekdays (0=Mon...6=Sun) `<'Index[int64]'>`."""
 *         return pd.Index(utils.dt64arr_weekday(self.values_naive), name="weekday")             # <<<<<<<<<<<<<<
 * 
 *     def is_weekday(self, weekday: int | str) -> pd.Index[bool]:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4192, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_weekday(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_weekday, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4192, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4189
 * 
 *     # . weekday
 *     @property             # <<<<<<<<<<<<<<
 *     def weekday(self) -> pd.Index[np.int64]:
 *         """The weekdays (0=Mon...6=Sun) `<'Index[int64]'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4194
 *         return pd.Index(utils.dt64arr_weekday(self.values_naive), name="weekday")
 * 
 *     def is_weekday(self, weekday: int | str) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether is the exact `weekday` `<'Index[bool]'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_209is_weekday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_208is_weekday, "Element-wise check whether is the exact `weekday` `<'Index[bool]'>`.\n\n        :param weekday `<'int/str/None'>`: Weekday value.\n\n            - `<'int'>`  Weekday number (0=Mon...6=Sun).\n            - `<'str'>`  Weekday name in lowercase, uppercase or titlecase (e.g., 'Mon', 'dienstag', '\346\230\237\346\234\237\344\270\211').\n\n        :return `<'Index[bool]'>`: True if `weekday` is recognized and matched\n            with index instances' weekday; Otherwise False.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_209is_weekday = {"is_weekday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_209is_weekday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_208is_weekday};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_209is_weekday(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_weekday = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_weekday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_weekday,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4194, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4194, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4194, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_weekday", 0) < (0)) __PYX_ERR(0, 4194, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_weekday", 1, 2, 2, i); __PYX_ERR(0, 4194, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4194, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4194, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_weekday = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_weekday", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4194, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_208is_weekday(__pyx_self, __pyx_v_self, __pyx_v_weekday);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_208is_weekday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_weekday) {
  int __pyx_v_wd;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_7cytimes_6parser_parse_weekday __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;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_weekday", 0);

  /* "cytimes/pddt.py":4205
 *             with index instances' weekday; Otherwise False.
 *         """
 *         wd: cython.int = _parse_weekday(weekday, None, True)             # <<<<<<<<<<<<<<
 *         return pd.Index(
 *             utils.arr_eq(utils.dt64arr_weekday(self.values_naive), wd),
*/
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_2.raise_error = 1;
  __pyx_t_1 = __pyx_f_7cytimes_6parser_parse_weekday(__pyx_v_weekday, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-2))) __PYX_ERR(0, 4205, __pyx_L1_error)
  __pyx_v_wd = __pyx_t_1;

  /* "cytimes/pddt.py":4206
 *         """
 *         wd: cython.int = _parse_weekday(weekday, None, True)
 *         return pd.Index(             # <<<<<<<<<<<<<<
 *             utils.arr_eq(utils.dt64arr_weekday(self.values_naive), wd),
 *             name="is_weekday",
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pddt.py":4207
 *         wd: cython.int = _parse_weekday(weekday, None, True)
 *         return pd.Index(
 *             utils.arr_eq(utils.dt64arr_weekday(self.values_naive), wd),             # <<<<<<<<<<<<<<
 *             name="is_weekday",
 *         )
*/
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4207, __pyx_L1_error)
  __pyx_t_7 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_weekday(((PyArrayObject *)__pyx_t_5), NULL)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_eq(((PyArrayObject *)__pyx_t_7), __pyx_v_wd)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_t_5};
    __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_is_weekday, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4206, __pyx_L1_error)
    __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4194
 *         return pd.Index(utils.dt64arr_weekday(self.values_naive), name="weekday")
 * 
 *     def is_weekday(self, weekday: int | str) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether is the exact `weekday` `<'Index[bool]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4211
 *         )
 * 
 *     def weekday_name(self, locale: str | None = None) -> pd.Index[str]:             # <<<<<<<<<<<<<<
 *         """Return the weekday names with specified locale `<'Index[str]'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_211weekday_name(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_210weekday_name, "Return the weekday names with specified locale `<'Index[str]'>`.\n\n        :param locale `<'str/None'>`: The locale to use for weekday name. Defaults to `None`.\n\n            - Locale determining the language in which to return the weekday name.\n              If `None` uses English locale (`'en_US'`).\n            - Use the command `locale -a` on Unix systems terminal to\n              find locale language code.\n\n        :return `<'Index[str]'>`: The weekday names.\n\n        ## Equivalent\n        >>> DatetimeIndex.day_name(locale)\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_211weekday_name = {"weekday_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_211weekday_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_210weekday_name};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_211weekday_name(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_locale = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("weekday_name (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_locale,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4211, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4211, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4211, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "weekday_name", 0) < (0)) __PYX_ERR(0, 4211, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject*)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("weekday_name", 0, 1, 2, i); __PYX_ERR(0, 4211, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4211, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4211, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject*)Py_None));
    }
    __pyx_v_self = values[0];
    __pyx_v_locale = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("weekday_name", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 4211, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.weekday_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_locale), (&PyUnicode_Type), 1, "locale", 2))) __PYX_ERR(0, 4211, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_210weekday_name(__pyx_self, __pyx_v_self, __pyx_v_locale);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_210weekday_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_locale) {
  PyObject *__pyx_v_err = 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;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_t_9;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_10;
  int __pyx_t_11;
  char const *__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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("weekday_name", 0);

  /* "cytimes/pddt.py":4226
 *         >>> DatetimeIndex.day_name(locale)
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return DatetimeIndex.day_name(self, locale=locale)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "cytimes/pddt.py":4227
 *         """
 *         try:
 *             return DatetimeIndex.day_name(self, locale=locale)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DatetimeIndex); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4227, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_day_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4227, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_8 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
        __pyx_t_8 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, __pyx_v_self};
        __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4227, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_locale, __pyx_v_locale, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4227, __pyx_L3_error)
        __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4227, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "cytimes/pddt.py":4226
 *         >>> DatetimeIndex.day_name(locale)
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return DatetimeIndex.day_name(self, locale=locale)
 *         except Exception as err:
*/
    }
    __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;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "cytimes/pddt.py":4228
 *         try:
 *             return DatetimeIndex.day_name(self, locale=locale)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__, "weekday_name(locale)", None, err
*/
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_9) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.weekday_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 4228, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_v_err = __pyx_t_7;
      /*try:*/ {

        /* "cytimes/pddt.py":4230
 *         except Exception as err:
 *             errors.raise_argument_error(
 *                 self.__class__, "weekday_name(locale)", None, err             # <<<<<<<<<<<<<<
 *             )
 * 
*/
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4230, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_5);

        /* "cytimes/pddt.py":4229
 *             return DatetimeIndex.day_name(self, locale=locale)
 *         except Exception as err:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self.__class__, "weekday_name(locale)", None, err
 *             )
*/
        __pyx_t_10.__pyx_n = 4;
        __pyx_t_10.cls = __pyx_t_5;
        __pyx_t_10.input_msg = __pyx_mstate_global->__pyx_kp_u_weekday_name_locale;
        __pyx_t_10.error_msg = ((PyObject*)Py_None);
        __pyx_t_10.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4229, __pyx_L14_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }

      /* "cytimes/pddt.py":4228
 *         try:
 *             return DatetimeIndex.day_name(self, locale=locale)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__, "weekday_name(locale)", None, err
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L15;
        }
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
          if ( unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __pyx_t_9 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
          __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
          goto __pyx_L5_except_error;
        }
        __pyx_L15:;
      }
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pddt.py":4226
 *         >>> DatetimeIndex.day_name(locale)
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return DatetimeIndex.day_name(self, locale=locale)
 *         except Exception as err:
*/
    __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_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_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);
  }

  /* "cytimes/pddt.py":4211
 *         )
 * 
 *     def weekday_name(self, locale: str | None = None) -> pd.Index[str]:             # <<<<<<<<<<<<<<
 *         """Return the weekday names with specified locale `<'Index[str]'>`.
 * 
*/

  /* function exit code */
  __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("cytimes.pddt.Pddt.weekday_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4234
 * 
 *     # . day
 *     @property             # <<<<<<<<<<<<<<
 *     def day(self) -> pd.Index[np.int64]:
 *         """The days (1-31) `<'Index[int64]'>`."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_213day(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_212day, "The days (1-31) `<'Index[int64]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_213day = {"day", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_213day, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_212day};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_213day(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("day (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4234, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4234, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "day", 0) < (0)) __PYX_ERR(0, 4234, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("day", 1, 1, 1, i); __PYX_ERR(0, 4234, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4234, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("day", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4234, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.day", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_212day(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_212day(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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("day", 0);

  /* "cytimes/pddt.py":4237
 *     def day(self) -> pd.Index[np.int64]:
 *         """The days (1-31) `<'Index[int64]'>`."""
 *         return pd.Index(utils.dt64arr_day(self.values_naive), name="day")             # <<<<<<<<<<<<<<
 * 
 *     def is_day(self, day: cython.int) -> pd.Index[bool]:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4237, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_day(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_day, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4237, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4234
 * 
 *     # . day
 *     @property             # <<<<<<<<<<<<<<
 *     def day(self) -> pd.Index[np.int64]:
 *         """The days (1-31) `<'Index[int64]'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.day", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4239
 *         return pd.Index(utils.dt64arr_day(self.values_naive), name="day")
 * 
 *     def is_day(self, day: cython.int) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether is the exact `day` `<'Index[bool]'>`."""
 *         return pd.Index(
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_215is_day(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_214is_day, "Element-wise check whether is the exact `day` `<'Index[bool]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_215is_day = {"is_day", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_215is_day, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_214is_day};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_215is_day(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_day (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4239, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4239, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4239, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_day", 0) < (0)) __PYX_ERR(0, 4239, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_day", 1, 2, 2, i); __PYX_ERR(0, 4239, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4239, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4239, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_day = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4239, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_day", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4239, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_day", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_214is_day(__pyx_self, __pyx_v_self, __pyx_v_day);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_214is_day(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_day) {
  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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_day", 0);

  /* "cytimes/pddt.py":4241
 *     def is_day(self, day: cython.int) -> pd.Index[bool]:
 *         """Element-wise check whether is the exact `day` `<'Index[bool]'>`."""
 *         return pd.Index(             # <<<<<<<<<<<<<<
 *             utils.arr_eq(utils.dt64arr_day(self.values_naive), day), name="is_day"
 *         )
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cytimes/pddt.py":4242
 *         """Element-wise check whether is the exact `day` `<'Index[bool]'>`."""
 *         return pd.Index(
 *             utils.arr_eq(utils.dt64arr_day(self.values_naive), day), name="is_day"             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4242, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_day(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_eq(((PyArrayObject *)__pyx_t_5), __pyx_v_day)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_is_day, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4241, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4239
 *         return pd.Index(utils.dt64arr_day(self.values_naive), name="day")
 * 
 *     def is_day(self, day: cython.int) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether is the exact `day` `<'Index[bool]'>`."""
 *         return pd.Index(
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_day", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4246
 * 
 *     # . time
 *     @property             # <<<<<<<<<<<<<<
 *     def hour(self) -> pd.Index[np.int64]:
 *         """The hours (0-23) `<'Index[int64]'>`."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_217hour(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_216hour, "The hours (0-23) `<'Index[int64]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_217hour = {"hour", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_217hour, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_216hour};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_217hour(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hour (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4246, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4246, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "hour", 0) < (0)) __PYX_ERR(0, 4246, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("hour", 1, 1, 1, i); __PYX_ERR(0, 4246, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4246, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("hour", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4246, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.hour", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_216hour(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_216hour(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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hour", 0);

  /* "cytimes/pddt.py":4249
 *     def hour(self) -> pd.Index[np.int64]:
 *         """The hours (0-23) `<'Index[int64]'>`."""
 *         return pd.Index(utils.dt64arr_hour(self.values_naive), name="hour")             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4249, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_hour(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_hour, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4249, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4246
 * 
 *     # . time
 *     @property             # <<<<<<<<<<<<<<
 *     def hour(self) -> pd.Index[np.int64]:
 *         """The hours (0-23) `<'Index[int64]'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.hour", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4251
 *         return pd.Index(utils.dt64arr_hour(self.values_naive), name="hour")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def minute(self) -> pd.Index[np.int64]:
 *         """The minutes (0-59) `<'Index[int64]'>`."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_219minute(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_218minute, "The minutes (0-59) `<'Index[int64]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_219minute = {"minute", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_219minute, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_218minute};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_219minute(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("minute (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4251, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4251, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "minute", 0) < (0)) __PYX_ERR(0, 4251, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("minute", 1, 1, 1, i); __PYX_ERR(0, 4251, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4251, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("minute", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4251, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.minute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_218minute(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_218minute(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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("minute", 0);

  /* "cytimes/pddt.py":4254
 *     def minute(self) -> pd.Index[np.int64]:
 *         """The minutes (0-59) `<'Index[int64]'>`."""
 *         return pd.Index(utils.dt64arr_minute(self.values_naive), name="minute")             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4254, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_minute(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_minute, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4254, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4251
 *         return pd.Index(utils.dt64arr_hour(self.values_naive), name="hour")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def minute(self) -> pd.Index[np.int64]:
 *         """The minutes (0-59) `<'Index[int64]'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.minute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4256
 *         return pd.Index(utils.dt64arr_minute(self.values_naive), name="minute")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def second(self) -> pd.Index[np.int64]:
 *         """The seconds (0-59) `<'Index[int64]'>`."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_221second(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_220second, "The seconds (0-59) `<'Index[int64]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_221second = {"second", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_221second, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_220second};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_221second(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("second (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4256, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4256, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "second", 0) < (0)) __PYX_ERR(0, 4256, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("second", 1, 1, 1, i); __PYX_ERR(0, 4256, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4256, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("second", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4256, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.second", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_220second(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_220second(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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("second", 0);

  /* "cytimes/pddt.py":4259
 *     def second(self) -> pd.Index[np.int64]:
 *         """The seconds (0-59) `<'Index[int64]'>`."""
 *         return pd.Index(utils.dt64arr_second(self.values_naive), name="second")             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4259, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_second(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_second, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4259, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4256
 *         return pd.Index(utils.dt64arr_minute(self.values_naive), name="minute")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def second(self) -> pd.Index[np.int64]:
 *         """The seconds (0-59) `<'Index[int64]'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.second", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4261
 *         return pd.Index(utils.dt64arr_second(self.values_naive), name="second")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def millisecond(self) -> pd.Index[np.int64]:
 *         """The milliseconds (0-999) `<'Index[int64]'>`."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_223millisecond(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_222millisecond, "The milliseconds (0-999) `<'Index[int64]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_223millisecond = {"millisecond", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_223millisecond, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_222millisecond};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_223millisecond(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("millisecond (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4261, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4261, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "millisecond", 0) < (0)) __PYX_ERR(0, 4261, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("millisecond", 1, 1, 1, i); __PYX_ERR(0, 4261, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4261, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("millisecond", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4261, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.millisecond", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_222millisecond(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_222millisecond(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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("millisecond", 0);

  /* "cytimes/pddt.py":4264
 *     def millisecond(self) -> pd.Index[np.int64]:
 *         """The milliseconds (0-999) `<'Index[int64]'>`."""
 *         return pd.Index(             # <<<<<<<<<<<<<<
 *             utils.dt64arr_millisecond(self.values_naive), name="millisecond"
 *         )
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cytimes/pddt.py":4265
 *         """The milliseconds (0-999) `<'Index[int64]'>`."""
 *         return pd.Index(
 *             utils.dt64arr_millisecond(self.values_naive), name="millisecond"             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4265, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_millisecond(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_millisecond, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4264, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4261
 *         return pd.Index(utils.dt64arr_second(self.values_naive), name="second")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def millisecond(self) -> pd.Index[np.int64]:
 *         """The milliseconds (0-999) `<'Index[int64]'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.millisecond", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4268
 *         )
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def microsecond(self) -> pd.Index[np.int64]:
 *         """The microseconds (0-999999) `<'Index[int64]'>`."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_225microsecond(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_224microsecond, "The microseconds (0-999999) `<'Index[int64]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_225microsecond = {"microsecond", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_225microsecond, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_224microsecond};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_225microsecond(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("microsecond (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4268, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4268, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "microsecond", 0) < (0)) __PYX_ERR(0, 4268, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("microsecond", 1, 1, 1, i); __PYX_ERR(0, 4268, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4268, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("microsecond", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4268, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.microsecond", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_224microsecond(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_224microsecond(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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("microsecond", 0);

  /* "cytimes/pddt.py":4271
 *     def microsecond(self) -> pd.Index[np.int64]:
 *         """The microseconds (0-999999) `<'Index[int64]'>`."""
 *         return pd.Index(             # <<<<<<<<<<<<<<
 *             utils.dt64arr_microsecond(self.values_naive), name="microsecond"
 *         )
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cytimes/pddt.py":4272
 *         """The microseconds (0-999999) `<'Index[int64]'>`."""
 *         return pd.Index(
 *             utils.dt64arr_microsecond(self.values_naive), name="microsecond"             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4272, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_microsecond(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_microsecond, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4271, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4268
 *         )
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def microsecond(self) -> pd.Index[np.int64]:
 *         """The microseconds (0-999999) `<'Index[int64]'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.microsecond", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4275
 *         )
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def nanosecond(self) -> pd.Index[np.int64]:
 *         """The nanoseconds (0-999) `<'Index[int64]'>`."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_227nanosecond(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_226nanosecond, "The nanoseconds (0-999) `<'Index[int64]'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_227nanosecond = {"nanosecond", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_227nanosecond, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_226nanosecond};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_227nanosecond(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("nanosecond (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4275, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4275, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nanosecond", 0) < (0)) __PYX_ERR(0, 4275, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nanosecond", 1, 1, 1, i); __PYX_ERR(0, 4275, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4275, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("nanosecond", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4275, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.nanosecond", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_226nanosecond(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_226nanosecond(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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("nanosecond", 0);

  /* "cytimes/pddt.py":4278
 *     def nanosecond(self) -> pd.Index[np.int64]:
 *         """The nanoseconds (0-999) `<'Index[int64]'>`."""
 *         return pd.Index(utils.dt64arr_nanosecond(self.values_naive), name="nanosecond")             # <<<<<<<<<<<<<<
 * 
 *     # Timezone -----------------------------------------------------------------------------
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4278, __pyx_L1_error)
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_nanosecond(((PyArrayObject *)__pyx_t_3), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_nanosecond, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4278, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4275
 *         )
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def nanosecond(self) -> pd.Index[np.int64]:
 *         """The nanoseconds (0-999) `<'Index[int64]'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.nanosecond", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4281
 * 
 *     # Timezone -----------------------------------------------------------------------------
 *     @property             # <<<<<<<<<<<<<<
 *     def tz_available(self) -> set[str]:
 *         """The available timezone names `<'set[str]'>`.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_229tz_available(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_228tz_available, "The available timezone names `<'set[str]'>`.\n\n        ## Equivalent\n        >>> zoneinfo.available_timezones()\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_229tz_available = {"tz_available", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_229tz_available, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_228tz_available};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_229tz_available(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tz_available (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4281, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4281, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "tz_available", 0) < (0)) __PYX_ERR(0, 4281, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("tz_available", 1, 1, 1, i); __PYX_ERR(0, 4281, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4281, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tz_available", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4281, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.tz_available", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_228tz_available(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_228tz_available(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;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_available", 0);

  /* "cytimes/pddt.py":4288
 *         >>> zoneinfo.available_timezones()
 *         """
 *         return _available_timezones()             # <<<<<<<<<<<<<<
 * 
 *     def is_local(self) -> bool:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_available_timezones); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(PySet_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_t_1))) __PYX_ERR(0, 4288, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4281
 * 
 *     # Timezone -----------------------------------------------------------------------------
 *     @property             # <<<<<<<<<<<<<<
 *     def tz_available(self) -> set[str]:
 *         """The available timezone names `<'set[str]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.tz_available", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4290
 *         return _available_timezones()
 * 
 *     def is_local(self) -> bool:             # <<<<<<<<<<<<<<
 *         """Check whether is in the local timezone `<'bool'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_231is_local(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_230is_local, "Check whether is in the local timezone `<'bool'>`.\n\n        - Naive datetime index always return `False`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_231is_local = {"is_local", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_231is_local, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_230is_local};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_231is_local(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_local (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4290, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4290, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_local", 0) < (0)) __PYX_ERR(0, 4290, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_local", 1, 1, 1, i); __PYX_ERR(0, 4290, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4290, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_local", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4290, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_local", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_230is_local(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_230is_local(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_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_local", 0);

  /* "cytimes/pddt.py":4295
 *         - Naive datetime index always return `False`.
 *         """
 *         return self.tzinfo is utils.tz_local()             # <<<<<<<<<<<<<<
 * 
 *     def is_utc(self) -> bool:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_7cytimes_5utils_tz_local(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__pyx_t_1 == __pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4290
 *         return _available_timezones()
 * 
 *     def is_local(self) -> bool:             # <<<<<<<<<<<<<<
 *         """Check whether is in the local timezone `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_local", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4297
 *         return self.tzinfo is utils.tz_local()
 * 
 *     def is_utc(self) -> bool:             # <<<<<<<<<<<<<<
 *         """Check whether is in the UTC timezone `<'bool'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_233is_utc(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_232is_utc, "Check whether is in the UTC timezone `<'bool'>`.\n\n        - Naive datetime index always return `False`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_233is_utc = {"is_utc", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_233is_utc, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_232is_utc};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_233is_utc(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_utc (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4297, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4297, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_utc", 0) < (0)) __PYX_ERR(0, 4297, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_utc", 1, 1, 1, i); __PYX_ERR(0, 4297, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4297, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_utc", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4297, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_utc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_232is_utc(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_232is_utc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  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_utc", 0);

  /* "cytimes/pddt.py":4302
 *         - Naive datetime index always return `False`.
 *         """
 *         return self.tzinfo is utils.UTC             # <<<<<<<<<<<<<<
 * 
 *     def tzname(self) -> str:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == ((PyObject *)__pyx_v_7cytimes_5utils_UTC));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4297
 *         return self.tzinfo is utils.tz_local()
 * 
 *     def is_utc(self) -> bool:             # <<<<<<<<<<<<<<
 *         """Check whether is in the UTC timezone `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_utc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4304
 *         return self.tzinfo is utils.UTC
 * 
 *     def tzname(self) -> str:             # <<<<<<<<<<<<<<
 *         """Return the timezone name `<'str/None'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_235tzname(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_234tzname, "Return the timezone name `<'str/None'>`.\n\n        - Naive datetime index always return `None`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_235tzname = {"tzname", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_235tzname, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_234tzname};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_235tzname(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tzname (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4304, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4304, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "tzname", 0) < (0)) __PYX_ERR(0, 4304, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("tzname", 1, 1, 1, i); __PYX_ERR(0, 4304, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4304, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tzname", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4304, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.tzname", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_234tzname(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_234tzname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_my_tz = 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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tzname", 0);

  /* "cytimes/pddt.py":4309
 *         - Naive datetime index always return `None`.
 *         """
 *         my_tz = self.tzinfo             # <<<<<<<<<<<<<<
 *         return None if my_tz is None else my_tz.tzname(utils.dt_now())
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_my_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":4310
 *         """
 *         my_tz = self.tzinfo
 *         return None if my_tz is None else my_tz.tzname(utils.dt_now())             # <<<<<<<<<<<<<<
 * 
 *     def astimezone(
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = (__pyx_v_my_tz == Py_None);
  if (__pyx_t_2) {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  } else {
    __pyx_t_4 = __pyx_v_my_tz;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_now(NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tzname, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4310, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_3))) __PYX_ERR(0, 4310, __pyx_L1_error)
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 4310, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4304
 *         return self.tzinfo is utils.UTC
 * 
 *     def tzname(self) -> str:             # <<<<<<<<<<<<<<
 *         """Return the timezone name `<'str/None'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.tzname", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_my_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4312
 *         return None if my_tz is None else my_tz.tzname(utils.dt_now())
 * 
 *     def astimezone(             # <<<<<<<<<<<<<<
 *         self,
 *         tz: datetime.tzinfo | str | None = None,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_237astimezone(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_236astimezone, "Convert to another timezone `<'Pddt'>`.\n\n        :param tz `<'tzinfo/str/None'>`: Target timezone. Defaults to `None`.\n\n            - `<'None'>` the system `local` timezone is used.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :param ambiguous `<'str/ndarray'>`: How to handle ambiguous times. Defaults to `'raise'`.\n\n            - `<'str'>` Accepts: `'infer'`, `'NaT'` or `'raise'` for ambiguous times handling.\n            - `<'ndarray'>` A boolean array that specifies ambiguous times (True for DST time).\n\n        :param nonexistent `<'str/timedelta'>`: How to handle nonexistent times. Defaults to `'raise'`.\n\n            - `<'str'>` Accepts `'shift_forward'`, `'shift_backward'`, `'NaT'` or `'raise'`\n                for nonexistent times handling.\n            - `<'timedelta'>` An instance of timedelta to shift the nonexistent times.\n\n        :returns `<'Pddt'>`: The resulting datetime index representing the `same` index\n            expressed in the target timezone. For naive datetime index and `tz is None`,\n            `localizes` the index to the system local zone.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_237astimezone = {"astimezone", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_237astimezone, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_236astimezone};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_237astimezone(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_v_ambiguous = 0;
  PyObject *__pyx_v_nonexistent = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("astimezone (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_tz,&__pyx_mstate_global->__pyx_n_u_ambiguous,&__pyx_mstate_global->__pyx_n_u_nonexistent,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4312, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4312, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4312, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4312, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4312, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "astimezone", 0) < (0)) __PYX_ERR(0, 4312, __pyx_L3_error)

      /* "cytimes/pddt.py":4314
 *     def astimezone(
 *         self,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         ambiguous: object = "raise",
 *         nonexistent: object = "raise",
*/
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_raise)));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_raise)));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("astimezone", 0, 1, 4, i); __PYX_ERR(0, 4312, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4312, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4312, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4312, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4312, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_raise)));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_raise)));
    }
    __pyx_v_self = values[0];
    __pyx_v_tz = values[1];
    __pyx_v_ambiguous = values[2];
    __pyx_v_nonexistent = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("astimezone", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 4312, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.astimezone", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_236astimezone(__pyx_self, __pyx_v_self, __pyx_v_tz, __pyx_v_ambiguous, __pyx_v_nonexistent);

  /* "cytimes/pddt.py":4312
 *         return None if my_tz is None else my_tz.tzname(utils.dt_now())
 * 
 *     def astimezone(             # <<<<<<<<<<<<<<
 *         self,
 *         tz: datetime.tzinfo | str | None = None,
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_236astimezone(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tz, PyObject *__pyx_v_ambiguous, PyObject *__pyx_v_nonexistent) {
  PyObject *__pyx_v_to_tz = NULL;
  PyObject *__pyx_v_my_tz = NULL;
  PyObject *__pyx_v_pt = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("astimezone", 0);

  /* "cytimes/pddt.py":4342
 *         """
 *         # Resolve target timezone
 *         to_tz = utils.tz_parse(tz)             # <<<<<<<<<<<<<<
 *         my_tz = self.tzinfo
 *         if to_tz is None:
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_to_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":4343
 *         # Resolve target timezone
 *         to_tz = utils.tz_parse(tz)
 *         my_tz = self.tzinfo             # <<<<<<<<<<<<<<
 *         if to_tz is None:
 *             to_tz = utils.tz_local()
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_my_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":4344
 *         to_tz = utils.tz_parse(tz)
 *         my_tz = self.tzinfo
 *         if to_tz is None:             # <<<<<<<<<<<<<<
 *             to_tz = utils.tz_local()
 *             # Fast-exit: naive + local -> localize
*/
  __pyx_t_2 = (__pyx_v_to_tz == Py_None);
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":4345
 *         my_tz = self.tzinfo
 *         if to_tz is None:
 *             to_tz = utils.tz_local()             # <<<<<<<<<<<<<<
 *             # Fast-exit: naive + local -> localize
 *             if my_tz is None:
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_local(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_to_tz, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytimes/pddt.py":4347
 *             to_tz = utils.tz_local()
 *             # Fast-exit: naive + local -> localize
 *             if my_tz is None:             # <<<<<<<<<<<<<<
 *                 return self.tz_localize(to_tz, ambiguous, nonexistent)
 * 
*/
    __pyx_t_2 = (__pyx_v_my_tz == Py_None);
    if (__pyx_t_2) {

      /* "cytimes/pddt.py":4348
 *             # Fast-exit: naive + local -> localize
 *             if my_tz is None:
 *                 return self.tz_localize(to_tz, ambiguous, nonexistent)             # <<<<<<<<<<<<<<
 * 
 *         # Resolve my timezone
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __pyx_v_self;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_to_tz, __pyx_v_ambiguous, __pyx_v_nonexistent};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tz_localize, __pyx_callargs+__pyx_t_4, (4-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4348, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pddt.py":4347
 *             to_tz = utils.tz_local()
 *             # Fast-exit: naive + local -> localize
 *             if my_tz is None:             # <<<<<<<<<<<<<<
 *                 return self.tz_localize(to_tz, ambiguous, nonexistent)
 * 
*/
    }

    /* "cytimes/pddt.py":4344
 *         to_tz = utils.tz_parse(tz)
 *         my_tz = self.tzinfo
 *         if to_tz is None:             # <<<<<<<<<<<<<<
 *             to_tz = utils.tz_local()
 *             # Fast-exit: naive + local -> localize
*/
  }

  /* "cytimes/pddt.py":4351
 * 
 *         # Resolve my timezone
 *         if my_tz is None:             # <<<<<<<<<<<<<<
 *             my_tz = utils.tz_local()
 *             pt = self.tz_localize(my_tz, ambiguous, nonexistent)
*/
  __pyx_t_2 = (__pyx_v_my_tz == Py_None);
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":4352
 *         # Resolve my timezone
 *         if my_tz is None:
 *             my_tz = utils.tz_local()             # <<<<<<<<<<<<<<
 *             pt = self.tz_localize(my_tz, ambiguous, nonexistent)
 *         else:
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_local(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_my_tz, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytimes/pddt.py":4353
 *         if my_tz is None:
 *             my_tz = utils.tz_local()
 *             pt = self.tz_localize(my_tz, ambiguous, nonexistent)             # <<<<<<<<<<<<<<
 *         else:
 *             pt = self
*/
    __pyx_t_3 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_my_tz, __pyx_v_ambiguous, __pyx_v_nonexistent};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tz_localize, __pyx_callargs+__pyx_t_4, (4-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_v_pt = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cytimes/pddt.py":4351
 * 
 *         # Resolve my timezone
 *         if my_tz is None:             # <<<<<<<<<<<<<<
 *             my_tz = utils.tz_local()
 *             pt = self.tz_localize(my_tz, ambiguous, nonexistent)
*/
    goto __pyx_L5;
  }

  /* "cytimes/pddt.py":4355
 *             pt = self.tz_localize(my_tz, ambiguous, nonexistent)
 *         else:
 *             pt = self             # <<<<<<<<<<<<<<
 * 
 *         # Fast-exit: exact same timezone
*/
  /*else*/ {
    __Pyx_INCREF(__pyx_v_self);
    __pyx_v_pt = __pyx_v_self;
  }
  __pyx_L5:;

  /* "cytimes/pddt.py":4358
 * 
 *         # Fast-exit: exact same timezone
 *         if my_tz is to_tz:             # <<<<<<<<<<<<<<
 *             return pt  # exit
 * 
*/
  __pyx_t_2 = (__pyx_v_my_tz == __pyx_v_to_tz);
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":4359
 *         # Fast-exit: exact same timezone
 *         if my_tz is to_tz:
 *             return pt  # exit             # <<<<<<<<<<<<<<
 * 
 *         # Convert to target timezone
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_pt);
    __pyx_r = __pyx_v_pt;
    goto __pyx_L0;

    /* "cytimes/pddt.py":4358
 * 
 *         # Fast-exit: exact same timezone
 *         if my_tz is to_tz:             # <<<<<<<<<<<<<<
 *             return pt  # exit
 * 
*/
  }

  /* "cytimes/pddt.py":4362
 * 
 *         # Convert to target timezone
 *         return pt.tz_convert(to_tz)             # <<<<<<<<<<<<<<
 * 
 *     def tz_localize(
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_v_pt;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_to_tz};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tz_convert, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4362, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4312
 *         return None if my_tz is None else my_tz.tzname(utils.dt_now())
 * 
 *     def astimezone(             # <<<<<<<<<<<<<<
 *         self,
 *         tz: datetime.tzinfo | str | None = None,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.astimezone", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_to_tz);
  __Pyx_XDECREF(__pyx_v_my_tz);
  __Pyx_XDECREF(__pyx_v_pt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4364
 *         return pt.tz_convert(to_tz)
 * 
 *     def tz_localize(             # <<<<<<<<<<<<<<
 *         self,
 *         tz: datetime.tzinfo | str | None,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_239tz_localize(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_238tz_localize, "Localize timezone-naive datetime index to the target timezone;\n        or timezone-aware datetime index to timezone naive (without moving\n        the date & time fields) `<'Pddt'>`.\n\n        :param tz `<'tzinfo/str/None'>`: Target timezone. Defaults to `None`.\n\n            - `<'None'>` Localize to timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :param ambiguous `<'str/ndarray'>`: How to handle ambiguous times. Defaults to `'raise'`.\n\n            - `<'str'>` Accepts: `'infer'`, `'NaT'` or `'raise'` for ambiguous times handling.\n            - `<'ndarray'>` A boolean array that specifies ambiguous times (True for DST time).\n\n        :param nonexistent `<'str/timedelta'>`: How to handle nonexistent times. Defaults to `'raise'`.\n\n            - `<'str'>` Accepts `'shift_forward'`, `'shift_backward'`, `'NaT'` or `'raise'`\n                for nonexistent times handling.\n            - `<'timedelta'>` An instance of timedelta to shift the nonexistent times.\n\n        :returns `<'Pddt'>`: The resulting datetime index localized to the target timezone.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_239tz_localize = {"tz_localize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_239tz_localize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_238tz_localize};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_239tz_localize(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_v_ambiguous = 0;
  PyObject *__pyx_v_nonexistent = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tz_localize (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_tz,&__pyx_mstate_global->__pyx_n_u_ambiguous,&__pyx_mstate_global->__pyx_n_u_nonexistent,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4364, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4364, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4364, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4364, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4364, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "tz_localize", 0) < (0)) __PYX_ERR(0, 4364, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_raise)));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_raise)));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("tz_localize", 0, 2, 4, i); __PYX_ERR(0, 4364, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4364, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4364, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4364, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4364, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_raise)));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_raise)));
    }
    __pyx_v_self = values[0];
    __pyx_v_tz = values[1];
    __pyx_v_ambiguous = values[2];
    __pyx_v_nonexistent = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tz_localize", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 4364, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.tz_localize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_238tz_localize(__pyx_self, __pyx_v_self, __pyx_v_tz, __pyx_v_ambiguous, __pyx_v_nonexistent);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_238tz_localize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tz, PyObject *__pyx_v_ambiguous, PyObject *__pyx_v_nonexistent) {
  PyObject *__pyx_v_my_tz = NULL;
  PyObject *__pyx_v_err = NULL;
  int __pyx_v_my_reso;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __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;
  size_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_error __pyx_t_14;
  int __pyx_t_15;
  char const *__pyx_t_16;
  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;
  char const *__pyx_t_23;
  char const *__pyx_t_24;
  int __pyx_t_25;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_26;
  int __pyx_t_27;
  char const *__pyx_t_28;
  char const *__pyx_t_29;
  char const *__pyx_t_30;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_localize", 0);
  __Pyx_INCREF(__pyx_v_tz);

  /* "cytimes/pddt.py":4394
 *         """
 *         # Timezone-aware
 *         tz = utils.tz_parse(tz)             # <<<<<<<<<<<<<<
 *         my_tz = self.tzinfo
 *         if my_tz is not None:
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":4395
 *         # Timezone-aware
 *         tz = utils.tz_parse(tz)
 *         my_tz = self.tzinfo             # <<<<<<<<<<<<<<
 *         if my_tz is not None:
 *             if tz is not None:
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_my_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":4396
 *         tz = utils.tz_parse(tz)
 *         my_tz = self.tzinfo
 *         if my_tz is not None:             # <<<<<<<<<<<<<<
 *             if tz is not None:
 *                 errors.raise_argument_error(
*/
  __pyx_t_2 = (__pyx_v_my_tz != Py_None);
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":4397
 *         my_tz = self.tzinfo
 *         if my_tz is not None:
 *             if tz is not None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     self.__class__,
*/
    __pyx_t_2 = (__pyx_v_tz != Py_None);
    if (__pyx_t_2) {

      /* "cytimes/pddt.py":4399
 *             if tz is not None:
 *                 errors.raise_argument_error(
 *                     self.__class__,             # <<<<<<<<<<<<<<
 *                     "tz_localize(tz, ...)",
 *                     "Datetime index is already timezone-aware.\n"
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4399, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "cytimes/pddt.py":4398
 *         if my_tz is not None:
 *             if tz is not None:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     self.__class__,
 *                     "tz_localize(tz, ...)",
*/
      __pyx_t_3.__pyx_n = 3;
      __pyx_t_3.cls = __pyx_t_1;
      __pyx_t_3.input_msg = __pyx_mstate_global->__pyx_kp_u_tz_localize_tz;
      __pyx_t_3.error_msg = __pyx_mstate_global->__pyx_kp_u_Datetime_index_is_already_timezo;
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4398, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "cytimes/pddt.py":4397
 *         my_tz = self.tzinfo
 *         if my_tz is not None:
 *             if tz is not None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     self.__class__,
*/
    }

    /* "cytimes/pddt.py":4406
 *                 )
 *             # Localize: aware => naive
 *             try:             # <<<<<<<<<<<<<<
 *                 return DatetimeIndex.tz_localize(self, None)
 *             # fmt: off
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __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:*/ {

        /* "cytimes/pddt.py":4407
 *             # Localize: aware => naive
 *             try:
 *                 return DatetimeIndex.tz_localize(self, None)             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             except errors.PdOutOfBoundsDatetime as err:
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_7 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_DatetimeIndex); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4407, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_tz_localize); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4407, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_10 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
          assert(__pyx_t_7);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
          __pyx_t_10 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_self, Py_None};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4407, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L9_try_return;

        /* "cytimes/pddt.py":4406
 *                 )
 *             # Localize: aware => naive
 *             try:             # <<<<<<<<<<<<<<
 *                 return DatetimeIndex.tz_localize(self, None)
 *             # fmt: off
*/
      }
      __pyx_L5_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "cytimes/pddt.py":4409
 *                 return DatetimeIndex.tz_localize(self, None)
 *             # fmt: off
 *             except errors.PdOutOfBoundsDatetime as err:             # <<<<<<<<<<<<<<
 *                 errors.raise_error(errors.OutOfBoundsError, self.__class__, "tz_localize(...)", None, err)
 *                 return  # unreachable: suppress compiler warning
*/
      __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_9, &__pyx_t_7);
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4409, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_PdOutOfBoundsDatetime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4409, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_12 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_11);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_ErrRestore(__pyx_t_1, __pyx_t_9, __pyx_t_7);
      __pyx_t_1 = 0; __pyx_t_9 = 0; __pyx_t_7 = 0;
      if (__pyx_t_12) {
        __Pyx_AddTraceback("cytimes.pddt.Pddt.tz_localize", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_9, &__pyx_t_1) < 0) __PYX_ERR(0, 4409, __pyx_L7_except_error)
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_9);
        __pyx_v_err = __pyx_t_9;
        /*try:*/ {

          /* "cytimes/pddt.py":4410
 *             # fmt: off
 *             except errors.PdOutOfBoundsDatetime as err:
 *                 errors.raise_error(errors.OutOfBoundsError, self.__class__, "tz_localize(...)", None, err)             # <<<<<<<<<<<<<<
 *                 return  # unreachable: suppress compiler warning
 *             except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:
*/
          __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4410, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_OutOfBoundsError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4410, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4410, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_13 = __pyx_v_err;
          __Pyx_INCREF(__pyx_t_13);
          if (!(likely(__Pyx_PyException_Check(__pyx_t_13))||((__pyx_t_13) == Py_None) || __Pyx_RaiseUnexpectedTypeError("Exception", __pyx_t_13))) __PYX_ERR(0, 4410, __pyx_L16_error)
          __pyx_t_14.__pyx_n = 4;
          __pyx_t_14.cls = __pyx_t_11;
          __pyx_t_14.input_msg = __pyx_mstate_global->__pyx_kp_u_tz_localize_2;
          __pyx_t_14.error_msg = ((PyObject*)Py_None);
          __pyx_t_14.tb_exc = ((PyObject*)__pyx_t_13);
          __pyx_f_7cytimes_6errors_raise_error(__pyx_t_8, 0, &__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4410, __pyx_L16_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

          /* "cytimes/pddt.py":4411
 *             except errors.PdOutOfBoundsDatetime as err:
 *                 errors.raise_error(errors.OutOfBoundsError, self.__class__, "tz_localize(...)", None, err)
 *                 return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *             except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:
 *                 errors.raise_error(errors.AmbiguousTimeError, self.__class__, "tz_localize(...)", None, err)
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          goto __pyx_L15_return;
        }

        /* "cytimes/pddt.py":4409
 *                 return DatetimeIndex.tz_localize(self, None)
 *             # fmt: off
 *             except errors.PdOutOfBoundsDatetime as err:             # <<<<<<<<<<<<<<
 *                 errors.raise_error(errors.OutOfBoundsError, self.__class__, "tz_localize(...)", None, err)
 *                 return  # unreachable: suppress compiler warning
*/
        /*finally:*/ {
          __pyx_L16_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
            if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_17);
            __Pyx_XGOTREF(__pyx_t_18);
            __Pyx_XGOTREF(__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_22);
            __pyx_t_12 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            }
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_17);
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
            __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
            __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
            goto __pyx_L7_except_error;
          }
          __pyx_L15_return: {
            __pyx_t_22 = __pyx_r;
            __pyx_r = 0;
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            __pyx_r = __pyx_t_22;
            __pyx_t_22 = 0;
            goto __pyx_L8_except_return;
          }
        }
      }

      /* "cytimes/pddt.py":4412
 *                 errors.raise_error(errors.OutOfBoundsError, self.__class__, "tz_localize(...)", None, err)
 *                 return  # unreachable: suppress compiler warning
 *             except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:             # <<<<<<<<<<<<<<
 *                 errors.raise_error(errors.AmbiguousTimeError, self.__class__, "tz_localize(...)", None, err)
 *                 return  # unreachable: suppress compiler warning
*/
      __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_9, &__pyx_t_7);
      __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4412, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_PytzAmbiguousTimeError); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4412, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4412, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_PytzNonExistentTimeError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4412, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_15 = __Pyx_PyErr_GivenExceptionMatches2(__pyx_t_1, __pyx_t_11, __pyx_t_8);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_ErrRestore(__pyx_t_1, __pyx_t_9, __pyx_t_7);
      __pyx_t_1 = 0; __pyx_t_9 = 0; __pyx_t_7 = 0;
      if (__pyx_t_15) {
        __Pyx_AddTraceback("cytimes.pddt.Pddt.tz_localize", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_9, &__pyx_t_1) < 0) __PYX_ERR(0, 4412, __pyx_L7_except_error)
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_9);
        __pyx_v_err = __pyx_t_9;
        /*try:*/ {

          /* "cytimes/pddt.py":4413
 *                 return  # unreachable: suppress compiler warning
 *             except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:
 *                 errors.raise_error(errors.AmbiguousTimeError, self.__class__, "tz_localize(...)", None, err)             # <<<<<<<<<<<<<<
 *                 return  # unreachable: suppress compiler warning
 *             except Exception as err:
*/
          __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4413, __pyx_L27_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_AmbiguousTimeError); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4413, __pyx_L27_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4413, __pyx_L27_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_13 = __pyx_v_err;
          __Pyx_INCREF(__pyx_t_13);
          if (!(likely(__Pyx_PyException_Check(__pyx_t_13))||((__pyx_t_13) == Py_None) || __Pyx_RaiseUnexpectedTypeError("Exception", __pyx_t_13))) __PYX_ERR(0, 4413, __pyx_L27_error)
          __pyx_t_14.__pyx_n = 4;
          __pyx_t_14.cls = __pyx_t_8;
          __pyx_t_14.input_msg = __pyx_mstate_global->__pyx_kp_u_tz_localize_2;
          __pyx_t_14.error_msg = ((PyObject*)Py_None);
          __pyx_t_14.tb_exc = ((PyObject*)__pyx_t_13);
          __pyx_f_7cytimes_6errors_raise_error(__pyx_t_11, 0, &__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4413, __pyx_L27_error)
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

          /* "cytimes/pddt.py":4414
 *             except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:
 *                 errors.raise_error(errors.AmbiguousTimeError, self.__class__, "tz_localize(...)", None, err)
 *                 return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *             except Exception as err:
 *                 errors.raise_argument_error(self.__class__, "tz_localize(...)", None, err)
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          goto __pyx_L26_return;
        }

        /* "cytimes/pddt.py":4412
 *                 errors.raise_error(errors.OutOfBoundsError, self.__class__, "tz_localize(...)", None, err)
 *                 return  # unreachable: suppress compiler warning
 *             except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:             # <<<<<<<<<<<<<<
 *                 errors.raise_error(errors.AmbiguousTimeError, self.__class__, "tz_localize(...)", None, err)
 *                 return  # unreachable: suppress compiler warning
*/
        /*finally:*/ {
          __pyx_L27_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0;
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_18, &__pyx_t_17);
            if ( unlikely(__Pyx_GetException(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_18);
            __Pyx_XGOTREF(__pyx_t_17);
            __pyx_t_15 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_23 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            }
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_XGIVEREF(__pyx_t_17);
            __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_18, __pyx_t_17);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_ErrRestore(__pyx_t_22, __pyx_t_21, __pyx_t_20);
            __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0;
            __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_23;
            goto __pyx_L7_except_error;
          }
          __pyx_L26_return: {
            __pyx_t_17 = __pyx_r;
            __pyx_r = 0;
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            __pyx_r = __pyx_t_17;
            __pyx_t_17 = 0;
            goto __pyx_L8_except_return;
          }
        }
      }

      /* "cytimes/pddt.py":4415
 *                 errors.raise_error(errors.AmbiguousTimeError, self.__class__, "tz_localize(...)", None, err)
 *                 return  # unreachable: suppress compiler warning
 *             except Exception as err:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(self.__class__, "tz_localize(...)", None, err)
 *                 return  # unreachable: suppress compiler warning
*/
      __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_12) {
        __Pyx_AddTraceback("cytimes.pddt.Pddt.tz_localize", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_9, &__pyx_t_7) < 0) __PYX_ERR(0, 4415, __pyx_L7_except_error)
        __Pyx_XGOTREF(__pyx_t_1);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __pyx_v_err = __pyx_t_9;
        /*try:*/ {

          /* "cytimes/pddt.py":4416
 *                 return  # unreachable: suppress compiler warning
 *             except Exception as err:
 *                 errors.raise_argument_error(self.__class__, "tz_localize(...)", None, err)             # <<<<<<<<<<<<<<
 *                 return  # unreachable: suppress compiler warning
 *             # fmt: on
*/
          __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4416, __pyx_L38_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_8 = __pyx_v_err;
          __Pyx_INCREF(__pyx_t_8);
          if (!(likely(__Pyx_PyException_Check(__pyx_t_8))||((__pyx_t_8) == Py_None) || __Pyx_RaiseUnexpectedTypeError("Exception", __pyx_t_8))) __PYX_ERR(0, 4416, __pyx_L38_error)
          __pyx_t_3.__pyx_n = 4;
          __pyx_t_3.cls = __pyx_t_13;
          __pyx_t_3.input_msg = __pyx_mstate_global->__pyx_kp_u_tz_localize_2;
          __pyx_t_3.error_msg = ((PyObject*)Py_None);
          __pyx_t_3.tb_exc = ((PyObject*)__pyx_t_8);
          __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4416, __pyx_L38_error)
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

          /* "cytimes/pddt.py":4417
 *             except Exception as err:
 *                 errors.raise_argument_error(self.__class__, "tz_localize(...)", None, err)
 *                 return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *             # fmt: on
 * 
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          goto __pyx_L37_return;
        }

        /* "cytimes/pddt.py":4415
 *                 errors.raise_error(errors.AmbiguousTimeError, self.__class__, "tz_localize(...)", None, err)
 *                 return  # unreachable: suppress compiler warning
 *             except Exception as err:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(self.__class__, "tz_localize(...)", None, err)
 *                 return  # unreachable: suppress compiler warning
*/
        /*finally:*/ {
          __pyx_L38_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
            if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_17);
            __Pyx_XGOTREF(__pyx_t_18);
            __Pyx_XGOTREF(__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_22);
            __pyx_t_12 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_24 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            }
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_17);
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
            __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
            __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_24;
            goto __pyx_L7_except_error;
          }
          __pyx_L37_return: {
            __pyx_t_22 = __pyx_r;
            __pyx_r = 0;
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            __pyx_r = __pyx_t_22;
            __pyx_t_22 = 0;
            goto __pyx_L8_except_return;
          }
        }
      }
      goto __pyx_L7_except_error;

      /* "cytimes/pddt.py":4406
 *                 )
 *             # Localize: aware => naive
 *             try:             # <<<<<<<<<<<<<<
 *                 return DatetimeIndex.tz_localize(self, None)
 *             # fmt: off
*/
      __pyx_L7_except_error:;
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
      goto __pyx_L1_error;
      __pyx_L9_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_L8_except_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;
    }

    /* "cytimes/pddt.py":4396
 *         tz = utils.tz_parse(tz)
 *         my_tz = self.tzinfo
 *         if my_tz is not None:             # <<<<<<<<<<<<<<
 *             if tz is not None:
 *                 errors.raise_argument_error(
*/
  }

  /* "cytimes/pddt.py":4421
 * 
 *         # Timezone-naive
 *         if tz is None:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  __pyx_t_2 = (__pyx_v_tz == Py_None);
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":4422
 *         # Timezone-naive
 *         if tz is None:
 *             return self  # exit             # <<<<<<<<<<<<<<
 * 
 *         # Localize: naive => aware
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pddt.py":4421
 * 
 *         # Timezone-naive
 *         if tz is None:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  }

  /* "cytimes/pddt.py":4427
 *         #: To prevent 'ns' overflow issue, we manually check if
 *         #: the values are in safe 'ns' range before localization.
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)             # <<<<<<<<<<<<<<
 *         try:
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
*/
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_7))) __PYX_ERR(0, 4427, __pyx_L1_error)
  __pyx_t_15 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(((PyObject*)__pyx_t_7)); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 4427, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_my_reso = __pyx_t_15;

  /* "cytimes/pddt.py":4428
 *         #: the values are in safe 'ns' range before localization.
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         try:             # <<<<<<<<<<<<<<
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *                 self.values_naive, utils.DT_NPY_UNIT_NS
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "cytimes/pddt.py":4429
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         try:
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *                 self.values_naive, utils.DT_NPY_UNIT_NS
 *             ):
*/
      __pyx_t_25 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS);
      if (__pyx_t_25) {
      } else {
        __pyx_t_2 = __pyx_t_25;
        goto __pyx_L52_bool_binop_done;
      }

      /* "cytimes/pddt.py":4430
 *         try:
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *                 self.values_naive, utils.DT_NPY_UNIT_NS             # <<<<<<<<<<<<<<
 *             ):
 *                 # Cast to 'us' to prevent overflow
*/
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4430, __pyx_L45_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4430, __pyx_L45_error)

      /* "cytimes/pddt.py":4429
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         try:
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *                 self.values_naive, utils.DT_NPY_UNIT_NS
 *             ):
*/
      __pyx_t_26.__pyx_n = 1;
      __pyx_t_26.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS;
      __pyx_t_25 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(((PyArrayObject *)__pyx_t_7), &__pyx_t_26); if (unlikely(__pyx_t_25 == ((int)-1))) __PYX_ERR(0, 4429, __pyx_L45_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_27 = (!__pyx_t_25);
      __pyx_t_2 = __pyx_t_27;
      __pyx_L52_bool_binop_done:;
      if (__pyx_t_2) {

        /* "cytimes/pddt.py":4433
 *             ):
 *                 # Cast to 'us' to prevent overflow
 *                 return DatetimeIndex.tz_localize(             # <<<<<<<<<<<<<<
 *                     self.as_unit("us"), tz, ambiguous, nonexistent
 *                 )
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_9 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DatetimeIndex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4433, __pyx_L45_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tz_localize); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4433, __pyx_L45_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "cytimes/pddt.py":4434
 *                 # Cast to 'us' to prevent overflow
 *                 return DatetimeIndex.tz_localize(
 *                     self.as_unit("us"), tz, ambiguous, nonexistent             # <<<<<<<<<<<<<<
 *                 )
 *                 # Localize in original resolution
*/
        __pyx_t_13 = __pyx_v_self;
        __Pyx_INCREF(__pyx_t_13);
        __pyx_t_10 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_mstate_global->__pyx_n_u_us};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4434, __pyx_L45_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_t_10 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
          assert(__pyx_t_9);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
          __pyx_t_10 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[5] = {__pyx_t_9, __pyx_t_1, __pyx_v_tz, __pyx_v_ambiguous, __pyx_v_nonexistent};
          __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_10, (5-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4433, __pyx_L45_error)
          __Pyx_GOTREF(__pyx_t_7);
        }
        __pyx_r = __pyx_t_7;
        __pyx_t_7 = 0;
        goto __pyx_L49_try_return;

        /* "cytimes/pddt.py":4429
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         try:
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *                 self.values_naive, utils.DT_NPY_UNIT_NS
 *             ):
*/
      }

      /* "cytimes/pddt.py":4438
 *                 # Localize in original resolution
 *             else:
 *                 return DatetimeIndex.tz_localize(self, tz, ambiguous, nonexistent)             # <<<<<<<<<<<<<<
 *         # fmt: off
 *         except errors.PdOutOfBoundsDatetime as err:
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_8 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DatetimeIndex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4438, __pyx_L45_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tz_localize); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4438, __pyx_L45_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_10 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
          assert(__pyx_t_8);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
          __pyx_t_10 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_v_self, __pyx_v_tz, __pyx_v_ambiguous, __pyx_v_nonexistent};
          __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_10, (5-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4438, __pyx_L45_error)
          __Pyx_GOTREF(__pyx_t_7);
        }
        __pyx_r = __pyx_t_7;
        __pyx_t_7 = 0;
        goto __pyx_L49_try_return;
      }

      /* "cytimes/pddt.py":4428
 *         #: the values are in safe 'ns' range before localization.
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         try:             # <<<<<<<<<<<<<<
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *                 self.values_naive, utils.DT_NPY_UNIT_NS
*/
    }
    __pyx_L45_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cytimes/pddt.py":4440
 *                 return DatetimeIndex.tz_localize(self, tz, ambiguous, nonexistent)
 *         # fmt: off
 *         except errors.PdOutOfBoundsDatetime as err:             # <<<<<<<<<<<<<<
 *             errors.raise_error(errors.OutOfBoundsError, self.__class__, "tz_localize(...)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
    __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_9, &__pyx_t_8);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4440, __pyx_L47_except_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_PdOutOfBoundsDatetime); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4440, __pyx_L47_except_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_15 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_7, __pyx_t_13);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_ErrRestore(__pyx_t_7, __pyx_t_9, __pyx_t_8);
    __pyx_t_7 = 0; __pyx_t_9 = 0; __pyx_t_8 = 0;
    if (__pyx_t_15) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.tz_localize", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_7) < 0) __PYX_ERR(0, 4440, __pyx_L47_except_error)
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_9);
      __pyx_v_err = __pyx_t_9;
      /*try:*/ {

        /* "cytimes/pddt.py":4441
 *         # fmt: off
 *         except errors.PdOutOfBoundsDatetime as err:
 *             errors.raise_error(errors.OutOfBoundsError, self.__class__, "tz_localize(...)", None, err)             # <<<<<<<<<<<<<<
 *             return  # unreachable: suppress compiler warning
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:
*/
        __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4441, __pyx_L59_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_OutOfBoundsError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4441, __pyx_L59_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4441, __pyx_L59_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_11 = __pyx_v_err;
        __Pyx_INCREF(__pyx_t_11);
        if (!(likely(__Pyx_PyException_Check(__pyx_t_11))||((__pyx_t_11) == Py_None) || __Pyx_RaiseUnexpectedTypeError("Exception", __pyx_t_11))) __PYX_ERR(0, 4441, __pyx_L59_error)
        __pyx_t_14.__pyx_n = 4;
        __pyx_t_14.cls = __pyx_t_13;
        __pyx_t_14.input_msg = __pyx_mstate_global->__pyx_kp_u_tz_localize_2;
        __pyx_t_14.error_msg = ((PyObject*)Py_None);
        __pyx_t_14.tb_exc = ((PyObject*)__pyx_t_11);
        __pyx_f_7cytimes_6errors_raise_error(__pyx_t_1, 0, &__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4441, __pyx_L59_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

        /* "cytimes/pddt.py":4442
 *         except errors.PdOutOfBoundsDatetime as err:
 *             errors.raise_error(errors.OutOfBoundsError, self.__class__, "tz_localize(...)", None, err)
 *             return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:
 *             errors.raise_error(errors.AmbiguousTimeError, self.__class__, "tz_localize(...)", None, err)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L58_return;
      }

      /* "cytimes/pddt.py":4440
 *                 return DatetimeIndex.tz_localize(self, tz, ambiguous, nonexistent)
 *         # fmt: off
 *         except errors.PdOutOfBoundsDatetime as err:             # <<<<<<<<<<<<<<
 *             errors.raise_error(errors.OutOfBoundsError, self.__class__, "tz_localize(...)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
      /*finally:*/ {
        __pyx_L59_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_18, &__pyx_t_17);
          if ( unlikely(__Pyx_GetException(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_17);
          __pyx_t_15 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_28 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_18, __pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_22, __pyx_t_21, __pyx_t_20);
          __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0;
          __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_28;
          goto __pyx_L47_except_error;
        }
        __pyx_L58_return: {
          __pyx_t_17 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          __pyx_r = __pyx_t_17;
          __pyx_t_17 = 0;
          goto __pyx_L48_except_return;
        }
      }
    }

    /* "cytimes/pddt.py":4443
 *             errors.raise_error(errors.OutOfBoundsError, self.__class__, "tz_localize(...)", None, err)
 *             return  # unreachable: suppress compiler warning
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:             # <<<<<<<<<<<<<<
 *             errors.raise_error(errors.AmbiguousTimeError, self.__class__, "tz_localize(...)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
    __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_9, &__pyx_t_8);
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4443, __pyx_L47_except_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_PytzAmbiguousTimeError); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4443, __pyx_L47_except_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4443, __pyx_L47_except_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_PytzNonExistentTimeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4443, __pyx_L47_except_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_12 = __Pyx_PyErr_GivenExceptionMatches2(__pyx_t_7, __pyx_t_13, __pyx_t_1);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_ErrRestore(__pyx_t_7, __pyx_t_9, __pyx_t_8);
    __pyx_t_7 = 0; __pyx_t_9 = 0; __pyx_t_8 = 0;
    if (__pyx_t_12) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.tz_localize", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_7) < 0) __PYX_ERR(0, 4443, __pyx_L47_except_error)
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_9);
      __pyx_v_err = __pyx_t_9;
      /*try:*/ {

        /* "cytimes/pddt.py":4444
 *             return  # unreachable: suppress compiler warning
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:
 *             errors.raise_error(errors.AmbiguousTimeError, self.__class__, "tz_localize(...)", None, err)             # <<<<<<<<<<<<<<
 *             return  # unreachable: suppress compiler warning
 *         except Exception as err:
*/
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4444, __pyx_L70_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_AmbiguousTimeError); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4444, __pyx_L70_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4444, __pyx_L70_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_11 = __pyx_v_err;
        __Pyx_INCREF(__pyx_t_11);
        if (!(likely(__Pyx_PyException_Check(__pyx_t_11))||((__pyx_t_11) == Py_None) || __Pyx_RaiseUnexpectedTypeError("Exception", __pyx_t_11))) __PYX_ERR(0, 4444, __pyx_L70_error)
        __pyx_t_14.__pyx_n = 4;
        __pyx_t_14.cls = __pyx_t_1;
        __pyx_t_14.input_msg = __pyx_mstate_global->__pyx_kp_u_tz_localize_2;
        __pyx_t_14.error_msg = ((PyObject*)Py_None);
        __pyx_t_14.tb_exc = ((PyObject*)__pyx_t_11);
        __pyx_f_7cytimes_6errors_raise_error(__pyx_t_13, 0, &__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4444, __pyx_L70_error)
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

        /* "cytimes/pddt.py":4445
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:
 *             errors.raise_error(errors.AmbiguousTimeError, self.__class__, "tz_localize(...)", None, err)
 *             return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "tz_localize(...)", None, err)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L69_return;
      }

      /* "cytimes/pddt.py":4443
 *             errors.raise_error(errors.OutOfBoundsError, self.__class__, "tz_localize(...)", None, err)
 *             return  # unreachable: suppress compiler warning
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:             # <<<<<<<<<<<<<<
 *             errors.raise_error(errors.AmbiguousTimeError, self.__class__, "tz_localize(...)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
      /*finally:*/ {
        __pyx_L70_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __pyx_t_12 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_29 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_29;
          goto __pyx_L47_except_error;
        }
        __pyx_L69_return: {
          __pyx_t_22 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          __pyx_r = __pyx_t_22;
          __pyx_t_22 = 0;
          goto __pyx_L48_except_return;
        }
      }
    }

    /* "cytimes/pddt.py":4446
 *             errors.raise_error(errors.AmbiguousTimeError, self.__class__, "tz_localize(...)", None, err)
 *             return  # unreachable: suppress compiler warning
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self.__class__, "tz_localize(...)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
    __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_15) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.tz_localize", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_9, &__pyx_t_8) < 0) __PYX_ERR(0, 4446, __pyx_L47_except_error)
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_9);
      __pyx_v_err = __pyx_t_9;
      /*try:*/ {

        /* "cytimes/pddt.py":4447
 *             return  # unreachable: suppress compiler warning
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "tz_localize(...)", None, err)             # <<<<<<<<<<<<<<
 *             return  # unreachable: suppress compiler warning
 *         # fmt: on
*/
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4447, __pyx_L81_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_1 = __pyx_v_err;
        __Pyx_INCREF(__pyx_t_1);
        if (!(likely(__Pyx_PyException_Check(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("Exception", __pyx_t_1))) __PYX_ERR(0, 4447, __pyx_L81_error)
        __pyx_t_3.__pyx_n = 4;
        __pyx_t_3.cls = __pyx_t_11;
        __pyx_t_3.input_msg = __pyx_mstate_global->__pyx_kp_u_tz_localize_2;
        __pyx_t_3.error_msg = ((PyObject*)Py_None);
        __pyx_t_3.tb_exc = ((PyObject*)__pyx_t_1);
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4447, __pyx_L81_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "cytimes/pddt.py":4448
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "tz_localize(...)", None, err)
 *             return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *         # fmt: on
 * 
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L80_return;
      }

      /* "cytimes/pddt.py":4446
 *             errors.raise_error(errors.AmbiguousTimeError, self.__class__, "tz_localize(...)", None, err)
 *             return  # unreachable: suppress compiler warning
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self.__class__, "tz_localize(...)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
      /*finally:*/ {
        __pyx_L81_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_18, &__pyx_t_17);
          if ( unlikely(__Pyx_GetException(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_17);
          __pyx_t_15 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_30 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_18, __pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_22, __pyx_t_21, __pyx_t_20);
          __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0;
          __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_30;
          goto __pyx_L47_except_error;
        }
        __pyx_L80_return: {
          __pyx_t_17 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          __pyx_r = __pyx_t_17;
          __pyx_t_17 = 0;
          goto __pyx_L48_except_return;
        }
      }
    }
    goto __pyx_L47_except_error;

    /* "cytimes/pddt.py":4428
 *         #: the values are in safe 'ns' range before localization.
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         try:             # <<<<<<<<<<<<<<
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *                 self.values_naive, utils.DT_NPY_UNIT_NS
*/
    __pyx_L47_except_error:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L49_try_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4);
    goto __pyx_L0;
    __pyx_L48_except_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4);
    goto __pyx_L0;
  }

  /* "cytimes/pddt.py":4364
 *         return pt.tz_convert(to_tz)
 * 
 *     def tz_localize(             # <<<<<<<<<<<<<<
 *         self,
 *         tz: datetime.tzinfo | str | None,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.tz_localize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_my_tz);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4451
 *         # fmt: on
 * 
 *     def tz_convert(self, tz: datetime.tzinfo | str | None) -> Self:             # <<<<<<<<<<<<<<
 *         """Convert timezone-aware datetime index to another timezone `<'Pddt'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_241tz_convert(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_240tz_convert, "Convert timezone-aware datetime index to another timezone `<'Pddt'>`.\n\n        :param tz `<'tzinfo/str/None'>`: Target timezone. Defaults to `None`.\n\n            - `<'None'>` Convert to UTC timezone and localize to timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :returns `<'Pddt'>`: The resulting datetime index representing the\n            `same` datetimes expressed in the target timezone.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_241tz_convert = {"tz_convert", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_241tz_convert, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_240tz_convert};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_241tz_convert(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_tz = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tz_convert (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_tz,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4451, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4451, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4451, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "tz_convert", 0) < (0)) __PYX_ERR(0, 4451, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("tz_convert", 1, 2, 2, i); __PYX_ERR(0, 4451, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4451, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4451, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_tz = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tz_convert", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4451, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.tz_convert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_240tz_convert(__pyx_self, __pyx_v_self, __pyx_v_tz);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_240tz_convert(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tz) {
  PyObject *__pyx_v_my_tz = NULL;
  int __pyx_v_my_reso;
  PyObject *__pyx_v_err = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_11;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_error __pyx_t_17;
  int __pyx_t_18;
  char const *__pyx_t_19;
  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;
  char const *__pyx_t_26;
  char const *__pyx_t_27;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_convert", 0);
  __Pyx_INCREF(__pyx_v_tz);

  /* "cytimes/pddt.py":4464
 *         """
 *         # Validate
 *         my_tz = self.tzinfo             # <<<<<<<<<<<<<<
 *         if my_tz is None:
 *             errors.raise_argument_error(
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_my_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":4465
 *         # Validate
 *         my_tz = self.tzinfo
 *         if my_tz is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self._cls(),
*/
  __pyx_t_2 = (__pyx_v_my_tz == Py_None);
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":4467
 *         if my_tz is None:
 *             errors.raise_argument_error(
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *                 "tz_convert(tz)",
 *                 "Datetime index is timezone-naive.\n"
*/
    __pyx_t_3 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cls_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4467, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }

    /* "cytimes/pddt.py":4466
 *         my_tz = self.tzinfo
 *         if my_tz is None:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self._cls(),
 *                 "tz_convert(tz)",
*/
    __pyx_t_5.__pyx_n = 3;
    __pyx_t_5.cls = __pyx_t_1;
    __pyx_t_5.input_msg = __pyx_mstate_global->__pyx_kp_u_tz_convert_tz;
    __pyx_t_5.error_msg = __pyx_mstate_global->__pyx_kp_u_Datetime_index_is_timezone_naive;
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4466, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cytimes/pddt.py":4465
 *         # Validate
 *         my_tz = self.tzinfo
 *         if my_tz is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self._cls(),
*/
  }

  /* "cytimes/pddt.py":4476
 * 
 *         # Same timezone
 *         tz = utils.tz_parse(tz)             # <<<<<<<<<<<<<<
 *         if my_tz is tz:
 *             return self
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":4477
 *         # Same timezone
 *         tz = utils.tz_parse(tz)
 *         if my_tz is tz:             # <<<<<<<<<<<<<<
 *             return self
 * 
*/
  __pyx_t_2 = (__pyx_v_my_tz == __pyx_v_tz);
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":4478
 *         tz = utils.tz_parse(tz)
 *         if my_tz is tz:
 *             return self             # <<<<<<<<<<<<<<
 * 
 *         # Convert: aware => aware
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pddt.py":4477
 *         # Same timezone
 *         tz = utils.tz_parse(tz)
 *         if my_tz is tz:             # <<<<<<<<<<<<<<
 *             return self
 * 
*/
  }

  /* "cytimes/pddt.py":4483
 *         #: To prevent 'ns' overflow issue, we manually check if
 *         #: the values are in safe 'ns' range before conversion.
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)             # <<<<<<<<<<<<<<
 *         try:
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 4483, __pyx_L1_error)
  __pyx_t_6 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(((PyObject*)__pyx_t_1)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 4483, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_my_reso = __pyx_t_6;

  /* "cytimes/pddt.py":4484
 *         #: the values are in safe 'ns' range before conversion.
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         try:             # <<<<<<<<<<<<<<
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *                 self.values_naive, utils.DT_NPY_UNIT_NS
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    /*try:*/ {

      /* "cytimes/pddt.py":4485
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         try:
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *                 self.values_naive, utils.DT_NPY_UNIT_NS
 *             ):
*/
      __pyx_t_10 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS);
      if (__pyx_t_10) {
      } else {
        __pyx_t_2 = __pyx_t_10;
        goto __pyx_L12_bool_binop_done;
      }

      /* "cytimes/pddt.py":4486
 *         try:
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *                 self.values_naive, utils.DT_NPY_UNIT_NS             # <<<<<<<<<<<<<<
 *             ):
 *                 # Cast to 'us' to prevent overflow
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4486, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4486, __pyx_L5_error)

      /* "cytimes/pddt.py":4485
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         try:
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *                 self.values_naive, utils.DT_NPY_UNIT_NS
 *             ):
*/
      __pyx_t_11.__pyx_n = 1;
      __pyx_t_11.arr_reso = __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS;
      __pyx_t_10 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(((PyArrayObject *)__pyx_t_1), &__pyx_t_11); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4485, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_12 = (!__pyx_t_10);
      __pyx_t_2 = __pyx_t_12;
      __pyx_L12_bool_binop_done:;
      if (__pyx_t_2) {

        /* "cytimes/pddt.py":4489
 *             ):
 *                 # Cast to 'us' to prevent overflow
 *                 return DatetimeIndex.tz_convert(self.as_unit("us"), tz)             # <<<<<<<<<<<<<<
 *             else:
 *                 # Convert in original resolution
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_DatetimeIndex); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4489, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_tz_convert); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4489, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_15 = __pyx_v_self;
        __Pyx_INCREF(__pyx_t_15);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_mstate_global->__pyx_n_u_us};
          __pyx_t_13 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_unit, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4489, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_13);
        }
        __pyx_t_4 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_14))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_14);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_14, __pyx__function);
          __pyx_t_4 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_13, __pyx_v_tz};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4489, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L9_try_return;

        /* "cytimes/pddt.py":4485
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         try:
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(             # <<<<<<<<<<<<<<
 *                 self.values_naive, utils.DT_NPY_UNIT_NS
 *             ):
*/
      }

      /* "cytimes/pddt.py":4492
 *             else:
 *                 # Convert in original resolution
 *                 return DatetimeIndex.tz_convert(self, tz)             # <<<<<<<<<<<<<<
 *         # fmt: off
 *         except errors.PdOutOfBoundsDatetime as err:
*/
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_14 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_DatetimeIndex); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4492, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_tz_convert); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4492, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_4 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_3);
          assert(__pyx_t_14);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
          __pyx_t_4 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_14, __pyx_v_self, __pyx_v_tz};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4492, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L9_try_return;
      }

      /* "cytimes/pddt.py":4484
 *         #: the values are in safe 'ns' range before conversion.
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         try:             # <<<<<<<<<<<<<<
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *                 self.values_naive, utils.DT_NPY_UNIT_NS
*/
    }
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 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;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cytimes/pddt.py":4494
 *                 return DatetimeIndex.tz_convert(self, tz)
 *         # fmt: off
 *         except errors.PdOutOfBoundsDatetime as err:             # <<<<<<<<<<<<<<
 *             errors.raise_error(errors.OutOfBoundsError, self.__class__, "tz_convert(...)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
    __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_3, &__pyx_t_14);
    __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4494, __pyx_L7_except_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_PdOutOfBoundsDatetime); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4494, __pyx_L7_except_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_6 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_15);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_ErrRestore(__pyx_t_1, __pyx_t_3, __pyx_t_14);
    __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_14 = 0;
    if (__pyx_t_6) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.tz_convert", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_3, &__pyx_t_1) < 0) __PYX_ERR(0, 4494, __pyx_L7_except_error)
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_v_err = __pyx_t_3;
      /*try:*/ {

        /* "cytimes/pddt.py":4495
 *         # fmt: off
 *         except errors.PdOutOfBoundsDatetime as err:
 *             errors.raise_error(errors.OutOfBoundsError, self.__class__, "tz_convert(...)", None, err)             # <<<<<<<<<<<<<<
 *             return  # unreachable: suppress compiler warning
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:
*/
        __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4495, __pyx_L19_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_OutOfBoundsError); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4495, __pyx_L19_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4495, __pyx_L19_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_16 = __pyx_v_err;
        __Pyx_INCREF(__pyx_t_16);
        if (!(likely(__Pyx_PyException_Check(__pyx_t_16))||((__pyx_t_16) == Py_None) || __Pyx_RaiseUnexpectedTypeError("Exception", __pyx_t_16))) __PYX_ERR(0, 4495, __pyx_L19_error)
        __pyx_t_17.__pyx_n = 4;
        __pyx_t_17.cls = __pyx_t_15;
        __pyx_t_17.input_msg = __pyx_mstate_global->__pyx_kp_u_tz_convert_2;
        __pyx_t_17.error_msg = ((PyObject*)Py_None);
        __pyx_t_17.tb_exc = ((PyObject*)__pyx_t_16);
        __pyx_f_7cytimes_6errors_raise_error(__pyx_t_13, 0, &__pyx_t_17); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4495, __pyx_L19_error)
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

        /* "cytimes/pddt.py":4496
 *         except errors.PdOutOfBoundsDatetime as err:
 *             errors.raise_error(errors.OutOfBoundsError, self.__class__, "tz_convert(...)", None, err)
 *             return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:
 *             errors.raise_error(errors.AmbiguousTimeError, self.__class__, "tz_convert(...)", None, err)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        goto __pyx_L18_return;
      }

      /* "cytimes/pddt.py":4494
 *                 return DatetimeIndex.tz_convert(self, tz)
 *         # fmt: off
 *         except errors.PdOutOfBoundsDatetime as err:             # <<<<<<<<<<<<<<
 *             errors.raise_error(errors.OutOfBoundsError, self.__class__, "tz_convert(...)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
      /*finally:*/ {
        __pyx_L19_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25);
          if ( unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_25);
          __pyx_t_6 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_19 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_XGIVEREF(__pyx_t_25);
          __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_ErrRestore(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
          __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_19;
          goto __pyx_L7_except_error;
        }
        __pyx_L18_return: {
          __pyx_t_25 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          __pyx_r = __pyx_t_25;
          __pyx_t_25 = 0;
          goto __pyx_L8_except_return;
        }
      }
    }

    /* "cytimes/pddt.py":4497
 *             errors.raise_error(errors.OutOfBoundsError, self.__class__, "tz_convert(...)", None, err)
 *             return  # unreachable: suppress compiler warning
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:             # <<<<<<<<<<<<<<
 *             errors.raise_error(errors.AmbiguousTimeError, self.__class__, "tz_convert(...)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
    __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_3, &__pyx_t_14);
    __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4497, __pyx_L7_except_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_PytzAmbiguousTimeError); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4497, __pyx_L7_except_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4497, __pyx_L7_except_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_PytzNonExistentTimeError); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4497, __pyx_L7_except_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_18 = __Pyx_PyErr_GivenExceptionMatches2(__pyx_t_1, __pyx_t_15, __pyx_t_13);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_ErrRestore(__pyx_t_1, __pyx_t_3, __pyx_t_14);
    __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_14 = 0;
    if (__pyx_t_18) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.tz_convert", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_3, &__pyx_t_1) < 0) __PYX_ERR(0, 4497, __pyx_L7_except_error)
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_v_err = __pyx_t_3;
      /*try:*/ {

        /* "cytimes/pddt.py":4498
 *             return  # unreachable: suppress compiler warning
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:
 *             errors.raise_error(errors.AmbiguousTimeError, self.__class__, "tz_convert(...)", None, err)             # <<<<<<<<<<<<<<
 *             return  # unreachable: suppress compiler warning
 *         except Exception as err:
*/
        __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4498, __pyx_L30_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_AmbiguousTimeError); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4498, __pyx_L30_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4498, __pyx_L30_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_16 = __pyx_v_err;
        __Pyx_INCREF(__pyx_t_16);
        if (!(likely(__Pyx_PyException_Check(__pyx_t_16))||((__pyx_t_16) == Py_None) || __Pyx_RaiseUnexpectedTypeError("Exception", __pyx_t_16))) __PYX_ERR(0, 4498, __pyx_L30_error)
        __pyx_t_17.__pyx_n = 4;
        __pyx_t_17.cls = __pyx_t_13;
        __pyx_t_17.input_msg = __pyx_mstate_global->__pyx_kp_u_tz_convert_2;
        __pyx_t_17.error_msg = ((PyObject*)Py_None);
        __pyx_t_17.tb_exc = ((PyObject*)__pyx_t_16);
        __pyx_f_7cytimes_6errors_raise_error(__pyx_t_15, 0, &__pyx_t_17); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4498, __pyx_L30_error)
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

        /* "cytimes/pddt.py":4499
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:
 *             errors.raise_error(errors.AmbiguousTimeError, self.__class__, "tz_convert(...)", None, err)
 *             return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "tz_convert(...)", None, err)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        goto __pyx_L29_return;
      }

      /* "cytimes/pddt.py":4497
 *             errors.raise_error(errors.OutOfBoundsError, self.__class__, "tz_convert(...)", None, err)
 *             return  # unreachable: suppress compiler warning
 *         except (errors.PytzAmbiguousTimeError, errors.PytzNonExistentTimeError) as err:             # <<<<<<<<<<<<<<
 *             errors.raise_error(errors.AmbiguousTimeError, self.__class__, "tz_convert(...)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
      /*finally:*/ {
        __pyx_L30_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20);
          if ( unlikely(__Pyx_GetException(&__pyx_t_25, &__pyx_t_24, &__pyx_t_23) < 0)) __Pyx_ErrFetch(&__pyx_t_25, &__pyx_t_24, &__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_25);
          __Pyx_XGOTREF(__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_20);
          __pyx_t_18 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_26 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_21, __pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_25);
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_ErrRestore(__pyx_t_25, __pyx_t_24, __pyx_t_23);
          __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0;
          __pyx_lineno = __pyx_t_18; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_26;
          goto __pyx_L7_except_error;
        }
        __pyx_L29_return: {
          __pyx_t_20 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          __pyx_r = __pyx_t_20;
          __pyx_t_20 = 0;
          goto __pyx_L8_except_return;
        }
      }
    }

    /* "cytimes/pddt.py":4500
 *             errors.raise_error(errors.AmbiguousTimeError, self.__class__, "tz_convert(...)", None, err)
 *             return  # unreachable: suppress compiler warning
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self.__class__, "tz_convert(...)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_6) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.tz_convert", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_14) < 0) __PYX_ERR(0, 4500, __pyx_L7_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_v_err = __pyx_t_3;
      /*try:*/ {

        /* "cytimes/pddt.py":4501
 *             return  # unreachable: suppress compiler warning
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "tz_convert(...)", None, err)             # <<<<<<<<<<<<<<
 *             return  # unreachable: suppress compiler warning
 *         # fmt: on
*/
        __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4501, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_13 = __pyx_v_err;
        __Pyx_INCREF(__pyx_t_13);
        if (!(likely(__Pyx_PyException_Check(__pyx_t_13))||((__pyx_t_13) == Py_None) || __Pyx_RaiseUnexpectedTypeError("Exception", __pyx_t_13))) __PYX_ERR(0, 4501, __pyx_L41_error)
        __pyx_t_5.__pyx_n = 4;
        __pyx_t_5.cls = __pyx_t_16;
        __pyx_t_5.input_msg = __pyx_mstate_global->__pyx_kp_u_tz_convert_2;
        __pyx_t_5.error_msg = ((PyObject*)Py_None);
        __pyx_t_5.tb_exc = ((PyObject*)__pyx_t_13);
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4501, __pyx_L41_error)
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

        /* "cytimes/pddt.py":4502
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "tz_convert(...)", None, err)
 *             return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *         # fmt: on
 * 
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        goto __pyx_L40_return;
      }

      /* "cytimes/pddt.py":4500
 *             errors.raise_error(errors.AmbiguousTimeError, self.__class__, "tz_convert(...)", None, err)
 *             return  # unreachable: suppress compiler warning
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self.__class__, "tz_convert(...)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
      /*finally:*/ {
        __pyx_L41_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25);
          if ( unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_25);
          __pyx_t_6 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_27 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_XGIVEREF(__pyx_t_25);
          __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_ErrRestore(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
          __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_27;
          goto __pyx_L7_except_error;
        }
        __pyx_L40_return: {
          __pyx_t_25 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          __pyx_r = __pyx_t_25;
          __pyx_t_25 = 0;
          goto __pyx_L8_except_return;
        }
      }
    }
    goto __pyx_L7_except_error;

    /* "cytimes/pddt.py":4484
 *         #: the values are in safe 'ns' range before conversion.
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         try:             # <<<<<<<<<<<<<<
 *             if my_reso == utils.DT_NPY_UNIT_NS and not utils.is_dt64arr_ns_safe(
 *                 self.values_naive, utils.DT_NPY_UNIT_NS
*/
    __pyx_L7_except_error:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L1_error;
    __pyx_L9_try_return:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L0;
    __pyx_L8_except_return:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L0;
  }

  /* "cytimes/pddt.py":4451
 *         # fmt: on
 * 
 *     def tz_convert(self, tz: datetime.tzinfo | str | None) -> Self:             # <<<<<<<<<<<<<<
 *         """Convert timezone-aware datetime index to another timezone `<'Pddt'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.tz_convert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_my_tz);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4505
 *         # fmt: on
 * 
 *     def tz_switch(             # <<<<<<<<<<<<<<
 *         self,
 *         targ_tz: datetime.tzinfo | str | None,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_243tz_switch(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_242tz_switch, "Switch (convert) the datetime index from base timezone to the target timezone `<'Pddt'>`.\n\n        This method extends the functionality of `astimezone()` by allowing\n        user to specify a base timezone for timezone-naive index before\n        converting to the target timezone.\n\n        - If the datetime index is timezone-aware, the 'base_tz' argument is `ignored`,\n          and this method behaves identical to `astimezone()`: converting the index\n          to the target timezone.\n        - If the datetime index is timezone-naive, it first localizes the index\n          to the `base_tz` (required), and then converts to the target timezone.\n\n        :param targ_tz `<'tzinfo/str/None'>`: The target timezone.\n\n        :param base_tz `<'tzinfo/str/None'>`: The base timezone for timezone-naive index. Defaults to `None`.\n\n        :param naive `<'bool'>`: If 'True', returns timezone-naive datetime index after conversion. Defaults to `False`.\n\n        :param ambiguous `<'str/ndarray'>`: How to handle ambiguous times. Defaults to `'raise'`.\n\n            - `<'str'>` Accepts: `'infer'`, `'NaT'` or `'raise'` for ambiguous times handling.\n            - `<'ndarray'>` A boolean array that specifies ambiguous times (True for DST time).\n\n        :param nonexistent `<'str/timedelta'>`: How to handle nonexistent times. Defaults to `'raise'`.\n\n            - `<'str'>` Accepts `'shift_forward'`, `'shift_backward'`, `'NaT'` or `'raise'`\n                for nonexistent times handling.\n            - `<'timedelta'>` An instance of timedelta to shift the nonexistent times.\n\n        :returns `<'Pddt'>`: The resulting datetime index representing the\n            `same` datetimes expressed in the target timezone; optionally timezone-naive.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_243tz_switch = {"tz_switch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_243tz_switch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_242tz_switch};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_243tz_switch(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_targ_tz = 0;
  PyObject *__pyx_v_base_tz = 0;
  int __pyx_v_naive;
  PyObject *__pyx_v_ambiguous = 0;
  PyObject *__pyx_v_nonexistent = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tz_switch (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_targ_tz,&__pyx_mstate_global->__pyx_n_u_base_tz,&__pyx_mstate_global->__pyx_n_u_naive,&__pyx_mstate_global->__pyx_n_u_ambiguous,&__pyx_mstate_global->__pyx_n_u_nonexistent,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4505, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 4505, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4505, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4505, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4505, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4505, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4505, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "tz_switch", 0) < (0)) __PYX_ERR(0, 4505, __pyx_L3_error)

      /* "cytimes/pddt.py":4508
 *         self,
 *         targ_tz: datetime.tzinfo | str | None,
 *         base_tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         naive: cython.bint = False,
 *         ambiguous: object = "raise",
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_raise)));
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_raise)));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("tz_switch", 0, 2, 6, i); __PYX_ERR(0, 4505, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 4505, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4505, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4505, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4505, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4505, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4505, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_raise)));
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_raise)));
    }
    __pyx_v_self = values[0];
    __pyx_v_targ_tz = values[1];
    __pyx_v_base_tz = values[2];
    if (values[3]) {
      __pyx_v_naive = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_naive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4509, __pyx_L3_error)
    } else {

      /* "cytimes/pddt.py":4509
 *         targ_tz: datetime.tzinfo | str | None,
 *         base_tz: datetime.tzinfo | str | None = None,
 *         naive: cython.bint = False,             # <<<<<<<<<<<<<<
 *         ambiguous: object = "raise",
 *         nonexistent: object = "raise",
*/
      __pyx_v_naive = ((int)((int)0));
    }
    __pyx_v_ambiguous = values[4];
    __pyx_v_nonexistent = values[5];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tz_switch", 0, 2, 6, __pyx_nargs); __PYX_ERR(0, 4505, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.tz_switch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_242tz_switch(__pyx_self, __pyx_v_self, __pyx_v_targ_tz, __pyx_v_base_tz, __pyx_v_naive, __pyx_v_ambiguous, __pyx_v_nonexistent);

  /* "cytimes/pddt.py":4505
 *         # fmt: on
 * 
 *     def tz_switch(             # <<<<<<<<<<<<<<
 *         self,
 *         targ_tz: datetime.tzinfo | str | None,
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_242tz_switch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_targ_tz, PyObject *__pyx_v_base_tz, int __pyx_v_naive, PyObject *__pyx_v_ambiguous, PyObject *__pyx_v_nonexistent) {
  PyObject *__pyx_v_to_tz = NULL;
  PyObject *__pyx_v_my_tz = NULL;
  PyObject *__pyx_v_pt = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_switch", 0);
  __Pyx_INCREF(__pyx_v_base_tz);

  /* "cytimes/pddt.py":4546
 *         """
 *         # Timezone-aware
 *         to_tz = utils.tz_parse(targ_tz)             # <<<<<<<<<<<<<<
 *         my_tz = self.tzinfo
 *         if my_tz is not None:
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_targ_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_to_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":4547
 *         # Timezone-aware
 *         to_tz = utils.tz_parse(targ_tz)
 *         my_tz = self.tzinfo             # <<<<<<<<<<<<<<
 *         if my_tz is not None:
 *             # . target timezone is None
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_my_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":4548
 *         to_tz = utils.tz_parse(targ_tz)
 *         my_tz = self.tzinfo
 *         if my_tz is not None:             # <<<<<<<<<<<<<<
 *             # . target timezone is None
 *             if to_tz is None:
*/
  __pyx_t_2 = (__pyx_v_my_tz != Py_None);
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":4550
 *         if my_tz is not None:
 *             # . target timezone is None
 *             if to_tz is None:             # <<<<<<<<<<<<<<
 *                 return self.tz_localize(None)
 *             # . target timezone is mytz
*/
    __pyx_t_2 = (__pyx_v_to_tz == Py_None);
    if (__pyx_t_2) {

      /* "cytimes/pddt.py":4551
 *             # . target timezone is None
 *             if to_tz is None:
 *                 return self.tz_localize(None)             # <<<<<<<<<<<<<<
 *             # . target timezone is mytz
 *             elif to_tz is utils.tz_parse(my_tz):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __pyx_v_self;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, Py_None};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tz_localize, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4551, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pddt.py":4550
 *         if my_tz is not None:
 *             # . target timezone is None
 *             if to_tz is None:             # <<<<<<<<<<<<<<
 *                 return self.tz_localize(None)
 *             # . target timezone is mytz
*/
    }

    /* "cytimes/pddt.py":4553
 *                 return self.tz_localize(None)
 *             # . target timezone is mytz
 *             elif to_tz is utils.tz_parse(my_tz):             # <<<<<<<<<<<<<<
 *                 return self.tz_localize(None) if naive else self
 *             # . mytz => target timezone
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_my_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4553, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = (__pyx_v_to_tz == __pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "cytimes/pddt.py":4554
 *             # . target timezone is mytz
 *             elif to_tz is utils.tz_parse(my_tz):
 *                 return self.tz_localize(None) if naive else self             # <<<<<<<<<<<<<<
 *             # . mytz => target timezone
 *             else:
*/
      __Pyx_XDECREF(__pyx_r);
      if (__pyx_v_naive) {
        __pyx_t_5 = __pyx_v_self;
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, Py_None};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tz_localize, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4554, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(__pyx_v_self);
        __pyx_t_1 = __pyx_v_self;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pddt.py":4553
 *                 return self.tz_localize(None)
 *             # . target timezone is mytz
 *             elif to_tz is utils.tz_parse(my_tz):             # <<<<<<<<<<<<<<
 *                 return self.tz_localize(None) if naive else self
 *             # . mytz => target timezone
*/
    }

    /* "cytimes/pddt.py":4557
 *             # . mytz => target timezone
 *             else:
 *                 pt = self.tz_convert(to_tz)             # <<<<<<<<<<<<<<
 *                 return pt.tz_localize(None) if naive else pt
 * 
*/
    /*else*/ {
      __pyx_t_3 = __pyx_v_self;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_to_tz};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tz_convert, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4557, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_v_pt = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "cytimes/pddt.py":4558
 *             else:
 *                 pt = self.tz_convert(to_tz)
 *                 return pt.tz_localize(None) if naive else pt             # <<<<<<<<<<<<<<
 * 
 *         # Timezone-naive
*/
      __Pyx_XDECREF(__pyx_r);
      if (__pyx_v_naive) {
        __pyx_t_5 = __pyx_v_pt;
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, Py_None};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tz_localize, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4558, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(__pyx_v_pt);
        __pyx_t_1 = __pyx_v_pt;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;
    }

    /* "cytimes/pddt.py":4548
 *         to_tz = utils.tz_parse(targ_tz)
 *         my_tz = self.tzinfo
 *         if my_tz is not None:             # <<<<<<<<<<<<<<
 *             # . target timezone is None
 *             if to_tz is None:
*/
  }

  /* "cytimes/pddt.py":4562
 *         # Timezone-naive
 *         # . target timezone is None
 *         if to_tz is None:             # <<<<<<<<<<<<<<
 *             return self  # exit
 *         # . base timezone is None
*/
  __pyx_t_2 = (__pyx_v_to_tz == Py_None);
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":4563
 *         # . target timezone is None
 *         if to_tz is None:
 *             return self  # exit             # <<<<<<<<<<<<<<
 *         # . base timezone is None
 *         base_tz = utils.tz_parse(base_tz)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pddt.py":4562
 *         # Timezone-naive
 *         # . target timezone is None
 *         if to_tz is None:             # <<<<<<<<<<<<<<
 *             return self  # exit
 *         # . base timezone is None
*/
  }

  /* "cytimes/pddt.py":4565
 *             return self  # exit
 *         # . base timezone is None
 *         base_tz = utils.tz_parse(base_tz)             # <<<<<<<<<<<<<<
 *         if base_tz is None:
 *             errors.raise_argument_error(
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_base_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_base_tz, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":4566
 *         # . base timezone is None
 *         base_tz = utils.tz_parse(base_tz)
 *         if base_tz is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  __pyx_t_2 = (__pyx_v_base_tz == Py_None);
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":4568
 *         if base_tz is None:
 *             errors.raise_argument_error(
 *                 self.__class__,             # <<<<<<<<<<<<<<
 *                 "tz_switch(...)",
 *                 "Datetime index is timezone-naive.\n"
*/
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cytimes/pddt.py":4567
 *         base_tz = utils.tz_parse(base_tz)
 *         if base_tz is None:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self.__class__,
 *                 "tz_switch(...)",
*/
    __pyx_t_6.__pyx_n = 3;
    __pyx_t_6.cls = __pyx_t_1;
    __pyx_t_6.input_msg = __pyx_mstate_global->__pyx_kp_u_tz_switch;
    __pyx_t_6.error_msg = __pyx_mstate_global->__pyx_kp_u_Datetime_index_is_timezone_naive_2;
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4567, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cytimes/pddt.py":4566
 *         # . base timezone is None
 *         base_tz = utils.tz_parse(base_tz)
 *         if base_tz is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  }

  /* "cytimes/pddt.py":4575
 *             )
 *         # . base timezone is target timezone
 *         if base_tz is to_tz:             # <<<<<<<<<<<<<<
 *             return self if naive else self.tz_localize(to_tz, ambiguous, nonexistent)
 *         # . localize to base, then convert to target timezone
*/
  __pyx_t_2 = (__pyx_v_base_tz == __pyx_v_to_tz);
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":4576
 *         # . base timezone is target timezone
 *         if base_tz is to_tz:
 *             return self if naive else self.tz_localize(to_tz, ambiguous, nonexistent)             # <<<<<<<<<<<<<<
 *         # . localize to base, then convert to target timezone
 *         else:
*/
    __Pyx_XDECREF(__pyx_r);
    if (__pyx_v_naive) {
      __Pyx_INCREF(__pyx_v_self);
      __pyx_t_1 = __pyx_v_self;
    } else {
      __pyx_t_5 = __pyx_v_self;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_to_tz, __pyx_v_ambiguous, __pyx_v_nonexistent};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tz_localize, __pyx_callargs+__pyx_t_4, (4-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4576, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_1 = __pyx_t_3;
      __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":4575
 *             )
 *         # . base timezone is target timezone
 *         if base_tz is to_tz:             # <<<<<<<<<<<<<<
 *             return self if naive else self.tz_localize(to_tz, ambiguous, nonexistent)
 *         # . localize to base, then convert to target timezone
*/
  }

  /* "cytimes/pddt.py":4579
 *         # . localize to base, then convert to target timezone
 *         else:
 *             pt = self.tz_localize(base_tz, ambiguous, nonexistent).tz_convert(to_tz)             # <<<<<<<<<<<<<<
 *             return pt.tz_localize(None) if naive else pt
 * 
*/
  /*else*/ {
    __pyx_t_7 = __pyx_v_self;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_v_base_tz, __pyx_v_ambiguous, __pyx_v_nonexistent};
      __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tz_localize, __pyx_callargs+__pyx_t_4, (4-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4579, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_3 = __pyx_t_5;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_to_tz};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tz_convert, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4579, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_v_pt = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cytimes/pddt.py":4580
 *         else:
 *             pt = self.tz_localize(base_tz, ambiguous, nonexistent).tz_convert(to_tz)
 *             return pt.tz_localize(None) if naive else pt             # <<<<<<<<<<<<<<
 * 
 *     # Values -------------------------------------------------------------------------------
*/
    __Pyx_XDECREF(__pyx_r);
    if (__pyx_v_naive) {
      __pyx_t_3 = __pyx_v_pt;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, Py_None};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tz_localize, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4580, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_1 = __pyx_t_5;
      __pyx_t_5 = 0;
    } else {
      __Pyx_INCREF(__pyx_v_pt);
      __pyx_t_1 = __pyx_v_pt;
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "cytimes/pddt.py":4505
 *         # fmt: on
 * 
 *     def tz_switch(             # <<<<<<<<<<<<<<
 *         self,
 *         targ_tz: datetime.tzinfo | str | None,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.tz_switch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_to_tz);
  __Pyx_XDECREF(__pyx_v_my_tz);
  __Pyx_XDECREF(__pyx_v_pt);
  __Pyx_XDECREF(__pyx_v_base_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4583
 * 
 *     # Values -------------------------------------------------------------------------------
 *     @property             # <<<<<<<<<<<<<<
 *     def values_naive(self) -> np.ndarray[np.datetime64]:
 *         """Returns an array of the `timezone-naive` datetimes
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_245values_naive(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_244values_naive, "Returns an array of the `timezone-naive` datetimes\n        (underlying data) in the index `<'ndarray[datetime64]'>`.\n\n        ## Behavior\n        - If index is timezone-naive or `UTC`, equivalent to `pt.values`.\n        - If index is timezone-aware, equivalent to `pt.tz_localize(None).values`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_245values_naive = {"values_naive", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_245values_naive, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_244values_naive};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_245values_naive(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("values_naive (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4583, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4583, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "values_naive", 0) < (0)) __PYX_ERR(0, 4583, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("values_naive", 1, 1, 1, i); __PYX_ERR(0, 4583, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4583, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("values_naive", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4583, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.values_naive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_244values_naive(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_244values_naive(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_tz = 0;
  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;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("values_naive", 0);

  /* "cytimes/pddt.py":4592
 *         - If index is timezone-aware, equivalent to `pt.tz_localize(None).values`.
 *         """
 *         tz: object = self.tzinfo             # <<<<<<<<<<<<<<
 *         if tz is None or tz is utils.UTC:
 *             return self.values
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":4593
 *         """
 *         tz: object = self.tzinfo
 *         if tz is None or tz is utils.UTC:             # <<<<<<<<<<<<<<
 *             return self.values
 *         else:
*/
  __pyx_t_3 = (__pyx_v_tz == Py_None);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__pyx_v_tz == ((PyObject *)__pyx_v_7cytimes_5utils_UTC));
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":4594
 *         tz: object = self.tzinfo
 *         if tz is None or tz is utils.UTC:
 *             return self.values             # <<<<<<<<<<<<<<
 *         else:
 *             return DatetimeIndex.tz_localize(self, None).values
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cytimes/pddt.py":4593
 *         """
 *         tz: object = self.tzinfo
 *         if tz is None or tz is utils.UTC:             # <<<<<<<<<<<<<<
 *             return self.values
 *         else:
*/
  }

  /* "cytimes/pddt.py":4596
 *             return self.values
 *         else:
 *             return DatetimeIndex.tz_localize(self, None).values             # <<<<<<<<<<<<<<
 * 
 *     def as_unit(self, as_unit: str) -> Self:
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_DatetimeIndex); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_tz_localize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_self, Py_None};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4596, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
  }

  /* "cytimes/pddt.py":4583
 * 
 *     # Values -------------------------------------------------------------------------------
 *     @property             # <<<<<<<<<<<<<<
 *     def values_naive(self) -> np.ndarray[np.datetime64]:
 *         """Returns an array of the `timezone-naive` datetimes
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.values_naive", __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;
}

/* "cytimes/pddt.py":4598
 *             return DatetimeIndex.tz_localize(self, None).values
 * 
 *     def as_unit(self, as_unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Convert index to the given unit resolution `<'Pddt'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_247as_unit(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_246as_unit, "Convert index to the given unit resolution `<'Pddt'>`.\n\n        :param as_unit `<'str'>`: The target datetime unit resolution.\n            Supports: `'s', 'ms', 'us', 'ns'`.\n\n        :returns `<'Pddt'>`: Index with the specified datetime unit.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_247as_unit = {"as_unit", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_247as_unit, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_246as_unit};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_247as_unit(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_as_unit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_unit (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_as_unit,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4598, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4598, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4598, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "as_unit", 0) < (0)) __PYX_ERR(0, 4598, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("as_unit", 1, 2, 2, i); __PYX_ERR(0, 4598, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4598, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4598, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_as_unit = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("as_unit", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4598, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.as_unit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_as_unit), (&PyUnicode_Type), 0, "as_unit", 2))) __PYX_ERR(0, 4598, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_246as_unit(__pyx_self, __pyx_v_self, __pyx_v_as_unit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_246as_unit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_as_unit) {
  int __pyx_v_as_reso;
  PyObject *__pyx_v_err = NULL;
  int __pyx_v_my_reso;
  PyArrayObject *__pyx_v_arr = 0;
  PyArrayObject *__pyx_v_out = 0;
  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;
  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[5];
  PyObject *__pyx_t_14 = NULL;
  size_t __pyx_t_15;
  int __pyx_t_16;
  char const *__pyx_t_17;
  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;
  int __pyx_t_24;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_unit __pyx_t_25;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_26;
  char const *__pyx_t_27;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_unit", 0);

  /* "cytimes/pddt.py":4607
 *         """
 *         # Validate units
 *         try:             # <<<<<<<<<<<<<<
 *             as_reso: cython.int = utils.nptime_unit_str2int(as_unit)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "cytimes/pddt.py":4608
 *         # Validate units
 *         try:
 *             as_reso: cython.int = utils.nptime_unit_str2int(as_unit)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             raise errors.InvalidArgumentError(
*/
      __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_as_unit); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 4608, __pyx_L3_error)
      __pyx_v_as_reso = __pyx_t_4;

      /* "cytimes/pddt.py":4607
 *         """
 *         # Validate units
 *         try:             # <<<<<<<<<<<<<<
 *             as_reso: cython.int = utils.nptime_unit_str2int(as_unit)
 *         except Exception as err:
*/
    }
    __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_L8_try_end;
    __pyx_L3_error:;

    /* "cytimes/pddt.py":4609
 *         try:
 *             as_reso: cython.int = utils.nptime_unit_str2int(as_unit)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise errors.InvalidArgumentError(
 *                 "<'%s'> Invalid 'as_unit' input.\n"
*/
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.as_unit", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 4609, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_err = __pyx_t_6;
      /*try:*/ {

        /* "cytimes/pddt.py":4610
 *             as_reso: cython.int = utils.nptime_unit_str2int(as_unit)
 *         except Exception as err:
 *             raise errors.InvalidArgumentError(             # <<<<<<<<<<<<<<
 *                 "<'%s'> Invalid 'as_unit' input.\n"
 *                 "Supports: 's', 'ms', 'us' and 'ns'; got %r."
*/
        __pyx_t_9 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4610, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_InvalidArgumentError); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4610, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

        /* "cytimes/pddt.py":4613
 *                 "<'%s'> Invalid 'as_unit' input.\n"
 *                 "Supports: 's', 'ms', 'us' and 'ns'; got %r."
 *                 % (self.__class__.__name__, as_unit)             # <<<<<<<<<<<<<<
 *             ) from err
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
*/
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4613, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4613, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_12), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4613, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_as_unit), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4613, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13[0] = __pyx_mstate_global->__pyx_kp_u__13;
        __pyx_t_13[1] = __pyx_t_10;
        __pyx_t_13[2] = __pyx_mstate_global->__pyx_kp_u_Invalid_as_unit_input_Supports;
        __pyx_t_13[3] = __pyx_t_12;
        __pyx_t_13[4] = __pyx_mstate_global->__pyx_kp_u__2;

        /* "cytimes/pddt.py":4611
 *         except Exception as err:
 *             raise errors.InvalidArgumentError(
 *                 "<'%s'> Invalid 'as_unit' input.\n"             # <<<<<<<<<<<<<<
 *                 "Supports: 's', 'ms', 'us' and 'ns'; got %r."
 *                 % (self.__class__.__name__, as_unit)
*/
        __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_13, 5, 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 68 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12));
        if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4611, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_15 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_11);
          assert(__pyx_t_9);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
          __pyx_t_15 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_14};
          __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4610, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_8);
        }

        /* "cytimes/pddt.py":4614
 *                 "Supports: 's', 'ms', 'us' and 'ns'; got %r."
 *                 % (self.__class__.__name__, as_unit)
 *             ) from err             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 * 
*/
        __Pyx_Raise(__pyx_t_8, 0, 0, __pyx_v_err);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 4610, __pyx_L14_error)
      }

      /* "cytimes/pddt.py":4609
 *         try:
 *             as_reso: cython.int = utils.nptime_unit_str2int(as_unit)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise errors.InvalidArgumentError(
 *                 "<'%s'> Invalid 'as_unit' input.\n"
*/
      /*finally:*/ {
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
          if ( unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __pyx_t_4 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17;
          goto __pyx_L5_except_error;
        }
      }
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pddt.py":4607
 *         """
 *         # Validate units
 *         try:             # <<<<<<<<<<<<<<
 *             as_reso: cython.int = utils.nptime_unit_str2int(as_unit)
 *         except Exception as err:
*/
    __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_L8_try_end:;
  }

  /* "cytimes/pddt.py":4615
 *                 % (self.__class__.__name__, as_unit)
 *             ) from err
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)             # <<<<<<<<<<<<<<
 * 
 *         # Fast-path: same unit
*/
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_7))) __PYX_ERR(0, 4615, __pyx_L1_error)
  __pyx_t_16 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(((PyObject*)__pyx_t_7)); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 4615, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_my_reso = __pyx_t_16;

  /* "cytimes/pddt.py":4618
 * 
 *         # Fast-path: same unit
 *         if my_reso == as_reso:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  __pyx_t_24 = (__pyx_v_my_reso == __pyx_v_as_reso);
  if (__pyx_t_24) {

    /* "cytimes/pddt.py":4619
 *         # Fast-path: same unit
 *         if my_reso == as_reso:
 *             return self  # exit             # <<<<<<<<<<<<<<
 * 
 *         # Convert unit
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pddt.py":4618
 * 
 *         # Fast-path: same unit
 *         if my_reso == as_reso:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  }

  /* "cytimes/pddt.py":4622
 * 
 *         # Convert unit
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         try:
 *             out: np.ndarray = utils.dt64arr_as_unit(arr, as_unit, my_reso, True, True)
*/
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4622, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cytimes/pddt.py":4623
 *         # Convert unit
 *         arr: np.ndarray = self.values_naive
 *         try:             # <<<<<<<<<<<<<<
 *             out: np.ndarray = utils.dt64arr_as_unit(arr, as_unit, my_reso, True, True)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "cytimes/pddt.py":4624
 *         arr: np.ndarray = self.values_naive
 *         try:
 *             out: np.ndarray = utils.dt64arr_as_unit(arr, as_unit, my_reso, True, True)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "as_unit", None, err)
*/
      __pyx_t_25.__pyx_n = 3;
      __pyx_t_25.arr_reso = __pyx_v_my_reso;
      __pyx_t_25.limit = 1;
      __pyx_t_25.copy = 1;
      __pyx_t_7 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_unit(__pyx_v_arr, __pyx_v_as_unit, &__pyx_t_25)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4624, __pyx_L21_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_v_out = ((PyArrayObject *)__pyx_t_7);
      __pyx_t_7 = 0;

      /* "cytimes/pddt.py":4623
 *         # Convert unit
 *         arr: np.ndarray = self.values_naive
 *         try:             # <<<<<<<<<<<<<<
 *             out: np.ndarray = utils.dt64arr_as_unit(arr, as_unit, my_reso, True, True)
 *         except Exception as err:
*/
    }
    __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_L26_try_end;
    __pyx_L21_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 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;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cytimes/pddt.py":4625
 *         try:
 *             out: np.ndarray = utils.dt64arr_as_unit(arr, as_unit, my_reso, True, True)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self.__class__, "as_unit", None, err)
 *             return  # unreachable: suppress compiler warning
*/
    __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_16) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.as_unit", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 4625, __pyx_L23_except_error)
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_err = __pyx_t_6;
      /*try:*/ {

        /* "cytimes/pddt.py":4626
 *             out: np.ndarray = utils.dt64arr_as_unit(arr, as_unit, my_reso, True, True)
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "as_unit", None, err)             # <<<<<<<<<<<<<<
 *             return  # unreachable: suppress compiler warning
 *         if arr is out:
*/
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4626, __pyx_L32_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_26.__pyx_n = 4;
        __pyx_t_26.cls = __pyx_t_8;
        __pyx_t_26.input_msg = __pyx_mstate_global->__pyx_n_u_as_unit;
        __pyx_t_26.error_msg = ((PyObject*)Py_None);
        __pyx_t_26.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_26); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4626, __pyx_L32_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "cytimes/pddt.py":4627
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "as_unit", None, err)
 *             return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *         if arr is out:
 *             return self  # exit
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L31_return;
      }

      /* "cytimes/pddt.py":4625
 *         try:
 *             out: np.ndarray = utils.dt64arr_as_unit(arr, as_unit, my_reso, True, True)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self.__class__, "as_unit", None, err)
 *             return  # unreachable: suppress compiler warning
*/
      /*finally:*/ {
        __pyx_L32_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18);
          if ( unlikely(__Pyx_GetException(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_18);
          __pyx_t_16 = __pyx_lineno; __pyx_t_4 = __pyx_clineno; __pyx_t_27 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_19, __pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_23, __pyx_t_22, __pyx_t_21);
          __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
          __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_4; __pyx_filename = __pyx_t_27;
          goto __pyx_L23_except_error;
        }
        __pyx_L31_return: {
          __pyx_t_18 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          __pyx_r = __pyx_t_18;
          __pyx_t_18 = 0;
          goto __pyx_L24_except_return;
        }
      }
    }
    goto __pyx_L23_except_error;

    /* "cytimes/pddt.py":4623
 *         # Convert unit
 *         arr: np.ndarray = self.values_naive
 *         try:             # <<<<<<<<<<<<<<
 *             out: np.ndarray = utils.dt64arr_as_unit(arr, as_unit, my_reso, True, True)
 *         except Exception as err:
*/
    __pyx_L23_except_error:;
    __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_L24_except_return:;
    __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_L0;
    __pyx_L26_try_end:;
  }

  /* "cytimes/pddt.py":4628
 *             errors.raise_argument_error(self.__class__, "as_unit", None, err)
 *             return  # unreachable: suppress compiler warning
 *         if arr is out:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  __pyx_t_24 = (__pyx_v_arr == __pyx_v_out);
  if (__pyx_t_24) {

    /* "cytimes/pddt.py":4629
 *             return  # unreachable: suppress compiler warning
 *         if arr is out:
 *             return self  # exit             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pddt.py":4628
 *             errors.raise_argument_error(self.__class__, "as_unit", None, err)
 *             return  # unreachable: suppress compiler warning
 *         if arr is out:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  }

  /* "cytimes/pddt.py":4632
 * 
 *         # New instance
 *         return self._new(out, tz=self.tzinfo, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *     # Arithmetic ---------------------------------------------------------------------------
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_15 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_6, ((PyObject *)__pyx_v_out)};
    __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_7, __pyx_t_11, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4632, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_8, __pyx_t_11, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 4632, __pyx_L1_error)
    __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4598
 *             return DatetimeIndex.tz_localize(self, None).values
 * 
 *     def as_unit(self, as_unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Convert index to the given unit resolution `<'Pddt'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __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_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.as_unit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4635
 * 
 *     # Arithmetic ---------------------------------------------------------------------------
 *     def add(             # <<<<<<<<<<<<<<
 *         self,
 *         years: cython.int = 0,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_249add(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_248add, "Add relative delta to the datetime index `<'Pddt'>`.\n\n        :param years `<'int'>`: Relative years. Defaults to `0`.\n        :param quarters `<'int'>`: Relative quarters (3 months). Defaults to `0`.\n        :param months `<'int'>`: Relative months. Defaults to `0`.\n        :param weeks `<'int'>`: Relative weeks (7 days). Defaults to `0`.\n        :param days `<'int'>`: Relative days. Defaults to `0`.\n        :param hours `<'int'>`: Relative hours. Defaults to `0`.\n        :param minutes `<'int'>`: Relative minutes. Defaults to `0`.\n        :param seconds `<'int'>`: Relative seconds. Defaults to `0`.\n        :param milliseconds `<'int'>`: Relative milliseconds (`1000 us`). Defaults to `0`.\n        :param microseconds `<'int'>`: Relative microseconds. Defaults to `0`.\n        :param nanoseconds `<'int'>`: Relative nanoseconds. Defaults to `0`.\n        :returns `<'Pddt'>`: The resulting datetime index after adding the relative delta.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_249add = {"add", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_249add, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_248add};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_249add(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_years;
  int __pyx_v_quarters;
  int __pyx_v_months;
  int __pyx_v_weeks;
  int __pyx_v_days;
  int __pyx_v_hours;
  int __pyx_v_minutes;
  int __pyx_v_seconds;
  int __pyx_v_milliseconds;
  int __pyx_v_microseconds;
  int __pyx_v_nanoseconds;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_years,&__pyx_mstate_global->__pyx_n_u_quarters,&__pyx_mstate_global->__pyx_n_u_months,&__pyx_mstate_global->__pyx_n_u_weeks,&__pyx_mstate_global->__pyx_n_u_days,&__pyx_mstate_global->__pyx_n_u_hours,&__pyx_mstate_global->__pyx_n_u_minutes_2,&__pyx_mstate_global->__pyx_n_u_seconds,&__pyx_mstate_global->__pyx_n_u_milliseconds,&__pyx_mstate_global->__pyx_n_u_microseconds,&__pyx_mstate_global->__pyx_n_u_nanoseconds,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4635, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case 12:
        values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 4635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case 11:
        values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 4635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case 10:
        values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 4635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 4635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 4635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 4635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 4635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add", 0) < (0)) __PYX_ERR(0, 4635, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add", 0, 1, 12, i); __PYX_ERR(0, 4635, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case 12:
        values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 4635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case 11:
        values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 4635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case 10:
        values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 4635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 4635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 4635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 4635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 4635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4635, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    if (values[1]) {
      __pyx_v_years = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_years == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4637, __pyx_L3_error)
    } else {
      __pyx_v_years = ((int)((int)0));
    }
    if (values[2]) {
      __pyx_v_quarters = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_quarters == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4638, __pyx_L3_error)
    } else {
      __pyx_v_quarters = ((int)((int)0));
    }
    if (values[3]) {
      __pyx_v_months = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_months == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4639, __pyx_L3_error)
    } else {
      __pyx_v_months = ((int)((int)0));
    }
    if (values[4]) {
      __pyx_v_weeks = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_weeks == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4640, __pyx_L3_error)
    } else {
      __pyx_v_weeks = ((int)((int)0));
    }
    if (values[5]) {
      __pyx_v_days = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_days == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4641, __pyx_L3_error)
    } else {
      __pyx_v_days = ((int)((int)0));
    }
    if (values[6]) {
      __pyx_v_hours = __Pyx_PyLong_As_int(values[6]); if (unlikely((__pyx_v_hours == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4642, __pyx_L3_error)
    } else {
      __pyx_v_hours = ((int)((int)0));
    }
    if (values[7]) {
      __pyx_v_minutes = __Pyx_PyLong_As_int(values[7]); if (unlikely((__pyx_v_minutes == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4643, __pyx_L3_error)
    } else {
      __pyx_v_minutes = ((int)((int)0));
    }
    if (values[8]) {
      __pyx_v_seconds = __Pyx_PyLong_As_int(values[8]); if (unlikely((__pyx_v_seconds == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4644, __pyx_L3_error)
    } else {
      __pyx_v_seconds = ((int)((int)0));
    }
    if (values[9]) {
      __pyx_v_milliseconds = __Pyx_PyLong_As_int(values[9]); if (unlikely((__pyx_v_milliseconds == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4645, __pyx_L3_error)
    } else {
      __pyx_v_milliseconds = ((int)((int)0));
    }
    if (values[10]) {
      __pyx_v_microseconds = __Pyx_PyLong_As_int(values[10]); if (unlikely((__pyx_v_microseconds == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4646, __pyx_L3_error)
    } else {
      __pyx_v_microseconds = ((int)((int)0));
    }
    if (values[11]) {
      __pyx_v_nanoseconds = __Pyx_PyLong_As_int(values[11]); if (unlikely((__pyx_v_nanoseconds == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4647, __pyx_L3_error)
    } else {
      __pyx_v_nanoseconds = ((int)((int)0));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add", 0, 1, 12, __pyx_nargs); __PYX_ERR(0, 4635, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_248add(__pyx_self, __pyx_v_self, __pyx_v_years, __pyx_v_quarters, __pyx_v_months, __pyx_v_weeks, __pyx_v_days, __pyx_v_hours, __pyx_v_minutes, __pyx_v_seconds, __pyx_v_milliseconds, __pyx_v_microseconds, __pyx_v_nanoseconds);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_248add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_years, int __pyx_v_quarters, int __pyx_v_months, int __pyx_v_weeks, int __pyx_v_days, int __pyx_v_hours, int __pyx_v_minutes, int __pyx_v_seconds, int __pyx_v_milliseconds, int __pyx_v_microseconds, int __pyx_v_nanoseconds) {
  PyArrayObject *__pyx_v_arr = 0;
  int __pyx_v_my_reso;
  PyArrayObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_add_delta __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add", 0);

  /* "cytimes/pddt.py":4666
 *         # Fast-path: no change
 *         if (
 *             years == 0             # <<<<<<<<<<<<<<
 *             and quarters == 0
 *             and months == 0
*/
  __pyx_t_2 = (__pyx_v_years == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":4667
 *         if (
 *             years == 0
 *             and quarters == 0             # <<<<<<<<<<<<<<
 *             and months == 0
 *             and weeks == 0
*/
  __pyx_t_2 = (__pyx_v_quarters == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":4668
 *             years == 0
 *             and quarters == 0
 *             and months == 0             # <<<<<<<<<<<<<<
 *             and weeks == 0
 *             and days == 0
*/
  __pyx_t_2 = (__pyx_v_months == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":4669
 *             and quarters == 0
 *             and months == 0
 *             and weeks == 0             # <<<<<<<<<<<<<<
 *             and days == 0
 *             and hours == 0
*/
  __pyx_t_2 = (__pyx_v_weeks == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":4670
 *             and months == 0
 *             and weeks == 0
 *             and days == 0             # <<<<<<<<<<<<<<
 *             and hours == 0
 *             and minutes == 0
*/
  __pyx_t_2 = (__pyx_v_days == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":4671
 *             and weeks == 0
 *             and days == 0
 *             and hours == 0             # <<<<<<<<<<<<<<
 *             and minutes == 0
 *             and seconds == 0
*/
  __pyx_t_2 = (__pyx_v_hours == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":4672
 *             and days == 0
 *             and hours == 0
 *             and minutes == 0             # <<<<<<<<<<<<<<
 *             and seconds == 0
 *             and milliseconds == 0
*/
  __pyx_t_2 = (__pyx_v_minutes == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":4673
 *             and hours == 0
 *             and minutes == 0
 *             and seconds == 0             # <<<<<<<<<<<<<<
 *             and milliseconds == 0
 *             and microseconds == 0
*/
  __pyx_t_2 = (__pyx_v_seconds == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":4674
 *             and minutes == 0
 *             and seconds == 0
 *             and milliseconds == 0             # <<<<<<<<<<<<<<
 *             and microseconds == 0
 *             and nanoseconds == 0
*/
  __pyx_t_2 = (__pyx_v_milliseconds == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":4675
 *             and seconds == 0
 *             and milliseconds == 0
 *             and microseconds == 0             # <<<<<<<<<<<<<<
 *             and nanoseconds == 0
 *         ):
*/
  __pyx_t_2 = (__pyx_v_microseconds == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":4676
 *             and milliseconds == 0
 *             and microseconds == 0
 *             and nanoseconds == 0             # <<<<<<<<<<<<<<
 *         ):
 *             return self  # exit
*/
  __pyx_t_2 = (__pyx_v_nanoseconds == 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;

  /* "cytimes/pddt.py":4665
 *         """
 *         # Fast-path: no change
 *         if (             # <<<<<<<<<<<<<<
 *             years == 0
 *             and quarters == 0
*/
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":4678
 *             and nanoseconds == 0
 *         ):
 *             return self  # exit             # <<<<<<<<<<<<<<
 * 
 *         # Access datetime array & info
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pddt.py":4665
 *         """
 *         # Fast-path: no change
 *         if (             # <<<<<<<<<<<<<<
 *             years == 0
 *             and quarters == 0
*/
  }

  /* "cytimes/pddt.py":4681
 * 
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4681, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cytimes/pddt.py":4682
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)             # <<<<<<<<<<<<<<
 * 
 *         # Add delta
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_3))) __PYX_ERR(0, 4682, __pyx_L1_error)
  __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(((PyObject*)__pyx_t_3)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 4682, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_my_reso = __pyx_t_4;

  /* "cytimes/pddt.py":4686
 *         # Add delta
 *         # fmt: off
 *         out = utils.dt64arr_add_delta(arr,             # <<<<<<<<<<<<<<
 *             years, quarters, months, weeks, days, hours, minutes,
 *             seconds, milliseconds, microseconds, nanoseconds,
*/
  __pyx_t_5.__pyx_n = 12;
  __pyx_t_5.years = __pyx_v_years;
  __pyx_t_5.quarters = __pyx_v_quarters;
  __pyx_t_5.months = __pyx_v_months;
  __pyx_t_5.weeks = __pyx_v_weeks;
  __pyx_t_5.days = __pyx_v_days;
  __pyx_t_5.hours = __pyx_v_hours;
  __pyx_t_5.minutes = __pyx_v_minutes;
  __pyx_t_5.seconds = __pyx_v_seconds;
  __pyx_t_5.milliseconds = __pyx_v_milliseconds;
  __pyx_t_5.microseconds = __pyx_v_microseconds;
  __pyx_t_5.nanoseconds = __pyx_v_nanoseconds;
  __pyx_t_5.arr_reso = __pyx_v_my_reso;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_add_delta(__pyx_v_arr, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cytimes/pddt.py":4694
 * 
 *         # New instance
 *         return self._new(out, tz=self.tzinfo, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *     def sub(
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_6, ((PyObject *)__pyx_v_out)};
    __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_7, __pyx_t_10, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4694, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_8, __pyx_t_10, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 4694, __pyx_L1_error)
    __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4635
 * 
 *     # Arithmetic ---------------------------------------------------------------------------
 *     def add(             # <<<<<<<<<<<<<<
 *         self,
 *         years: cython.int = 0,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4696
 *         return self._new(out, tz=self.tzinfo, name=self.name)
 * 
 *     def sub(             # <<<<<<<<<<<<<<
 *         self,
 *         years: cython.int = 0,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_251sub(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_250sub, "Subtract relative delta from the datetime index `<'Pddt'>`.\n\n        :param years `<'int'>`: Relative years. Defaults to `0`.\n        :param quarters `<'int'>`: Relative quarters (3 months). Defaults to `0`.\n        :param months `<'int'>`: Relative months. Defaults to `0`.\n        :param weeks `<'int'>`: Relative weeks (7 days). Defaults to `0`.\n        :param days `<'int'>`: Relative days. Defaults to `0`.\n        :param hours `<'int'>`: Relative hours. Defaults to `0`.\n        :param minutes `<'int'>`: Relative minutes. Defaults to `0`.\n        :param seconds `<'int'>`: Relative seconds. Defaults to `0`.\n        :param milliseconds `<'int'>`: Relative milliseconds (`1000 us`). Defaults to `0`.\n        :param microseconds `<'int'>`: Relative microseconds. Defaults to `0`.\n        :param nanoseconds `<'int'>`: Relative nanoseconds. Defaults to `0`.\n        :returns `<'Pddt'>`: The resulting datetime index after subtracting the relative delta.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_251sub = {"sub", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_251sub, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_250sub};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_251sub(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  int __pyx_v_years;
  int __pyx_v_quarters;
  int __pyx_v_months;
  int __pyx_v_weeks;
  int __pyx_v_days;
  int __pyx_v_hours;
  int __pyx_v_minutes;
  int __pyx_v_seconds;
  int __pyx_v_milliseconds;
  int __pyx_v_microseconds;
  int __pyx_v_nanoseconds;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sub (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_years,&__pyx_mstate_global->__pyx_n_u_quarters,&__pyx_mstate_global->__pyx_n_u_months,&__pyx_mstate_global->__pyx_n_u_weeks,&__pyx_mstate_global->__pyx_n_u_days,&__pyx_mstate_global->__pyx_n_u_hours,&__pyx_mstate_global->__pyx_n_u_minutes_2,&__pyx_mstate_global->__pyx_n_u_seconds,&__pyx_mstate_global->__pyx_n_u_milliseconds,&__pyx_mstate_global->__pyx_n_u_microseconds,&__pyx_mstate_global->__pyx_n_u_nanoseconds,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4696, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case 12:
        values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case 11:
        values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case 10:
        values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "sub", 0) < (0)) __PYX_ERR(0, 4696, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("sub", 0, 1, 12, i); __PYX_ERR(0, 4696, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case 12:
        values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case 11:
        values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case 10:
        values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4696, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    if (values[1]) {
      __pyx_v_years = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_years == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4698, __pyx_L3_error)
    } else {
      __pyx_v_years = ((int)((int)0));
    }
    if (values[2]) {
      __pyx_v_quarters = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_quarters == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4699, __pyx_L3_error)
    } else {
      __pyx_v_quarters = ((int)((int)0));
    }
    if (values[3]) {
      __pyx_v_months = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_months == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4700, __pyx_L3_error)
    } else {
      __pyx_v_months = ((int)((int)0));
    }
    if (values[4]) {
      __pyx_v_weeks = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_weeks == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4701, __pyx_L3_error)
    } else {
      __pyx_v_weeks = ((int)((int)0));
    }
    if (values[5]) {
      __pyx_v_days = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_days == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4702, __pyx_L3_error)
    } else {
      __pyx_v_days = ((int)((int)0));
    }
    if (values[6]) {
      __pyx_v_hours = __Pyx_PyLong_As_int(values[6]); if (unlikely((__pyx_v_hours == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4703, __pyx_L3_error)
    } else {
      __pyx_v_hours = ((int)((int)0));
    }
    if (values[7]) {
      __pyx_v_minutes = __Pyx_PyLong_As_int(values[7]); if (unlikely((__pyx_v_minutes == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4704, __pyx_L3_error)
    } else {
      __pyx_v_minutes = ((int)((int)0));
    }
    if (values[8]) {
      __pyx_v_seconds = __Pyx_PyLong_As_int(values[8]); if (unlikely((__pyx_v_seconds == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4705, __pyx_L3_error)
    } else {
      __pyx_v_seconds = ((int)((int)0));
    }
    if (values[9]) {
      __pyx_v_milliseconds = __Pyx_PyLong_As_int(values[9]); if (unlikely((__pyx_v_milliseconds == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4706, __pyx_L3_error)
    } else {
      __pyx_v_milliseconds = ((int)((int)0));
    }
    if (values[10]) {
      __pyx_v_microseconds = __Pyx_PyLong_As_int(values[10]); if (unlikely((__pyx_v_microseconds == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4707, __pyx_L3_error)
    } else {
      __pyx_v_microseconds = ((int)((int)0));
    }
    if (values[11]) {
      __pyx_v_nanoseconds = __Pyx_PyLong_As_int(values[11]); if (unlikely((__pyx_v_nanoseconds == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4708, __pyx_L3_error)
    } else {
      __pyx_v_nanoseconds = ((int)((int)0));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sub", 0, 1, 12, __pyx_nargs); __PYX_ERR(0, 4696, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.sub", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_250sub(__pyx_self, __pyx_v_self, __pyx_v_years, __pyx_v_quarters, __pyx_v_months, __pyx_v_weeks, __pyx_v_days, __pyx_v_hours, __pyx_v_minutes, __pyx_v_seconds, __pyx_v_milliseconds, __pyx_v_microseconds, __pyx_v_nanoseconds);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_250sub(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_years, int __pyx_v_quarters, int __pyx_v_months, int __pyx_v_weeks, int __pyx_v_days, int __pyx_v_hours, int __pyx_v_minutes, int __pyx_v_seconds, int __pyx_v_milliseconds, int __pyx_v_microseconds, int __pyx_v_nanoseconds) {
  PyArrayObject *__pyx_v_arr = 0;
  int __pyx_v_my_reso;
  PyArrayObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_add_delta __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sub", 0);

  /* "cytimes/pddt.py":4727
 *         # Fast-path: no change
 *         if (
 *             years == 0             # <<<<<<<<<<<<<<
 *             and quarters == 0
 *             and months == 0
*/
  __pyx_t_2 = (__pyx_v_years == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":4728
 *         if (
 *             years == 0
 *             and quarters == 0             # <<<<<<<<<<<<<<
 *             and months == 0
 *             and weeks == 0
*/
  __pyx_t_2 = (__pyx_v_quarters == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":4729
 *             years == 0
 *             and quarters == 0
 *             and months == 0             # <<<<<<<<<<<<<<
 *             and weeks == 0
 *             and days == 0
*/
  __pyx_t_2 = (__pyx_v_months == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":4730
 *             and quarters == 0
 *             and months == 0
 *             and weeks == 0             # <<<<<<<<<<<<<<
 *             and days == 0
 *             and hours == 0
*/
  __pyx_t_2 = (__pyx_v_weeks == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":4731
 *             and months == 0
 *             and weeks == 0
 *             and days == 0             # <<<<<<<<<<<<<<
 *             and hours == 0
 *             and minutes == 0
*/
  __pyx_t_2 = (__pyx_v_days == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":4732
 *             and weeks == 0
 *             and days == 0
 *             and hours == 0             # <<<<<<<<<<<<<<
 *             and minutes == 0
 *             and seconds == 0
*/
  __pyx_t_2 = (__pyx_v_hours == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":4733
 *             and days == 0
 *             and hours == 0
 *             and minutes == 0             # <<<<<<<<<<<<<<
 *             and seconds == 0
 *             and milliseconds == 0
*/
  __pyx_t_2 = (__pyx_v_minutes == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":4734
 *             and hours == 0
 *             and minutes == 0
 *             and seconds == 0             # <<<<<<<<<<<<<<
 *             and milliseconds == 0
 *             and microseconds == 0
*/
  __pyx_t_2 = (__pyx_v_seconds == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":4735
 *             and minutes == 0
 *             and seconds == 0
 *             and milliseconds == 0             # <<<<<<<<<<<<<<
 *             and microseconds == 0
 *             and nanoseconds == 0
*/
  __pyx_t_2 = (__pyx_v_milliseconds == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":4736
 *             and seconds == 0
 *             and milliseconds == 0
 *             and microseconds == 0             # <<<<<<<<<<<<<<
 *             and nanoseconds == 0
 *         ):
*/
  __pyx_t_2 = (__pyx_v_microseconds == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cytimes/pddt.py":4737
 *             and milliseconds == 0
 *             and microseconds == 0
 *             and nanoseconds == 0             # <<<<<<<<<<<<<<
 *         ):
 *             return self  # exit
*/
  __pyx_t_2 = (__pyx_v_nanoseconds == 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;

  /* "cytimes/pddt.py":4726
 *         """
 *         # Fast-path: no change
 *         if (             # <<<<<<<<<<<<<<
 *             years == 0
 *             and quarters == 0
*/
  if (__pyx_t_1) {

    /* "cytimes/pddt.py":4739
 *             and nanoseconds == 0
 *         ):
 *             return self  # exit             # <<<<<<<<<<<<<<
 * 
 *         # Access datetime array & info
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pddt.py":4726
 *         """
 *         # Fast-path: no change
 *         if (             # <<<<<<<<<<<<<<
 *             years == 0
 *             and quarters == 0
*/
  }

  /* "cytimes/pddt.py":4742
 * 
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive             # <<<<<<<<<<<<<<
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values_naive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4742, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cytimes/pddt.py":4743
 *         # Access datetime array & info
 *         arr: np.ndarray = self.values_naive
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)             # <<<<<<<<<<<<<<
 * 
 *         # Sub delta
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_3))) __PYX_ERR(0, 4743, __pyx_L1_error)
  __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(((PyObject*)__pyx_t_3)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 4743, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_my_reso = __pyx_t_4;

  /* "cytimes/pddt.py":4747
 *         # Sub delta
 *         # fmt: off
 *         out = utils.dt64arr_add_delta(arr,             # <<<<<<<<<<<<<<
 *             -years, -quarters, -months, -weeks, -days, -hours, -minutes,
 *             -seconds, -milliseconds, -microseconds, -nanoseconds,
*/
  __pyx_t_5.__pyx_n = 12;
  __pyx_t_5.years = (-__pyx_v_years);
  __pyx_t_5.quarters = (-__pyx_v_quarters);
  __pyx_t_5.months = (-__pyx_v_months);
  __pyx_t_5.weeks = (-__pyx_v_weeks);
  __pyx_t_5.days = (-__pyx_v_days);
  __pyx_t_5.hours = (-__pyx_v_hours);
  __pyx_t_5.minutes = (-__pyx_v_minutes);
  __pyx_t_5.seconds = (-__pyx_v_seconds);
  __pyx_t_5.milliseconds = (-__pyx_v_milliseconds);
  __pyx_t_5.microseconds = (-__pyx_v_microseconds);
  __pyx_t_5.nanoseconds = (-__pyx_v_nanoseconds);
  __pyx_t_5.arr_reso = __pyx_v_my_reso;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_add_delta(__pyx_v_arr, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cytimes/pddt.py":4755
 * 
 *         # New instance
 *         return self._new(out, tz=self.tzinfo, name=self.name)             # <<<<<<<<<<<<<<
 * 
 *     def diff(
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_6, ((PyObject *)__pyx_v_out)};
    __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_7, __pyx_t_10, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4755, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_8, __pyx_t_10, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 4755, __pyx_L1_error)
    __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10);
    __Pyx_XDECREF(__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;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4696
 *         return self._new(out, tz=self.tzinfo, name=self.name)
 * 
 *     def sub(             # <<<<<<<<<<<<<<
 *         self,
 *         years: cython.int = 0,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.sub", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4757
 *         return self._new(out, tz=self.tzinfo, name=self.name)
 * 
 *     def diff(             # <<<<<<<<<<<<<<
 *         self,
 *         data: object,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_253diff(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_252diff, "Compute the delta difference between the instance and another datetime-like data `<'int'>`.\n\n        The delta are computed in the specified datetime 'unit' and\n        adjusted based on the 'inclusive' argument to determine the\n        inclusivity of the start and end times.\n\n        :param data `<'object'>`: Datetime-like data.\n\n            - `<'Array-Like'>`          \342\206\222 An array-like (1-dimensional) data containing datetime information.\n                                          such as: `list`, `np.ndarray`, `DatetimeIndex`, `Pddt`, etc.\n                                          Must contains the exact number of elements as the instance.\n            - `<'str'>`                 \342\206\222 A datetime string.\n            - `<'datetime.datetime'>`   \342\206\222 An instance or subclass of `datetime.datetime`.\n            - `<'datetime.date'>`       \342\206\222 An instance or subclass of `datetime.date` (time fields set to 0).\n            - `<'np.datetime64'>`       \342\206\222 An instance of `np.datetime64`.\n\n        :param unit `<'str'>`: The unit to compute the delta difference.\n            Supports: `'Y', 'Q', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'`.\n\n        :param absolute `<'bool'>`: If 'True', compute the absolute difference. Defaults to `False`.\n\n        :param inclusive `<'str'>`: Specifies the inclusivity of the start and end times. Defaults to `'one'`.\n\n            - `'one'`     \342\206\222 Include either the start or end time \342\206\222 `(a - b)`\n            - `'both'`:   \342\206\222 Include both the start and end times \342\206\222 `(a - b) + 1 (offset)`\n            - `'neither'` \342\206\222 Exclude both the start and end times \342\206\222 `(a - b) - 1 (offset)`\n\n        :returns `<'np.ndarray[int64]'>`: The delta difference between the instance\n            and `data` in the specified `unit`, adjusted for inclusivity.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_253diff = {"diff", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_253diff, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_252diff};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_253diff(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_unit = 0;
  int __pyx_v_absolute;
  PyObject *__pyx_v_inclusive = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("diff (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_data,&__pyx_mstate_global->__pyx_n_u_unit,&__pyx_mstate_global->__pyx_n_u_absolute,&__pyx_mstate_global->__pyx_n_u_inclusive,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4757, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4757, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4757, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4757, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4757, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4757, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "diff", 0) < (0)) __PYX_ERR(0, 4757, __pyx_L3_error)
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_n_u_one)));
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("diff", 0, 3, 5, i); __PYX_ERR(0, 4757, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4757, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4757, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4757, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4757, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4757, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_n_u_one)));
    }
    __pyx_v_self = values[0];
    __pyx_v_data = values[1];
    __pyx_v_unit = ((PyObject*)values[2]);
    if (values[3]) {
      __pyx_v_absolute = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_absolute == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4761, __pyx_L3_error)
    } else {

      /* "cytimes/pddt.py":4761
 *         data: object,
 *         unit: str,
 *         absolute: cython.bint = False,             # <<<<<<<<<<<<<<
 *         inclusive: str = "one",
 *     ) -> np.ndarray[np.int64]:
*/
      __pyx_v_absolute = ((int)((int)0));
    }
    __pyx_v_inclusive = ((PyObject*)values[4]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("diff", 0, 3, 5, __pyx_nargs); __PYX_ERR(0, 4757, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 4760, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inclusive), (&PyUnicode_Type), 0, "inclusive", 2))) __PYX_ERR(0, 4762, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_252diff(__pyx_self, __pyx_v_self, __pyx_v_data, __pyx_v_unit, __pyx_v_absolute, __pyx_v_inclusive);

  /* "cytimes/pddt.py":4757
 *         return self._new(out, tz=self.tzinfo, name=self.name)
 * 
 *     def diff(             # <<<<<<<<<<<<<<
 *         self,
 *         data: object,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_252diff(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_unit, int __pyx_v_absolute, PyObject *__pyx_v_inclusive) {
  PyArrayObject *__pyx_v_my_arr = 0;
  Py_ssize_t __pyx_v_my_size;
  PyObject *__pyx_v_pt = NULL;
  PyObject *__pyx_v_err = NULL;
  PyArrayObject *__pyx_v_pt_arr = 0;
  PyObject *__pyx_v_my_tz = NULL;
  PyObject *__pyx_v_pt_tz = NULL;
  int __pyx_v_incl_off;
  Py_ssize_t __pyx_v_unit_len;
  PyArrayObject *__pyx_v_delta = NULL;
  npy_int64 *__pyx_v_delta_p;
  Py_ssize_t __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __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;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_13;
  int __pyx_t_14;
  char const *__pyx_t_15;
  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[5];
  int __pyx_t_23;
  struct __pyx_opt_args_7cytimes_6errors_raise_error __pyx_t_24;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_W_iso __pyx_t_25;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 __pyx_t_26;
  char const *__pyx_t_27;
  struct __pyx_opt_args_7cytimes_5utils_arr_sub_arr __pyx_t_28;
  struct __pyx_opt_args_7cytimes_5utils_arr_abs __pyx_t_29;
  Py_ssize_t __pyx_t_30;
  Py_ssize_t __pyx_t_31;
  Py_ssize_t __pyx_t_32;
  npy_int64 __pyx_t_33;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("diff", 0);

  /* "cytimes/pddt.py":4795
 *         """
 *         # Parse 'data' into datetime index
 *         my_arr: np.ndarray = self.values             # <<<<<<<<<<<<<<
 *         my_size: cython.Py_ssize_t = my_arr.shape[0]
 *         if isinstance(data, Pddt):
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4795, __pyx_L1_error)
  __pyx_v_my_arr = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pddt.py":4796
 *         # Parse 'data' into datetime index
 *         my_arr: np.ndarray = self.values
 *         my_size: cython.Py_ssize_t = my_arr.shape[0]             # <<<<<<<<<<<<<<
 *         if isinstance(data, Pddt):
 *             pt = data
*/
  __pyx_v_my_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_my_arr)[0]);

  /* "cytimes/pddt.py":4797
 *         my_arr: np.ndarray = self.values
 *         my_size: cython.Py_ssize_t = my_arr.shape[0]
 *         if isinstance(data, Pddt):             # <<<<<<<<<<<<<<
 *             pt = data
 *         elif isinstance(data, (str, datetime.date, np.datetime64)):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Pddt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_data, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 4797, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":4798
 *         my_size: cython.Py_ssize_t = my_arr.shape[0]
 *         if isinstance(data, Pddt):
 *             pt = data             # <<<<<<<<<<<<<<
 *         elif isinstance(data, (str, datetime.date, np.datetime64)):
 *             pt = Pddt.fromdatetime(data, size=my_size)
*/
    __Pyx_INCREF(__pyx_v_data);
    __pyx_v_pt = __pyx_v_data;

    /* "cytimes/pddt.py":4797
 *         my_arr: np.ndarray = self.values
 *         my_size: cython.Py_ssize_t = my_arr.shape[0]
 *         if isinstance(data, Pddt):             # <<<<<<<<<<<<<<
 *             pt = data
 *         elif isinstance(data, (str, datetime.date, np.datetime64)):
*/
    goto __pyx_L3;
  }

  /* "cytimes/pddt.py":4799
 *         if isinstance(data, Pddt):
 *             pt = data
 *         elif isinstance(data, (str, datetime.date, np.datetime64)):             # <<<<<<<<<<<<<<
 *             pt = Pddt.fromdatetime(data, size=my_size)
 *         elif isinstance(data, (int, float)):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_datetime64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = PyUnicode_Check(__pyx_v_data); 
  if (!__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_data, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date); 
  if (!__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = PyObject_IsInstance(__pyx_v_data, __pyx_t_3); 
  __pyx_t_2 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":4800
 *             pt = data
 *         elif isinstance(data, (str, datetime.date, np.datetime64)):
 *             pt = Pddt.fromdatetime(data, size=my_size)             # <<<<<<<<<<<<<<
 *         elif isinstance(data, (int, float)):
 *             pt = Pddt.fromseconds(data, size=my_size)
*/
    __pyx_t_1 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Pddt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4800, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_fromdatetime_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4800, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyLong_FromSsize_t(__pyx_v_my_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4800, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_1);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_v_data};
      __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4800, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_size_2, __pyx_t_5, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4800, __pyx_L1_error)
      __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4800, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_v_pt = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cytimes/pddt.py":4799
 *         if isinstance(data, Pddt):
 *             pt = data
 *         elif isinstance(data, (str, datetime.date, np.datetime64)):             # <<<<<<<<<<<<<<
 *             pt = Pddt.fromdatetime(data, size=my_size)
 *         elif isinstance(data, (int, float)):
*/
    goto __pyx_L3;
  }

  /* "cytimes/pddt.py":4801
 *         elif isinstance(data, (str, datetime.date, np.datetime64)):
 *             pt = Pddt.fromdatetime(data, size=my_size)
 *         elif isinstance(data, (int, float)):             # <<<<<<<<<<<<<<
 *             pt = Pddt.fromseconds(data, size=my_size)
 *         else:
*/
  __pyx_t_4 = PyLong_Check(__pyx_v_data); 
  if (!__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_4 = PyFloat_Check(__pyx_v_data); 
  __pyx_t_2 = __pyx_t_4;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":4802
 *             pt = Pddt.fromdatetime(data, size=my_size)
 *         elif isinstance(data, (int, float)):
 *             pt = Pddt.fromseconds(data, size=my_size)             # <<<<<<<<<<<<<<
 *         else:
 *             try:
*/
    __pyx_t_6 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_Pddt); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_fromseconds); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyLong_FromSsize_t(__pyx_v_my_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_6);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_v_data};
      __pyx_t_1 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4802, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_size_2, __pyx_t_8, __pyx_t_1, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4802, __pyx_L1_error)
      __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_1);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4802, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_v_pt = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cytimes/pddt.py":4801
 *         elif isinstance(data, (str, datetime.date, np.datetime64)):
 *             pt = Pddt.fromdatetime(data, size=my_size)
 *         elif isinstance(data, (int, float)):             # <<<<<<<<<<<<<<
 *             pt = Pddt.fromseconds(data, size=my_size)
 *         else:
*/
    goto __pyx_L3;
  }

  /* "cytimes/pddt.py":4804
 *             pt = Pddt.fromseconds(data, size=my_size)
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 pt = Pddt(data)
 *             except Exception as err:
*/
  /*else*/ {
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      /*try:*/ {

        /* "cytimes/pddt.py":4805
 *         else:
 *             try:
 *                 pt = Pddt(data)             # <<<<<<<<<<<<<<
 *             except Exception as err:
 *                 errors.raise_argument_error(
*/
        __pyx_t_5 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Pddt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4805, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
          assert(__pyx_t_5);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
          __pyx_t_7 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_data};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4805, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_v_pt = __pyx_t_3;
        __pyx_t_3 = 0;

        /* "cytimes/pddt.py":4804
 *             pt = Pddt.fromseconds(data, size=my_size)
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 pt = Pddt(data)
 *             except Exception as err:
*/
      }
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L14_try_end;
      __pyx_L9_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "cytimes/pddt.py":4806
 *             try:
 *                 pt = Pddt(data)
 *             except Exception as err:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     self.__class__,
*/
      __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_12) {
        __Pyx_AddTraceback("cytimes.pddt.Pddt.diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_5) < 0) __PYX_ERR(0, 4806, __pyx_L11_except_error)
        __Pyx_XGOTREF(__pyx_t_3);
        __Pyx_XGOTREF(__pyx_t_1);
        __Pyx_XGOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_v_err = __pyx_t_1;
        /*try:*/ {

          /* "cytimes/pddt.py":4808
 *             except Exception as err:
 *                 errors.raise_argument_error(
 *                     self.__class__,             # <<<<<<<<<<<<<<
 *                     "diff(data, ...)",
 *                     "Cannot parse 'data' into datetime index.",
*/
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4808, __pyx_L20_error)
          __Pyx_GOTREF(__pyx_t_8);

          /* "cytimes/pddt.py":4807
 *                 pt = Pddt(data)
 *             except Exception as err:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     self.__class__,
 *                     "diff(data, ...)",
*/
          __pyx_t_13.__pyx_n = 4;
          __pyx_t_13.cls = __pyx_t_8;
          __pyx_t_13.input_msg = __pyx_mstate_global->__pyx_kp_u_diff_data;
          __pyx_t_13.error_msg = __pyx_mstate_global->__pyx_kp_u_Cannot_parse_data_into_datetime;
          __pyx_t_13.tb_exc = __pyx_v_err;
          __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_13); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4807, __pyx_L20_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

          /* "cytimes/pddt.py":4813
 *                     err,
 *                 )
 *                 return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 * 
 *         # Check array size
*/
          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          goto __pyx_L19_return;
        }

        /* "cytimes/pddt.py":4806
 *             try:
 *                 pt = Pddt(data)
 *             except Exception as err:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     self.__class__,
*/
        /*finally:*/ {
          __pyx_L20_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
            if ( unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
            __Pyx_XGOTREF(__pyx_t_16);
            __Pyx_XGOTREF(__pyx_t_17);
            __Pyx_XGOTREF(__pyx_t_18);
            __Pyx_XGOTREF(__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_21);
            __pyx_t_12 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            }
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_16);
            __Pyx_XGIVEREF(__pyx_t_17);
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
            __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
            __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
            goto __pyx_L11_except_error;
          }
          __pyx_L19_return: {
            __pyx_t_21 = __pyx_r;
            __pyx_r = 0;
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            __pyx_r = __pyx_t_21;
            __pyx_t_21 = 0;
            goto __pyx_L12_except_return;
          }
        }
      }
      goto __pyx_L11_except_error;

      /* "cytimes/pddt.py":4804
 *             pt = Pddt.fromseconds(data, size=my_size)
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 pt = Pddt(data)
 *             except Exception as err:
*/
      __pyx_L11_except_error:;
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      goto __pyx_L1_error;
      __pyx_L12_except_return:;
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      goto __pyx_L0;
      __pyx_L14_try_end:;
    }
  }
  __pyx_L3:;

  /* "cytimes/pddt.py":4816
 * 
 *         # Check array size
 *         pt_arr: np.ndarray = pt.values             # <<<<<<<<<<<<<<
 *         if my_size != pt_arr.shape[0]:
 *             errors.raise_argument_error(
*/
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_pt, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4816, __pyx_L1_error)
  __pyx_v_pt_arr = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cytimes/pddt.py":4817
 *         # Check array size
 *         pt_arr: np.ndarray = pt.values
 *         if my_size != pt_arr.shape[0]:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  __pyx_t_2 = (__pyx_v_my_size != (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_pt_arr)[0]));
  if (__pyx_t_2) {

    /* "cytimes/pddt.py":4819
 *         if my_size != pt_arr.shape[0]:
 *             errors.raise_argument_error(
 *                 self.__class__,             # <<<<<<<<<<<<<<
 *                 "diff(data, ...)",
 *                 "Cannot compare datetime indexes with different length: '%d' vs '%d'."
*/
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "cytimes/pddt.py":4822
 *                 "diff(data, ...)",
 *                 "Cannot compare datetime indexes with different length: '%d' vs '%d'."
 *                 % (my_size, pt_arr.shape[0]),             # <<<<<<<<<<<<<<
 *             )
 * 
*/
    __pyx_t_1 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_my_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyUnicode_From_npy_intp((__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_pt_arr)[0]), 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_22[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_compare_datetime_indexes;
    __pyx_t_22[1] = __pyx_t_1;
    __pyx_t_22[2] = __pyx_mstate_global->__pyx_kp_u_vs;
    __pyx_t_22[3] = __pyx_t_3;
    __pyx_t_22[4] = __pyx_mstate_global->__pyx_kp_u__14;

    /* "cytimes/pddt.py":4821
 *                 self.__class__,
 *                 "diff(data, ...)",
 *                 "Cannot compare datetime indexes with different length: '%d' vs '%d'."             # <<<<<<<<<<<<<<
 *                 % (my_size, pt_arr.shape[0]),
 *             )
*/
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_22, 5, 56 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 2, 127);
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cytimes/pddt.py":4818
 *         pt_arr: np.ndarray = pt.values
 *         if my_size != pt_arr.shape[0]:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self.__class__,
 *                 "diff(data, ...)",
*/
    __pyx_t_13.__pyx_n = 3;
    __pyx_t_13.cls = __pyx_t_5;
    __pyx_t_13.input_msg = __pyx_mstate_global->__pyx_kp_u_diff_data;
    __pyx_t_13.error_msg = ((PyObject*)__pyx_t_8);
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_13); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4818, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "cytimes/pddt.py":4817
 *         # Check array size
 *         pt_arr: np.ndarray = pt.values
 *         if my_size != pt_arr.shape[0]:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  }

  /* "cytimes/pddt.py":4826
 * 
 *         # Check timezone parity
 *         my_tz = self.tzinfo             # <<<<<<<<<<<<<<
 *         pt_tz = pt.tzinfo
 *         if (my_tz is not None) != (pt_tz is not None):
*/
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_v_my_tz = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "cytimes/pddt.py":4827
 *         # Check timezone parity
 *         my_tz = self.tzinfo
 *         pt_tz = pt.tzinfo             # <<<<<<<<<<<<<<
 *         if (my_tz is not None) != (pt_tz is not None):
 *             errors.raise_error(
*/
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_pt, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_v_pt_tz = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "cytimes/pddt.py":4828
 *         my_tz = self.tzinfo
 *         pt_tz = pt.tzinfo
 *         if (my_tz is not None) != (pt_tz is not None):             # <<<<<<<<<<<<<<
 *             errors.raise_error(
 *                 errors.MixedTimezoneError,
*/
  __pyx_t_2 = (__pyx_v_my_tz != Py_None);
  __pyx_t_4 = (__pyx_v_pt_tz != Py_None);
  __pyx_t_23 = (__pyx_t_2 != __pyx_t_4);
  if (__pyx_t_23) {

    /* "cytimes/pddt.py":4830
 *         if (my_tz is not None) != (pt_tz is not None):
 *             errors.raise_error(
 *                 errors.MixedTimezoneError,             # <<<<<<<<<<<<<<
 *                 self.__class__,
 *                 "diff(data, ...)",
*/
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4830, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_MixedTimezoneError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4830, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "cytimes/pddt.py":4831
 *             errors.raise_error(
 *                 errors.MixedTimezoneError,
 *                 self.__class__,             # <<<<<<<<<<<<<<
 *                 "diff(data, ...)",
 *                 "Cannot compare naive and aware datetime indexes",
*/
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4831, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);

    /* "cytimes/pddt.py":4829
 *         pt_tz = pt.tzinfo
 *         if (my_tz is not None) != (pt_tz is not None):
 *             errors.raise_error(             # <<<<<<<<<<<<<<
 *                 errors.MixedTimezoneError,
 *                 self.__class__,
*/
    __pyx_t_24.__pyx_n = 3;
    __pyx_t_24.cls = __pyx_t_8;
    __pyx_t_24.input_msg = __pyx_mstate_global->__pyx_kp_u_diff_data;
    __pyx_t_24.error_msg = __pyx_mstate_global->__pyx_kp_u_Cannot_compare_naive_and_aware_d_2;
    __pyx_f_7cytimes_6errors_raise_error(__pyx_t_5, 0, &__pyx_t_24); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4829, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "cytimes/pddt.py":4828
 *         my_tz = self.tzinfo
 *         pt_tz = pt.tzinfo
 *         if (my_tz is not None) != (pt_tz is not None):             # <<<<<<<<<<<<<<
 *             errors.raise_error(
 *                 errors.MixedTimezoneError,
*/
  }

  /* "cytimes/pddt.py":4837
 * 
 *         # Handle inclusive
 *         if inclusive == "both":             # <<<<<<<<<<<<<<
 *             incl_off: cython.int = 1
 *         elif inclusive == "one":
*/
  __pyx_t_23 = (__Pyx_PyUnicode_Equals(__pyx_v_inclusive, __pyx_mstate_global->__pyx_n_u_both, Py_EQ)); if (unlikely((__pyx_t_23 < 0))) __PYX_ERR(0, 4837, __pyx_L1_error)
  if (__pyx_t_23) {

    /* "cytimes/pddt.py":4838
 *         # Handle inclusive
 *         if inclusive == "both":
 *             incl_off: cython.int = 1             # <<<<<<<<<<<<<<
 *         elif inclusive == "one":
 *             incl_off: cython.int = 0
*/
    __pyx_v_incl_off = 1;

    /* "cytimes/pddt.py":4837
 * 
 *         # Handle inclusive
 *         if inclusive == "both":             # <<<<<<<<<<<<<<
 *             incl_off: cython.int = 1
 *         elif inclusive == "one":
*/
    goto __pyx_L28;
  }

  /* "cytimes/pddt.py":4839
 *         if inclusive == "both":
 *             incl_off: cython.int = 1
 *         elif inclusive == "one":             # <<<<<<<<<<<<<<
 *             incl_off: cython.int = 0
 *         elif inclusive == "neither":
*/
  __pyx_t_23 = (__Pyx_PyUnicode_Equals(__pyx_v_inclusive, __pyx_mstate_global->__pyx_n_u_one, Py_EQ)); if (unlikely((__pyx_t_23 < 0))) __PYX_ERR(0, 4839, __pyx_L1_error)
  if (__pyx_t_23) {

    /* "cytimes/pddt.py":4840
 *             incl_off: cython.int = 1
 *         elif inclusive == "one":
 *             incl_off: cython.int = 0             # <<<<<<<<<<<<<<
 *         elif inclusive == "neither":
 *             incl_off: cython.int = -1
*/
    __pyx_v_incl_off = 0;

    /* "cytimes/pddt.py":4839
 *         if inclusive == "both":
 *             incl_off: cython.int = 1
 *         elif inclusive == "one":             # <<<<<<<<<<<<<<
 *             incl_off: cython.int = 0
 *         elif inclusive == "neither":
*/
    goto __pyx_L28;
  }

  /* "cytimes/pddt.py":4841
 *         elif inclusive == "one":
 *             incl_off: cython.int = 0
 *         elif inclusive == "neither":             # <<<<<<<<<<<<<<
 *             incl_off: cython.int = -1
 *         else:
*/
  __pyx_t_23 = (__Pyx_PyUnicode_Equals(__pyx_v_inclusive, __pyx_mstate_global->__pyx_n_u_neither, Py_EQ)); if (unlikely((__pyx_t_23 < 0))) __PYX_ERR(0, 4841, __pyx_L1_error)
  if (__pyx_t_23) {

    /* "cytimes/pddt.py":4842
 *             incl_off: cython.int = 0
 *         elif inclusive == "neither":
 *             incl_off: cython.int = -1             # <<<<<<<<<<<<<<
 *         else:
 *             errors.raise_argument_error(
*/
    __pyx_v_incl_off = -1;

    /* "cytimes/pddt.py":4841
 *         elif inclusive == "one":
 *             incl_off: cython.int = 0
 *         elif inclusive == "neither":             # <<<<<<<<<<<<<<
 *             incl_off: cython.int = -1
 *         else:
*/
    goto __pyx_L28;
  }

  /* "cytimes/pddt.py":4844
 *             incl_off: cython.int = -1
 *         else:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self.__class__,
 *                 "diff(..., inclusive)",
*/
  /*else*/ {

    /* "cytimes/pddt.py":4845
 *         else:
 *             errors.raise_argument_error(
 *                 self.__class__,             # <<<<<<<<<<<<<<
 *                 "diff(..., inclusive)",
 *                 "Supports: 'one', 'both' or 'neither'; got '%s'." % inclusive,
*/
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4845, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);

    /* "cytimes/pddt.py":4847
 *                 self.__class__,
 *                 "diff(..., inclusive)",
 *                 "Supports: 'one', 'both' or 'neither'; got '%s'." % inclusive,             # <<<<<<<<<<<<<<
 *             )
 *             return  # unreachable: suppress compiler warning
*/
    __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Supports_one_both_or_neither_got, __pyx_v_inclusive); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "cytimes/pddt.py":4844
 *             incl_off: cython.int = -1
 *         else:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self.__class__,
 *                 "diff(..., inclusive)",
*/
    __pyx_t_13.__pyx_n = 3;
    __pyx_t_13.cls = __pyx_t_8;
    __pyx_t_13.input_msg = __pyx_mstate_global->__pyx_kp_u_diff_inclusive;
    __pyx_t_13.error_msg = ((PyObject*)__pyx_t_5);
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_13); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4844, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cytimes/pddt.py":4849
 *                 "Supports: 'one', 'both' or 'neither'; got '%s'." % inclusive,
 *             )
 *             return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 * 
 *         # Validate delta 'unit'
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }
  __pyx_L28:;

  /* "cytimes/pddt.py":4852
 * 
 *         # Validate delta 'unit'
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  __pyx_t_23 = (__pyx_v_unit == ((PyObject*)Py_None));
  if (__pyx_t_23) {

    /* "cytimes/pddt.py":4854
 *         if unit is None:
 *             errors.raise_argument_error(
 *                 self.__class__,             # <<<<<<<<<<<<<<
 *                 "diff(..., unit)",
 *                 "Delta 'unit' cannot be None.",
*/
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "cytimes/pddt.py":4853
 *         # Validate delta 'unit'
 *         if unit is None:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self.__class__,
 *                 "diff(..., unit)",
*/
    __pyx_t_13.__pyx_n = 3;
    __pyx_t_13.cls = __pyx_t_5;
    __pyx_t_13.input_msg = __pyx_mstate_global->__pyx_kp_u_diff_unit;
    __pyx_t_13.error_msg = __pyx_mstate_global->__pyx_kp_u_Delta_unit_cannot_be_None;
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_13); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4853, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cytimes/pddt.py":4852
 * 
 *         # Validate delta 'unit'
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  }

  /* "cytimes/pddt.py":4858
 *                 "Delta 'unit' cannot be None.",
 *             )
 *         unit_len: cython.Py_ssize_t = str_len(unit)             # <<<<<<<<<<<<<<
 *         if unit_len == 0:
 *             errors.raise_argument_error(
*/
  __pyx_v_unit_len = PyUnicode_GET_LENGTH(__pyx_v_unit);

  /* "cytimes/pddt.py":4859
 *             )
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 0:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  __pyx_t_23 = (__pyx_v_unit_len == 0);
  if (__pyx_t_23) {

    /* "cytimes/pddt.py":4861
 *         if unit_len == 0:
 *             errors.raise_argument_error(
 *                 self.__class__,             # <<<<<<<<<<<<<<
 *                 "diff(..., unit)",
 *                 "Delta 'unit' cannot be an empty string.",
*/
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4861, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "cytimes/pddt.py":4860
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 0:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self.__class__,
 *                 "diff(..., unit)",
*/
    __pyx_t_13.__pyx_n = 3;
    __pyx_t_13.cls = __pyx_t_5;
    __pyx_t_13.input_msg = __pyx_mstate_global->__pyx_kp_u_diff_unit;
    __pyx_t_13.error_msg = __pyx_mstate_global->__pyx_kp_u_Delta_unit_cannot_be_an_empty_st;
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_13); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4860, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cytimes/pddt.py":4859
 *             )
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 0:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  }

  /* "cytimes/pddt.py":4867
 * 
 *         # Calculate delta -> int64
 *         try:             # <<<<<<<<<<<<<<
 *             # . convert to int64[W] on monday
 *             if unit_len == 1 and str_read(unit, 0) == "W":
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_9);
    /*try:*/ {

      /* "cytimes/pddt.py":4869
 *         try:
 *             # . convert to int64[W] on monday
 *             if unit_len == 1 and str_read(unit, 0) == "W":             # <<<<<<<<<<<<<<
 *                 my_arr = utils.dt64arr_as_W_iso(my_arr, 1, -1, 0, True)
 *                 pt_arr = utils.dt64arr_as_W_iso(pt_arr, 1, -1, 0, True)
*/
      __pyx_t_4 = (__pyx_v_unit_len == 1);
      if (__pyx_t_4) {
      } else {
        __pyx_t_23 = __pyx_t_4;
        goto __pyx_L38_bool_binop_done;
      }
      __pyx_t_4 = (PyUnicode_READ_CHAR(__pyx_v_unit, 0) == 87);
      __pyx_t_23 = __pyx_t_4;
      __pyx_L38_bool_binop_done:;
      if (__pyx_t_23) {

        /* "cytimes/pddt.py":4870
 *             # . convert to int64[W] on monday
 *             if unit_len == 1 and str_read(unit, 0) == "W":
 *                 my_arr = utils.dt64arr_as_W_iso(my_arr, 1, -1, 0, True)             # <<<<<<<<<<<<<<
 *                 pt_arr = utils.dt64arr_as_W_iso(pt_arr, 1, -1, 0, True)
 *             # . convert to int64[unit]
*/
        __pyx_t_25.__pyx_n = 3;
        __pyx_t_25.arr_reso = -1;
        __pyx_t_25.offset = 0;
        __pyx_t_25.copy = 1;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_W_iso(__pyx_v_my_arr, 1, &__pyx_t_25)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4870, __pyx_L31_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_my_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "cytimes/pddt.py":4871
 *             if unit_len == 1 and str_read(unit, 0) == "W":
 *                 my_arr = utils.dt64arr_as_W_iso(my_arr, 1, -1, 0, True)
 *                 pt_arr = utils.dt64arr_as_W_iso(pt_arr, 1, -1, 0, True)             # <<<<<<<<<<<<<<
 *             # . convert to int64[unit]
 *             else:
*/
        __pyx_t_25.__pyx_n = 3;
        __pyx_t_25.arr_reso = -1;
        __pyx_t_25.offset = 0;
        __pyx_t_25.copy = 1;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_W_iso(__pyx_v_pt_arr, 1, &__pyx_t_25)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4871, __pyx_L31_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_pt_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "cytimes/pddt.py":4869
 *         try:
 *             # . convert to int64[W] on monday
 *             if unit_len == 1 and str_read(unit, 0) == "W":             # <<<<<<<<<<<<<<
 *                 my_arr = utils.dt64arr_as_W_iso(my_arr, 1, -1, 0, True)
 *                 pt_arr = utils.dt64arr_as_W_iso(pt_arr, 1, -1, 0, True)
*/
        goto __pyx_L37;
      }

      /* "cytimes/pddt.py":4874
 *             # . convert to int64[unit]
 *             else:
 *                 my_arr = utils.dt64arr_as_int64(my_arr, unit, -1, 0, True)             # <<<<<<<<<<<<<<
 *                 pt_arr = utils.dt64arr_as_int64(pt_arr, unit, -1, 0, True)
 *         except Exception as err:
*/
      /*else*/ {
        __pyx_t_26.__pyx_n = 3;
        __pyx_t_26.arr_reso = -1;
        __pyx_t_26.offset = 0;
        __pyx_t_26.copy = 1;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64(__pyx_v_my_arr, __pyx_v_unit, &__pyx_t_26)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4874, __pyx_L31_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_my_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "cytimes/pddt.py":4875
 *             else:
 *                 my_arr = utils.dt64arr_as_int64(my_arr, unit, -1, 0, True)
 *                 pt_arr = utils.dt64arr_as_int64(pt_arr, unit, -1, 0, True)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "diff(..., unit)", None, err)
*/
        __pyx_t_26.__pyx_n = 3;
        __pyx_t_26.arr_reso = -1;
        __pyx_t_26.offset = 0;
        __pyx_t_26.copy = 1;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64(__pyx_v_pt_arr, __pyx_v_unit, &__pyx_t_26)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4875, __pyx_L31_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_pt_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;
      }
      __pyx_L37:;

      /* "cytimes/pddt.py":4867
 * 
 *         # Calculate delta -> int64
 *         try:             # <<<<<<<<<<<<<<
 *             # . convert to int64[W] on monday
 *             if unit_len == 1 and str_read(unit, 0) == "W":
*/
    }
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_L36_try_end;
    __pyx_L31_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "cytimes/pddt.py":4876
 *                 my_arr = utils.dt64arr_as_int64(my_arr, unit, -1, 0, True)
 *                 pt_arr = utils.dt64arr_as_int64(pt_arr, unit, -1, 0, True)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self.__class__, "diff(..., unit)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
    __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_14) {
      __Pyx_AddTraceback("cytimes.pddt.Pddt.diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_8, &__pyx_t_3) < 0) __PYX_ERR(0, 4876, __pyx_L33_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __pyx_v_err = __pyx_t_8;
      /*try:*/ {

        /* "cytimes/pddt.py":4877
 *                 pt_arr = utils.dt64arr_as_int64(pt_arr, unit, -1, 0, True)
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "diff(..., unit)", None, err)             # <<<<<<<<<<<<<<
 *             return  # unreachable: suppress compiler warning
 *         # . compute relative delta
*/
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4877, __pyx_L45_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_13.__pyx_n = 4;
        __pyx_t_13.cls = __pyx_t_1;
        __pyx_t_13.input_msg = __pyx_mstate_global->__pyx_kp_u_diff_unit;
        __pyx_t_13.error_msg = ((PyObject*)Py_None);
        __pyx_t_13.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_13); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4877, __pyx_L45_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "cytimes/pddt.py":4878
 *         except Exception as err:
 *             errors.raise_argument_error(self.__class__, "diff(..., unit)", None, err)
 *             return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *         # . compute relative delta
 *         delta = utils.arr_sub_arr(my_arr, pt_arr, 0, False)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L44_return;
      }

      /* "cytimes/pddt.py":4876
 *                 my_arr = utils.dt64arr_as_int64(my_arr, unit, -1, 0, True)
 *                 pt_arr = utils.dt64arr_as_int64(pt_arr, unit, -1, 0, True)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self.__class__, "diff(..., unit)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
      /*finally:*/ {
        __pyx_L45_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16);
          if ( unlikely(__Pyx_GetException(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_16);
          __pyx_t_14 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_27 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ErrRestore(__pyx_t_21, __pyx_t_20, __pyx_t_19);
          __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0;
          __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_27;
          goto __pyx_L33_except_error;
        }
        __pyx_L44_return: {
          __pyx_t_16 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          __pyx_r = __pyx_t_16;
          __pyx_t_16 = 0;
          goto __pyx_L34_except_return;
        }
      }
    }
    goto __pyx_L33_except_error;

    /* "cytimes/pddt.py":4867
 * 
 *         # Calculate delta -> int64
 *         try:             # <<<<<<<<<<<<<<
 *             # . convert to int64[W] on monday
 *             if unit_len == 1 and str_read(unit, 0) == "W":
*/
    __pyx_L33_except_error:;
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
    goto __pyx_L1_error;
    __pyx_L34_except_return:;
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
    goto __pyx_L0;
    __pyx_L36_try_end:;
  }

  /* "cytimes/pddt.py":4880
 *             return  # unreachable: suppress compiler warning
 *         # . compute relative delta
 *         delta = utils.arr_sub_arr(my_arr, pt_arr, 0, False)             # <<<<<<<<<<<<<<
 * 
 *         # Adjust for inclusivity
*/
  __pyx_t_28.__pyx_n = 2;
  __pyx_t_28.offset = 0;
  __pyx_t_28.copy = 0;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_sub_arr(__pyx_v_my_arr, __pyx_v_pt_arr, &__pyx_t_28)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_delta = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cytimes/pddt.py":4884
 *         # Adjust for inclusivity
 *         # . absolute = True
 *         if absolute:             # <<<<<<<<<<<<<<
 *             delta = utils.arr_abs(delta, incl_off, False)
 *         # . absolute = False & inclusive offset
*/
  if (__pyx_v_absolute) {

    /* "cytimes/pddt.py":4885
 *         # . absolute = True
 *         if absolute:
 *             delta = utils.arr_abs(delta, incl_off, False)             # <<<<<<<<<<<<<<
 *         # . absolute = False & inclusive offset
 *         elif incl_off != 0:
*/
    __pyx_t_29.__pyx_n = 2;
    __pyx_t_29.offset = __pyx_v_incl_off;
    __pyx_t_29.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_abs(__pyx_v_delta, &__pyx_t_29)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "cytimes/pddt.py":4884
 *         # Adjust for inclusivity
 *         # . absolute = True
 *         if absolute:             # <<<<<<<<<<<<<<
 *             delta = utils.arr_abs(delta, incl_off, False)
 *         # . absolute = False & inclusive offset
*/
    goto __pyx_L51;
  }

  /* "cytimes/pddt.py":4887
 *             delta = utils.arr_abs(delta, incl_off, False)
 *         # . absolute = False & inclusive offset
 *         elif incl_off != 0:             # <<<<<<<<<<<<<<
 *             delta_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(delta))
 *             i: cython.Py_ssize_t
*/
  __pyx_t_23 = (__pyx_v_incl_off != 0);
  if (__pyx_t_23) {

    /* "cytimes/pddt.py":4888
 *         # . absolute = False & inclusive offset
 *         elif incl_off != 0:
 *             delta_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(delta))             # <<<<<<<<<<<<<<
 *             i: cython.Py_ssize_t
 *             for i in range(my_size):
*/
    __pyx_v_delta_p = ((npy_int64 *)PyArray_DATA(__pyx_v_delta));

    /* "cytimes/pddt.py":4890
 *             delta_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(delta))
 *             i: cython.Py_ssize_t
 *             for i in range(my_size):             # <<<<<<<<<<<<<<
 *                 # Preserve NaT
 *                 v: np.npy_int64 = delta_p[i]
*/
    __pyx_t_30 = __pyx_v_my_size;
    __pyx_t_31 = __pyx_t_30;
    for (__pyx_t_32 = 0; __pyx_t_32 < __pyx_t_31; __pyx_t_32+=1) {
      __pyx_v_i = __pyx_t_32;

      /* "cytimes/pddt.py":4892
 *             for i in range(my_size):
 *                 # Preserve NaT
 *                 v: np.npy_int64 = delta_p[i]             # <<<<<<<<<<<<<<
 *                 if v == utils.LLONG_MIN:
 *                     continue
*/
      __pyx_v_v = (__pyx_v_delta_p[__pyx_v_i]);

      /* "cytimes/pddt.py":4893
 *                 # Preserve NaT
 *                 v: np.npy_int64 = delta_p[i]
 *                 if v == utils.LLONG_MIN:             # <<<<<<<<<<<<<<
 *                     continue
 *                 # Adjust offset
*/
      __pyx_t_23 = (__pyx_v_v == LLONG_MIN);
      if (__pyx_t_23) {

        /* "cytimes/pddt.py":4894
 *                 v: np.npy_int64 = delta_p[i]
 *                 if v == utils.LLONG_MIN:
 *                     continue             # <<<<<<<<<<<<<<
 *                 # Adjust offset
 *                 delta_p[i] = v - incl_off if v < 0 else v + incl_off
*/
        goto __pyx_L52_continue;

        /* "cytimes/pddt.py":4893
 *                 # Preserve NaT
 *                 v: np.npy_int64 = delta_p[i]
 *                 if v == utils.LLONG_MIN:             # <<<<<<<<<<<<<<
 *                     continue
 *                 # Adjust offset
*/
      }

      /* "cytimes/pddt.py":4896
 *                     continue
 *                 # Adjust offset
 *                 delta_p[i] = v - incl_off if v < 0 else v + incl_off             # <<<<<<<<<<<<<<
 * 
 *         # Finished
*/
      __pyx_t_23 = (__pyx_v_v < 0);
      if (__pyx_t_23) {
        __pyx_t_33 = (__pyx_v_v - __pyx_v_incl_off);
      } else {
        __pyx_t_33 = (__pyx_v_v + __pyx_v_incl_off);
      }
      (__pyx_v_delta_p[__pyx_v_i]) = __pyx_t_33;
      __pyx_L52_continue:;
    }

    /* "cytimes/pddt.py":4887
 *             delta = utils.arr_abs(delta, incl_off, False)
 *         # . absolute = False & inclusive offset
 *         elif incl_off != 0:             # <<<<<<<<<<<<<<
 *             delta_p = cython.cast(cython.pointer(np.npy_int64), np.PyArray_DATA(delta))
 *             i: cython.Py_ssize_t
*/
  }
  __pyx_L51:;

  /* "cytimes/pddt.py":4899
 * 
 *         # Finished
 *         return pd.Index(delta, name="diff")             # <<<<<<<<<<<<<<
 * 
 *     # Comparison ---------------------------------------------------------------------------
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_8 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_7 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
    assert(__pyx_t_8);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
    __pyx_t_7 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_8, ((PyObject *)__pyx_v_delta)};
    __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_diff, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4899, __pyx_L1_error)
    __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4757
 *         return self._new(out, tz=self.tzinfo, name=self.name)
 * 
 *     def diff(             # <<<<<<<<<<<<<<
 *         self,
 *         data: object,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_my_arr);
  __Pyx_XDECREF(__pyx_v_pt);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF((PyObject *)__pyx_v_pt_arr);
  __Pyx_XDECREF(__pyx_v_my_tz);
  __Pyx_XDECREF(__pyx_v_pt_tz);
  __Pyx_XDECREF((PyObject *)__pyx_v_delta);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4902
 * 
 *     # Comparison ---------------------------------------------------------------------------
 *     def is_past(self) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether datetimes are in the past `<'Index[bool]'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_255is_past(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_254is_past, "Element-wise check whether datetimes are in the past `<'Index[bool]'>`.\n\n        ## Equivalent\n        >>> self < datetime.datetime.now(self.tzinfo)\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_255is_past = {"is_past", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_255is_past, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_254is_past};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_255is_past(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_past (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4902, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4902, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_past", 0) < (0)) __PYX_ERR(0, 4902, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_past", 1, 1, 1, i); __PYX_ERR(0, 4902, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4902, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_past", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4902, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_past", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_254is_past(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_254is_past(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyDateTime_DateTime *__pyx_v_dt = 0;
  int __pyx_v_my_reso;
  PY_LONG_LONG __pyx_v_tic;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_now __pyx_t_3;
  int __pyx_t_4;
  PY_LONG_LONG __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_us __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  size_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_past", 0);

  /* "cytimes/pddt.py":4909
 *         """
 *         # Get current datetime in the same timezone
 *         dt: datetime.datetime = utils.dt_now(self.tzinfo, None)             # <<<<<<<<<<<<<<
 * 
 *         # Convert to the same resolution
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.tzinfo = __pyx_t_1;
  __pyx_t_3.dtclass = Py_None;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_now(&__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":4912
 * 
 *         # Convert to the same resolution
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)             # <<<<<<<<<<<<<<
 *         tic: cython.longlong = utils.dt_to_us(dt, True)
 *         if my_reso == utils.DT_NPY_UNIT_NS:
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 4912, __pyx_L1_error)
  __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(((PyObject*)__pyx_t_2)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 4912, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_my_reso = __pyx_t_4;

  /* "cytimes/pddt.py":4913
 *         # Convert to the same resolution
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         tic: cython.longlong = utils.dt_to_us(dt, True)             # <<<<<<<<<<<<<<
 *         if my_reso == utils.DT_NPY_UNIT_NS:
 *             tic *= utils.NS_MICROSECOND
*/
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.utc = 1;
  __pyx_t_5 = __pyx_f_7cytimes_5utils_dt_to_us(__pyx_v_dt, &__pyx_t_6); if (unlikely(__pyx_t_5 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 4913, __pyx_L1_error)
  __pyx_v_tic = __pyx_t_5;

  /* "cytimes/pddt.py":4914
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         tic: cython.longlong = utils.dt_to_us(dt, True)
 *         if my_reso == utils.DT_NPY_UNIT_NS:             # <<<<<<<<<<<<<<
 *             tic *= utils.NS_MICROSECOND
 *         elif my_reso == utils.DT_NPY_UNIT_MS:
*/
  __pyx_t_7 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS);
  if (__pyx_t_7) {

    /* "cytimes/pddt.py":4915
 *         tic: cython.longlong = utils.dt_to_us(dt, True)
 *         if my_reso == utils.DT_NPY_UNIT_NS:
 *             tic *= utils.NS_MICROSECOND             # <<<<<<<<<<<<<<
 *         elif my_reso == utils.DT_NPY_UNIT_MS:
 *             tic = utils.math_div_even(tic, utils.US_MILLISECOND)
*/
    __pyx_v_tic = (__pyx_v_tic * __pyx_v_7cytimes_5utils_NS_MICROSECOND);

    /* "cytimes/pddt.py":4914
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         tic: cython.longlong = utils.dt_to_us(dt, True)
 *         if my_reso == utils.DT_NPY_UNIT_NS:             # <<<<<<<<<<<<<<
 *             tic *= utils.NS_MICROSECOND
 *         elif my_reso == utils.DT_NPY_UNIT_MS:
*/
    goto __pyx_L3;
  }

  /* "cytimes/pddt.py":4916
 *         if my_reso == utils.DT_NPY_UNIT_NS:
 *             tic *= utils.NS_MICROSECOND
 *         elif my_reso == utils.DT_NPY_UNIT_MS:             # <<<<<<<<<<<<<<
 *             tic = utils.math_div_even(tic, utils.US_MILLISECOND)
 *         elif my_reso == utils.DT_NPY_UNIT_SS:
*/
  __pyx_t_7 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MS);
  if (__pyx_t_7) {

    /* "cytimes/pddt.py":4917
 *             tic *= utils.NS_MICROSECOND
 *         elif my_reso == utils.DT_NPY_UNIT_MS:
 *             tic = utils.math_div_even(tic, utils.US_MILLISECOND)             # <<<<<<<<<<<<<<
 *         elif my_reso == utils.DT_NPY_UNIT_SS:
 *             tic = utils.math_div_even(tic, utils.US_SECOND)
*/
    __pyx_t_5 = __pyx_f_7cytimes_5utils_math_div_even(__pyx_v_tic, __pyx_v_7cytimes_5utils_US_MILLISECOND, NULL); if (unlikely(__pyx_t_5 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 4917, __pyx_L1_error)
    __pyx_v_tic = __pyx_t_5;

    /* "cytimes/pddt.py":4916
 *         if my_reso == utils.DT_NPY_UNIT_NS:
 *             tic *= utils.NS_MICROSECOND
 *         elif my_reso == utils.DT_NPY_UNIT_MS:             # <<<<<<<<<<<<<<
 *             tic = utils.math_div_even(tic, utils.US_MILLISECOND)
 *         elif my_reso == utils.DT_NPY_UNIT_SS:
*/
    goto __pyx_L3;
  }

  /* "cytimes/pddt.py":4918
 *         elif my_reso == utils.DT_NPY_UNIT_MS:
 *             tic = utils.math_div_even(tic, utils.US_MILLISECOND)
 *         elif my_reso == utils.DT_NPY_UNIT_SS:             # <<<<<<<<<<<<<<
 *             tic = utils.math_div_even(tic, utils.US_SECOND)
 *         #: else 'us' -> as-is
*/
  __pyx_t_7 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_SS);
  if (__pyx_t_7) {

    /* "cytimes/pddt.py":4919
 *             tic = utils.math_div_even(tic, utils.US_MILLISECOND)
 *         elif my_reso == utils.DT_NPY_UNIT_SS:
 *             tic = utils.math_div_even(tic, utils.US_SECOND)             # <<<<<<<<<<<<<<
 *         #: else 'us' -> as-is
 * 
*/
    __pyx_t_5 = __pyx_f_7cytimes_5utils_math_div_even(__pyx_v_tic, __pyx_v_7cytimes_5utils_US_SECOND, NULL); if (unlikely(__pyx_t_5 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 4919, __pyx_L1_error)
    __pyx_v_tic = __pyx_t_5;

    /* "cytimes/pddt.py":4918
 *         elif my_reso == utils.DT_NPY_UNIT_MS:
 *             tic = utils.math_div_even(tic, utils.US_MILLISECOND)
 *         elif my_reso == utils.DT_NPY_UNIT_SS:             # <<<<<<<<<<<<<<
 *             tic = utils.math_div_even(tic, utils.US_SECOND)
 *         #: else 'us' -> as-is
*/
  }
  __pyx_L3:;

  /* "cytimes/pddt.py":4923
 * 
 *         # Compare
 *         return pd.Index(utils.arr_lt(self.values, tic), name="is_past")             # <<<<<<<<<<<<<<
 * 
 *     def is_future(self) -> pd.Index[bool]:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4923, __pyx_L1_error)
  __pyx_t_10 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_lt(((PyArrayObject *)__pyx_t_8), __pyx_v_tic)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_11 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
    assert(__pyx_t_1);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
    __pyx_t_11 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_t_10};
    __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4923, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_is_past, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4923, __pyx_L1_error)
    __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4923, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4902
 * 
 *     # Comparison ---------------------------------------------------------------------------
 *     def is_past(self) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether datetimes are in the past `<'Index[bool]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_past", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pddt.py":4925
 *         return pd.Index(utils.arr_lt(self.values, tic), name="is_past")
 * 
 *     def is_future(self) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether datetimes are in the future `<'Index[bool]'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_257is_future(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pddt_4Pddt_256is_future, "Element-wise check whether datetimes are in the future `<'Index[bool]'>`.\n\n        ## Equivalent\n        >>> self > datetime.datetime.now(self.tzinfo)\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pddt_4Pddt_257is_future = {"is_future", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pddt_4Pddt_257is_future, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pddt_4Pddt_256is_future};
static PyObject *__pyx_pw_7cytimes_4pddt_4Pddt_257is_future(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_future (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4925, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4925, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_future", 0) < (0)) __PYX_ERR(0, 4925, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_future", 1, 1, 1, i); __PYX_ERR(0, 4925, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4925, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_future", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4925, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_future", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pddt_4Pddt_256is_future(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pddt_4Pddt_256is_future(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyDateTime_DateTime *__pyx_v_dt = 0;
  int __pyx_v_my_reso;
  PY_LONG_LONG __pyx_v_tic;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_now __pyx_t_3;
  int __pyx_t_4;
  PY_LONG_LONG __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_us __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  size_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_future", 0);

  /* "cytimes/pddt.py":4932
 *         """
 *         # Get current datetime in the same timezone
 *         dt: datetime.datetime = utils.dt_now(self.tzinfo, None)             # <<<<<<<<<<<<<<
 * 
 *         # Convert to the same resolution
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.tzinfo = __pyx_t_1;
  __pyx_t_3.dtclass = Py_None;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_now(&__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pddt.py":4935
 * 
 *         # Convert to the same resolution
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)             # <<<<<<<<<<<<<<
 *         tic: cython.longlong = utils.dt_to_us(dt, True)
 *         if my_reso == utils.DT_NPY_UNIT_NS:
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 4935, __pyx_L1_error)
  __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(((PyObject*)__pyx_t_2)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 4935, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_my_reso = __pyx_t_4;

  /* "cytimes/pddt.py":4936
 *         # Convert to the same resolution
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         tic: cython.longlong = utils.dt_to_us(dt, True)             # <<<<<<<<<<<<<<
 *         if my_reso == utils.DT_NPY_UNIT_NS:
 *             tic *= utils.NS_MICROSECOND
*/
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.utc = 1;
  __pyx_t_5 = __pyx_f_7cytimes_5utils_dt_to_us(__pyx_v_dt, &__pyx_t_6); if (unlikely(__pyx_t_5 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 4936, __pyx_L1_error)
  __pyx_v_tic = __pyx_t_5;

  /* "cytimes/pddt.py":4937
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         tic: cython.longlong = utils.dt_to_us(dt, True)
 *         if my_reso == utils.DT_NPY_UNIT_NS:             # <<<<<<<<<<<<<<
 *             tic *= utils.NS_MICROSECOND
 *         elif my_reso == utils.DT_NPY_UNIT_MS:
*/
  __pyx_t_7 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS);
  if (__pyx_t_7) {

    /* "cytimes/pddt.py":4938
 *         tic: cython.longlong = utils.dt_to_us(dt, True)
 *         if my_reso == utils.DT_NPY_UNIT_NS:
 *             tic *= utils.NS_MICROSECOND             # <<<<<<<<<<<<<<
 *         elif my_reso == utils.DT_NPY_UNIT_MS:
 *             tic = utils.math_div_even(tic, utils.US_MILLISECOND)
*/
    __pyx_v_tic = (__pyx_v_tic * __pyx_v_7cytimes_5utils_NS_MICROSECOND);

    /* "cytimes/pddt.py":4937
 *         my_reso: cython.int = utils.nptime_unit_str2int(self.unit)
 *         tic: cython.longlong = utils.dt_to_us(dt, True)
 *         if my_reso == utils.DT_NPY_UNIT_NS:             # <<<<<<<<<<<<<<
 *             tic *= utils.NS_MICROSECOND
 *         elif my_reso == utils.DT_NPY_UNIT_MS:
*/
    goto __pyx_L3;
  }

  /* "cytimes/pddt.py":4939
 *         if my_reso == utils.DT_NPY_UNIT_NS:
 *             tic *= utils.NS_MICROSECOND
 *         elif my_reso == utils.DT_NPY_UNIT_MS:             # <<<<<<<<<<<<<<
 *             tic = utils.math_div_even(tic, utils.US_MILLISECOND)
 *         elif my_reso == utils.DT_NPY_UNIT_SS:
*/
  __pyx_t_7 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MS);
  if (__pyx_t_7) {

    /* "cytimes/pddt.py":4940
 *             tic *= utils.NS_MICROSECOND
 *         elif my_reso == utils.DT_NPY_UNIT_MS:
 *             tic = utils.math_div_even(tic, utils.US_MILLISECOND)             # <<<<<<<<<<<<<<
 *         elif my_reso == utils.DT_NPY_UNIT_SS:
 *             tic = utils.math_div_even(tic, utils.US_SECOND)
*/
    __pyx_t_5 = __pyx_f_7cytimes_5utils_math_div_even(__pyx_v_tic, __pyx_v_7cytimes_5utils_US_MILLISECOND, NULL); if (unlikely(__pyx_t_5 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 4940, __pyx_L1_error)
    __pyx_v_tic = __pyx_t_5;

    /* "cytimes/pddt.py":4939
 *         if my_reso == utils.DT_NPY_UNIT_NS:
 *             tic *= utils.NS_MICROSECOND
 *         elif my_reso == utils.DT_NPY_UNIT_MS:             # <<<<<<<<<<<<<<
 *             tic = utils.math_div_even(tic, utils.US_MILLISECOND)
 *         elif my_reso == utils.DT_NPY_UNIT_SS:
*/
    goto __pyx_L3;
  }

  /* "cytimes/pddt.py":4941
 *         elif my_reso == utils.DT_NPY_UNIT_MS:
 *             tic = utils.math_div_even(tic, utils.US_MILLISECOND)
 *         elif my_reso == utils.DT_NPY_UNIT_SS:             # <<<<<<<<<<<<<<
 *             tic = utils.math_div_even(tic, utils.US_SECOND)
 *         #: else 'us' -> as-is
*/
  __pyx_t_7 = (__pyx_v_my_reso == __pyx_v_7cytimes_5utils_DT_NPY_UNIT_SS);
  if (__pyx_t_7) {

    /* "cytimes/pddt.py":4942
 *             tic = utils.math_div_even(tic, utils.US_MILLISECOND)
 *         elif my_reso == utils.DT_NPY_UNIT_SS:
 *             tic = utils.math_div_even(tic, utils.US_SECOND)             # <<<<<<<<<<<<<<
 *         #: else 'us' -> as-is
 * 
*/
    __pyx_t_5 = __pyx_f_7cytimes_5utils_math_div_even(__pyx_v_tic, __pyx_v_7cytimes_5utils_US_SECOND, NULL); if (unlikely(__pyx_t_5 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 4942, __pyx_L1_error)
    __pyx_v_tic = __pyx_t_5;

    /* "cytimes/pddt.py":4941
 *         elif my_reso == utils.DT_NPY_UNIT_MS:
 *             tic = utils.math_div_even(tic, utils.US_MILLISECOND)
 *         elif my_reso == utils.DT_NPY_UNIT_SS:             # <<<<<<<<<<<<<<
 *             tic = utils.math_div_even(tic, utils.US_SECOND)
 *         #: else 'us' -> as-is
*/
  }
  __pyx_L3:;

  /* "cytimes/pddt.py":4946
 * 
 *         # Compare
 *         return pd.Index(utils.arr_gt(self.values, tic), name="is_future")             # <<<<<<<<<<<<<<
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_Index); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4946, __pyx_L1_error)
  __pyx_t_10 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_gt(((PyArrayObject *)__pyx_t_8), __pyx_v_tic)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_11 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
    assert(__pyx_t_1);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
    __pyx_t_11 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_t_10};
    __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4946, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_is_future, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4946, __pyx_L1_error)
    __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4946, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cytimes/pddt.py":4925
 *         return pd.Index(utils.arr_lt(self.values, tic), name="is_past")
 * 
 *     def is_future(self) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether datetimes are in the future `<'Index[bool]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cytimes.pddt.Pddt.is_future", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* #### Code section: module_exttypes ### */

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};
/* #### Code section: initfunc_declarations ### */
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/
/* #### Code section: init_module ### */

static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_2_1(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyTypeObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  0, 0,
  #else
  sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(7, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType_3_2_1(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyLongObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyLongObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  0, 0,
  #else
  sizeof(PyLongObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyLongObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(8, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType_3_2_1(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyComplexObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  0, 0,
  #else
  sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyComplexObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(9, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_5numpy_dtype = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "dtype",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArray_Descr),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArray_Descr),
  #else
  sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArray_Descr),
  #endif
  __Pyx_ImportType_CheckSize_Ignore_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_dtype) __PYX_ERR(1, 228, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_flatiter = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "flatiter",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArrayIterObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArrayIterObject),
  #else
  sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArrayIterObject),
  #endif
  __Pyx_ImportType_CheckSize_Ignore_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_flatiter) __PYX_ERR(1, 273, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_broadcast = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "broadcast",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArrayMultiIterObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArrayMultiIterObject),
  #else
  sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArrayMultiIterObject),
  #endif
  __Pyx_ImportType_CheckSize_Ignore_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_broadcast) __PYX_ERR(1, 277, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_ndarray = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "ndarray",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArrayObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArrayObject),
  #else
  sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArrayObject),
  #endif
  __Pyx_ImportType_CheckSize_Ignore_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_ndarray) __PYX_ERR(1, 316, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_generic = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "generic",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #else
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_generic) __PYX_ERR(1, 825, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_number = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "number",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #else
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_number) __PYX_ERR(1, 827, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_integer = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "integer",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #else
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_integer) __PYX_ERR(1, 829, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_signedinteger = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "signedinteger",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #else
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_signedinteger) __PYX_ERR(1, 831, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "unsignedinteger",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #else
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(1, 833, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_inexact = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "inexact",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #else
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_inexact) __PYX_ERR(1, 835, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_floating = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "floating",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #else
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_floating) __PYX_ERR(1, 837, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_complexfloating = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "complexfloating",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #else
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_complexfloating) __PYX_ERR(1, 839, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_flexible = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "flexible",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #else
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_flexible) __PYX_ERR(1, 841, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_character = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "character",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #else
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_character) __PYX_ERR(1, 843, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_ufunc = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "ufunc",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyUFuncObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyUFuncObject),
  #else
  sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyUFuncObject),
  #endif
  __Pyx_ImportType_CheckSize_Ignore_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_ufunc) __PYX_ERR(1, 907, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("datetime"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cpython_8datetime_date = __Pyx_ImportType_3_2_1(__pyx_t_1, "datetime", "date",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_Date),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_Date),
  #else
  sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_Date),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_date) __PYX_ERR(3, 43, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7cpython_8datetime_time = __Pyx_ImportType_3_2_1(__pyx_t_1, "datetime", "time",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_Time),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_Time),
  #else
  sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_Time),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_time) __PYX_ERR(3, 56, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7cpython_8datetime_datetime = __Pyx_ImportType_3_2_1(__pyx_t_1, "datetime", "datetime",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_DateTime),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_DateTime),
  #else
  sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_DateTime),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_datetime) __PYX_ERR(3, 82, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7cpython_8datetime_timedelta = __Pyx_ImportType_3_2_1(__pyx_t_1, "datetime", "timedelta",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_Delta),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_Delta),
  #else
  sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_Delta),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_timedelta) __PYX_ERR(3, 120, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7cpython_8datetime_tzinfo = __Pyx_ImportType_3_2_1(__pyx_t_1, "datetime", "tzinfo",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_TZInfo),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_TZInfo),
  #else
  sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_TZInfo),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_tzinfo) __PYX_ERR(3, 133, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("cytimes.parser"); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cytimes_6parser_Configs = __Pyx_ImportType_3_2_1(__pyx_t_1, "cytimes.parser", "Configs",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7cytimes_6parser_Configs), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(struct __pyx_obj_7cytimes_6parser_Configs),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7cytimes_6parser_Configs), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(struct __pyx_obj_7cytimes_6parser_Configs),
  #else
  sizeof(struct __pyx_obj_7cytimes_6parser_Configs), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(struct __pyx_obj_7cytimes_6parser_Configs),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_7cytimes_6parser_Configs) __PYX_ERR(6, 246, __pyx_L1_error)
  __pyx_vtabptr_7cytimes_6parser_Configs = (struct __pyx_vtabstruct_7cytimes_6parser_Configs*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7cytimes_6parser_Configs); if (unlikely(!__pyx_vtabptr_7cytimes_6parser_Configs)) __PYX_ERR(6, 246, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7cytimes_6parser_Result = __Pyx_ImportType_3_2_1(__pyx_t_1, "cytimes.parser", "Result",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7cytimes_6parser_Result), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(struct __pyx_obj_7cytimes_6parser_Result),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7cytimes_6parser_Result), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(struct __pyx_obj_7cytimes_6parser_Result),
  #else
  sizeof(struct __pyx_obj_7cytimes_6parser_Result), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(struct __pyx_obj_7cytimes_6parser_Result),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_7cytimes_6parser_Result) __PYX_ERR(6, 326, __pyx_L1_error)
  __pyx_vtabptr_7cytimes_6parser_Result = (struct __pyx_vtabstruct_7cytimes_6parser_Result*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7cytimes_6parser_Result); if (unlikely(!__pyx_vtabptr_7cytimes_6parser_Result)) __PYX_ERR(6, 326, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7cytimes_6parser_Parser = __Pyx_ImportType_3_2_1(__pyx_t_1, "cytimes.parser", "Parser",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7cytimes_6parser_Parser), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(struct __pyx_obj_7cytimes_6parser_Parser),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7cytimes_6parser_Parser), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(struct __pyx_obj_7cytimes_6parser_Parser),
  #else
  sizeof(struct __pyx_obj_7cytimes_6parser_Parser), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(struct __pyx_obj_7cytimes_6parser_Parser),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_7cytimes_6parser_Parser) __PYX_ERR(6, 374, __pyx_L1_error)
  __pyx_vtabptr_7cytimes_6parser_Parser = (struct __pyx_vtabstruct_7cytimes_6parser_Parser*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7cytimes_6parser_Parser); if (unlikely(!__pyx_vtabptr_7cytimes_6parser_Parser)) __PYX_ERR(6, 374, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  {
    __pyx_t_1 = PyImport_ImportModule("cytimes.utils"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PY_LONG_LONG_PyDateTime_DateTime);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    const char * __pyx_import_name = __pyx_import_signature + 185;
    void **const __pyx_import_pointers[] = {(void **)&__pyx_vp_7cytimes_5utils_DT64_NS_DD_MAX, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_DD_MIN, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_HH_MAX, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_HH_MIN, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_MI_MAX, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_MI_MIN, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_MM_MAX, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_MM_MIN, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_MS_MAX, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_MS_MIN, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_NS_MAX, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_NS_MIN, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_SS_MAX, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_SS_MIN, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_US_MAX, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_US_MIN, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_WW_MAX, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_WW_MIN, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_YY_MAX, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_YY_MIN, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_C100, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_C4, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_C400, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_CBASE, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_DAY, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_HOUR, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_MICROSECOND, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_MILLISECOND, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_MINUTE, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_MONTH, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_SECOND, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_YEAR, (void **)&__pyx_vp_7cytimes_5utils_MS_DAY, (void **)&__pyx_vp_7cytimes_5utils_MS_HOUR, (void **)&__pyx_vp_7cytimes_5utils_MS_MINUTE, (void **)&__pyx_vp_7cytimes_5utils_MS_SECOND, (void **)&__pyx_vp_7cytimes_5utils_NS_DAY, (void **)&__pyx_vp_7cytimes_5utils_NS_HOUR, (void **)&__pyx_vp_7cytimes_5utils_NS_MICROSECOND, (void **)&__pyx_vp_7cytimes_5utils_NS_MILLISECOND, (void **)&__pyx_vp_7cytimes_5utils_NS_MINUTE, (void **)&__pyx_vp_7cytimes_5utils_NS_SECOND, (void **)&__pyx_vp_7cytimes_5utils_SS_DAY, (void **)&__pyx_vp_7cytimes_5utils_SS_HOUR, (void **)&__pyx_vp_7cytimes_5utils_SS_MINUTE, (void **)&__pyx_vp_7cytimes_5utils_TD64_MM_MICROSECOND, (void **)&__pyx_vp_7cytimes_5utils_TD64_MM_MILLISECOND, (void **)&__pyx_vp_7cytimes_5utils_TD64_MM_NANOSECOND, (void **)&__pyx_vp_7cytimes_5utils_TD64_MM_SECOND, (void **)&__pyx_vp_7cytimes_5utils_TD64_YY_MICROSECOND, (void **)&__pyx_vp_7cytimes_5utils_TD64_YY_MILLISECOND, (void **)&__pyx_vp_7cytimes_5utils_TD64_YY_NANOSECOND, (void **)&__pyx_vp_7cytimes_5utils_TD64_YY_SECOND, (void **)&__pyx_vp_7cytimes_5utils_US_DAY, (void **)&__pyx_vp_7cytimes_5utils_US_HOUR, (void **)&__pyx_vp_7cytimes_5utils_US_MILLISECOND, (void **)&__pyx_vp_7cytimes_5utils_US_MINUTE, (void **)&__pyx_vp_7cytimes_5utils_US_SECOND, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_DT, (void **)&__pyx_vp_7cytimes_5utils_UTC, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_AS, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_DD, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_FS, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_HH, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_MI, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_MM, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_MS, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_NS, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_PS, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_SS, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_US, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_WW, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_YY, (void **)&__pyx_vp_7cytimes_5utils_NAT, (void **)&__pyx_vp_7cytimes_5utils_T_TIMEZONE, (void **)&__pyx_vp_7cytimes_5utils_T_ZONEINFO, (void **)&__pyx_vp_7cytimes_5utils__LOCAL_TIMEZONE, (void **)&__pyx_vp_7cytimes_5utils__UTC_ALIASES, (void **)&__pyx_vp_7cytimes_5utils_TD64_MM_DAY, (void **)&__pyx_vp_7cytimes_5utils_TD64_YY_DAY, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_AS, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_DD, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_FS, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_HH, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_MI, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_MM, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_MS, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_NS, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_PS, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_SS, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_US, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_WW, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_YY, (void **)&__pyx_vp_7cytimes_5utils_NULL_TZOFFSET, (void **)&__pyx_vp_7cytimes_5utils_ORDINAL_MAX, (void **)&__pyx_vp_7cytimes_5utils_DAYS_BR_MONTH, (void **)&__pyx_vp_7cytimes_5utils_DAYS_IN_MONTH, (void **)&__pyx_vp_7cytimes_5utils_DAYS_BR_QUARTER, (void **)&__pyx_vp_7cytimes_5utils_DAYS_IN_QUARTER, (void **) NULL};
    void **const *__pyx_import_pointer = __pyx_import_pointers;
    const char *__pyx_import_current_signature = __pyx_import_signature;
    while (*__pyx_import_pointer) {
      if (__Pyx_ImportVoidPtr_3_2_1(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      ++__pyx_import_pointer;
      __pyx_import_name = strchr(__pyx_import_name, '\0') + 1;
      __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1;
      if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  {
    __pyx_t_1 = PyImport_ImportModule("cytimes.parser"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject_struct___pyx_obj_7cytim);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    const char * __pyx_import_name = __pyx_import_signature + 105;
    void **const __pyx_import_pointers[] = {(void **)&__pyx_vp_7cytimes_6parser__DEFAULT_AMPM, (void **)&__pyx_vp_7cytimes_6parser__DEFAULT_HMS, (void **)&__pyx_vp_7cytimes_6parser__DEFAULT_JUMP, (void **)&__pyx_vp_7cytimes_6parser__DEFAULT_MONTH, (void **)&__pyx_vp_7cytimes_6parser__DEFAULT_PERTAIN, (void **)&__pyx_vp_7cytimes_6parser__DEFAULT_TZ, (void **)&__pyx_vp_7cytimes_6parser__DEFAULT_UTC, (void **)&__pyx_vp_7cytimes_6parser__DEFAULT_WEEKDAY, (void **)&__pyx_vp_7cytimes_6parser__DEFAULT_CONFIGS, (void **)&__pyx_vp_7cytimes_6parser__DEFAULT_PARSER, (void **) NULL};
    void **const *__pyx_import_pointer = __pyx_import_pointers;
    const char *__pyx_import_current_signature = __pyx_import_signature;
    while (*__pyx_import_pointer) {
      if (__Pyx_ImportVoidPtr_3_2_1(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      ++__pyx_import_pointer;
      __pyx_import_name = strchr(__pyx_import_name, '\0') + 1;
      __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1;
      if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  {
    __pyx_t_1 = PyImport_ImportModule("cytimes.utils"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject_PyObject_tz_parse);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    const char * __pyx_import_name = __pyx_import_signature + 23;
    void (**const __pyx_import_pointers[])(void) = {(void (**)(void))&__pyx_f_7cytimes_5utils_tz_parse, (void (**)(void)) NULL};
    void (**const *__pyx_import_pointer)(void) = __pyx_import_pointers;
    const char *__pyx_import_current_signature = __pyx_import_signature;
    while (*__pyx_import_pointer) {
      if (__Pyx_ImportFunction_3_2_1(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      ++__pyx_import_pointer;
      __pyx_import_name = strchr(__pyx_import_name, '\0') + 1;
      __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1;
      if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  {
    __pyx_t_1 = PyImport_ImportModule("cytimes.parser"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyDateTime_DateTime_PyObject_int);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    const char * __pyx_import_name = __pyx_import_signature + 362;
    void (**const __pyx_import_pointers[])(void) = {(void (**)(void))&__pyx_f_7cytimes_6parser_parse_obj, (void (**)(void))&__pyx_f_7cytimes_6parser_parse_month, (void (**)(void))&__pyx_f_7cytimes_6parser_parse_weekday, (void (**)(void)) NULL};
    void (**const *__pyx_import_pointer)(void) = __pyx_import_pointers;
    const char *__pyx_import_current_signature = __pyx_import_signature;
    while (*__pyx_import_pointer) {
      if (__Pyx_ImportFunction_3_2_1(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      ++__pyx_import_pointer;
      __pyx_import_name = strchr(__pyx_import_name, '\0') + 1;
      __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1;
      if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  {
    __pyx_t_1 = PyImport_ImportModule("cytimes.errors"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_int_PyObject_int___pyx_skip_disp);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    const char * __pyx_import_name = __pyx_import_signature + 335;
    void (**const __pyx_import_pointers[])(void) = {(void (**)(void))&__pyx_f_7cytimes_6errors_raise_error, (void (**)(void))&__pyx_f_7cytimes_6errors_raise_argument_error, (void (**)(void))&__pyx_f_7cytimes_6errors_raise_type_error, (void (**)(void)) NULL};
    void (**const *__pyx_import_pointer)(void) = __pyx_import_pointers;
    const char *__pyx_import_current_signature = __pyx_import_signature;
    while (*__pyx_import_pointer) {
      if (__Pyx_ImportFunction_3_2_1(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      ++__pyx_import_pointer;
      __pyx_import_name = strchr(__pyx_import_name, '\0') + 1;
      __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1;
      if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_pddt(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_pddt},
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  {Py_mod_gil, Py_MOD_GIL_USED},
  #endif
  #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE
  {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
  #endif
  {0, NULL}
};
#endif

#ifdef __cplusplus
namespace {
  struct PyModuleDef __pyx_moduledef =
  #else
  static struct PyModuleDef __pyx_moduledef =
  #endif
  {
      PyModuleDef_HEAD_INIT,
      "pddt",
      0, /* m_doc */
    #if CYTHON_USE_MODULE_STATE
      sizeof(__pyx_mstatetype), /* m_size */
    #else
      (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */
    #endif
      __pyx_methods /* m_methods */,
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      __pyx_moduledef_slots, /* m_slots */
    #else
      NULL, /* m_reload */
    #endif
    #if CYTHON_USE_MODULE_STATE
      __pyx_m_traverse, /* m_traverse */
      __pyx_m_clear, /* m_clear */
      NULL /* m_free */
    #else
      NULL, /* m_traverse */
      NULL, /* m_clear */
      NULL /* m_free */
    #endif
  };
  #ifdef __cplusplus
} /* anonymous namespace */
#endif

/* PyModInitFuncType */
#ifndef CYTHON_NO_PYINIT_EXPORT
  #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#else
  #ifdef __cplusplus
  #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
  #else
  #define __Pyx_PyMODINIT_FUNC PyObject *
  #endif
#endif

__Pyx_PyMODINIT_FUNC PyInit_pddt(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_pddt(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
/* ModuleCreationPEP489 */
#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
      || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) {
    {
        PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think
        if (!module) {
            PyErr_Clear(); // just try the 3.8-3.12 version
            module = PyImport_ImportModule("_xxsubinterpreters");
            if (!module) goto bad;
        }
        PyObject *current = PyObject_CallMethod(module, "get_current", NULL);
        Py_DECREF(module);
        if (!current) goto bad;
        if (PyTuple_Check(current)) {
            PyObject *new_current = PySequence_GetItem(current, 0);
            Py_DECREF(current);
            current = new_current;
            if (!new_current) goto bad;
        }
        long long as_c_int = PyLong_AsLongLong(current);
        Py_DECREF(current);
        return as_c_int;
    }
  bad:
    PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n");
    return -1;
}
#endif
#if !CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    static PY_INT64_T main_interpreter_id = -1;
#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
    PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
#elif CYTHON_COMPILING_IN_GRAAL
    PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
      || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
    PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId();
#elif CYTHON_COMPILING_IN_LIMITED_API
    PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get());
#else
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
#endif
    if (unlikely(current_id == -1)) {
        return -1;
    }
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return 0;
    } else if (unlikely(main_interpreter_id != current_id)) {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
#endif
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
{
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    CYTHON_UNUSED_VAR(def);
    #if !CYTHON_USE_MODULE_STATE
    if (__Pyx_check_single_interpreter())
        return NULL;
    #endif
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_pddt(PyObject *__pyx_pyinit_module)
#endif
{
  int stringtab_initialized = 0;
  #if CYTHON_USE_MODULE_STATE
  int pystate_addmodule_run = 0;
  #endif
  __pyx_mstatetype *__pyx_mstate = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  Py_ssize_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;
  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;
  size_t __pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'pddt' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #else
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_t_1 = __pyx_pyinit_module;
  Py_INCREF(__pyx_t_1);
  #else
  __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #if CYTHON_USE_MODULE_STATE
  {
    int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef);
    __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "pddt" pseudovariable */
    if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    pystate_addmodule_run = 1;
  }
  #else
  __pyx_m = __pyx_t_1;
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED);
  #endif
  __pyx_mstate = __pyx_mstate_global;
  CYTHON_UNUSED_VAR(__pyx_t_1);
  __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_mstate->__pyx_d);
  __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /* ImportRefnannyAPI */
  #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("PyInit_pddt", 0);
  __Pyx_init_runtime_version();
  if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Library function declarations ---*/
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  stringtab_initialized = 1;
  if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__pyx_module_is_main_cytimes__pddt) {
    if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "cytimes.pddt")) {
      if (unlikely((PyDict_SetItemString(modules, "cytimes.pddt", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code(__pyx_mstate);
  (void)__Pyx_modinit_variable_export_code(__pyx_mstate);
  (void)__Pyx_modinit_function_export_code(__pyx_mstate);
  (void)__Pyx_modinit_type_init_code(__pyx_mstate);
  if (unlikely((__Pyx_modinit_type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_variable_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_function_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Execution code ---*/

  /* "utils.pxd":1438
 * 
 * # . parse and convert
 * cpdef inline long long parse_to_int(str token) except *:             # <<<<<<<<<<<<<<
 *     """Parse the first numeric token from a string into a `long long` `<'int'>`.
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_1parse_to_int, 0, __pyx_mstate_global->__pyx_n_u_parse_to_int, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_parse_to_int, __pyx_t_2) < (0)) __PYX_ERR(5, 1438, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "utils.pxd":1527
 *     return -out if neg else out
 * 
 * cpdef inline double parse_to_float(str token) except *:             # <<<<<<<<<<<<<<
 *     """Parse the first numeric token from a string into a `double` `<'float'>`.
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_3parse_to_float, 0, __pyx_mstate_global->__pyx_n_u_parse_to_float, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_parse_to_float, __pyx_t_2) < (0)) __PYX_ERR(5, 1527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pddt.py":21
 * from cython.cimports.cytimes import errors, utils  # type: ignore
 * 
 * np.import_array()             # <<<<<<<<<<<<<<
 * np.import_umath()
 * datetime.import_datetime()
*/
  __pyx_t_3 = __pyx_f_5numpy_import_array(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 21, __pyx_L1_error)

  /* "cytimes/pddt.py":22
 * 
 * np.import_array()
 * np.import_umath()             # <<<<<<<<<<<<<<
 * datetime.import_datetime()
 * 
*/
  __pyx_t_3 = __pyx_f_5numpy_import_umath(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 22, __pyx_L1_error)

  /* "cytimes/pddt.py":23
 * np.import_array()
 * np.import_umath()
 * datetime.import_datetime()             # <<<<<<<<<<<<<<
 * 
 * # Python imports
*/
  __pyx_f_7cpython_8datetime_import_datetime();

  /* "cytimes/pddt.py":26
 * 
 * # Python imports
 * from typing import Any, Hashable             # <<<<<<<<<<<<<<
 * from typing_extensions import Self
 * import datetime
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Any,__pyx_mstate_global->__pyx_n_u_Hashable};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 2, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Any,__pyx_mstate_global->__pyx_n_u_Hashable};
    for (__pyx_t_4=0; __pyx_t_4 < 2; __pyx_t_4++) {
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_4]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_4], __pyx_t_5) < (0)) __PYX_ERR(0, 26, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pddt.py":27
 * # Python imports
 * from typing import Any, Hashable
 * from typing_extensions import Self             # <<<<<<<<<<<<<<
 * import datetime
 * import numpy as np
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Self};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing_extensions, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Self};
    __pyx_t_4 = 0; {
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_4]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_4], __pyx_t_5) < (0)) __PYX_ERR(0, 27, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pddt.py":28
 * from typing import Any, Hashable
 * from typing_extensions import Self
 * import datetime             # <<<<<<<<<<<<<<
 * import numpy as np
 * import pandas as pd
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_datetime, __pyx_t_2) < (0)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pddt.py":29
 * from typing_extensions import Self
 * import datetime
 * import numpy as np             # <<<<<<<<<<<<<<
 * import pandas as pd
 * from pandas import DatetimeIndex
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_np, __pyx_t_2) < (0)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pddt.py":30
 * import datetime
 * import numpy as np
 * import pandas as pd             # <<<<<<<<<<<<<<
 * from pandas import DatetimeIndex
 * from pandas.core.arrays.datetimes import DatetimeArray
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pandas, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pd, __pyx_t_2) < (0)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pddt.py":31
 * import numpy as np
 * import pandas as pd
 * from pandas import DatetimeIndex             # <<<<<<<<<<<<<<
 * from pandas.core.arrays.datetimes import DatetimeArray
 * from pandas._libs.lib import no_default as _no_default
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DatetimeIndex};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pandas, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DatetimeIndex};
    __pyx_t_4 = 0; {
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_4]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_4], __pyx_t_5) < (0)) __PYX_ERR(0, 31, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pddt.py":32
 * import pandas as pd
 * from pandas import DatetimeIndex
 * from pandas.core.arrays.datetimes import DatetimeArray             # <<<<<<<<<<<<<<
 * from pandas._libs.lib import no_default as _no_default
 * from zoneinfo import available_timezones as _available_timezones
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DatetimeArray};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pandas_core_arrays_datetimes, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DatetimeArray};
    __pyx_t_4 = 0; {
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_4]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_4], __pyx_t_5) < (0)) __PYX_ERR(0, 32, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pddt.py":33
 * from pandas import DatetimeIndex
 * from pandas.core.arrays.datetimes import DatetimeArray
 * from pandas._libs.lib import no_default as _no_default             # <<<<<<<<<<<<<<
 * from zoneinfo import available_timezones as _available_timezones
 * from cytimes.pydt import Pydt
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_no_default_2};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pandas__libs_lib, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_no_default_2};
    __pyx_t_4 = 0; {
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_4]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      switch (__pyx_t_4) {
        case 0:
        if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_no_default, __pyx_t_5) < (0)) __PYX_ERR(0, 33, __pyx_L1_error)
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pddt.py":34
 * from pandas.core.arrays.datetimes import DatetimeArray
 * from pandas._libs.lib import no_default as _no_default
 * from zoneinfo import available_timezones as _available_timezones             # <<<<<<<<<<<<<<
 * from cytimes.pydt import Pydt
 * from cytimes.parser import (
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_available_timezones_2};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_zoneinfo, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_available_timezones_2};
    __pyx_t_4 = 0; {
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_4]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 34, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      switch (__pyx_t_4) {
        case 0:
        if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_available_timezones, __pyx_t_5) < (0)) __PYX_ERR(0, 34, __pyx_L1_error)
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pddt.py":35
 * from pandas._libs.lib import no_default as _no_default
 * from zoneinfo import available_timezones as _available_timezones
 * from cytimes.pydt import Pydt             # <<<<<<<<<<<<<<
 * from cytimes.parser import (
 *     Configs,
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Pydt};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Pydt};
    __pyx_t_4 = 0; {
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_4]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 35, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_4], __pyx_t_5) < (0)) __PYX_ERR(0, 35, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pddt.py":36
 * from zoneinfo import available_timezones as _available_timezones
 * from cytimes.pydt import Pydt
 * from cytimes.parser import (             # <<<<<<<<<<<<<<
 *     Configs,
 *     parse_obj as _parse_obj,
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Configs,__pyx_mstate_global->__pyx_n_u_parse_obj,__pyx_mstate_global->__pyx_n_u_parse_month,__pyx_mstate_global->__pyx_n_u_parse_weekday};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cytimes_parser, __pyx_imported_names, 4, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_parse_obj,__pyx_mstate_global->__pyx_n_u_parse_month,__pyx_mstate_global->__pyx_n_u_parse_weekday};
    for (__pyx_t_4=0; __pyx_t_4 < 3; __pyx_t_4++) {
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_4]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 36, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      switch (__pyx_t_4) {
        case 0:
        if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_parse_obj, __pyx_t_5) < (0)) __PYX_ERR(0, 38, __pyx_L1_error)
        break;
        case 1:
        if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_parse_month, __pyx_t_5) < (0)) __PYX_ERR(0, 39, __pyx_L1_error)
        break;
        case 2:
        if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_parse_weekday, __pyx_t_5) < (0)) __PYX_ERR(0, 40, __pyx_L1_error)
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pddt.py":42
 *     parse_weekday as _parse_weekday,
 * )
 * from cytimes import errors, utils             # <<<<<<<<<<<<<<
 * 
 * __all__ = ["Pddt"]
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_errors,__pyx_mstate_global->__pyx_n_u_utils};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cytimes, __pyx_imported_names, 2, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_errors,__pyx_mstate_global->__pyx_n_u_utils};
    for (__pyx_t_4=0; __pyx_t_4 < 2; __pyx_t_4++) {
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_4]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 42, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_4], __pyx_t_5) < (0)) __PYX_ERR(0, 42, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pddt.py":44
 * from cytimes import errors, utils
 * 
 * __all__ = ["Pddt"]             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_Pddt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_all, __pyx_t_2) < (0)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pddt.py":225
 * 
 * # Pddt (Pandas Datetime) ----------------------------------------------------------------------
 * class Pddt(DatetimeIndex):             # <<<<<<<<<<<<<<
 *     """A drop-in replacement for Pandas `<'DatetimeIndex'>` with extended parsing,
 *     timezone normalization, resolution control, and delta-aware arithmetic.
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DatetimeIndex); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_Pddt, __pyx_mstate_global->__pyx_n_u_Pddt, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_kp_u_A_drop_in_replacement_for_Pandas); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__pyx_t_2 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 225, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pddt.py":249
 *         tz: datetime.tzinfo | str | None = None,
 *         ambiguous: object = "raise",
 *         yearfirst: bool = True,             # <<<<<<<<<<<<<<
 *         dayfirst: bool = False,
 *         as_unit: str = None,
*/
  __pyx_t_5 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "cytimes/pddt.py":250
 *         ambiguous: object = "raise",
 *         yearfirst: bool = True,
 *         dayfirst: bool = False,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         copy: bool = False,
*/
  __pyx_t_8 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "cytimes/pddt.py":252
 *         dayfirst: bool = False,
 *         as_unit: str = None,
 *         copy: bool = False,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *         cfg: Configs = None,
*/
  __pyx_t_9 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "cytimes/pddt.py":243
 *     """
 * 
 *     def __new__(             # <<<<<<<<<<<<<<
 *         cls,
 *         data: object,
*/
  __pyx_t_10 = PyTuple_Pack(9, Py_None, Py_None, ((PyObject*)__pyx_mstate_global->__pyx_n_u_raise), __pyx_t_5, __pyx_t_8, Py_None, __pyx_t_9, Py_None, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyDict_NewPresized(11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_data, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 243, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_freq, __pyx_mstate_global->__pyx_kp_u_object_None) < (0)) __PYX_ERR(0, 243, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 243, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_ambiguous, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 243, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_yearfirst, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 243, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_dayfirst, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 243, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_as_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 243, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_copy, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 243, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u_Hashable_None) < (0)) __PYX_ERR(0, 243, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_cfg, __pyx_mstate_global->__pyx_n_u_Configs) < (0)) __PYX_ERR(0, 243, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 243, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Pddt___new, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_t_10);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_9);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNewInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_new_2, __pyx_t_8) < (0)) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":330
 *         tz: datetime.tzinfo | str | None = None,
 *         ambiguous: object = "infer",
 *         yearfirst: bool = True,             # <<<<<<<<<<<<<<
 *         dayfirst: bool = False,
 *         as_unit: str = None,
*/
  __pyx_t_8 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "cytimes/pddt.py":331
 *         ambiguous: object = "infer",
 *         yearfirst: bool = True,
 *         dayfirst: bool = False,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         copy: bool = False,
*/
  __pyx_t_9 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "cytimes/pddt.py":333
 *         dayfirst: bool = False,
 *         as_unit: str = None,
 *         copy: bool = False,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *         cfg: Configs = None,
*/
  __pyx_t_10 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);

  /* "cytimes/pddt.py":323
 * 
 *     # Constructor --------------------------------------------------------------------------
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _new(
 *         cls,
*/
  __pyx_t_5 = PyTuple_Pack(9, Py_None, Py_None, ((PyObject*)__pyx_mstate_global->__pyx_n_u_infer), __pyx_t_8, __pyx_t_9, Py_None, __pyx_t_10, Py_None, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __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_t_10 = __Pyx_PyDict_NewPresized(11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_data, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 323, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_freq, __pyx_mstate_global->__pyx_kp_u_object_None) < (0)) __PYX_ERR(0, 323, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 323, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_ambiguous, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 323, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_yearfirst, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 323, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_dayfirst, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 323, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_as_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 323, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_copy, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 323, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u_Hashable_None) < (0)) __PYX_ERR(0, 323, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_cfg, __pyx_mstate_global->__pyx_n_u_Configs) < (0)) __PYX_ERR(0, 323, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 323, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_3_new, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Pddt__new, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_t_5);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_10) < (0)) __PYX_ERR(0, 323, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "cytimes/pddt.py":416
 *         tz: datetime.tzinfo = None,
 *         ambiguous: object = "infer",
 *         yearfirst: bool = True,             # <<<<<<<<<<<<<<
 *         dayfirst: bool = False,
 *         as_unit: str = None,
*/
  __pyx_t_10 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);

  /* "cytimes/pddt.py":417
 *         ambiguous: object = "infer",
 *         yearfirst: bool = True,
 *         dayfirst: bool = False,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         copy: bool = False,
*/
  __pyx_t_9 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "cytimes/pddt.py":419
 *         dayfirst: bool = False,
 *         as_unit: str = None,
 *         copy: bool = False,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *     ) -> Self:
*/
  __pyx_t_5 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "cytimes/pddt.py":409
 *             )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _new_native(
 *         cls,
*/
  __pyx_t_8 = PyTuple_Pack(8, Py_None, Py_None, ((PyObject*)__pyx_mstate_global->__pyx_n_u_infer), __pyx_t_10, __pyx_t_9, Py_None, __pyx_t_5, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_data, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 409, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_freq, __pyx_mstate_global->__pyx_kp_u_object_None) < (0)) __PYX_ERR(0, 409, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo) < (0)) __PYX_ERR(0, 409, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ambiguous, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 409, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_yearfirst, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 409, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_dayfirst, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 409, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_as_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 409, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_copy, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 409, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u_Hashable_None) < (0)) __PYX_ERR(0, 409, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 409, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_5_new_native, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Pddt__new_native, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_t_8);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_new_native, __pyx_t_5) < (0)) __PYX_ERR(0, 409, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pddt.py":478
 *         dayfirst: bool | None = False,
 *         as_unit: str = None,
 *         copy: bool = False,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *         cfg: Configs = None,
*/
  __pyx_t_5 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "cytimes/pddt.py":468
 *         return pt if as_unit is None else pt.as_unit(as_unit)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _new_parser(
 *         cls,
*/
  __pyx_t_9 = PyTuple_Pack(9, Py_None, Py_None, ((PyObject*)__pyx_mstate_global->__pyx_n_u_infer), ((PyObject*)Py_True), ((PyObject*)Py_False), Py_None, __pyx_t_5, Py_None, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_data, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 468, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_freq, __pyx_mstate_global->__pyx_kp_u_object_None) < (0)) __PYX_ERR(0, 468, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo) < (0)) __PYX_ERR(0, 468, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ambiguous, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 468, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_yearfirst, __pyx_mstate_global->__pyx_kp_u_bool_None) < (0)) __PYX_ERR(0, 468, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_dayfirst, __pyx_mstate_global->__pyx_kp_u_bool_None) < (0)) __PYX_ERR(0, 468, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_as_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 468, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_copy, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 468, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u_Hashable_None) < (0)) __PYX_ERR(0, 468, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_cfg, __pyx_mstate_global->__pyx_n_u_Configs) < (0)) __PYX_ERR(0, 468, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 468, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_7_new_parser, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Pddt__new_parser, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_t_9);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_new_parser, __pyx_t_5) < (0)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pddt.py":549
 *         freq: object | None = "D",
 *         tz: datetime.tzinfo | str | None = None,
 *         normalize: bool = False,             # <<<<<<<<<<<<<<
 *         inclusive: str = "both",
 *         unit: str = None,
*/
  __pyx_t_5 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "cytimes/pddt.py":541
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def date_range(
 *         cls,
*/
  __pyx_t_8 = PyTuple_Pack(9, Py_None, Py_None, Py_None, ((PyObject*)__pyx_mstate_global->__pyx_n_u_D), Py_None, __pyx_t_5, ((PyObject*)__pyx_mstate_global->__pyx_n_u_both), Py_None, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_start, __pyx_mstate_global->__pyx_kp_u_object_None) < (0)) __PYX_ERR(0, 541, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_end, __pyx_mstate_global->__pyx_kp_u_object_None) < (0)) __PYX_ERR(0, 541, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_periods, __pyx_mstate_global->__pyx_kp_u_int_None) < (0)) __PYX_ERR(0, 541, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_freq, __pyx_mstate_global->__pyx_kp_u_object_None) < (0)) __PYX_ERR(0, 541, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 541, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_normalize, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 541, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_inclusive, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 541, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 541, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u_Hashable_None) < (0)) __PYX_ERR(0, 541, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 541, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_9date_range, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Pddt_date_range, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_t_8);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_date_range_2, __pyx_t_5) < (0)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pddt.py":635
 *         tz: datetime.tzinfo | str | None = None,
 *         ambiguous: object = "raise",
 *         yearfirst: bool = True,             # <<<<<<<<<<<<<<
 *         dayfirst: bool = False,
 *         as_unit: str = None,
*/
  __pyx_t_5 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "cytimes/pddt.py":636
 *         ambiguous: object = "raise",
 *         yearfirst: bool = True,
 *         dayfirst: bool = False,             # <<<<<<<<<<<<<<
 *         as_unit: str = None,
 *         copy: bool = False,
*/
  __pyx_t_9 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "cytimes/pddt.py":638
 *         dayfirst: bool = False,
 *         as_unit: str = None,
 *         copy: bool = False,             # <<<<<<<<<<<<<<
 *         name: Hashable | None = None,
 *         cfg: Configs = None,
*/
  __pyx_t_8 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "cytimes/pddt.py":628
 *         return cls._new(dtarr, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def parse(
 *         cls,
*/
  __pyx_t_10 = PyTuple_Pack(9, Py_None, Py_None, ((PyObject*)__pyx_mstate_global->__pyx_n_u_raise), __pyx_t_5, __pyx_t_9, Py_None, __pyx_t_8, Py_None, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyDict_NewPresized(11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_data, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 628, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_freq, __pyx_mstate_global->__pyx_kp_u_object_None) < (0)) __PYX_ERR(0, 628, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 628, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ambiguous, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 628, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_yearfirst, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 628, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_dayfirst, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 628, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_as_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 628, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_copy, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 628, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u_Hashable_None) < (0)) __PYX_ERR(0, 628, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_cfg, __pyx_mstate_global->__pyx_n_u_Configs) < (0)) __PYX_ERR(0, 628, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 628, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_11parse, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Pddt_parse, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_t_10);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_parse, __pyx_t_8) < (0)) __PYX_ERR(0, 628, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":696
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def now(
 *         cls,
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_size_2, __pyx_mstate_global->__pyx_kp_u_int_Any) < (0)) __PYX_ERR(0, 696, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 696, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_as_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 696, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u_Hashable_None) < (0)) __PYX_ERR(0, 696, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 696, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_13now, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Pddt_now, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[1]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_now, __pyx_t_8) < (0)) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":735
 *         return cls._new(arr, tz=tz, as_unit=as_unit, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def utcnow(
 *         cls,
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_size_2, __pyx_mstate_global->__pyx_kp_u_int_Any) < (0)) __PYX_ERR(0, 735, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_as_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 735, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u_Hashable_None) < (0)) __PYX_ERR(0, 735, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 735, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_15utcnow, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Pddt_utcnow, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_utcnow, __pyx_t_8) < (0)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":762
 *         return cls.now(size, tz=utils.UTC, as_unit=as_unit, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def today(
 *         cls,
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_size_2, __pyx_mstate_global->__pyx_kp_u_int_Any) < (0)) __PYX_ERR(0, 762, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_as_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 762, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u_Hashable_None) < (0)) __PYX_ERR(0, 762, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 762, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_17today, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Pddt_today, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_today, __pyx_t_8) < (0)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":792
 *         return cls.now(size, tz=None, as_unit=as_unit, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def combine(
 *         cls,
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_size_2, __pyx_mstate_global->__pyx_kp_u_int_Any) < (0)) __PYX_ERR(0, 792, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_date, __pyx_mstate_global->__pyx_kp_u_datetime_date_str_None) < (0)) __PYX_ERR(0, 792, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_time, __pyx_mstate_global->__pyx_kp_u_datetime_time_str_None) < (0)) __PYX_ERR(0, 792, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 792, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_as_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 792, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u_Hashable_None) < (0)) __PYX_ERR(0, 792, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 792, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_19combine, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Pddt_combine, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[3]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_combine, __pyx_t_8) < (0)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":869
 *         return cls._new(arr, tz=tz, as_unit=as_unit, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromordinal(
 *         cls,
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ordinal, __pyx_mstate_global->__pyx_kp_u_int_object) < (0)) __PYX_ERR(0, 869, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_size_2, __pyx_mstate_global->__pyx_kp_u_int_Any_None) < (0)) __PYX_ERR(0, 869, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 869, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_as_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 869, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u_Hashable_None) < (0)) __PYX_ERR(0, 869, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 869, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_21fromordinal, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Pddt_fromordinal, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[4]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_fromordinal, __pyx_t_8) < (0)) __PYX_ERR(0, 869, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":988
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromseconds(
 *         cls,
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_seconds, __pyx_mstate_global->__pyx_kp_u_int_float_object) < (0)) __PYX_ERR(0, 988, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_size_2, __pyx_mstate_global->__pyx_kp_u_int_Any_None) < (0)) __PYX_ERR(0, 988, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 988, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_as_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 988, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u_Hashable_None) < (0)) __PYX_ERR(0, 988, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 988, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_23fromseconds, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Pddt_fromseconds, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[4]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_fromseconds, __pyx_t_8) < (0)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":1120
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def frommicroseconds(
 *         cls,
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_us, __pyx_mstate_global->__pyx_kp_u_int_object) < (0)) __PYX_ERR(0, 1120, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_size_2, __pyx_mstate_global->__pyx_kp_u_int_Any_None) < (0)) __PYX_ERR(0, 1120, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 1120, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_as_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 1120, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u_Hashable_None) < (0)) __PYX_ERR(0, 1120, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 1120, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_25frommicroseconds, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Pddt_frommicroseconds, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[4]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_frommicroseconds, __pyx_t_8) < (0)) __PYX_ERR(0, 1120, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":1240
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromtimestamp(
 *         cls,
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ts, __pyx_mstate_global->__pyx_kp_u_int_float_object) < (0)) __PYX_ERR(0, 1240, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_size_2, __pyx_mstate_global->__pyx_kp_u_int_Any_None) < (0)) __PYX_ERR(0, 1240, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 1240, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_as_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 1240, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u_Hashable_None) < (0)) __PYX_ERR(0, 1240, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 1240, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_27fromtimestamp, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Pddt_fromtimestamp, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[4]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_fromtimestamp, __pyx_t_8) < (0)) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":1406
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def utcfromtimestamp(
 *         cls,
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ts, __pyx_mstate_global->__pyx_kp_u_int_float_object) < (0)) __PYX_ERR(0, 1406, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_size_2, __pyx_mstate_global->__pyx_kp_u_int_Any_None) < (0)) __PYX_ERR(0, 1406, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_as_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 1406, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u_Hashable_None) < (0)) __PYX_ERR(0, 1406, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 1406, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_29utcfromtimestamp, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Pddt_utcfromtimestamp, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[1]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_utcfromtimestamp, __pyx_t_8) < (0)) __PYX_ERR(0, 1406, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":1446
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromisoformat(
 *         cls,
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_dtstr, __pyx_mstate_global->__pyx_kp_u_str_object) < (0)) __PYX_ERR(0, 1446, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_size_2, __pyx_mstate_global->__pyx_kp_u_int_Any_None) < (0)) __PYX_ERR(0, 1446, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_as_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 1446, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u_Hashable_None) < (0)) __PYX_ERR(0, 1446, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 1446, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_31fromisoformat, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Pddt_fromisoformat, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[1]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_fromisoformat_2, __pyx_t_8) < (0)) __PYX_ERR(0, 1446, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":1492
 *             errors.raise_argument_error(cls, "fromisoformat(...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromisocalendar(
 *         cls,
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_iso, __pyx_mstate_global->__pyx_kp_u_dict_list_tuple_pd_DataFrame) < (0)) __PYX_ERR(0, 1492, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_size_2, __pyx_mstate_global->__pyx_kp_u_int_Any_None) < (0)) __PYX_ERR(0, 1492, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 1492, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_as_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 1492, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u_Hashable_None) < (0)) __PYX_ERR(0, 1492, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 1492, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_33fromisocalendar, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Pddt_fromisocalendar, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[4]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_fromisocalendar, __pyx_t_8) < (0)) __PYX_ERR(0, 1492, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":1590
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdayofyear(
 *         cls,
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_doy, __pyx_mstate_global->__pyx_kp_u_dict_list_tuple_pd_DataFrame) < (0)) __PYX_ERR(0, 1590, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_size_2, __pyx_mstate_global->__pyx_kp_u_int_Any_None) < (0)) __PYX_ERR(0, 1590, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 1590, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_as_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 1590, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u_Hashable_None) < (0)) __PYX_ERR(0, 1590, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 1590, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_35fromdayofyear, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Pddt_fromdayofyear, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[4]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_fromdayofyear, __pyx_t_8) < (0)) __PYX_ERR(0, 1590, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":1688
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdate(
 *         cls,
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_date, __pyx_mstate_global->__pyx_kp_u_datetime_date_object) < (0)) __PYX_ERR(0, 1688, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_size_2, __pyx_mstate_global->__pyx_kp_u_int_Any_None) < (0)) __PYX_ERR(0, 1688, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 1688, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_as_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 1688, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u_Hashable_None) < (0)) __PYX_ERR(0, 1688, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 1688, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_37fromdate, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Pddt_fromdate, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[4]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_fromdate_2, __pyx_t_8) < (0)) __PYX_ERR(0, 1688, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":1741
 *             errors.raise_argument_error(cls, "fromdate(...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdatetime(
 *         cls,
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_dt, __pyx_mstate_global->__pyx_kp_u_datetime_datetime_np_datetime64) < (0)) __PYX_ERR(0, 1741, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_size_2, __pyx_mstate_global->__pyx_kp_u_int_Any_None) < (0)) __PYX_ERR(0, 1741, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 1741, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_as_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 1741, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u_Hashable_None) < (0)) __PYX_ERR(0, 1741, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 1741, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_39fromdatetime, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Pddt_fromdatetime, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[4]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_fromdatetime_2, __pyx_t_8) < (0)) __PYX_ERR(0, 1741, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":1795
 *             errors.raise_argument_error(cls, "fromdatetime(...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdatetime64(
 *         cls,
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_dt64, __pyx_mstate_global->__pyx_kp_u_datetime_datetime_np_datetime64) < (0)) __PYX_ERR(0, 1795, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_size_2, __pyx_mstate_global->__pyx_kp_u_int_Any_None) < (0)) __PYX_ERR(0, 1795, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 1795, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_as_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 1795, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u_Hashable_None) < (0)) __PYX_ERR(0, 1795, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 1795, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_41fromdatetime64, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Pddt_fromdatetime64, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[4]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_fromdatetime64, __pyx_t_8) < (0)) __PYX_ERR(0, 1795, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":1810
 *         return cls.fromdatetime(dt64, size=size, tz=tz, as_unit=as_unit, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def strptime(
 *         cls,
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_dtstr, __pyx_mstate_global->__pyx_kp_u_str_object) < (0)) __PYX_ERR(0, 1810, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_fmt, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 1810, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_size_2, __pyx_mstate_global->__pyx_kp_u_int_Any_None) < (0)) __PYX_ERR(0, 1810, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_as_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 1810, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u_Hashable_None) < (0)) __PYX_ERR(0, 1810, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 1810, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_43strptime, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Pddt_strptime, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[1]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_strptime, __pyx_t_8) < (0)) __PYX_ERR(0, 1810, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":1888
 * 
 *     # Convertor ----------------------------------------------------------------------------
 *     def ctime(self) -> pd.Index[str]:             # <<<<<<<<<<<<<<
 *         """Return ctime-stype string index `<'Index[str]'>`.
 * 
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_str) < (0)) __PYX_ERR(0, 1888, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_45ctime, 0, __pyx_mstate_global->__pyx_n_u_Pddt_ctime, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ctime, __pyx_t_9) < (0)) __PYX_ERR(0, 1888, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "cytimes/pddt.py":1895
 *         return self.strftime("%a %b %d %H:%M:%S %Y")
 * 
 *     def strftime(self, fmt: str) -> pd.Index[str]:             # <<<<<<<<<<<<<<
 *         """Format to index of strings according to the given format `<'str'>`.
 * 
*/
  __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_fmt, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 1895, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_str) < (0)) __PYX_ERR(0, 1895, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_47strftime, 0, __pyx_mstate_global->__pyx_n_u_Pddt_strftime, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_9);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_strftime, __pyx_t_8) < (0)) __PYX_ERR(0, 1895, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":1906
 *             errors.raise_argument_error(self.__class__, "strftime(fmt)", None, err)
 * 
 *     def isoformat(self, sep: str = "T") -> pd.Index[str]:             # <<<<<<<<<<<<<<
 *         """Return the date and time formatted according to ISO format `<'str'>`.
 * 
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_sep, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 1906, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_str) < (0)) __PYX_ERR(0, 1906, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_49isoformat, 0, __pyx_mstate_global->__pyx_n_u_Pddt_isoformat, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[5]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_isoformat, __pyx_t_9) < (0)) __PYX_ERR(0, 1906, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "cytimes/pddt.py":1914
 *         return self.strftime(f"%Y-%m-%d{sep}%H:%M:%S.%f%z")
 * 
 *     def timedf(self) -> pd.DataFrame:             # <<<<<<<<<<<<<<
 *         """Return `local` time DataFrame compatible with `time.localtime()` `<'DataFrame'>`.
 * 
*/
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_DataFrame) < (0)) __PYX_ERR(0, 1914, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_51timedf, 0, __pyx_mstate_global->__pyx_n_u_Pddt_timedf, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_9);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_timedf, __pyx_t_8) < (0)) __PYX_ERR(0, 1914, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":1940
 *         )
 * 
 *     def utctimedf(self) -> pd.DataFrame:             # <<<<<<<<<<<<<<
 *         """Return `UTC` time DataFrame compatible with `time.gmtime()` `<'DataFrame'>`.
 * 
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_DataFrame) < (0)) __PYX_ERR(0, 1940, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_53utctimedf, 0, __pyx_mstate_global->__pyx_n_u_Pddt_utctimedf, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_utctimedf, __pyx_t_9) < (0)) __PYX_ERR(0, 1940, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "cytimes/pddt.py":1957
 *             return self.tz_convert(utils.UTC).timedf()
 * 
 *     def toordinal(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return an index of proleptic Gregorian ordinals from the dates `<'Index[int64]'>`.
 * 
*/
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 1957, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_55toordinal, 0, __pyx_mstate_global->__pyx_n_u_Pddt_toordinal, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_9);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_toordinal, __pyx_t_8) < (0)) __PYX_ERR(0, 1957, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":1966
 *         return pd.Index(arr, name="ordinal")
 * 
 *     def toseconds(self, utc: cython.bint = False) -> pd.Index[np.float64]:             # <<<<<<<<<<<<<<
 *         """Return an index of total seconds since epoch `<'Index[float64]'>`.
 * 
*/
  __pyx_t_8 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = PyTuple_Pack(1, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_utc, __pyx_mstate_global->__pyx_kp_u_cython_bint) < (0)) __PYX_ERR(0, 1966, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_float64) < (0)) __PYX_ERR(0, 1966, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_57toseconds, 0, __pyx_mstate_global->__pyx_n_u_Pddt_toseconds, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_10, __pyx_t_9);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_toseconds, __pyx_t_10) < (0)) __PYX_ERR(0, 1966, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "cytimes/pddt.py":1993
 *         return pd.Index(utils.dt64arr_to_ts(arr, -1, True), name="seconds")
 * 
 *     def tomicroseconds(self, utc: cython.bint = False) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return an index of total microseconds since epoch `<'Index[float64]'>`.
 * 
*/
  __pyx_t_10 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_8 = PyTuple_Pack(1, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_utc, __pyx_mstate_global->__pyx_kp_u_cython_bint) < (0)) __PYX_ERR(0, 1993, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 1993, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_59tomicroseconds, 0, __pyx_mstate_global->__pyx_n_u_Pddt_tomicroseconds, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_t_8);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_tomicroseconds, __pyx_t_9) < (0)) __PYX_ERR(0, 1993, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "cytimes/pddt.py":2022
 *         )
 * 
 *     def timestamp(self) -> pd.Index[np.float64]:             # <<<<<<<<<<<<<<
 *         """Return an index of POSIX timestamps `<'Index[float64]'>`."""
 *         # fmt: off
*/
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_float64) < (0)) __PYX_ERR(0, 2022, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_61timestamp, 0, __pyx_mstate_global->__pyx_n_u_Pddt_timestamp, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_9);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_timestamp, __pyx_t_10) < (0)) __PYX_ERR(0, 2022, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "cytimes/pddt.py":2032
 *         return pd.Index(utils.dt64arr_to_ts(arr, -1, True), name="timestamp")
 * 
 *     def datetime(self) -> np.ndarray[Pydt]:             # <<<<<<<<<<<<<<
 *         """Return an array of datetime `<'ndarray[Pydt]'>`.
 * 
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_np_ndarray_Pydt) < (0)) __PYX_ERR(0, 2032, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_63datetime, 0, __pyx_mstate_global->__pyx_n_u_Pddt_datetime, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_datetime, __pyx_t_9) < (0)) __PYX_ERR(0, 2032, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "cytimes/pddt.py":2058
 *         return out
 * 
 *     def date(self) -> np.ndarray[datetime.date]:             # <<<<<<<<<<<<<<
 *         """Return an array of date `<'ndarray[date]'>`."""
 *         return super(Pddt, self).date
*/
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_np_ndarray_datetime_date) < (0)) __PYX_ERR(0, 2058, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_65date, 0, __pyx_mstate_global->__pyx_n_u_Pddt_date, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_9);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_date, __pyx_t_10) < (0)) __PYX_ERR(0, 2058, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "cytimes/pddt.py":2062
 *         return super(Pddt, self).date
 * 
 *     def time(self) -> np.ndarray[datetime.time]:             # <<<<<<<<<<<<<<
 *         """Return an array of time (without timezone information) `<'ndarray[time]'>`."""
 *         return super(Pddt, self).time
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_np_ndarray_datetime_time) < (0)) __PYX_ERR(0, 2062, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_67time, 0, __pyx_mstate_global->__pyx_n_u_Pddt_time, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_time, __pyx_t_9) < (0)) __PYX_ERR(0, 2062, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "cytimes/pddt.py":2066
 *         return super(Pddt, self).time
 * 
 *     def timetz(self) -> np.ndarray[datetime.time]:             # <<<<<<<<<<<<<<
 *         """Return an array of time (with the same timezone information) `<'ndarray[time]'>`."""
 *         return super(Pddt, self).timetz
*/
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_np_ndarray_datetime_time) < (0)) __PYX_ERR(0, 2066, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_69timetz, 0, __pyx_mstate_global->__pyx_n_u_Pddt_timetz, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_9);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_timetz, __pyx_t_10) < (0)) __PYX_ERR(0, 2066, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "cytimes/pddt.py":2073
 *     def replace(
 *         self,
 *         year: cython.int = -1,             # <<<<<<<<<<<<<<
 *         month: cython.int = -1,
 *         day: cython.int = -1,
*/
  __pyx_t_10 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);

  /* "cytimes/pddt.py":2074
 *         self,
 *         year: cython.int = -1,
 *         month: cython.int = -1,             # <<<<<<<<<<<<<<
 *         day: cython.int = -1,
 *         hour: cython.int = -1,
*/
  __pyx_t_9 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "cytimes/pddt.py":2075
 *         year: cython.int = -1,
 *         month: cython.int = -1,
 *         day: cython.int = -1,             # <<<<<<<<<<<<<<
 *         hour: cython.int = -1,
 *         minute: cython.int = -1,
*/
  __pyx_t_8 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "cytimes/pddt.py":2076
 *         month: cython.int = -1,
 *         day: cython.int = -1,
 *         hour: cython.int = -1,             # <<<<<<<<<<<<<<
 *         minute: cython.int = -1,
 *         second: cython.int = -1,
*/
  __pyx_t_5 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "cytimes/pddt.py":2077
 *         day: cython.int = -1,
 *         hour: cython.int = -1,
 *         minute: cython.int = -1,             # <<<<<<<<<<<<<<
 *         second: cython.int = -1,
 *         microsecond: cython.int = -1,
*/
  __pyx_t_11 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2077, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);

  /* "cytimes/pddt.py":2078
 *         hour: cython.int = -1,
 *         minute: cython.int = -1,
 *         second: cython.int = -1,             # <<<<<<<<<<<<<<
 *         microsecond: cython.int = -1,
 *         nanosecond: cython.int = -1,
*/
  __pyx_t_12 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);

  /* "cytimes/pddt.py":2079
 *         minute: cython.int = -1,
 *         second: cython.int = -1,
 *         microsecond: cython.int = -1,             # <<<<<<<<<<<<<<
 *         nanosecond: cython.int = -1,
 *         tzinfo: datetime.tzinfo | str | None = -1,
*/
  __pyx_t_13 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);

  /* "cytimes/pddt.py":2080
 *         second: cython.int = -1,
 *         microsecond: cython.int = -1,
 *         nanosecond: cython.int = -1,             # <<<<<<<<<<<<<<
 *         tzinfo: datetime.tzinfo | str | None = -1,
 *     ) -> Self:
*/
  __pyx_t_14 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);

  /* "cytimes/pddt.py":2071
 * 
 *     # Manipulator --------------------------------------------------------------------------
 *     def replace(             # <<<<<<<<<<<<<<
 *         self,
 *         year: cython.int = -1,
*/
  __pyx_t_15 = PyTuple_Pack(9, __pyx_t_10, __pyx_t_9, __pyx_t_8, __pyx_t_5, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, ((PyObject*)__pyx_mstate_global->__pyx_int_neg_1)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __pyx_t_14 = __Pyx_PyDict_NewPresized(10); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_year, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2071, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2071, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2071, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_hour, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2071, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_minute, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2071, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_second, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2071, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_microsecond, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2071, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_nanosecond, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2071, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 2071, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2071, __pyx_L1_error)
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_71replace, 0, __pyx_mstate_global->__pyx_n_u_Pddt_replace, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_13, __pyx_t_15);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_13, __pyx_t_14);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_replace, __pyx_t_13) < (0)) __PYX_ERR(0, 2071, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "cytimes/pddt.py":2159
 *         self,
 *         month: int | str | None = None,
 *         day: cython.int = -1,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Adjust the date to the specified month and day in the current year `<'Pddt'>`.
*/
  __pyx_t_13 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);

  /* "cytimes/pddt.py":2156
 * 
 *     # . year
 *     def to_curr_year(             # <<<<<<<<<<<<<<
 *         self,
 *         month: int | str | None = None,
*/
  __pyx_t_14 = PyTuple_Pack(2, Py_None, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_13 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_int_str_None) < (0)) __PYX_ERR(0, 2156, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2156, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2156, __pyx_L1_error)
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_73to_curr_year, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_curr_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_15, __pyx_t_14);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_15, __pyx_t_13);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_curr_year, __pyx_t_15) < (0)) __PYX_ERR(0, 2156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "cytimes/pddt.py":2243
 *         self,
 *         month: int | str | None = None,
 *         day: cython.int = -1,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Adjust the date to the specified month and day in the previous year `<'Pddt'>`.
*/
  __pyx_t_15 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);

  /* "cytimes/pddt.py":2240
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_prev_year(             # <<<<<<<<<<<<<<
 *         self,
 *         month: int | str | None = None,
*/
  __pyx_t_13 = PyTuple_Pack(2, Py_None, __pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __pyx_t_15 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (PyDict_SetItem(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_int_str_None) < (0)) __PYX_ERR(0, 2240, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2240, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2240, __pyx_L1_error)
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_75to_prev_year, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_prev_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_t_13);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_14, __pyx_t_15);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_prev_year, __pyx_t_14) < (0)) __PYX_ERR(0, 2240, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "cytimes/pddt.py":2268
 *         self,
 *         month: int | str | None = None,
 *         day: cython.int = -1,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Adjust the date to the specified month and day in the next year `<'Pddt'>`.
*/
  __pyx_t_14 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);

  /* "cytimes/pddt.py":2265
 *         return self.to_year(-1, month, day)
 * 
 *     def to_next_year(             # <<<<<<<<<<<<<<
 *         self,
 *         month: int | str | None = None,
*/
  __pyx_t_15 = PyTuple_Pack(2, Py_None, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __pyx_t_14 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_int_str_None) < (0)) __PYX_ERR(0, 2265, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2265, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2265, __pyx_L1_error)
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_77to_next_year, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_next_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_13, __pyx_t_15);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_13, __pyx_t_14);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_next_year, __pyx_t_13) < (0)) __PYX_ERR(0, 2265, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "cytimes/pddt.py":2294
 *         offset: cython.int,
 *         month: int | str | None = None,
 *         day: cython.int = -1,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Adjust the date to the specified month and day in the year (+/-) offset `<'Pddt'>`.
*/
  __pyx_t_13 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);

  /* "cytimes/pddt.py":2290
 *         return self.to_year(1, month, day)
 * 
 *     def to_year(             # <<<<<<<<<<<<<<
 *         self,
 *         offset: cython.int,
*/
  __pyx_t_14 = PyTuple_Pack(2, Py_None, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_13 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_offset, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2290, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_int_str_None) < (0)) __PYX_ERR(0, 2290, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2290, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2290, __pyx_L1_error)
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_79to_year, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_15, __pyx_t_14);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_15, __pyx_t_13);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_year, __pyx_t_15) < (0)) __PYX_ERR(0, 2290, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "cytimes/pddt.py":2385
 * 
 *     # . quarter
 *     def to_curr_quarter(self, month: cython.int = -1, day: cython.int = -1) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specified month-of-quarter and day in the current quarter. `<'Pddt'>`.
 * 
*/
  __pyx_t_15 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_13 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_14 = PyTuple_Pack(2, __pyx_t_15, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_13 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2385, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2385, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2385, __pyx_L1_error)
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_81to_curr_quarter, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_curr_quarter, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_15, __pyx_t_14);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_15, __pyx_t_13);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_curr_quarter, __pyx_t_15) < (0)) __PYX_ERR(0, 2385, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "cytimes/pddt.py":2459
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_prev_quarter(self, month: cython.int = -1, day: cython.int = -1) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specified month-of-quarter and day in the previous quarter. `<'Pddt'>`.
 * 
*/
  __pyx_t_15 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_13 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_14 = PyTuple_Pack(2, __pyx_t_15, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_13 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2459, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2459, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2459, __pyx_L1_error)
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_83to_prev_quarter, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_prev_quarter, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_15, __pyx_t_14);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_15, __pyx_t_13);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_prev_quarter, __pyx_t_15) < (0)) __PYX_ERR(0, 2459, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "cytimes/pddt.py":2475
 *         return self.to_quarter(-1, month, day)
 * 
 *     def to_next_quarter(self, month: cython.int = -1, day: cython.int = -1) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specified month-of-quarter and day in the next quarter. `<'Pddt'>`.
 * 
*/
  __pyx_t_15 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_13 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_14 = PyTuple_Pack(2, __pyx_t_15, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_13 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2475, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2475, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2475, __pyx_L1_error)
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_85to_next_quarter, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_next_quarter, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_15, __pyx_t_14);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_15, __pyx_t_13);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_next_quarter, __pyx_t_15) < (0)) __PYX_ERR(0, 2475, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "cytimes/pddt.py":2494
 *         self,
 *         offset: cython.int,
 *         month: cython.int = -1,             # <<<<<<<<<<<<<<
 *         day: cython.int = -1,
 *     ) -> Self:
*/
  __pyx_t_15 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);

  /* "cytimes/pddt.py":2495
 *         offset: cython.int,
 *         month: cython.int = -1,
 *         day: cython.int = -1,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Adjust the date to the specified month-of-quarter and day in the quarter (+/-) offset `<'Pddt'>`.
*/
  __pyx_t_13 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);

  /* "cytimes/pddt.py":2491
 *         return self.to_quarter(1, month, day)
 * 
 *     def to_quarter(             # <<<<<<<<<<<<<<
 *         self,
 *         offset: cython.int,
*/
  __pyx_t_14 = PyTuple_Pack(2, __pyx_t_15, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_13 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_offset, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2491, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2491, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2491, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2491, __pyx_L1_error)
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_87to_quarter, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_quarter, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_15, __pyx_t_14);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_15, __pyx_t_13);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_quarter, __pyx_t_15) < (0)) __PYX_ERR(0, 2491, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "cytimes/pddt.py":2577
 * 
 *     # . month
 *     def to_curr_month(self, day: cython.int = -1) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specified day of the current month `<'Pddt'>`.
 * 
*/
  __pyx_t_15 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_13 = PyTuple_Pack(1, __pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __pyx_t_15 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (PyDict_SetItem(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2577, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2577, __pyx_L1_error)
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_89to_curr_month, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_curr_month, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_t_13);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_14, __pyx_t_15);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_curr_month, __pyx_t_14) < (0)) __PYX_ERR(0, 2577, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "cytimes/pddt.py":2642
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_prev_month(self, day: cython.int = -1) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specified day of the previous month `<'Pddt'>`.
 * 
*/
  __pyx_t_14 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_15 = PyTuple_Pack(1, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __pyx_t_14 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2642, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2642, __pyx_L1_error)
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_91to_prev_month, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_prev_month, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_13, __pyx_t_15);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_13, __pyx_t_14);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_prev_month, __pyx_t_13) < (0)) __PYX_ERR(0, 2642, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "cytimes/pddt.py":2656
 *         return self.to_month(-1, day)
 * 
 *     def to_next_month(self, day: cython.int = -1) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specified day of the next month `<'Pddt'>`.
 * 
*/
  __pyx_t_13 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_14 = PyTuple_Pack(1, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_13 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2656, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2656, __pyx_L1_error)
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_93to_next_month, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_next_month, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_15, __pyx_t_14);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_15, __pyx_t_13);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_next_month, __pyx_t_15) < (0)) __PYX_ERR(0, 2656, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "cytimes/pddt.py":2670
 *         return self.to_month(1, day)
 * 
 *     def to_month(self, offset: cython.int, day: cython.int = -1) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specified day of the month (+/-) offset `<'Pddt'>`.
 * 
*/
  __pyx_t_15 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_13 = PyTuple_Pack(1, __pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __pyx_t_15 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (PyDict_SetItem(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_offset, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2670, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2670, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2670, __pyx_L1_error)
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_95to_month, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_month, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_t_13);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_14, __pyx_t_15);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_month, __pyx_t_14) < (0)) __PYX_ERR(0, 2670, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "cytimes/pddt.py":2742
 * 
 *     # . weekday
 *     def to_monday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the `Monday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(0)
*/
  __pyx_t_14 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2742, __pyx_L1_error)
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_97to_monday, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_monday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_15, __pyx_t_14);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_monday, __pyx_t_15) < (0)) __PYX_ERR(0, 2742, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "cytimes/pddt.py":2746
 *         return self._to_curr_weekday(0)
 * 
 *     def to_tuesday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the `Tuesday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(1)
*/
  __pyx_t_15 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (PyDict_SetItem(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2746, __pyx_L1_error)
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_99to_tuesday, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_tuesday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[51])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_14, __pyx_t_15);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_tuesday, __pyx_t_14) < (0)) __PYX_ERR(0, 2746, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "cytimes/pddt.py":2750
 *         return self._to_curr_weekday(1)
 * 
 *     def to_wednesday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the `Wednesday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(2)
*/
  __pyx_t_14 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2750, __pyx_L1_error)
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_101to_wednesday, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_wednesday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[52])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_15, __pyx_t_14);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_wednesday, __pyx_t_15) < (0)) __PYX_ERR(0, 2750, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "cytimes/pddt.py":2754
 *         return self._to_curr_weekday(2)
 * 
 *     def to_thursday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the `Thursday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(3)
*/
  __pyx_t_15 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (PyDict_SetItem(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2754, __pyx_L1_error)
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_103to_thursday, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_thursday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[53])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_14, __pyx_t_15);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_thursday, __pyx_t_14) < (0)) __PYX_ERR(0, 2754, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "cytimes/pddt.py":2758
 *         return self._to_curr_weekday(3)
 * 
 *     def to_friday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the `Friday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(4)
*/
  __pyx_t_14 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2758, __pyx_L1_error)
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_105to_friday, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_friday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[54])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_15, __pyx_t_14);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_friday, __pyx_t_15) < (0)) __PYX_ERR(0, 2758, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "cytimes/pddt.py":2762
 *         return self._to_curr_weekday(4)
 * 
 *     def to_saturday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the `Saturday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(5)
*/
  __pyx_t_15 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (PyDict_SetItem(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2762, __pyx_L1_error)
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_107to_saturday, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_saturday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[55])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_14, __pyx_t_15);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_saturday, __pyx_t_14) < (0)) __PYX_ERR(0, 2762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "cytimes/pddt.py":2766
 *         return self._to_curr_weekday(5)
 * 
 *     def to_sunday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the `Sunday` of the current week `<'Pddt'>`."""
 *         return self._to_curr_weekday(6)
*/
  __pyx_t_14 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2766, __pyx_L1_error)
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_109to_sunday, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_sunday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[56])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_15, __pyx_t_14);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_sunday, __pyx_t_15) < (0)) __PYX_ERR(0, 2766, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "cytimes/pddt.py":2770
 *         return self._to_curr_weekday(6)
 * 
 *     def to_curr_weekday(self, weekday: int | str | None = None) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specific weekday of the current week `<'Pddt'>`.
 * 
*/
  __pyx_t_15 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (PyDict_SetItem(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_weekday, __pyx_mstate_global->__pyx_kp_u_int_str_None) < (0)) __PYX_ERR(0, 2770, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2770, __pyx_L1_error)
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_111to_curr_weekday, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_curr_weekday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[57])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[6]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_14, __pyx_t_15);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_curr_weekday_2, __pyx_t_14) < (0)) __PYX_ERR(0, 2770, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "cytimes/pddt.py":2787
 *         return self._to_curr_weekday(_parse_weekday(weekday, None, True))
 * 
 *     def to_prev_weekday(self, weekday: int | str | None = None) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specific weekday of the previous week `<'Pddt'>`.
 * 
*/
  __pyx_t_14 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_weekday, __pyx_mstate_global->__pyx_kp_u_int_str_None) < (0)) __PYX_ERR(0, 2787, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2787, __pyx_L1_error)
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_113to_prev_weekday, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_prev_weekday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[58])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_15, __pyx_mstate_global->__pyx_tuple[6]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_15, __pyx_t_14);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_prev_weekday, __pyx_t_15) < (0)) __PYX_ERR(0, 2787, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "cytimes/pddt.py":2804
 *         return self.to_weekday(-1, weekday)
 * 
 *     def to_next_weekday(self, weekday: int | str | None = None) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specific weekday of the next week `<'Pddt'>`.
 * 
*/
  __pyx_t_15 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (PyDict_SetItem(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_weekday, __pyx_mstate_global->__pyx_kp_u_int_str_None) < (0)) __PYX_ERR(0, 2804, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2804, __pyx_L1_error)
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_115to_next_weekday, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_next_weekday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[59])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[6]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_14, __pyx_t_15);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_next_weekday, __pyx_t_14) < (0)) __PYX_ERR(0, 2804, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "cytimes/pddt.py":2821
 *         return self.to_weekday(1, weekday)
 * 
 *     def to_weekday(self, offset: cython.int, weekday: int | str | None = None) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specific weekday of the week (+/-) offset `<'Pddt'>`.
 * 
*/
  __pyx_t_14 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_offset, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2821, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_weekday, __pyx_mstate_global->__pyx_kp_u_int_str_None) < (0)) __PYX_ERR(0, 2821, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2821, __pyx_L1_error)
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_117to_weekday, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_weekday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[60])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_15, __pyx_mstate_global->__pyx_tuple[6]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_15, __pyx_t_14);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_weekday, __pyx_t_15) < (0)) __PYX_ERR(0, 2821, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "cytimes/pddt.py":2882
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def _to_curr_weekday(self, weekday: cython.int) -> Self:             # <<<<<<<<<<<<<<
 *         """(internal) Adjust the date to the specific weekday of the current week `<'Pddt'>`.
 * 
*/
  __pyx_t_15 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (PyDict_SetItem(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_weekday, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2882, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2882, __pyx_L1_error)
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_119_to_curr_weekday, 0, __pyx_mstate_global->__pyx_n_u_Pddt__to_curr_weekday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[61])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_14, __pyx_t_15);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_curr_weekday, __pyx_t_14) < (0)) __PYX_ERR(0, 2882, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "cytimes/pddt.py":2927
 * 
 *     # . day
 *     def to_yesterday(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to `Yesterday` `<'Pddt'>`."""
 *         return self.to_day(-1)
*/
  __pyx_t_14 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2927, __pyx_L1_error)
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_121to_yesterday, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_yesterday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[62])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_15, __pyx_t_14);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_yesterday, __pyx_t_15) < (0)) __PYX_ERR(0, 2927, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "cytimes/pddt.py":2931
 *         return self.to_day(-1)
 * 
 *     def to_tomorrow(self) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to `Tomorrow` `<'Pddt'>`."""
 *         return self.to_day(1)
*/
  __pyx_t_15 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (PyDict_SetItem(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2931, __pyx_L1_error)
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_123to_tomorrow, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_tomorrow, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[63])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_14, __pyx_t_15);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_tomorrow, __pyx_t_14) < (0)) __PYX_ERR(0, 2931, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "cytimes/pddt.py":2935
 *         return self.to_day(1)
 * 
 *     def to_day(self, offset: cython.int) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to day (+/-) offset `<'Pddt'>`.
 * 
*/
  __pyx_t_14 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_offset, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2935, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2935, __pyx_L1_error)
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_125to_day, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_day, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[64])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_15, __pyx_t_14);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_day, __pyx_t_15) < (0)) __PYX_ERR(0, 2935, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "cytimes/pddt.py":2980
 * 
 *     # . date&time
 *     def normalize(self):             # <<<<<<<<<<<<<<
 *         """Set the time fields to midnight (00:00:00) `<'Pddt'>`.
 * 
*/
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_127normalize, 0, __pyx_mstate_global->__pyx_n_u_Pddt_normalize, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[65])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_normalize, __pyx_t_15) < (0)) __PYX_ERR(0, 2980, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "cytimes/pddt.py":2988
 *         return self.to_time(0, 0, 0, 0, 0)
 * 
 *     def snap(self, freq: object) -> Self:             # <<<<<<<<<<<<<<
 *         """Snap to nearest occurring frequency `<'Pddt'>`.
 * 
*/
  __pyx_t_15 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (PyDict_SetItem(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_freq, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 2988, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 2988, __pyx_L1_error)
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_129snap, 0, __pyx_mstate_global->__pyx_n_u_Pddt_snap, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[66])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_14, __pyx_t_15);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_snap, __pyx_t_14) < (0)) __PYX_ERR(0, 2988, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "cytimes/pddt.py":3008
 *     def to_datetime(
 *         self,
 *         year: cython.int = -1,             # <<<<<<<<<<<<<<
 *         month: cython.int = -1,
 *         day: cython.int = -1,
*/
  __pyx_t_14 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);

  /* "cytimes/pddt.py":3009
 *         self,
 *         year: cython.int = -1,
 *         month: cython.int = -1,             # <<<<<<<<<<<<<<
 *         day: cython.int = -1,
 *         hour: cython.int = -1,
*/
  __pyx_t_15 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);

  /* "cytimes/pddt.py":3010
 *         year: cython.int = -1,
 *         month: cython.int = -1,
 *         day: cython.int = -1,             # <<<<<<<<<<<<<<
 *         hour: cython.int = -1,
 *         minute: cython.int = -1,
*/
  __pyx_t_13 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);

  /* "cytimes/pddt.py":3011
 *         month: cython.int = -1,
 *         day: cython.int = -1,
 *         hour: cython.int = -1,             # <<<<<<<<<<<<<<
 *         minute: cython.int = -1,
 *         second: cython.int = -1,
*/
  __pyx_t_12 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);

  /* "cytimes/pddt.py":3012
 *         day: cython.int = -1,
 *         hour: cython.int = -1,
 *         minute: cython.int = -1,             # <<<<<<<<<<<<<<
 *         second: cython.int = -1,
 *         microsecond: cython.int = -1,
*/
  __pyx_t_11 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);

  /* "cytimes/pddt.py":3013
 *         hour: cython.int = -1,
 *         minute: cython.int = -1,
 *         second: cython.int = -1,             # <<<<<<<<<<<<<<
 *         microsecond: cython.int = -1,
 *         nanosecond: cython.int = -1,
*/
  __pyx_t_5 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "cytimes/pddt.py":3014
 *         minute: cython.int = -1,
 *         second: cython.int = -1,
 *         microsecond: cython.int = -1,             # <<<<<<<<<<<<<<
 *         nanosecond: cython.int = -1,
 *     ) -> Self:
*/
  __pyx_t_8 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "cytimes/pddt.py":3015
 *         second: cython.int = -1,
 *         microsecond: cython.int = -1,
 *         nanosecond: cython.int = -1,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Adjust the date and time fields with new values,
*/
  __pyx_t_9 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "cytimes/pddt.py":3006
 *             errors.raise_argument_error(self.__class__, "snap(freq)", None, err)
 * 
 *     def to_datetime(             # <<<<<<<<<<<<<<
 *         self,
 *         year: cython.int = -1,
*/
  __pyx_t_10 = PyTuple_Pack(8, __pyx_t_14, __pyx_t_15, __pyx_t_13, __pyx_t_12, __pyx_t_11, __pyx_t_5, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_year, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3006, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3006, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3006, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_hour, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3006, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_minute, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3006, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_second, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3006, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_microsecond, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3006, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_nanosecond, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3006, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 3006, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_131to_datetime, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_datetime, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[67])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_t_10);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_9);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_datetime_2, __pyx_t_8) < (0)) __PYX_ERR(0, 3006, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":3122
 *     def to_date(
 *         self,
 *         year: cython.int = -1,             # <<<<<<<<<<<<<<
 *         month: cython.int = -1,
 *         day: cython.int = -1,
*/
  __pyx_t_8 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "cytimes/pddt.py":3123
 *         self,
 *         year: cython.int = -1,
 *         month: cython.int = -1,             # <<<<<<<<<<<<<<
 *         day: cython.int = -1,
 *     ) -> Self:
*/
  __pyx_t_9 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "cytimes/pddt.py":3124
 *         year: cython.int = -1,
 *         month: cython.int = -1,
 *         day: cython.int = -1,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Adjust the date with new values, without affecting other fields `<'Pddt'>`.
*/
  __pyx_t_10 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);

  /* "cytimes/pddt.py":3120
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_date(             # <<<<<<<<<<<<<<
 *         self,
 *         year: cython.int = -1,
*/
  __pyx_t_5 = PyTuple_Pack(3, __pyx_t_8, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __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_t_10 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_year, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3120, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3120, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3120, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 3120, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_133to_date, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_date, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[68])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_t_5);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_date, __pyx_t_9) < (0)) __PYX_ERR(0, 3120, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "cytimes/pddt.py":3183
 *     def to_time(
 *         self,
 *         hour: cython.int = -1,             # <<<<<<<<<<<<<<
 *         minute: cython.int = -1,
 *         second: cython.int = -1,
*/
  __pyx_t_9 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "cytimes/pddt.py":3184
 *         self,
 *         hour: cython.int = -1,
 *         minute: cython.int = -1,             # <<<<<<<<<<<<<<
 *         second: cython.int = -1,
 *         microsecond: cython.int = -1,
*/
  __pyx_t_10 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);

  /* "cytimes/pddt.py":3185
 *         hour: cython.int = -1,
 *         minute: cython.int = -1,
 *         second: cython.int = -1,             # <<<<<<<<<<<<<<
 *         microsecond: cython.int = -1,
 *         nanosecond: cython.int = -1,
*/
  __pyx_t_5 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "cytimes/pddt.py":3186
 *         minute: cython.int = -1,
 *         second: cython.int = -1,
 *         microsecond: cython.int = -1,             # <<<<<<<<<<<<<<
 *         nanosecond: cython.int = -1,
 *     ) -> Self:
*/
  __pyx_t_8 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "cytimes/pddt.py":3187
 *         second: cython.int = -1,
 *         microsecond: cython.int = -1,
 *         nanosecond: cython.int = -1,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Adjust the time fields with new values, without affecting other fields `<'Pddt'>`.
*/
  __pyx_t_11 = __Pyx_PyLong_From_int(((int)-1)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);

  /* "cytimes/pddt.py":3181
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_time(             # <<<<<<<<<<<<<<
 *         self,
 *         hour: cython.int = -1,
*/
  __pyx_t_12 = PyTuple_Pack(5, __pyx_t_9, __pyx_t_10, __pyx_t_5, __pyx_t_8, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_hour, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3181, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_minute, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3181, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_second, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3181, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_microsecond, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3181, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_nanosecond, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3181, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 3181, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_135to_time, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_time, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[69])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_t_12);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_time, __pyx_t_8) < (0)) __PYX_ERR(0, 3181, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":3284
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_first_of(self, unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date fields to the first day of the specified datetime unit,
 *         without affecting the time fields `<'Pddt'>`.
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 3284, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 3284, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_137to_first_of, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_first_of, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[70])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_first_of, __pyx_t_11) < (0)) __PYX_ERR(0, 3284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cytimes/pddt.py":3382
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_last_of(self, unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date fields to the last day of the specified datetime unit,
 *         without affecting the time fields `<'Pddt'>`.
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 3382, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 3382, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_139to_last_of, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_last_of, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[71])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_last_of, __pyx_t_8) < (0)) __PYX_ERR(0, 3382, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":3481
 *         return self._new(arr.astype(dtype), tz=self.tz, name=self.name)
 * 
 *     def to_start_of(self, unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date & time fields to the start of the specified datetime unit `<'Pddt'>`.
 * 
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 3481, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 3481, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_141to_start_of, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_start_of, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[72])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_start_of, __pyx_t_11) < (0)) __PYX_ERR(0, 3481, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cytimes/pddt.py":3598
 *         return self._new(arr, tz=self.tz, name=self.name)
 * 
 *     def to_end_of(self, unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date & time fields to the end of the specified datetime unit `<'Pddt'>`.
 * 
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 3598, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 3598, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_143to_end_of, 0, __pyx_mstate_global->__pyx_n_u_Pddt_to_end_of, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[73])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_to_end_of, __pyx_t_8) < (0)) __PYX_ERR(0, 3598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":3719
 *         return self._new(arr, tz=self.tz, name=self.name)
 * 
 *     def is_first_of(self, unit: str) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether the date fields are on the first day
 *         of the specified datetime unit `<'Index[bool]'>`.
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 3719, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_bool) < (0)) __PYX_ERR(0, 3719, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_145is_first_of, 0, __pyx_mstate_global->__pyx_n_u_Pddt_is_first_of, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[74])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_is_first_of, __pyx_t_11) < (0)) __PYX_ERR(0, 3719, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cytimes/pddt.py":3743
 *         return pd.Index(utils.arr_eq_arr(my_dateD, pt_dateD), name="is_first_of")
 * 
 *     def is_last_of(self, unit: str) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether the date fields are on the last day
 *         of the specified datetime unit `<'Index[bool]'>`.
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 3743, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_bool) < (0)) __PYX_ERR(0, 3743, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_147is_last_of, 0, __pyx_mstate_global->__pyx_n_u_Pddt_is_last_of, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[75])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_is_last_of, __pyx_t_8) < (0)) __PYX_ERR(0, 3743, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":3767
 *         return pd.Index(utils.arr_eq_arr(my_dateD, pt_dateD), name="is_last_of")
 * 
 *     def is_start_of(self, unit: str) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether date & time fileds are the
 *         start of the specified datetime unit `<'Index[bool]'>`.
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 3767, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_bool) < (0)) __PYX_ERR(0, 3767, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_149is_start_of, 0, __pyx_mstate_global->__pyx_n_u_Pddt_is_start_of, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[76])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_is_start_of, __pyx_t_11) < (0)) __PYX_ERR(0, 3767, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cytimes/pddt.py":3807
 *         return pd.Index(arr, name="is_start_of")
 * 
 *     def is_end_of(self, unit: str) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether date & time fileds are the
 *         end of the specified datetime unit `<'Index[bool]'>`.
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 3807, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_bool) < (0)) __PYX_ERR(0, 3807, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_151is_end_of, 0, __pyx_mstate_global->__pyx_n_u_Pddt_is_end_of, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[77])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_is_end_of, __pyx_t_8) < (0)) __PYX_ERR(0, 3807, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":3848
 * 
 *     # . round / ceil / floor
 *     def round(self, unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Perform round operation to the specified datetime unit `<'Pddt'>`.
 * 
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 3848, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 3848, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_153round, 0, __pyx_mstate_global->__pyx_n_u_Pddt_round, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[78])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_round, __pyx_t_11) < (0)) __PYX_ERR(0, 3848, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cytimes/pddt.py":3883
 *         return self._new(out, tz=self.tz, name=self.name)
 * 
 *     def ceil(self, unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Perform ceil operation to the specified datetime unit `<'Pddt'>`.
 * 
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 3883, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 3883, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_155ceil, 0, __pyx_mstate_global->__pyx_n_u_Pddt_ceil, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[79])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ceil, __pyx_t_8) < (0)) __PYX_ERR(0, 3883, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":3918
 *         return self._new(out, tz=self.tz, name=self.name)
 * 
 *     def floor(self, unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Perform floor operation to the specified datetime unit `<'Pddt'>`.
 * 
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 3918, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 3918, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_157floor, 0, __pyx_mstate_global->__pyx_n_u_Pddt_floor, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[80])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_floor, __pyx_t_11) < (0)) __PYX_ERR(0, 3918, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cytimes/pddt.py":3954
 * 
 *     # . fsp (fractional seconds precision)
 *     def fsp(self, precision: cython.int) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust to the specified fractional seconds precision `<'Pddt'>`.
 * 
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_precision, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3954, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 3954, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_159fsp, 0, __pyx_mstate_global->__pyx_n_u_Pddt_fsp, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[81])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_fsp, __pyx_t_8) < (0)) __PYX_ERR(0, 3954, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":4013
 *     # Calendar -----------------------------------------------------------------------------
 *     # . iso
 *     def isocalendar(self) -> pd.DataFrame:             # <<<<<<<<<<<<<<
 *         """Return the ISO calendar `<'DateFrame'>`.
 * 
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_DataFrame) < (0)) __PYX_ERR(0, 4013, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_161isocalendar, 0, __pyx_mstate_global->__pyx_n_u_Pddt_isocalendar, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[82])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_isocalendar, __pyx_t_11) < (0)) __PYX_ERR(0, 4013, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cytimes/pddt.py":4027
 *         return pd.DataFrame(arr, columns=["year", "week", "weekday"], index=self)
 * 
 *     def isoyear(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the ISO calendar years `<'Index[int64]'>`."""
 *         arr = utils.dt64arr_isoyear(self.values_naive)
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4027, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_163isoyear, 0, __pyx_mstate_global->__pyx_n_u_Pddt_isoyear, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[83])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_isoyear, __pyx_t_8) < (0)) __PYX_ERR(0, 4027, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":4032
 *         return pd.Index(arr, name="isoyear")
 * 
 *     def isoweek(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the ISO calendar week numbers (1-53) `<'Index[int64]'>`."""
 *         arr = utils.dt64arr_isoweek(self.values_naive)
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4032, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_165isoweek, 0, __pyx_mstate_global->__pyx_n_u_Pddt_isoweek, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[84])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_isoweek, __pyx_t_11) < (0)) __PYX_ERR(0, 4032, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cytimes/pddt.py":4037
 *         return pd.Index(arr, name="isoweek")
 * 
 *     def isoweekday(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the ISO calendar weekdays (1=Mon...7=Sun) `<'Index[int64]'>`."""
 *         arr = utils.dt64arr_isoweekday(self.values_naive)
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4037, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_167isoweekday, 0, __pyx_mstate_global->__pyx_n_u_Pddt_isoweekday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[85])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_isoweekday, __pyx_t_8) < (0)) __PYX_ERR(0, 4037, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":4043
 * 
 *     # . year
 *     @property             # <<<<<<<<<<<<<<
 *     def year(self) -> pd.Index[np.int64]:
 *         """The years `<'Index[int64]'>`."""
*/
  __pyx_t_11 = NULL;
  __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4043, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_169year, 0, __pyx_mstate_global->__pyx_n_u_Pddt_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[86])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_16 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_5};
    __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
  }
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_year, __pyx_t_8) < (0)) __PYX_ERR(0, 4043, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":4048
 *         return pd.Index(utils.dt64arr_year(self.values_naive), name="year")
 * 
 *     def is_year(self, year: cython.int) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether is the exact `year` `<'Index[bool]'>."""
 *         return pd.Index(
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_year, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4048, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_bool) < (0)) __PYX_ERR(0, 4048, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_171is_year, 0, __pyx_mstate_global->__pyx_n_u_Pddt_is_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[87])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_is_year, __pyx_t_5) < (0)) __PYX_ERR(0, 4048, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pddt.py":4054
 *         )
 * 
 *     def is_leap_year(self) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether is in leap year `<'Index[bool]'>."""
 *         return pd.Index(
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_bool) < (0)) __PYX_ERR(0, 4054, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_173is_leap_year, 0, __pyx_mstate_global->__pyx_n_u_Pddt_is_leap_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[88])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_is_leap_year, __pyx_t_8) < (0)) __PYX_ERR(0, 4054, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":4060
 *         )
 * 
 *     def is_long_year(self) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether is in long year `<'Index[bool]'>`.
 * 
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_bool) < (0)) __PYX_ERR(0, 4060, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_175is_long_year, 0, __pyx_mstate_global->__pyx_n_u_Pddt_is_long_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[89])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_is_long_year, __pyx_t_5) < (0)) __PYX_ERR(0, 4060, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pddt.py":4069
 *         )
 * 
 *     def leap_bt_year(self, year: cython.int) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Compute the total number of leap years between `year` and each element `<'Index[int64]'>`."""
 *         return pd.Index(
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_year, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4069, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4069, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_177leap_bt_year, 0, __pyx_mstate_global->__pyx_n_u_Pddt_leap_bt_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[90])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_leap_bt_year, __pyx_t_8) < (0)) __PYX_ERR(0, 4069, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":4076
 *         )
 * 
 *     def days_in_year(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the maximum number of days (365, 366) in the year `<'Index[int64]'>`."""
 *         return pd.Index(
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4076, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_179days_in_year, 0, __pyx_mstate_global->__pyx_n_u_Pddt_days_in_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[91])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_days_in_year, __pyx_t_5) < (0)) __PYX_ERR(0, 4076, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pddt.py":4082
 *         )
 * 
 *     def days_bf_year(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the number of days strictly before January 1 of year `<'Index[int64]'>`."""
 *         return pd.Index(
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4082, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_181days_bf_year, 0, __pyx_mstate_global->__pyx_n_u_Pddt_days_bf_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[92])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_days_bf_year, __pyx_t_8) < (0)) __PYX_ERR(0, 4082, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":4088
 *         )
 * 
 *     def day_of_year(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the number of days since the 1st day of the year `<'Index[int64]'>`."""
 *         return pd.Index(
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4088, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_183day_of_year, 0, __pyx_mstate_global->__pyx_n_u_Pddt_day_of_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[93])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_day_of_year, __pyx_t_5) < (0)) __PYX_ERR(0, 4088, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pddt.py":4095
 * 
 *     # . quarter
 *     @property             # <<<<<<<<<<<<<<
 *     def quarter(self) -> pd.Index[np.int64]:
 *         """The quarters (1-4) `<'Index[int64]'>`."""
*/
  __pyx_t_8 = NULL;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4095, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_185quarter, 0, __pyx_mstate_global->__pyx_n_u_Pddt_quarter, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[94])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_16 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_12};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_quarter, __pyx_t_5) < (0)) __PYX_ERR(0, 4095, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pddt.py":4100
 *         return pd.Index(utils.dt64arr_quarter(self.values_naive), name="quarter")
 * 
 *     def is_quarter(self, quarter: cython.int) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether is the exact `quarter` `<'Index[bool]'>`."""
 *         return pd.Index(
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_quarter, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4100, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_bool) < (0)) __PYX_ERR(0, 4100, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_187is_quarter, 0, __pyx_mstate_global->__pyx_n_u_Pddt_is_quarter, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[95])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_is_quarter, __pyx_t_12) < (0)) __PYX_ERR(0, 4100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "cytimes/pddt.py":4107
 *         )
 * 
 *     def days_in_quarter(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the maximum number of days (90-92) in the quarter `<'Index[int64]'>`."""
 *         return pd.Index(
*/
  __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4107, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_189days_in_quarter, 0, __pyx_mstate_global->__pyx_n_u_Pddt_days_in_quarter, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[96])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_days_in_quarter, __pyx_t_5) < (0)) __PYX_ERR(0, 4107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pddt.py":4113
 *         )
 * 
 *     def days_bf_quarter(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the number of days strictly before the first day
 *         of the calendar quarter `<'Index[int64]'>`.
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4113, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_191days_bf_quarter, 0, __pyx_mstate_global->__pyx_n_u_Pddt_days_bf_quarter, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[97])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_days_bf_quarter, __pyx_t_12) < (0)) __PYX_ERR(0, 4113, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "cytimes/pddt.py":4121
 *         )
 * 
 *     def day_of_quarter(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the number of days since the 1st day of the quarter `<'Index[int64]'>`."""
 *         return pd.Index(
*/
  __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4121, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_193day_of_quarter, 0, __pyx_mstate_global->__pyx_n_u_Pddt_day_of_quarter, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[98])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_day_of_quarter, __pyx_t_5) < (0)) __PYX_ERR(0, 4121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pddt.py":4128
 * 
 *     # . month
 *     @property             # <<<<<<<<<<<<<<
 *     def month(self) -> pd.Index[np.int64]:
 *         """The months (1-12) `<'Index[int64]'>`."""
*/
  __pyx_t_12 = NULL;
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4128, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_195month, 0, __pyx_mstate_global->__pyx_n_u_Pddt_month, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[99])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_16 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_11};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_month, __pyx_t_5) < (0)) __PYX_ERR(0, 4128, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pddt.py":4133
 *         return pd.Index(utils.dt64arr_month(self.values_naive), name="month")
 * 
 *     def is_month(self, month: str | int) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether is the exact `month` `<'Index[bool]'>`.
 * 
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_str_int) < (0)) __PYX_ERR(0, 4133, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_bool) < (0)) __PYX_ERR(0, 4133, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_197is_month, 0, __pyx_mstate_global->__pyx_n_u_Pddt_is_month, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[100])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_is_month, __pyx_t_11) < (0)) __PYX_ERR(0, 4133, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cytimes/pddt.py":4149
 *         )
 * 
 *     def days_in_month(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the maximum number of days (28-31) in the month `<'Index[int64]'>`."""
 *         return pd.Index(
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4149, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_199days_in_month, 0, __pyx_mstate_global->__pyx_n_u_Pddt_days_in_month, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[101])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_days_in_month, __pyx_t_5) < (0)) __PYX_ERR(0, 4149, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pddt.py":4155
 *         )
 * 
 *     def days_bf_month(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the number of days strictly before the first day
 *         of the calendar month `<'Index[int64]'>`.
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4155, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_201days_bf_month, 0, __pyx_mstate_global->__pyx_n_u_Pddt_days_bf_month, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[102])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_days_bf_month, __pyx_t_11) < (0)) __PYX_ERR(0, 4155, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cytimes/pddt.py":4163
 *         )
 * 
 *     def day_of_month(self) -> pd.Index[np.int64]:             # <<<<<<<<<<<<<<
 *         """Return the number of days since the 1st day of the month `<'Index[int64]'>`.
 * 
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4163, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_203day_of_month, 0, __pyx_mstate_global->__pyx_n_u_Pddt_day_of_month, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[103])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_day_of_month, __pyx_t_5) < (0)) __PYX_ERR(0, 4163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pddt.py":4171
 *         return pd.Index(utils.dt64arr_day(self.values_naive), name="day_of_month")
 * 
 *     def month_name(self, locale: str | None = None) -> pd.Index[str]:             # <<<<<<<<<<<<<<
 *         """Return the month names with specified locale `<'Index[str]'>`.
 * 
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_locale, __pyx_mstate_global->__pyx_kp_u_str_None) < (0)) __PYX_ERR(0, 4171, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_str) < (0)) __PYX_ERR(0, 4171, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_205month_name, 0, __pyx_mstate_global->__pyx_n_u_Pddt_month_name, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[104])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[6]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_month_name, __pyx_t_11) < (0)) __PYX_ERR(0, 4171, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cytimes/pddt.py":4189
 * 
 *     # . weekday
 *     @property             # <<<<<<<<<<<<<<
 *     def weekday(self) -> pd.Index[np.int64]:
 *         """The weekdays (0=Mon...6=Sun) `<'Index[int64]'>`."""
*/
  __pyx_t_5 = NULL;
  __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4189, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_207weekday, 0, __pyx_mstate_global->__pyx_n_u_Pddt_weekday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[105])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_16 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_8};
    __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
  }
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_weekday, __pyx_t_11) < (0)) __PYX_ERR(0, 4189, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cytimes/pddt.py":4194
 *         return pd.Index(utils.dt64arr_weekday(self.values_naive), name="weekday")
 * 
 *     def is_weekday(self, weekday: int | str) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether is the exact `weekday` `<'Index[bool]'>`.
 * 
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_weekday, __pyx_mstate_global->__pyx_kp_u_int_str) < (0)) __PYX_ERR(0, 4194, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_bool) < (0)) __PYX_ERR(0, 4194, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_209is_weekday, 0, __pyx_mstate_global->__pyx_n_u_Pddt_is_weekday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[106])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_is_weekday, __pyx_t_8) < (0)) __PYX_ERR(0, 4194, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":4211
 *         )
 * 
 *     def weekday_name(self, locale: str | None = None) -> pd.Index[str]:             # <<<<<<<<<<<<<<
 *         """Return the weekday names with specified locale `<'Index[str]'>`.
 * 
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_locale, __pyx_mstate_global->__pyx_kp_u_str_None) < (0)) __PYX_ERR(0, 4211, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_str) < (0)) __PYX_ERR(0, 4211, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_211weekday_name, 0, __pyx_mstate_global->__pyx_n_u_Pddt_weekday_name, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[107])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[6]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_weekday_name, __pyx_t_11) < (0)) __PYX_ERR(0, 4211, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cytimes/pddt.py":4234
 * 
 *     # . day
 *     @property             # <<<<<<<<<<<<<<
 *     def day(self) -> pd.Index[np.int64]:
 *         """The days (1-31) `<'Index[int64]'>`."""
*/
  __pyx_t_8 = NULL;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4234, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_213day, 0, __pyx_mstate_global->__pyx_n_u_Pddt_day, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[108])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_16 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_12};
    __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
  }
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_day, __pyx_t_11) < (0)) __PYX_ERR(0, 4234, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cytimes/pddt.py":4239
 *         return pd.Index(utils.dt64arr_day(self.values_naive), name="day")
 * 
 *     def is_day(self, day: cython.int) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether is the exact `day` `<'Index[bool]'>`."""
 *         return pd.Index(
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4239, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_bool) < (0)) __PYX_ERR(0, 4239, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_215is_day, 0, __pyx_mstate_global->__pyx_n_u_Pddt_is_day, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[109])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_is_day, __pyx_t_12) < (0)) __PYX_ERR(0, 4239, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "cytimes/pddt.py":4246
 * 
 *     # . time
 *     @property             # <<<<<<<<<<<<<<
 *     def hour(self) -> pd.Index[np.int64]:
 *         """The hours (0-23) `<'Index[int64]'>`."""
*/
  __pyx_t_11 = NULL;
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4246, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_217hour, 0, __pyx_mstate_global->__pyx_n_u_Pddt_hour, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[110])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_16 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_5};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_hour, __pyx_t_12) < (0)) __PYX_ERR(0, 4246, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "cytimes/pddt.py":4251
 *         return pd.Index(utils.dt64arr_hour(self.values_naive), name="hour")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def minute(self) -> pd.Index[np.int64]:
 *         """The minutes (0-59) `<'Index[int64]'>`."""
*/
  __pyx_t_5 = NULL;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4251, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_219minute, 0, __pyx_mstate_global->__pyx_n_u_Pddt_minute, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[111])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_16 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_8};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_minute, __pyx_t_12) < (0)) __PYX_ERR(0, 4251, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "cytimes/pddt.py":4256
 *         return pd.Index(utils.dt64arr_minute(self.values_naive), name="minute")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def second(self) -> pd.Index[np.int64]:
 *         """The seconds (0-59) `<'Index[int64]'>`."""
*/
  __pyx_t_8 = NULL;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4256, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_221second, 0, __pyx_mstate_global->__pyx_n_u_Pddt_second, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[112])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_16 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_second, __pyx_t_12) < (0)) __PYX_ERR(0, 4256, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "cytimes/pddt.py":4261
 *         return pd.Index(utils.dt64arr_second(self.values_naive), name="second")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def millisecond(self) -> pd.Index[np.int64]:
 *         """The milliseconds (0-999) `<'Index[int64]'>`."""
*/
  __pyx_t_11 = NULL;
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4261, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_223millisecond, 0, __pyx_mstate_global->__pyx_n_u_Pddt_millisecond, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[113])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_16 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_5};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_millisecond, __pyx_t_12) < (0)) __PYX_ERR(0, 4261, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "cytimes/pddt.py":4268
 *         )
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def microsecond(self) -> pd.Index[np.int64]:
 *         """The microseconds (0-999999) `<'Index[int64]'>`."""
*/
  __pyx_t_5 = NULL;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4268, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_225microsecond, 0, __pyx_mstate_global->__pyx_n_u_Pddt_microsecond, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[114])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_16 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_8};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_microsecond, __pyx_t_12) < (0)) __PYX_ERR(0, 4268, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "cytimes/pddt.py":4275
 *         )
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def nanosecond(self) -> pd.Index[np.int64]:
 *         """The nanoseconds (0-999) `<'Index[int64]'>`."""
*/
  __pyx_t_8 = NULL;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_np_int64) < (0)) __PYX_ERR(0, 4275, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_227nanosecond, 0, __pyx_mstate_global->__pyx_n_u_Pddt_nanosecond, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[115])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_16 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_nanosecond, __pyx_t_12) < (0)) __PYX_ERR(0, 4275, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "cytimes/pddt.py":4281
 * 
 *     # Timezone -----------------------------------------------------------------------------
 *     @property             # <<<<<<<<<<<<<<
 *     def tz_available(self) -> set[str]:
 *         """The available timezone names `<'set[str]'>`.
*/
  __pyx_t_11 = NULL;
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_set_str) < (0)) __PYX_ERR(0, 4281, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_229tz_available, 0, __pyx_mstate_global->__pyx_n_u_Pddt_tz_available, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[116])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_16 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_5};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_tz_available, __pyx_t_12) < (0)) __PYX_ERR(0, 4281, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "cytimes/pddt.py":4290
 *         return _available_timezones()
 * 
 *     def is_local(self) -> bool:             # <<<<<<<<<<<<<<
 *         """Check whether is in the local timezone `<'bool'>`.
 * 
*/
  __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 4290, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_231is_local, 0, __pyx_mstate_global->__pyx_n_u_Pddt_is_local, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[117])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_is_local, __pyx_t_5) < (0)) __PYX_ERR(0, 4290, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pddt.py":4297
 *         return self.tzinfo is utils.tz_local()
 * 
 *     def is_utc(self) -> bool:             # <<<<<<<<<<<<<<
 *         """Check whether is in the UTC timezone `<'bool'>`.
 * 
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 4297, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_233is_utc, 0, __pyx_mstate_global->__pyx_n_u_Pddt_is_utc, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[118])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_is_utc, __pyx_t_12) < (0)) __PYX_ERR(0, 4297, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "cytimes/pddt.py":4304
 *         return self.tzinfo is utils.UTC
 * 
 *     def tzname(self) -> str:             # <<<<<<<<<<<<<<
 *         """Return the timezone name `<'str/None'>`.
 * 
*/
  __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 4304, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_235tzname, 0, __pyx_mstate_global->__pyx_n_u_Pddt_tzname, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[119])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_tzname, __pyx_t_5) < (0)) __PYX_ERR(0, 4304, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pddt.py":4312
 *         return None if my_tz is None else my_tz.tzname(utils.dt_now())
 * 
 *     def astimezone(             # <<<<<<<<<<<<<<
 *         self,
 *         tz: datetime.tzinfo | str | None = None,
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 4312, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ambiguous, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 4312, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_nonexistent, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 4312, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 4312, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_237astimezone, 0, __pyx_mstate_global->__pyx_n_u_Pddt_astimezone, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[120])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_astimezone, __pyx_t_12) < (0)) __PYX_ERR(0, 4312, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "cytimes/pddt.py":4364
 *         return pt.tz_convert(to_tz)
 * 
 *     def tz_localize(             # <<<<<<<<<<<<<<
 *         self,
 *         tz: datetime.tzinfo | str | None,
*/
  __pyx_t_12 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 4364, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_ambiguous, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 4364, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_nonexistent, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 4364, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 4364, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_239tz_localize, 0, __pyx_mstate_global->__pyx_n_u_Pddt_tz_localize, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[121])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[8]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_tz_localize, __pyx_t_5) < (0)) __PYX_ERR(0, 4364, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pddt.py":4451
 *         # fmt: on
 * 
 *     def tz_convert(self, tz: datetime.tzinfo | str | None) -> Self:             # <<<<<<<<<<<<<<
 *         """Convert timezone-aware datetime index to another timezone `<'Pddt'>`.
 * 
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 4451, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 4451, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_241tz_convert, 0, __pyx_mstate_global->__pyx_n_u_Pddt_tz_convert, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[122])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_tz_convert, __pyx_t_12) < (0)) __PYX_ERR(0, 4451, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "cytimes/pddt.py":4509
 *         targ_tz: datetime.tzinfo | str | None,
 *         base_tz: datetime.tzinfo | str | None = None,
 *         naive: cython.bint = False,             # <<<<<<<<<<<<<<
 *         ambiguous: object = "raise",
 *         nonexistent: object = "raise",
*/
  __pyx_t_12 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);

  /* "cytimes/pddt.py":4505
 *         # fmt: on
 * 
 *     def tz_switch(             # <<<<<<<<<<<<<<
 *         self,
 *         targ_tz: datetime.tzinfo | str | None,
*/
  __pyx_t_5 = PyTuple_Pack(4, Py_None, __pyx_t_12, ((PyObject*)__pyx_mstate_global->__pyx_n_u_raise), ((PyObject*)__pyx_mstate_global->__pyx_n_u_raise)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_targ_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 4505, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_base_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 4505, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_naive, __pyx_mstate_global->__pyx_kp_u_cython_bint) < (0)) __PYX_ERR(0, 4505, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_ambiguous, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 4505, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_nonexistent, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 4505, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 4505, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_243tz_switch, 0, __pyx_mstate_global->__pyx_n_u_Pddt_tz_switch, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[123])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_t_5);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_tz_switch_2, __pyx_t_11) < (0)) __PYX_ERR(0, 4505, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cytimes/pddt.py":4583
 * 
 *     # Values -------------------------------------------------------------------------------
 *     @property             # <<<<<<<<<<<<<<
 *     def values_naive(self) -> np.ndarray[np.datetime64]:
 *         """Returns an array of the `timezone-naive` datetimes
*/
  __pyx_t_12 = NULL;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_np_ndarray_np_datetime64) < (0)) __PYX_ERR(0, 4583, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_245values_naive, 0, __pyx_mstate_global->__pyx_n_u_Pddt_values_naive, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[124])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_16 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_8};
    __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
  }
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_values_naive, __pyx_t_11) < (0)) __PYX_ERR(0, 4583, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cytimes/pddt.py":4598
 *             return DatetimeIndex.tz_localize(self, None).values
 * 
 *     def as_unit(self, as_unit: str) -> Self:             # <<<<<<<<<<<<<<
 *         """Convert index to the given unit resolution `<'Pddt'>`.
 * 
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_as_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 4598, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 4598, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_247as_unit, 0, __pyx_mstate_global->__pyx_n_u_Pddt_as_unit, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[125])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_as_unit, __pyx_t_8) < (0)) __PYX_ERR(0, 4598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":4637
 *     def add(
 *         self,
 *         years: cython.int = 0,             # <<<<<<<<<<<<<<
 *         quarters: cython.int = 0,
 *         months: cython.int = 0,
*/
  __pyx_t_8 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "cytimes/pddt.py":4638
 *         self,
 *         years: cython.int = 0,
 *         quarters: cython.int = 0,             # <<<<<<<<<<<<<<
 *         months: cython.int = 0,
 *         weeks: cython.int = 0,
*/
  __pyx_t_11 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);

  /* "cytimes/pddt.py":4639
 *         years: cython.int = 0,
 *         quarters: cython.int = 0,
 *         months: cython.int = 0,             # <<<<<<<<<<<<<<
 *         weeks: cython.int = 0,
 *         days: cython.int = 0,
*/
  __pyx_t_12 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);

  /* "cytimes/pddt.py":4640
 *         quarters: cython.int = 0,
 *         months: cython.int = 0,
 *         weeks: cython.int = 0,             # <<<<<<<<<<<<<<
 *         days: cython.int = 0,
 *         hours: cython.int = 0,
*/
  __pyx_t_5 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "cytimes/pddt.py":4641
 *         months: cython.int = 0,
 *         weeks: cython.int = 0,
 *         days: cython.int = 0,             # <<<<<<<<<<<<<<
 *         hours: cython.int = 0,
 *         minutes: cython.int = 0,
*/
  __pyx_t_10 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);

  /* "cytimes/pddt.py":4642
 *         weeks: cython.int = 0,
 *         days: cython.int = 0,
 *         hours: cython.int = 0,             # <<<<<<<<<<<<<<
 *         minutes: cython.int = 0,
 *         seconds: cython.int = 0,
*/
  __pyx_t_9 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "cytimes/pddt.py":4643
 *         days: cython.int = 0,
 *         hours: cython.int = 0,
 *         minutes: cython.int = 0,             # <<<<<<<<<<<<<<
 *         seconds: cython.int = 0,
 *         milliseconds: cython.int = 0,
*/
  __pyx_t_13 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);

  /* "cytimes/pddt.py":4644
 *         hours: cython.int = 0,
 *         minutes: cython.int = 0,
 *         seconds: cython.int = 0,             # <<<<<<<<<<<<<<
 *         milliseconds: cython.int = 0,
 *         microseconds: cython.int = 0,
*/
  __pyx_t_15 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);

  /* "cytimes/pddt.py":4645
 *         minutes: cython.int = 0,
 *         seconds: cython.int = 0,
 *         milliseconds: cython.int = 0,             # <<<<<<<<<<<<<<
 *         microseconds: cython.int = 0,
 *         nanoseconds: cython.int = 0,
*/
  __pyx_t_14 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);

  /* "cytimes/pddt.py":4646
 *         seconds: cython.int = 0,
 *         milliseconds: cython.int = 0,
 *         microseconds: cython.int = 0,             # <<<<<<<<<<<<<<
 *         nanoseconds: cython.int = 0,
 *     ) -> Self:
*/
  __pyx_t_17 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);

  /* "cytimes/pddt.py":4647
 *         milliseconds: cython.int = 0,
 *         microseconds: cython.int = 0,
 *         nanoseconds: cython.int = 0,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Add relative delta to the datetime index `<'Pddt'>`.
*/
  __pyx_t_18 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 4647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);

  /* "cytimes/pddt.py":4635
 * 
 *     # Arithmetic ---------------------------------------------------------------------------
 *     def add(             # <<<<<<<<<<<<<<
 *         self,
 *         years: cython.int = 0,
*/
  __pyx_t_19 = PyTuple_Pack(11, __pyx_t_8, __pyx_t_11, __pyx_t_12, __pyx_t_5, __pyx_t_10, __pyx_t_9, __pyx_t_13, __pyx_t_15, __pyx_t_14, __pyx_t_17, __pyx_t_18); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 4635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __pyx_t_18 = __Pyx_PyDict_NewPresized(12); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 4635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (PyDict_SetItem(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_years, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4635, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_quarters, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4635, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_months, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4635, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_weeks, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4635, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_days, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4635, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4635, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4635, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_seconds, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4635, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_milliseconds, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4635, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_microseconds, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4635, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_nanoseconds, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4635, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 4635, __pyx_L1_error)
  __pyx_t_17 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_249add, 0, __pyx_mstate_global->__pyx_n_u_Pddt_add, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[126])); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_17);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_17, __pyx_t_19);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_17, __pyx_t_18);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_add, __pyx_t_17) < (0)) __PYX_ERR(0, 4635, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

  /* "cytimes/pddt.py":4698
 *     def sub(
 *         self,
 *         years: cython.int = 0,             # <<<<<<<<<<<<<<
 *         quarters: cython.int = 0,
 *         months: cython.int = 0,
*/
  __pyx_t_17 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 4698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);

  /* "cytimes/pddt.py":4699
 *         self,
 *         years: cython.int = 0,
 *         quarters: cython.int = 0,             # <<<<<<<<<<<<<<
 *         months: cython.int = 0,
 *         weeks: cython.int = 0,
*/
  __pyx_t_18 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 4699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);

  /* "cytimes/pddt.py":4700
 *         years: cython.int = 0,
 *         quarters: cython.int = 0,
 *         months: cython.int = 0,             # <<<<<<<<<<<<<<
 *         weeks: cython.int = 0,
 *         days: cython.int = 0,
*/
  __pyx_t_19 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 4700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);

  /* "cytimes/pddt.py":4701
 *         quarters: cython.int = 0,
 *         months: cython.int = 0,
 *         weeks: cython.int = 0,             # <<<<<<<<<<<<<<
 *         days: cython.int = 0,
 *         hours: cython.int = 0,
*/
  __pyx_t_14 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);

  /* "cytimes/pddt.py":4702
 *         months: cython.int = 0,
 *         weeks: cython.int = 0,
 *         days: cython.int = 0,             # <<<<<<<<<<<<<<
 *         hours: cython.int = 0,
 *         minutes: cython.int = 0,
*/
  __pyx_t_15 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);

  /* "cytimes/pddt.py":4703
 *         weeks: cython.int = 0,
 *         days: cython.int = 0,
 *         hours: cython.int = 0,             # <<<<<<<<<<<<<<
 *         minutes: cython.int = 0,
 *         seconds: cython.int = 0,
*/
  __pyx_t_13 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);

  /* "cytimes/pddt.py":4704
 *         days: cython.int = 0,
 *         hours: cython.int = 0,
 *         minutes: cython.int = 0,             # <<<<<<<<<<<<<<
 *         seconds: cython.int = 0,
 *         milliseconds: cython.int = 0,
*/
  __pyx_t_9 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "cytimes/pddt.py":4705
 *         hours: cython.int = 0,
 *         minutes: cython.int = 0,
 *         seconds: cython.int = 0,             # <<<<<<<<<<<<<<
 *         milliseconds: cython.int = 0,
 *         microseconds: cython.int = 0,
*/
  __pyx_t_10 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);

  /* "cytimes/pddt.py":4706
 *         minutes: cython.int = 0,
 *         seconds: cython.int = 0,
 *         milliseconds: cython.int = 0,             # <<<<<<<<<<<<<<
 *         microseconds: cython.int = 0,
 *         nanoseconds: cython.int = 0,
*/
  __pyx_t_5 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "cytimes/pddt.py":4707
 *         seconds: cython.int = 0,
 *         milliseconds: cython.int = 0,
 *         microseconds: cython.int = 0,             # <<<<<<<<<<<<<<
 *         nanoseconds: cython.int = 0,
 *     ) -> Self:
*/
  __pyx_t_12 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);

  /* "cytimes/pddt.py":4708
 *         milliseconds: cython.int = 0,
 *         microseconds: cython.int = 0,
 *         nanoseconds: cython.int = 0,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Subtract relative delta from the datetime index `<'Pddt'>`.
*/
  __pyx_t_11 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);

  /* "cytimes/pddt.py":4696
 *         return self._new(out, tz=self.tzinfo, name=self.name)
 * 
 *     def sub(             # <<<<<<<<<<<<<<
 *         self,
 *         years: cython.int = 0,
*/
  __pyx_t_8 = PyTuple_Pack(11, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_14, __pyx_t_15, __pyx_t_13, __pyx_t_9, __pyx_t_10, __pyx_t_5, __pyx_t_12, __pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_years, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4696, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_quarters, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4696, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_months, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4696, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_weeks, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4696, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_days, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4696, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4696, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4696, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_seconds, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4696, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_milliseconds, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4696, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_microseconds, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4696, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_nanoseconds, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 4696, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 4696, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_251sub, 0, __pyx_mstate_global->__pyx_n_u_Pddt_sub, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[127])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_t_8);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_sub, __pyx_t_12) < (0)) __PYX_ERR(0, 4696, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "cytimes/pddt.py":4761
 *         data: object,
 *         unit: str,
 *         absolute: cython.bint = False,             # <<<<<<<<<<<<<<
 *         inclusive: str = "one",
 *     ) -> np.ndarray[np.int64]:
*/
  __pyx_t_12 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);

  /* "cytimes/pddt.py":4757
 *         return self._new(out, tz=self.tzinfo, name=self.name)
 * 
 *     def diff(             # <<<<<<<<<<<<<<
 *         self,
 *         data: object,
*/
  __pyx_t_11 = PyTuple_Pack(2, __pyx_t_12, ((PyObject*)__pyx_mstate_global->__pyx_n_u_one)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_data, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 4757, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 4757, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_absolute, __pyx_mstate_global->__pyx_kp_u_cython_bint) < (0)) __PYX_ERR(0, 4757, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_inclusive, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 4757, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_np_ndarray_np_int64) < (0)) __PYX_ERR(0, 4757, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_253diff, 0, __pyx_mstate_global->__pyx_n_u_Pddt_diff, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[128])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_t_11);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_diff, __pyx_t_8) < (0)) __PYX_ERR(0, 4757, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":4902
 * 
 *     # Comparison ---------------------------------------------------------------------------
 *     def is_past(self) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether datetimes are in the past `<'Index[bool]'>`.
 * 
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_bool) < (0)) __PYX_ERR(0, 4902, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_255is_past, 0, __pyx_mstate_global->__pyx_n_u_Pddt_is_past, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[129])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_is_past, __pyx_t_12) < (0)) __PYX_ERR(0, 4902, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "cytimes/pddt.py":4925
 *         return pd.Index(utils.arr_lt(self.values, tic), name="is_past")
 * 
 *     def is_future(self) -> pd.Index[bool]:             # <<<<<<<<<<<<<<
 *         """Element-wise check whether datetimes are in the future `<'Index[bool]'>`.
 * 
*/
  __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_pd_Index_bool) < (0)) __PYX_ERR(0, 4925, __pyx_L1_error)
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pddt_4Pddt_257is_future, 0, __pyx_mstate_global->__pyx_n_u_Pddt_is_future, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pddt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[130])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_is_future, __pyx_t_8) < (0)) __PYX_ERR(0, 4925, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/pddt.py":225
 * 
 * # Pddt (Pandas Datetime) ----------------------------------------------------------------------
 * class Pddt(DatetimeIndex):             # <<<<<<<<<<<<<<
 *     """A drop-in replacement for Pandas `<'DatetimeIndex'>` with extended parsing,
 *     timezone normalization, resolution control, and delta-aware arithmetic.
*/
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Pddt, __pyx_t_2, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Pddt, __pyx_t_8) < (0)) __PYX_ERR(0, 225, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pddt.py":1
 * # cython: language_level=3             # <<<<<<<<<<<<<<
 * # cython: wraparound=False
 * # cython: boundscheck=False
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(33); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_date_range_line_541, __pyx_mstate_global->__pyx_kp_u_Construct_a_fixed_frequency_inde) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_today_line_762, __pyx_mstate_global->__pyx_kp_u_Construct_an_index_from_the_curr) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_utcfromtimestamp_line_1406, __pyx_mstate_global->__pyx_kp_u_Construct_a_UTC_aware_index_from) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_timedf_line_1914, __pyx_mstate_global->__pyx_kp_u_Return_local_time_DataFrame_comp) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_utctimedf_line_1940, __pyx_mstate_global->__pyx_kp_u_Return_UTC_time_DataFrame_compat) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_replace_line_2071, __pyx_mstate_global->__pyx_kp_u_Replace_the_specified_datetime_f) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_to_curr_year_line_2156, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_to_prev_year_line_2240, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_to_next_year_line_2265, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified_3) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_to_year_line_2290, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified_4) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_to_curr_quarter_line_2385, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified_5) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_to_prev_quarter_line_2459, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified_6) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_to_next_quarter_line_2475, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified_7) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_to_quarter_line_2491, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified_8) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_to_curr_month_line_2577, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified_9) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_to_prev_month_line_2642, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified_10) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_to_next_month_line_2656, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified_11) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_to_month_line_2670, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified_12) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_to_curr_weekday_line_2770, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specific) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_to_prev_weekday_line_2787, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specific_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_to_next_weekday_line_2804, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specific_3) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_to_weekday_line_2821, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specific_4) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_to_day_line_2935, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_day_offset_Pd) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_snap_line_2988, __pyx_mstate_global->__pyx_kp_u_Snap_to_nearest_occurring_freque) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_to_datetime_line_3006, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_and_time_fields) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_to_date_line_3120, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_with_new_values) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_to_time_line_3181, __pyx_mstate_global->__pyx_kp_u_Adjust_the_time_fields_with_new) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_isocalendar_line_4013, __pyx_mstate_global->__pyx_kp_u_Return_the_ISO_calendar_DateFram) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_day_of_month_line_4163, __pyx_mstate_global->__pyx_kp_u_Return_the_number_of_days_since) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_weekday_name_line_4211, __pyx_mstate_global->__pyx_kp_u_Return_the_weekday_names_with_sp) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_tz_available_line_4281, __pyx_mstate_global->__pyx_kp_u_The_available_timezone_names_set) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_is_past_line_4902, __pyx_mstate_global->__pyx_kp_u_Element_wise_check_whether_datet) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pddt_is_future_line_4925, __pyx_mstate_global->__pyx_kp_u_Element_wise_check_whether_datet_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /*--- Wrapped vars code ---*/

  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_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_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  if (__pyx_m) {
    if (__pyx_mstate->__pyx_d && stringtab_initialized) {
      __Pyx_AddTraceback("init cytimes.pddt", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    #if !CYTHON_USE_MODULE_STATE
    Py_CLEAR(__pyx_m);
    #else
    Py_DECREF(__pyx_m);
    if (pystate_addmodule_run) {
      PyObject *tp, *value, *tb;
      PyErr_Fetch(&tp, &value, &tb);
      PyState_RemoveModule(&__pyx_moduledef);
      PyErr_Restore(tp, value, tb);
    }
    #endif
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init cytimes.pddt");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #else
  return __pyx_m;
  #endif
}
/* #### Code section: pystring_table ### */
/* #### Code section: cached_builtins ### */

static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) {
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_property); if (!__pyx_builtin_property) __PYX_ERR(0, 4043, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_super); if (!__pyx_builtin_super) __PYX_ERR(0, 2060, __pyx_L1_error)

  /* Cached unbound methods */
  __pyx_mstate->__pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_get.method_name = &__pyx_mstate->__pyx_n_u_get;
  __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items;
  __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
  __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values;
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cached_constants ### */

static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "cytimes/pddt.py":2986
 *         - The timezone is unaffected.
 *         """
 *         return self.to_time(0, 0, 0, 0, 0)             # <<<<<<<<<<<<<<
 * 
 *     def snap(self, freq: object) -> Self:
*/
  __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(5, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 2986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]);

  /* "cytimes/pddt.py":696
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def now(
 *         cls,
*/
  __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]);

  /* "cytimes/pddt.py":735
 *         return cls._new(arr, tz=tz, as_unit=as_unit, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def utcnow(
 *         cls,
*/
  __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]);

  /* "cytimes/pddt.py":792
 *         return cls.now(size, tz=None, as_unit=as_unit, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def combine(
 *         cls,
*/
  __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(5, Py_None, Py_None, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]);

  /* "cytimes/pddt.py":869
 *         return cls._new(arr, tz=tz, as_unit=as_unit, name=name)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromordinal(
 *         cls,
*/
  __pyx_mstate_global->__pyx_tuple[4] = PyTuple_Pack(4, Py_None, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[4])) __PYX_ERR(0, 869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[4]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[4]);

  /* "cytimes/pddt.py":1906
 *             errors.raise_argument_error(self.__class__, "strftime(fmt)", None, err)
 * 
 *     def isoformat(self, sep: str = "T") -> pd.Index[str]:             # <<<<<<<<<<<<<<
 *         """Return the date and time formatted according to ISO format `<'str'>`.
 * 
*/
  __pyx_mstate_global->__pyx_tuple[5] = PyTuple_Pack(1, ((PyObject*)__pyx_mstate_global->__pyx_n_u_T)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[5])) __PYX_ERR(0, 1906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[5]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[5]);

  /* "cytimes/pddt.py":2770
 *         return self._to_curr_weekday(6)
 * 
 *     def to_curr_weekday(self, weekday: int | str | None = None) -> Self:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specific weekday of the current week `<'Pddt'>`.
 * 
*/
  __pyx_mstate_global->__pyx_tuple[6] = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[6])) __PYX_ERR(0, 2770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[6]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[6]);

  /* "cytimes/pddt.py":4312
 *         return None if my_tz is None else my_tz.tzname(utils.dt_now())
 * 
 *     def astimezone(             # <<<<<<<<<<<<<<
 *         self,
 *         tz: datetime.tzinfo | str | None = None,
*/
  __pyx_mstate_global->__pyx_tuple[7] = PyTuple_Pack(3, Py_None, ((PyObject*)__pyx_mstate_global->__pyx_n_u_raise), ((PyObject*)__pyx_mstate_global->__pyx_n_u_raise)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[7])) __PYX_ERR(0, 4312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[7]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[7]);

  /* "cytimes/pddt.py":4364
 *         return pt.tz_convert(to_tz)
 * 
 *     def tz_localize(             # <<<<<<<<<<<<<<
 *         self,
 *         tz: datetime.tzinfo | str | None,
*/
  __pyx_mstate_global->__pyx_tuple[8] = PyTuple_Pack(2, ((PyObject*)__pyx_mstate_global->__pyx_n_u_raise), ((PyObject*)__pyx_mstate_global->__pyx_n_u_raise)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[8])) __PYX_ERR(0, 4364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[8]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[8]);
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_tuple;
    for (Py_ssize_t i=0; i<9; ++i) {
      #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
      #else
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
      #endif
    }
  }
  #endif
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}
/* #### Code section: init_constants ### */

static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) {
  CYTHON_UNUSED_VAR(__pyx_mstate);
  {
    const struct { const unsigned int length: 12; } index[] = {{1},{3},{9},{15},{20},{19},{14},{9},{3},{4},{3},{2},{4},{795},{12},{62},{2207},{276},{631},{635},{619},{770},{941},{497},{481},{549},{946},{926},{932},{883},{888},{868},{882},{493},{894},{1579},{50},{93},{56},{58},{47},{65},{16},{15},{46},{37},{23},{80},{59},{42},{41},{46},{41},{47},{26},{14},{40},{65},{65},{70},{65},{61},{68},{44},{61},{68},{67},{72},{67},{63},{46},{63},{77},{83},{80},{22},{1297},{2533},{864},{61},{8},{119},{174},{130},{28},{39},{56},{54},{60},{54},{57},{157},{159},{54},{42},{44},{55},{53},{81},{54},{26},{38},{79},{29},{88},{52},{54},{29},{67},{13},{15},{9},{68},{83},{84},{84},{8},{4},{179},{77},{26},{29},{26},{24},{28},{24},{21},{23},{30},{32},{32},{29},{24},{28},{23},{25},{30},{32},{32},{29},{30},{32},{32},{29},{27},{24},{27},{24},{21},{29},{33},{26},{29},{2849},{323},{328},{300},{127},{540},{38},{443},{99},{107},{99},{53},{61},{53},{47},{119},{51},{16},{40},{29},{49},{55},{79},{31},{33},{31},{53},{35},{35},{22},{30},{30},{48},{49},{52},{49},{8},{57},{53},{64},{59},{53},{55},{63},{58},{50},{8},{8},{1},{5},{1},{2},{2},{1},{1},{2},{1},{0},{1},{1},{1},{2},{20},{8},{18},{31},{35},{31},{35},{31},{35},{32},{36},{32},{36},{29},{33},{26},{14},{11},{10},{18},{18},{11},{10},{15},{17},{22},{26},{42},{26},{15},{28},{34},{15},{20},{15},{35},{34},{10},{11},{34},{7},{8},{7},{13},{14},{17},{18},{18},{20},{18},{19},{22},{20},{20},{17},{20},{17},{17},{14},{7},{8},{9},{16},{10},{20},{12},{9},{16},{8},{32},{51},{32},{51},{32},{51},{33},{52},{33},{52},{30},{49},{27},{51},{10},{109},{12},{15},{18},{9},{53},{28},{16},{25},{25},{25},{20},{7},{39},{34},{13},{68},{69},{38},{36},{12},{14},{20},{18},{13},{30},{11},{8},{10},{15},{21},{8},{6},{37},{51},{53},{39},{35},{49},{51},{37},{10},{19},{21},{10},{9},{12},{13},{15},{20},{82},{26},{77},{50},{39},{34},{5},{14},{16},{15},{17},{40},{12},{13},{12},{42},{16},{53},{17},{51},{11},{30},{15},{14},{16},{20},{14},{17},{15},{9},{6},{11},{20},{18},{3},{3},{3},{7},{1},{9},{13},{13},{3},{3},{3},{8},{5},{20},{3},{3},{3},{1},{3},{3},{18},{3},{3},{3},{16},{17},{16},{21},{4},{12},{9},{16},{16},{21},{8},{12},{15},{9},{12},{10},{9},{15},{13},{8},{17},{19},{16},{18},{20},{17},{18},{20},{17},{9},{10},{13},{17},{19},{18},{20},{18},{21},{16},{16},{18},{8},{9},{11},{14},{16},{14},{15},{17},{13},{17},{13},{12},{15},{16},{11},{15},{12},{16},{14},{12},{15},{12},{17},{16},{16},{11},{10},{15},{15},{14},{8},{10},{12},{12},{10},{11},{9},{13},{13},{8},{9},{11},{14},{11},{18},{20},{20},{17},{12},{16},{11},{14},{16},{14},{15},{14},{13},{18},{20},{20},{17},{18},{20},{20},{17},{15},{16},{16},{14},{16},{12},{16},{15},{17},{15},{12},{17},{10},{19},{14},{14},{17},{15},{16},{14},{11},{21},{11},{14},{17},{12},{17},{9},{4},{22},{24},{20},{3},{4},{3},{6},{3},{1},{3},{3},{1},{3},{1},{1},{8},{3},{7},{9},{3},{5},{8},{4},{6},{2},{7},{7},{10},{6},{18},{20},{19},{7},{4},{4},{4},{3},{3},{9},{18},{3},{4},{7},{7},{4},{5},{7},{14},{12},{12},{13},{1},{4},{4},{5},{5},{5},{5},{10},{5},{8},{10},{3},{8},{12},{14},{11},{8},{4},{13},{15},{12},{13},{15},{12},{5},{7},{4},{7},{3},{3},{2},{4},{5},{3},{5},{5},{3},{3},{6},{1},{5},{3},{4},{4},{8},{14},{12},{13},{15},{13},{16},{11},{11},{13},{7},{2},{3},{8},{15},{3},{1},{6},{4},{5},{1},{8},{9},{5},{5},{13},{6},{9},{11},{9},{10},{12},{8},{12},{8},{7},{10},{11},{6},{10},{7},{3},{11},{9},{7},{10},{7},{5},{12},{6},{1},{8},{13},{11},{12},{11},{12},{3},{6},{7},{2},{10},{5},{10},{6},{15},{2},{3},{6},{8},{7},{7},{5},{7},{5},{4},{8},{10},{11},{7},{4},{7},{11},{11},{11},{10},{11},{9},{3},{2},{2},{5},{1},{3},{6},{6},{3},{7},{6},{3},{6},{16},{28},{5},{11},{9},{14},{12},{13},{2},{7},{3},{9},{11},{8},{2},{2},{6},{8},{7},{5},{7},{14},{12},{7},{8},{5},{7},{7},{6},{5},{3},{1},{6},{7},{4},{3},{12},{10},{13},{4},{6},{4},{5},{3},{8},{8},{3},{5},{7},{8},{3},{4},{6},{5},{9},{6},{7},{7},{6},{6},{6},{7},{7},{7},{6},{13},{15},{16},{15},{12},{7},{11},{6},{7},{9},{11},{9},{10},{9},{8},{13},{15},{15},{12},{13},{15},{15},{12},{10},{7},{11},{11},{9},{11},{7},{11},{10},{5},{12},{10},{7},{12},{5},{5},{14},{9},{9},{2},{6},{17},{2},{12},{10},{11},{9},{6},{6},{4},{8},{2},{3},{16},{6},{9},{9},{5},{1},{3},{5},{6},{12},{2},{4},{7},{12},{5},{3},{4},{9},{5},{8},{1511},{397},{31},{252},{384},{681},{173},{173},{32},{40},{68},{55},{120},{24},{17},{336},{119},{145},{486},{78},{596},{54},{54},{15},{404},{644},{53},{224},{145},{106},{315},{53},{352},{384},{113},{113},{378},{783},{537},{451},{500},{624},{151},{59},{141},{419},{282},{134},{289},{55},{263},{227},{487},{45},{45},{32},{248},{582},{555},{523},{263},{32},{32},{252},{274},{28},{28},{27},{27},{27},{28},{27},{23},{17},{35},{402},{25},{25},{48},{36},{44},{28},{16},{17},{75},{81},{120},{318},{153},{254},{28},{30},{29},{16},{17},{18},{510},{32},{32},{716},{119},{32},{25},{25},{51},{258},{53},{28},{30},{18},{28},{38},{28},{30},{36},{32},{18},{20},{18},{485},{177},{588},{75}};
    #if (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (15576 bytes) */
const char* const cstring = "BZh91AY&SY\2653\021\334\000\037\242\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\301`PD\300@@@@@@@U\000@\000`MI\367\233\315\333\355\355\350\215\335\305\316\352\271\3066\330\223k\355w\035:\r\000\211\350\r\354\364=z\016\373\315\362\372{\267\236\373n\2735\323\321L\357{\275\336\356\324\355;\307+F\2644\373\357;^kIQ_=\336vS\300C\025\350\016\355\346\275y*J\353\337w\236\266\373l\373\246\234\275\356\340\001#\231\236\265W\241\236\325y\275p\366\314\275\331\266\3545\317y\327\036\\\036\267d\231/]\334\317uw\200\336\213-\307B\233\273\265\350\351'\255b\312za\356\36533[\336\267]\367\200\000%\353:\320\000(\001\240\017\250(W\240\357J\364z\007A\326@\222\"\020\002a1\032\247\200\236\200h\032\010`\223\310\236\203D\304\331\r!\0312\232<\324\305<\320\246\311\221\014\2154\000\004\210\200A\010\010\232dL\251\3725?T\332\247\2117\251\211\017MG\223)\372\2325\017\0214z\215\036\247\2504\000\006\200\0004\000\000\222\004\204I&\233I\241\240\320h4\000\032=Ljl\221\211\3526\210\375F\233\320ba&Jz\233\324\236&S&\236\246\206\324\332\231\3525\0324\022i\"\"\"\230\247\232i\222\236F\243\324\332'\246\232\206\206\236\211\264\200\364M<\246CL\230\021\240\304\0314\321\246\200\006\217H\006\200\010\224\202d\320\247\204\311\241\224\364\322\233M)\352\237\220\312\236\247\350)\275S\30114e4\365=\030\247\251\243\324\032h\000\006 \017(\032h\000\004I\010@\020\3214Si\223\024\332b\223\304\236\3246\251\372MM4\332\233\3256\220z\203F\2145\000z\215\000\000\320\r\000\000\032_cs@\017\203\345g\242I\263Z\255\t\013:\003\206]\256\266^1x\240\245\324'-\003\t\ndM\\\203\341\351\371\332\326\366UwD4<\220\245}\226\277K\276\262\3528\016\216_\326\357nd\314\007|\337\236\321m\252%vH\357bW|\276\357\315m\330\247u\261\237\036M\272M(\310\345\321-\226T\243\210{X\251\026\321d%S\302b\033\t\252\2138\354,\362\220\323\242\2332\022`\2300\225\322B\305\023-*T\205\263\356w\340\262o\346\373\007\311\374\377\325\366\035|o\217\220\371\275z\374\205UU\266\333o\371\225\313\316s(\316>\037\270\377\016u\314\023\264M\035\"\\\3013\370\376\201I\256;""J\226\013C\305<M\253b\355\246\303c/}\267\217\277]\377\226\r\243\251\037\276:\360\337\036\342\033&\215\376\367+\345\217\223\305\340\317\203\206%\333\356\374\017\376\220.0\367\320/\200H\243\272L\214\351\234\216\002\356\312\307\207Fq\2568-D7\316f\316t\021\003RpqR\3200^\207%i\203|\026\265\334\020\033\246\010.Qh\202\260\322;@^\221\241``\026J\352\024\240.B\244\256\002\305\221}\377\362}\271\377^\005\026\204\023 \241 (\275\270\345\003(\031C*\273\215\312\024f9\207\373\032\003\240\2329\016\206\212\033\361p\377\341\000YA\200\242\302UX\003\030\260X\272\375BAJ0\222\301\205\205\213\324\034\253\230\214\030\3102*\022(\221\214\2102\003\030\"\n1\030\260D\026\"\210\210\013\021\210#\010,\2022,\222*\021\301@~\270`\230\030.\013\200\030#\231C\030!\020C\034QB\362\360\276\361\275\275r)\342C*\017\324\362\304@\351\200\247\241\031'\271\375_S\347\245b\206\300\364\003\202\357\350\236\314\374\256M\306D\005F\003\026F$A\202\220X\261F0E\366\t\333\345\267\272\235\207\244\367\027\372\355W\373WW\027V\256Z\271j\272\265\265\273\234\335\307\210\252\203\201\246\331\377\007\364W0\020\270?\253+\035\334w\217\025\2458\376\302\320m4:\233\246\316\031 \004!\024\213\")\306\351\350\200K\006\354\266\330;\360I#\2707\033\223\342Tkx\3557\250\235/K}\350w:P\356#\334\212\250\211\024Y\020Y\030\003\020RAa\004HE\220FE\210\300D\001\214\001\005d\026,\024QH\244\021\221\214\212\"A\020\220B0\024\200\300X\020RH\300 B,C\000r\000\206\204\032F\264d\370M\201r \217\214]\026\355&\2060\341\"\000d\003L!!~\237\034\r\202\206>\003s[\233\n\240#\240gf\311B\360f\324\332\"\3606\216\303\362\327 \017\022m\314\002\010BH\244`\261 \204A\024U\006\020|n3'\302\017h\031\3567\204\252T)\201\010\000\302\003\"-\021\006\240\004P\004I\004`\0100D\005\214Q\016\354A\330\031\232\t\032JiX\020V\337TL\263$L\322$S:`i\241\252\347\002cL\004j(\004#\006\004H\322[\2414\010\231\3055\016\016\030\023\024\033e\265Q\223\022WP\373\321XK\214(\030,\340\266-\213\226j\314bh\273o\020\235]\234AaU\026\224V\256\224\204\223\222\021\\L\005\021uR\366\206\321K@b\362\353Z\205\313\241P\263 ""\242f.\nJ\215\263\025X\005B\210\274Q\244\221\275\361\314\3608 \034a\316/\036\007\020!\260\210<P6\273x\216\360\343\371\233Sy\275\256@\364\016\335\323x\0054!D* \221J\252\205\003\004\255\352\233\320w\217@\360S\241\016\016\243\361\315\353\231\000s\021\003N\210\347\317s\034\352\222$\316\031\363\201\332CM\311s\265?\0328\350\327D\203\225p9\001\256S\022\" \211\024\220>]\340\3576\242m\007\235x\007:\232\237\254\200\235C\300\016\021\036!\026\201\234\322\352\202\334\032\020\2549\251\251\254\254*\"\006\245\003S\250\324jCK\244\310\246/\320\317\235\016P\330e\316gh\032&\206\263]\202\326\025\232\252\250\304\3264X\020\034\206\243S\251\324\337\210~\r\216\315\"\272D\344\014\3034\334<G\236\300\304\272Z\345\310\360\340\243\301\340\034;\001\316c\354p\340\240<7\031;S\206\360e\027\205\220lBD\023Q\273p\273\207.\334\014J!\361\"\352\016\320j\206}\374\267\006ps\232p\032\034\216w\020\247\315\202\340#\214\007\035\305\344\2049\352\nkL\rf\267)\257\020\3518\027\0024P\032\337\323\035\207\272\334\000\334\334\364\035\306\205''\034\t\032p\020\211\262\005\033(\002\277)8&f`Ns\266<\3013M\177\r\315\032\250\035\357\270\003\2615O\362p\222\335\035\306\302\337X\033\006\260\341w\352C\320b+\202\004!\031\301\244-\277\235\305\017 \313l\177\\\241\021\276q\245H[\321YDDp\220\010\300\021\214\006?J\016\244\202A/]\r\261-\343x\353\203\037\211\002\201\035\375\322\222E$\310\375\320\367\275\177\217\356\341\021\276\227\366yO\267\233\037\265\210\372$\271YC\222'\321\354\335\236\364,p'\317\216\225\205lh\305#\275\240\224\031\342\330\253\215\255\233\330-SN\223\024\010\325\311H\232B\005N.bF\250\027e\332\".\346X1\245\023*P3\005\310\n\327%\037S;f\367\204'v\330\353 g\313\356\327\311\331\026\200\330\023\017\241~\324o\332\331GL_\210\336\211\277CC\253\240\317h\034\003\212b\355\357FP\257\227\3352\201\024<\246\0372g\005o4\245\032?gU4\355\337\373\236\264\243>\230\025\236\336\027\375\306\343\347\377Z[\037\347\334\306\376\263\373\3058\345\244\027\0050\245\2551\004\246\002#]\023<\327+b\332\246\363\0221m)P+\317\352\017\346V\014Yh\346\203\254""\014\236\272\037\235\001~\025`Ix\350\000\343\330\267\350\027\333\262\352\032\306^\315n\024\234q\220\267\222\322j,\004\253\227\261\331\365\034e\212\001\227\246\307\0017L\364\365\306\325==\027\022\034\201\230\230\223`\010`\322\006\t\202h\030\246\212\222\367\310v\361\342\227i\365\354\006B\036,\260\204\\\003Q\207\3143\0041\331`\222\251)\027z\250n_>u\331K\365<`\024\270\332\350\346\235\363\274\343T\354\366\350\006\332\301\263\243\265\273\261\241\263pl\032EK\335\320*\021\"(\352\243\375\323\323\367l\253>\231\200G\343h\021\007h\n\3564\254\253\243\276kR\227\346\313\020\247\214W\222\204\206\226\017\202\262\022\321\232\352\217\325H@Hv\261\006\342\204W[\304\227\264\n\003\331\344\240\351\303m\267\323lT\371\354\364\034`\330\024+Ux\"\330\241\373\276\027\036\261\233\n\244\235\303\351\277\001pY\256\307\250\320\013\270U!#\265\356Tq\274\025;\020@\350\3746\215\256\010\376|~]\353\317D\021\342\204\026\0109\000\322\021\035^9\010\025K\344(/\001\034F\206\225[mv 0\002\363\r\270J\224\273T\355\t\004\336\"\352\320\n\262\210F*Va\233\0168v\315\327\305\357\237\347\364\236x\330j\253+\261M\241p\201\0025\022A\221\225\264\034\212z\020\362\346\014\354Ss\007\035\013\025\300\267Zmr\016\216\220M\343\325\315\317\\wT4\312r\352\261\307\307\360\231+\320cM\334f\312\2771\2032 \330y\316\210z\274\261$Ck\267\2474\016\333\255V\n\220x\226\260\266]\331;\352x\363\177\r\262p\275\234\361\0211\306\335;\025\317\201^\252@\375\225\r@\242\010M9%\3415\346\232\311\300x\371'a3\271\336;\267\3326\227\215\204\2737v\332]\2725t\332Wl+\255\243#(\316\314I\246\204\272\242\025\334\235\333\341$p\267\273\261x\032:T\243\026|n\033\204\203k\230\202\300\261EH\222+A\227\025\221U\014\026(\004\t\263oh|\260\024\326\373\363\251;m\331\357W\354\276R\354Q%\033\001\321v\322\315\223\205\n\366P\271!\266\331\003\"\211\033\007\002\252ed\032\367A\372Yy\013%A\201\210Y*)\316\301\340\303\217\213}\024ATA\343\335\2050\250\034\r@\333\224\312,\312\257\355q\322\225S\377\037Z\247\r\370n\245\203\020QYF\335\222\217.\356\201\200\241\340z\367\222\350\351iL\300\324\312+J""\230\016\030\003\224W\004\204\020\314/K\221\341\275Ue\251\225)\253\226\367\031\007)}-\330\364\301\321\274\226+pd\304\265\300|\3410\360=\303\310\261\307\2252 \355\212\343\306|\254\255\357x\005J\0304z8U:\355\t\007\227\274\200Y\n&S0\333c\204A,|\255\312R\010\256c0\372a:\003\373J\313\342\305]W\\\222\200\245\000\247<g\213 \257a:\325\352\214\225\311\272\347|\202\221N\216\372w\235\215|>\026\260B\021\203\363'q\242=\220\004}(A\273\367\00303\263S\270\275\303b\375-\323!\227n; \2214\223o\267H\362\324v\002\261\202\\o((&\232+\t\210=\\t\276\327\245\341d\200\337\006\2365D\225B\340\267\200\2014\321W\265\362\004\031\200\245\201\221\211\020\313uf\247\035\001C\224\n\234\035u,8\234k\237\004\360\033\256q\261\r\337U\232r6:\247\375\221\335\223\324\210\361\231\3058(E\036r\237`\003\030\3017f\251u`\253\232ZU\213\330\273\330\265\t\213\227\23309C\244\327\327\357UP\256\376.T\241ah\002^o\017o\037F|\0228K\306\276t544C8\332\322y\364\2513@;\343\255\026\373iO\000\252L\310*~\373e \353\237\206\220yBk\205\236\341>\207y\270\317*A1\364Z\222i\270Sfr\016\371\016\313c\270:\035\361\307\200\362[\224w\326\216T::\2656<\350\024)\004tS\305\nJ\335z<\001\036\273*\365\356U\244\r\272\037$\023\005:\013\324\227\"\\\213\276.g\356\034\2571\327\027W\271\347\367NqzQL\250Rra\036T\033\"\301Bhs\026H)\006:a\026Sh\243\031k8\235\307\013Ps\233/0\327\001\035\233\242\034\030\010D\2078\354\241\310V\\D\303\2039\300\274\346\303Zt;K\305\344\335}p\362\003\363C\3043\366\226\322zT:,\036\216\253od\253]X+\330X\325\017q$\036\247\366}\251\3524Y\276\325\365\300+b\037}\376O\270\3374\002\026\303\346\350T9\201\346\343\372N\220.\207p\206\3206\355@\332\016\323\250\026\321\304\203\221\003 \016\tUq1\270\312\001@\241\326DB\251\263\317\370\362\301\22304\031\274\203\331\020A\2264d\007\026\371\023\020/VQ\262\375\301\366\272Cw#\325>\273:\216\243\250\350\023\250\352N\243\256\340\241\250\226%P\252\252\325)\256\265D\252\n\240Q\251@T\304R\333F.\262\344\340\007\333\303\2716\333\035\274\263#\272\247\267.\354(\317\236Q\242\375\251\"\315=N'\021\221\244\212\016\036Y""\275\212z\230\344rg\033\021.\201\3715\tK\014\354\300\003\261\262\336\237\002\356\207b\335\000\350\021\314=\257\357\033P\373\350i\350\003\335\370\304\302\344\"\215HR\212\354\r\340\344\223\250\3331\371\207S\350N\257\272\367h\314A\033*\332\r\272\321\007RM\"\221^L\010{kC\304\362&e\003\3152\372\375B\315\205a\016\020&\010M\332\010y\311)\001\024@yo\016\362\035\3174;I\335\214\017c\376j\2564\352\240)\033\372(,\212\301\316\tr\t\334;\227\266\316\275\304t*\0379\201_+\233>F\210>b\020\245\244\034E\001\001$&C\022E\242bVC\276\311M^\214\306I\215\2036\302D\010K\3204E\274F\344_\023\355\036\327\304\207\225\373E\004\200\033\306\024\203\t\205APA\273\355\017\220\266a^\357`\270G\035\211\302'J\315$b\356\244&FN\003\014\006\240B\262\010\367K\277R\022h\304\370t\325\242\302\342\036\320!K@\022\232\200M\010=\227\257\350\3208\374G\3232^\230u\224\232W\t\304\320\232~\355\025\010<(NR\357\027.\261\300\220\336\351l^\026K\267y^/HS\025\316\316\245[~\323z\267\365\215\235y\206fSO\326\016\240m\2040\207`o\300\035\007\314\320\312\276\202{\227\335\337r\332\024\024_\330D\236\032(\320\232x/\202\234L.F\262]*Pi\004\004j\346\325\005\360\310\372bw\370\376KO\017\227\213\344\226\217\354fww\323\323\3708\343\244uy\313\337;N\377~ZZ\276_\335\346\036w\247j\375\036|\267\216\362z\222k\013X\301\351\375\210\365`X\003\000\007>%L\263\260\301\252\004\035,\325\306\016\226\"\304*U\333pXj\233{\231\002)\004\340\263<\264\352\014\010\371\220\247\026|vM}\263&\241\264\360\371{\225\234Ya\336<B\035A\020\201\024\022\253f\024\304\025\200\331\356J6t\371\350\334\321~\364\377\003x\032\262[\211\265*\205M\344\"\201IRV#-\0025\311\322sX\216\326\302.O\025\000\337\007\244\323\243t\243\211N\273vt\345\240)\363\005\310\005\017\022\304xP&d\247:\234\352}\363R\370gi\240\023\034'\3576\220\265v\221\343tiqv\227\207u\250\204\215)\021L\353\314\316~\367\316%\305\335a\330\036\270\320\241A\237\225\344\365\2304e\005\370vOi\020\313+l\362\301mQ\027\035\242s3w%4A\205\246\264A@n\340.11\241\364\347\375Nq.\321\304DZw\370L<\333\010\362W\036\326\323Xt6\336\343Le\306\265""\311\256\247{\277\234\252\214\r'\275d\354}\255\263L\343\217\002(\253\2204\311\3251\343Q;\232\256\031\352K\r\224\n\014\250]\264)\366\314\214\241\215*n=-\216\035\320(\200I\307hR$`)\300|\026\235\350\331\324$v\256\216\226\244+ \207\r\333D\331t\\(Y\232\3307\003}*>\344\315\353\342l~\036\252\275\356Am\003\350\245\372\351[\004<\363\302w\321\214\024\361\300\370;\017BX\202J\010\244\262\311\370,\003\177\276\3500\005\353-\217Z\rF\364^\353;\311\0101\0103\r!\214\325\331\030\373\245\002\005\301\305\\C\203\321\201g\344\367\265E\2201\345\305J\302=@\253\004f\nLP\222g(;-b\034b\227\275#H\3123\244\034_1\347nT\352\232y\200\3218|j\026\030\235\214\354C\024\342\310Bm\206\006\250\311\331\221\006F\257w\210\027\324\265\365\315n;\225z\204^)-'1\312\314\021uU*t\365Px\337\220d\353/\313\026\270e\003\030\350\346Np\366^H\036\374#\371%\373\305\316\030\273&\221\250i\254\343Q8\373\374\r\243\300\321\026\372\t\343\nh\255y\034\367E\2203\203\250_\222\371\"?\005\375=\272a\2663\313-\341\337h\356\355\037\226\211\324x\255\004\361}\236\203l\357\006\2603\344\375\\F1\337!dO?.\276\307-\263V\264\236\302\330\024/@\217\311\004\371\177\013\372$S\013j\027:\377;\345K}\377']\253\363m\2236%\312\245$\"\332\365\303!\020@x3\256\374\006\3420!\021@\217\000%\203\370O\005\367t\222\373\342\330\203\016\014\262\034\277\330\332\223\013szH\226\010\300\004\211\243\010\207\001K\221F\361bT\002\2344+\224\240\304\260\355EP\304Xl\201\321&\215\360\024\256f\315\212l\303yti\200Q\312\2126V\225\266\370S\223\331\207Pr\035|\003G\027eV]\325\\\222\022\025\215W}0~\351~.\355\365\037,\313\014`\303\251\342Q\250\363)Q$LR\220\341\2258\021\363\256@\2609\207j\034\336\000\364|&\363\266v\364sf\320\016\234\335\014:$(\363\002\206\220\323\364'\030\240Pup3\021\212\000b\254\261\026\326\017\217wB\216\345\320WP\027C=-lu\234\301;(t\254\333\226\001r\\\347\227\030\222\006\254\262\022\302\364\221lpq\n\270G\234\023\235\003\2349\307\235\033\271\231\016\370r\216\"\333N\356S\021\255jk\325\315\251$\321\232Yr\205a-{\000\252\244\213\n\261X\300\264,\000d\204k\036\037)o\215\3437""\337OW\335\017|\217|8\321\212\300\332\317\257\t\362 \204\024B\r\"\234[\014%\304i5@\367\300\272\"\341p,\207]%m[4\014yH\350+\264\232\343\0310\311\206<o5\271\032\320\366\000\305\262\225T+5\213&h\222\311\332\3051\263-V\257\027+IW\2541kF\310^B,\240VDY\021eY\274\256H\205$\367FNm\032\r2RKF\301\216a\\CG2c\034\301\231\3714\033w!\270\273\271}\201\370\355\265\215\367\\\314\005\253\343\204\035\003\365\347\240R\203 A\004\305\324\367\354W\177(\345\\\1771\370i\243Z\326\370\r\"\203\323\236L\347\236@\375\247Q\223j\246vA[3h\000Y\000\226A\233\221|2y\003\034\352\032\302\3104\201\201\230\252\250\242\216hR%\\G\037x\353\032\2739\371\252\337\255\304\204\016\300,\010\254\002\202\254\n\262\363b\3169Ox\375JvF\232\270x@t\014,\300\325\016\260~\203\321\\\353\206\247\031<\300f\224\312\225\010'\206\3036\275)\213\242.\365\272\306n\365\373\2063\203*D\027\341\241DW\302\212\362\330\242'\204\303\003zz\374}0\313hS\270P\304:\214\362\376d\366\323;\302\263\345d\250\207'\037\347\335w?/\177\371\021?\037\341/x\374\304q\2448*`/\300l\254\264\203\332\317\210\242c\031\360\301\253:Yu&\336/\365\373\006h_B\220_lHR\n\274\214\247\236\034\242\327]\347,\026\003b\007\030\262\306\360\230\233{\010\030\320\310\301\221\245\254Y%\342S\202\306\205\356\2645J\300\306\251\2274D\340Df\3116\352\033\373\220H\202qHhy\353\323F\201\r\027\215GT\034\267\223 \031\272S\246\017\032\334\272\367G\237\226Y\263p3\312aATEMM\375_\r[\006\222\244\305U\354fB\323@>\200D\330:\0177\236\332\257*\323\303,\021[\222\215=\372\277\201\243(\366\324;\003\351u\202\\E\305\302{\207\336\024\226n>>1\250k 3#2\026%\321\030\250?\227\220\0341\340\237<\251\000\210\304p1\027\024\350)<6\236kme\207\233*\257\334\302\245l\371C\365*\005\177d/.\211i\301N\017\005\340\274\025\340\371~\023\303ag\335\347\016\334\237\025\220?_\264%\374\221D\272\211\356\366\321\320\2534y\302\310\370\365\355Gg\2737t\321\254\022\331\356\312bzI*)\350\356\r\313\271]\251\265M\311z\001z%\t\026\205\321\033X\305\363\217\022\261\303_C\312\036\030\006\347\2441\231}\367l\001p9\023i\260\354\361tz\234\276\244""\300\301\\\023\004\301\337\351'\254v\037!\016\223\3428\t\357\036\302\333\t\003\333\342\376-\373\003K\245\003Jit\237'\254>q\370`vD\326\014#\265\206\t\010\323\2121I\221X/$\266\211\017n!\350\337B\035-\000\270`fL<?\213\270p\265\320.\253\245\321]WVe\234\242\230q\006\306\337\277\225L\247\360\010\370\023}\205\211fd~c\023C\217\004\360'\301\245\202VW\202\211\247\227\333\032\232)\2071J\254\022\266e\234W\004O\3251\022+\203!\005\266\013\026\034\325\235\306TC\0009\372}\253CxW\230\027O\r'\304\201Wm\322\016c7\224\022\245\022HiWI\330Z\255\260$\204\220\t\000\2607\250\225b\\\273\355\363\3524\251\344\024\232\232\227\312)\005\331\016h\235\323\343\267\207\213\315\016\276(ZxP\014\232\006XZ\346[\014\323\031\310\316\003\372v\313+b\3129ckJ\370\277z\345\321\307\2069\365Q\256\264k8\330MG\356Dks\331\340x\240>\345\222h\263\367\261b\331\341j|\254\362k\366-\373X\033\033?\023\251\367\240\317\352\353\230\374\245u\235\236\2350\351\266\246\277\253\213P\257\366\251'CYq\304uy\264V_\022}\352G\024\237\244\364\360\366p\356\334\334\\\256\325\333\215q\2564\272q\337e\305wi\342\370\271x\361\036\272\275\257>\204a=\314\n\2575\374\373r\274\333H\304\347\254\363g^\026H(\0247{\006\207\\\0202>h#\343\020\272{\353g\334\305V\002\307\276Y\312\030\266\205\257m\032\246\210\221\206\226\276fyQ\013\313\3051\033\245\002\022\223F#\2244\260U\216\215Rkc\351\326\241\202\202\260^j2\254\010xv$ \204\350\311$\201\245\301\300\301\337\341\334\t$\256'q\375%\274\254\220X\020\3235\252\265Q`\256\261\002\311\367\031~\227\021\211\277\207k\037\177\032Ye\226Ye\257'\371r<^~U\356G\035\335\335\235\235\304{R\021\355\2576*\026=\243\037\274\037\\\337\267^`%\314\320\245)H\034\274!\010B\016\003A\320jddeC\006\204{\001\261\336\357\245\331\n\014<\013\345\360/\202\276\222\276\257\202/\232\202^\350e\013;/\303\253\226:\000\222\362YB\031\016Zn\013\216%\024Oo\251oF\267\331\302F\020\222\244e\010aJB\024\334\002sM\240\301\003\236!\371~3y\325F\267\024\362\364\323\363C\350\240q\016 q8\217\021x\274@,\250\354\0178\335\333\023\374\370\033\321\374d\217A$\214\317\256S""\303zt\327c\336\224\213\336)\254\321\254Mi\250\003[\257\274v\355\203\331\233.@\301m\014\014\003\003\014\017?\355\031\304\307\2518f,k\017y\210v\200\323\234\316\347\\\343\2353\207\177\354~\035\352w\214\371\034\202dC!\221C!\340\320c|R@\326&\237\307\331\316\215\201D6\230\244\030\217e\274\3324\0324:\003\225\253\377\205U\230U\237?\214+\267\032~``Fh28\211\"5\214oyA\014\3144V\0103\020 \024J*\307<\350\245\020\260\222Q\334\363z\r\234\236\\\377\222-\r\261\323\rW\272EF`\365.\361\246\251/\2318A\216\304\312o\210;\360S\201\261q\263\312\265X\271p\336\204\321B\210\261\244\314*\246\242\221\374F]\373\367\333|\311\007\306\300\241\025\333ies\262\"\275\310^\005\254\335\207X\024[\356\347\370\177j\377W|\207\350_m\257[Vff1LV\201\213VE\214q,l\373\037Z\325\263\261\234J\025\036\002\243\000\367d\243\355\343\364^\333\347vo\276\265A\365}\361T*\323\355\330\217\007G&fz\321\215\221\301\372\307W'\322\361\311\257\227\253\217\315/5\017\266F\240\343\032\345\031)Gl\r!0\257B\203{\260\2718\254)\025O\226,p\330\260~\270`\232#\222?\022\005\214@\022\333\014\013\307\352\010\210\210\210\210\217^\300w\302\247oEM\207\320\326\325\230\025\202\324O\275@]\22416\2326\331\335<I\312\031\234\246\326w\2312j\273j\2365\212\322\263357\325mkX\265\263\214c\030\315\216\271/\343\327c\262\344x\332%\317\211\332\026b\037N\202E<\344\370\007\245#M\254\245\322e6\252\n\335\355lw\362\277\233\317\002C\022-\341\252\004\304\304DD\\\357\305k[M\213Z\367\275\350\272\013\021\322\325^\013\005\253\310\253v\335\356\240\345\030\201\265\225\333P\nM\367\010$\227\342\366\343\177\013\240\240K\n` \347\225cj\336sI\245&fI\273\245)Z\272\225\255l\212M(\023\023\021\021\021\320\337m\365k\273\343\005\327]v+\357\245\367\276\027\352\237Lu\273\276Qm\375\243\255\004\250\017$\214W\354\230\225%{\263*\266\344\372\004\265\307\036\364\313^}DQWi\2253\003\215\220\022\241\023\372iC\304\n2s\334Vt\221\r+\035!\nHp9b\033]\201\247\261\022\213\210\014% \203\344\"\003\310|\243\302\314\202\324=\270\017\330\200\356\372<K/\303\020\250\021\027\354\365\036$\226\201\341\327K\335\357""\320\216\273\027f\220Y6\204\020\245\241\rKQ$a\004FI8yGGA}/\033F\007\326\212;W\306\215\275\222\217b\000\330%\340X\232\325\200\321\005\221\002u\tRK\270\202\213\330v=\354\254\003\223\234\330^\332\000~\030E\007Z\240iq\243\343\201HJi\031\000\222F0\312'\"\204\324\211(\211\002\375\240dF\nyP\317b\025\322\"{\374\303n\013\021\0107\235\374bAC\273\224\017N.\335\215'`(\252\027\304E\214\036\240\252Y\020<\320*2.\340\336\250\034\tg\313\251e\241I#L\242J\226r\327\302\017H\2655\222\030\211\007x:wc\345\260\352\215\304H\t1c\335\217\0027\210o\200\022H%a\036`\004\244\252y\323\\*\213\353k\372\251)\242\205\034\332j5\366\264>\014\333E\342@>R\207\344\246M\245\261d0\241AqR\211\217UZ\014\316@\272\205\r\304#\024\204Xz\230)\352\254\270a\267QC\010\203\361\243\211\010\021\"\324&\340.\251aK\261\026\021D\211\031\000\321\\\310\201\221\237\233u\216X\366\304\354\231\2537(\006\201\r\322j\225\315C\337\260\211\215C:\201\007 QI\004\002s\003H\021\212\322\304#\000'r\221(\001\200C\t\200\017/\213\223\305\325\334\016\024(\240\360\210R\nQ9\335\204\203d\370\024-\001\2255Xt*\032\262@\272\006\252\304J0\342\367\2321K2\202A\205E(\305-$\267\026\232\2260L\305\206\2345\245\206\233X\"\314ML\\QR\213\254\251\\\250V\035\221#!\335\332Y\r\274\204h\r`\353\333\210nD\021\327a\013\025\001\252\350\306\024\221K\037\030w\207\304\004S\037\254c$\202c\360s\275\312\212\236\312!n\220'\302\003u\371\311k\204T\335\264\345w;\277\027\217\014\306a\2018\235\327\275\\\246i\0013\004\026d\201T\246\027!{yc.v\2765\215x\002$\t@G\345\0331\353z'e\242w\331\315\2409\260\242\035\371\251D\230\n\270\263URUk\\\200\032\351\220\215cFp\334\025g\310?\276\326(!\206'\023\331\257\362\026^\000S\010\034\004B \232\202\022\214S,\034\004n\00722T\252\371\366\236 ^=n\344\315\311\276J\227$\313K\000z\201:\201;\336\007D\352\251Uz\267\234\351>\200)k+\351\027\320\257\242\372\021|H\325\rcX}\356\347\263\326\356$\345*\n\320$!\n\010\324\024\213L\240\357R\231Mg\204\200\342\240y\364\276\001\013\014J\210\253\003\004RJ\231\020\3759\363\317_\241\301\244\233\263%&@p\303'\275\025\000l""\205K\023\202@\205Dk\3702\367\242$\314\222\221*!$\214\204\264\360\017\034\307\020\272\304\230IgJn\313$7z\242f\261\333\2675*\023\335\t\022\304\200\337\037V\364VT\244\370Y|\205\350\\\305\311v--V\326\207\237\216,\251C\350\237Jj}\202\324\013o\022\222`\322\032I\240^9\231\002fd&d\266\344\"Ch)\362\014(!\336\"\007\324\316\336,|=p\364\257d\231\332\025\331\313\203\243\371]\275\367\265\216\311\362 \266\317\016\355\270q\343~\355\362k\247I1\033)\236\221\341\267\222,\317X\000\036\373BH\177Ql\314\367\006\347\006\255\312BA\327\277+\371\345\"\007\314\310|\020\274\206\256!\367e\372\270\373\231\217\006.\324\334'7~\373F\240\r\002q\363\002D\016`\334g\226C\375\264\021\324=\223\322\230\356:jI\023\034L\312iCI\265\317\317\010S1\356?\254\367\320\240\0068\250\234\262\323f\312\236\030\251e\270\3534\035\030\366\226f\321\277c\313\277\320=\005aF\024aXV\023\014H\377M\354\233n:A\242C-+`\020`\317\005&V\215\327J\322\030\353\363\266m\233\251\002(@\212|\240\271d\240\"l\225{[\354e3\356S\3177I\232\244 !\025\014a\346\366\344\230\255\370\370\025\nb\267\350t\266QXBE\336tmJM\200\211Z#|j\233Z\355\2460\270+3*\241y\n\027\272\312\302L\332\322\245\240!\014CI\247N4\264\013\005\266\272\026\204\323i,\013*\020\020\257\315\naUL\022\2206\264p\211\266\354\330\234_\204\230\005\033(@\203\322\300\337z\222!]r\n\022\n\240la\256\005X\215\372o1\356\272s\205\201\253\276\264\236\233\355t\007\027iC7\314\014\007A\322\364!R\221\0169\010\322E\272\264\212\246\n\032F\352\2244Z&\260)q5\2143m\242\010x\006\320\003\245\210b\212\230.<R)\213\033\245b\212\"\005<b\034\231\253\273\211\334\014\303[)\241E\010\203RE\332Q\357\207\276\303\355\252\025hO\247A\271H\033\003\300\334\350I\t\353h%\253:K\241\0072Ry\2024\343\027\351*\214\315c,\265E\321\222\026\031\206T66\314\255Q\320th5\201\027,J\200\2200\241\253$\357\202\006\"\351\004\255XQ\364&\277\236\024\032\317m5\256\232\010\274\203S\322f\010\375\246\204Z\237\250\205\2603=)j|\333\002\203\272\311|HF\204\341\367A\003\0201\2619\204\021\311\362\033IN\350\246\203\034/V\250\n\306J\3439\241v\371\240\027wi""\333\361eW\321\203\224\201\277\214\340\333\276\274\225\0004\014l D\201\020\034|\343\366t\234\240\0013e\316\276\3742\tZ\246~\237\254\023\264\006\373Sg\0324\326\010<\240\025\256\300\3313\343\320Q\034\335\254\201\035\321\"\311m\274\323cc\257\322C\203\252\212\246\223\2445\227\273^\275\354j\356\256\277{\312\236\345\265)\273gXYM\374\034r\352\014\003wt\010\001\317\021A\346\016\354\271\035\261\315@\262|\032\211\340Y\363{:\025\237q\244\301\201\277\n\000\320\003\002D\217@\014:\347\312A0b\222\010\243W\316\240h\311|\306\004\326\306\204\341\016\001\004\036\030\224\261\201$ e+\001&\345\231\353A\204\253TX\213\245\265\203\212s!\233\310\022v\272\023\347\274j\357h$\004\317m\2336\327\325\325]\255\361\207^\177$k#\315>u\274p(zi3g)^\323 ;Xd\326Q-\362\272\366\266!p\034\267\325\354\201\361\311\210\\SM\302\035d\211\026\367^\320\023\265\023\363- i!\t\264\231R\367\006\332\005\036\224S~ \250\246\316\220\241\r\302\034\370\336 \035\247\302S\213A\017D\024\2559\272\2218\020l\t-\214\030\020l\033\000lJ\245\"\252S\257\220(\026\207\003\314\310\201\002v\312\032D\202\215A\257o\007\250\334C#\350\372\013\3341\002z\331^\347nOJ\252I$\354\205\262P\017 d\234\030\006\364\362\207\032Y\257\273\0207\261\361{\271\002\273\2005\220\035\177b\236\342xx\353\013\203\353\236~\006r\352HW1\033\315v/\340\325\265B\323\334\361X\022\341\264\204\203\014\332\202.\317\246\2750~\223\013\r%\256?\014\021\351\177bbb8\202\"\010\346\010\364\301\036\357\246d\212?\247_\004\2216\265\262#\323\356\244lvs\342\035\250\3733\026X\371\203\346=\235\211\326\366\035\215\241\365\2727\252\032\002\006\240bp\232\241\310'b\234\211\332\230\210\247OL3T\271P+\220\201`\306\276\233\202z\321\306\226\250\034\006Ej\274d\033\225\215\034\340l\330 l\243\237\210\243\272 \366\244\203\335\006\024I\020\335CH\036\314\025\250\213\"\205\211\005k\251\004\360T\232\206/\346,\211\020\210H\300\025 EB1`\010DX\002\222) \241\001db \310\220d\004`\260X+\243\324C\345\215\324\201\t\241)\303\017\024\007\254\326\373\304}\343\265\345\354\365\347\242<\300\301V\223\226\313@[-\340\241""\206l\366-8\361\306\007\020A\206\002\353\255\221\037\t\346\316\364\226,L\205\243Q\227a\324\002\031\0062\203\310\370.\017B\013\034\205>\307\037J\340\033W8&G!\241\253(\371N\341\324\261fj'\020\322\032\303\273\224\322\025=\004EX\301c\001*`\003HB\022\t\"\3108\035\243\324\020\325/0J\301\236:(eb\tt\257\202\360\344\006)t\023(\232\273.-=:\n<\231\320\r\214{\234\037\037o\204\013\261\260)\351\343\226\022\203\302\220\004\265>\317\226U?:\336\231\200\323\206\016\236\023\242s\215\200z\351G\271\351\300\373\223\324\274\217\031\310\346\341:\225\037\030Dl}\337\244q8CuV*i\226\\\322\241`m\3000v\300\200\221\204H\304d\204$\020\234\312\233\306\256z\362\355B\360^\226\206\232\\s\334\373\335\230\334\270|?S\206a\356\345\325\364x\370\017P\230d#\021\330\021u\277\221\347\243\300o\305\225r\371 \361\3329\361\025\216=\343\330#\270f\262\njI\222\332\2015\204j\"r\343\212e]\243pqfZ\026W\200'\200'>Q\320Y\001\266\224eV\362\024\330C,\303\177\323\336h0\212F\013\010n\252\222x\374~7\306)\345\002\317sHf\200\034\221\242!\355\205\352\227\205\355\250\360\"\022\000\206\316\360\033G\266;\032\016\201\26410\306\030\377#\355j\274\214\220\006@\220\t\332ZC\265\0240m\362\310\213\223&\2513\262\226Os `\t\271\212@}\023\274\220\r2\233\302@yh\241\252\243\210T\215Th\024\216\021\372\375Zp:W\265\215\220\312\007^L\243\361\223\321/\255KT`\243\247\301\322\350\2539\265\271\002\242Q\217\221\014\370\320\007\217\256\335\203\342\261(y\330\311\325( '\201F\357#\177Ai\003k\337\275\240I\315\266\213h\006\256{\001[\016\004\242u\256\025\226\265\010T@\013\245\n\006\372H\242Wa\326\001\324CJ\016]\264\357>\232\367{\345Q\335<\333\201\351\336TW\212\260\250)h\rE\252\n\013$^\265(\350\373\356CGg\"\217/5\201\220l\202_\1775\322I$\222e@\262\260k`\230\003[\031\017\246o\314]\244el$H\310\306\001\000\212\300\014\245\200,bF0D\222\010\n\220X#\004\021`\n\263\210\034F\005\314h\214 {\273:\023@\212 0 \200T7G\\[\305L\245R\272\252\331\217:t\331\322LX\213F\022\252#[\026\367\247\277d\242\335\013I\\\330]\372*\232\345\250\020\304\304&\006H\020\216z\202\342j\0330\205\251""\356\240\250o\010\334$L\236\341\0366\032A\"\371\370\226A\303/\3044\277X\206\254\006\333\343\276\236\014-\205\315\366\0040J\225\361\372\363\237\320\370>\n\035Z\320\354CI\204L\270\231\032\222t\2311\324\3637\206\022\025\354&c\022\0317%\265\002\221d\231\213'\t ,\001\023C\201CAK<`B`!\301\020\327\244\252\227[\256q\226\233\266bwOq\026x\276o\223x8D\211\021 \306\332\2421\202L\362\351\331\032\332\351@\335\036}x6p\333\355@\312\265\232\023Fm#\236\007\216\233\2025\255r\344(\030\206\025$(\351>(;\004t0\323\002\306Aw\004\210K'\023\201\333\257\257,\332HIA\207A\315*J\314\320P\327\005\210\306\330q\t\004\204\026\310\004Aa\005a\0052\205u\201\nm\326\305\240\266\263\215\204\326\022\360\347 d\2072\025B\024)[pQ*\002\005\033D\037_E/{\232Y\334\200H\207\331\230=\340\276B\245\240w\321\r\256\337J\231\314\024s\333 \017T\026\342a!\275\0174%\rz\315\013=\200c\271\345\035\206/b\0136\273\000\234\005\024\013i4|\230\351\332\236\324\013(\344\017a\032\262\261: \024\240$\222$BD4@\260\"\000B\226\332\213m\214\"H^.>N\212\354\027\241 LJ7wB\021{\317\217\2351\236B\010\222\002\007(v\221\010\014`\256\250\026 \021\212$\033\356\"Kt\243m\324\264\331@\314\201h\2528\270\317\244\243\320\032l\211\357L+\365x\342\007\327\203z\3011c\363\223\240\246G\205Nr\310S\030\342AL\201\326,\000\242\005\334o\2542,\016\363\333Z\255\036c\242\007\003C\n%\314\004\002@\210\026\nF\326)m\002@\242\205\240m\274\331\274\242\240\217\010\323\022\320\367\002/K!A\330\374L\244\207RHP\340\241'\246t\024\342\222\217\277i\227\316\244\201d\236rPQI\005\004O\032O\022\231\025;\257\324:\335Eov\224\021*\rI\020\334\"oV@\200\214`)E\240\260\210k\345\347\035Kbtk&\376\241\345z\035X7\007I\270\314\226\202E\014\262\311\021\004Q\001\362a\242(\370\035\017k\227\343\031\2215\340\023\316\204\216\233*\236\014\200W0n\035A\006\250n+\024\020b\240\202\207)[\240\236\324\222h\026\021\026\020\272\023H\343\n\032o\325\321A\264\300\243(2{\347:\007H\207\205\244\330\031\034+jq\271\275\347\2258\005\200\336\226\271(n`>/\0216\311\223\305\305\2008S5\202\322\344\344U\254\225\335\365\372\235>""\317\353\244\200\266\003oT\210=\370\372\356\221\0364\370\253\252\3328\305>\370\332\304\222\306\331A\306Uq\346\274=K\256\336-\350/\223@8(W\264\351\\\257d5\364s[\212\350\350P\242\205p\347\306tcZ\3274\255B\020Z\201\265z\010\200P\325\215\231k\3226\034H\220@\314P\213$\212\224b\200T\005s#\261\r\030\006\236R\353\315\261\273\317\252%\035\230\345U7\242d\003\333\334%\203\255i\014x\002\200@\031\204\341+\010uM\324\300m\202\337\340\337\341w\302\336\337\030-\321\033\250\231(\030U\313\351J\316\331\024\245\257,Y32\007\025q:\221\t\227*\251e\004\014\251k\330\001\224,\222\262\220\261f\001\270\223\230\300\262a\223z\243zg\030q\232\302\234<\230^[\321\351)\343\223\264\360\210\210\214\205\366\306L2\"\r@A\005,Y%\014\214\303\020U\200\210\014\221\021\"\n0\225R\022\264\244\030\367\340Y2\204J*\240\200\3063\006\031\243X\006!X\252\240\314\226\031\t\217\213\014\233\030\354\331|\335\\B\225V\246\223\020EUL\342\030^\002T\226\225\210\013\t\232\007\343w\374u\037\017<I\000\300\021\307HB1\323\013\025\014\212W\\2\222T\255bI\215v\025\252V6\024J5S\303\343\017\032\246g\027[p]\226\371f\020b\246}\241\271\3603|}\245}\\\363y\214\010Fk\2108\017f\266P\016@&f[\260\034\341b0\023\326\207\016X\303\270\317&\345\366yp)mpp\031\022%\344\004\242\372\200\n\004\357\345\250Q\361\356\314C\250G\016C\257!in(^\030e\020\312\222\014\"0s\304\204dT\240L\245l>\364\006\035L\252\256\262%$\205\264\310w\300\345\314\212\241\021\214Rn\262\005\000\206\362\343UZP\210\322\207\214\013T=\330\025Yb\025WA\352\025:\223\250\353\356u\337\214\364l\350\234\275Nke\274:jd\003/k\270\220\261T\262Q\362<\275\217D\301\200e\324$\307\010O\030\245(\212\016\023\300-\240\3205\214\272\270\324_9\024,\036Hb\240\247\341+;\305\221\265\211\332\t\277\263\005\260d\026\0250p\204d\000\035\351/3\240\233\204\250\212\252\005A\305a\304a}\304A\276b0\214\207r`\204\313\250$hbh\246\203\257!\342\212\261\212{\364\233\336\252Xn\356\300\352\035\224\025G\317\277\tv:\373\267VtapWiv\332\235\357\264\212:\2277\024(\220*+\234\311\300\267\357\021\002b$h\331q\003@\305\301\307r\016+\037\021""\203\\\300\264\315\242\njP\037d\326\222\334\244\312Tb-H\031Pb\031\004)\220\321\346N\344C\322OXr m\236\260\327\317d\256\247\204\360\342\373\235\\O%\256\317\305\233\366\265\314\021\343\340m\364;\201o\343]`\325\320\014gl\357-\255rF\335\037\2028\326\314A\314f_\001$\027\0046\306T9\352\221\026E\307z\234P\343`\317\211\306\017\014X\204/\010[\230\251\266\373)\271\025\347A\240\205\361\250t\322\025i\252\261\251\005\305\273G\277\315]\315\321}\211T9\036\301:y\022I`} \025E:k04\020\246\335\356\252\255\276\201 \r\007\325\347\310~G\222)\333<\340A\272\003\257\006\341\302\242-\310\311^\32700\2078B$\366\222\256\320N\\\327\t\254\252\373=\217\025\243\241#\214\364\2753\337p\323\324\t\033\236\233\241T\355_e\221\360\357n=\250\027\264A\244\033+M\006\024#PF\242Xq\020\263\264\263\204e\021\250@\006wL\312\3134RQ\361\375@,w\334\255\357*K\000\305k\330E\225J\2777x\n\023l`\320\244.\003m\003i\021\241\310J-yB\304\320B\363\024P\246`ZC\270\266\221~\210\333\033\023\337X\006`0\204Z\023\201t\026\256rm\334\200\270\3630X\364\304\241\317*\253\217\323\325\n\r\266\310c\314,h\366\232^\376\304Y+\357\n\250\023\001\r\000\323I\234\364\275\235B\"\353\014M\231\300\266\345\035$2\222\372\014$\026@U \210\"1\021\030\221\031\021\021\030\210\214DF\"#\021\214\203\021\214\220\247c\306\320%,\244\0046\333lI\262H\271\212\352\334\273\323\244\343%1\214h\013\035-\\\243\0274\306\306\306\307\"\305\231\010=m\271\270\307{n\r\253$\204\220b\317f\366\266\260\332\227b0\032A\310\364\2072%\236\275E\013BdW\347\302Z\221\3661]\25393\204\341\250L\032P\213-\204,`\217V\301\200\262M\020/\035\2442\000\311iP\322HsKrB\260\252\003[\003F\006\035\241\210\204ox)H\206yS&\354\350\014j\223\271B\013\3212\332\000j`n(odi`{\021)\201v\010\225\005\260\301\033\243\034(\030\246\220=H\202'\236(\231\340\332B\233Z\232\264\016E\355R\211Y\006\215\217\r\213\215\001\223*\274\005a\310\332_\233h\220\004U\022({\177\023\256x\017\"\362\303\221\003\333\214 w\223|u\316\306\356\336|\257F\343\350\227\206<.\223\310\"\300l\366\221v\225z\"77\305\367\305,/k\016\203\030\322\321e\035{""\033BKe\336x\020\252O%\225\272\314\205\260\245\356\030\310\311L\343\263\016\262rX\305UE\036\0322Y\207\276O\n}\322v\243\235\357GG)\302=\t\303\332]U\200\013\242-QW\322\202.mA\226'\030\352\223%\022@\327\205\013\235\374\361}+\344\364-\247\217\234\272B\241\330\301C\261\206!Xb\025\2060\243\345\361t\360\324^\327\323\316\240gu\2060^\242_\034\207Y\363Gd\005\273\364o\364\351mG\225\361\350\217L\334B5\373\310H\253I\260\024\207\032\243\206{\203\tK\254\310\302`r8\330\000)+\251\352\"C\253\272\342 \007\004\036\303\341\355\254J6\2679\231\344\236{\035\203\221 \220\\\254\302ZX&&}\372j\224\352B\3603N\247\217~\275\312Z\222O\253\331B\224\256\n\004\005!\212\016\257H\367\236f+|\346\262\004k$\215e\255\254\tk\022\"\005F<\232\217\201\003h@\004\201\220l\215\024:U\017 Ae\213@\224\035\202\213\367\216`\366\352\2034|C\365{\233\026\321Y\336P\010\t\326sD=\230\350fh\036\260c\235\247\2775\002d p\014\344N\005O\002\3326:bY{\230\255\355\303L\256\264\246\311\t\010Du#q\220\000\365\220\032\354\220\023R\206\315,y\031FQ9\223\222\243\2702.\362\241\004\250\2659\032#\004\216\216\321B\275\322u\010B\\\016W\263IU\0010\r+\254\032\363cV&\020{B\007 \031\311\031\350\317\025\360\276\031\373\303\351_\342\000\363\024\200E2-\001\320\2070H*\347\344\267G\223\020\tx@\254%\3127\327WM\016\272\322\321\013\0010\347\303\300k\rb\362NG'\227 \3112:G \334\207\020\221\200q\342\007\016\r\341H\367\3109K$\026\305!A\013@\352\223\305>M\257\007\315Y:g\351\244@\2126.:\016\320\256!\304-\315\330L)\300\231Y\263u\n\325\324]*\326M\325H\277\030\200\225\024\344)\017\275D\204\207\177\tGeBW\010\014Q:\001\314\231\234\306V\241\304\0350\036\354P\352\276\203ZA\226\016\2375\024RV\301\222\n\020\363\246R\005\020o\343v(y(\305au\356\311\234\200\026\004G\221,p\230-LTqH#\016Gh\003\353\312\250\014 {\201\204C^\330\307\025\205|\243Y\374t\240E\355\311\3465\016x=\342\301\343\352\312\333#\204N\270\347\2757\231\2754\234\241\307\247\242\237R<\372V\212\021\020\265\375\035H\027\020\351$\261\023{\317\277{\324.\000{\020S\214\210\246`HPS\200\001= %\037\230l\033#Z\204lA\363""\264\tZ\242\255I\004J\024;\200\354\t\334\361ru9\\\231\033\312\355\020I1\004\366{\223W9ys\275\251\256W\243\303N\237L=\223\377\010\177\201\377a\362\216\371\356J\n\000\305\222*\010\261`\202\304#\006\002\220\021\200x\257R\311?\030\372\001\376FJ\244\204\372pC\373\003\371\030\001\373\004aX\n\242\243\024\202\264\021%\225\"[(\002\254F\021\005$Pl\260\240\311\363\022C\337\001\207\302\022\037Q\001\200\371(\203\003\313B\030e\0102\020\374/E\205\237,\377\022P?DL\203\007\000\242\372\274\034H\006l\277\025\214s\344\237W\241\017v\036\364l1>\214\234SBD\214@H\277/\331%\014\237\3352z\002\001a\245\363\230G&A\\\020>\312\023\354\352\342d\214\222\212\32460\004\220\325\252\220G%\226\302Y\374#\221\004\220\332\374\303\367\275p\320\351J1 \200)\365\341\270\036\336l\321\260?\216\351\221\373EW\320\375\242\214\212\017\330)\013\021\003\355\1779~\255)\226\026q\006)\003tOJs\256\005\343\233\311\370\223u62o\227\203\215\031\324\245\246\202a\376\347\330\300\364\301\"3\004-\276\245+\364\202\316\017\266od\340\205H$62\245\004\020c$Ha\200\353\341\033\202\330T\370\t\357\r\000{\317\210I\237\217\277\266R\202O\335\224F\341I7\020\334\321\323\216\205d5\264M\021!x)A%\3030\351\302\314\013\341\021\244\346x\242G\271W\362\202\303\240t\300n\313\244\256\016#\214+5\322\007\220\006;\322\210\007\263%\354\234\256A\346\216\2357\346#\307*/\300\347\210|\344\223\340\354\370e\301)\320\223G2\201\327\225\346~\263\010\332S\0255\301\314\265\003\363|\354\371\336\357\316\270\025$2!\001\305\177zLH$\302\031vM\233\317\217\365\211}S\tZ\237\223\352\200[3\362\003\216/\222\373\010\260\3075\302\260\271\300\257\331\211at\222=^{*\223@Y\323DT\\\241\231\034\326n_4\376a\017\314rC\232g\377b\177``g\022\367\211\030U~\013\334\200\225\221\245P\267\3149&,%,\237\230\006\276\333>o\232#\254\020\177\306\0175\271\336\352\212-\010\343\225\347O@\031\316|\340\366\211E\034\374\014 9:`rs\256\356\212p\224k)\253O\320=\203\331\235\302z\362C\375\250\177g\257\354@vvnm\222L\007\277\341\254`X$wX\236aq\207x\344C\256\203\214\354\316\036\361\263\327c\333\005\357Q\r\223\3228E""\3742\020d\264\026%\241\033o\033t\366\"\225\210\221T,\032\315f_\020-\360\340\017G\33272m1\330p\357\263$\277\220\2379\006l\315\206ezja\206\007.\035\t\201\210/.\036\211\232f\003s\316\017k\335\311\017\2338\223\241\201Nl\257Mn\321\302=\331\337B,\006\005\303\314aD`\256s?\241\301\377O\177{\271Gj\345\251\2577\356\037\331\r\361c\032\260\301\260\271\275Cc\0317\343!\341\2614\030\360\302@-\200\362\307\003\002s\320\327\245\370\315,\"N\020\223\210J\203~\000\223\300\037\246.\000\3408n\262\260\304\336\344\266\020P\3223\016c\323\347\207\016\235z\316\221Vn'\351\235.\013\256\025\027M\261D|\253\321h8\031%\260\302\006r\307L\234P4\262\203`\340L\215g\nB\200q\321\021\2509:\235X\242{\2001\014\022o\360\242\324\334E\021\323\300\262\252\327\327!h\014\372\006\326\021\240\204\347\201$\2609&\373\022\327.\" \022b\356\234\"\231\006E\237G\177\202\026\266\023\r\016\314\013A\000\031\226\361\245\226\361\244\323\000\373\000\233\035\3566\357\246\331\237\314\357\230\026\336\\\304\r[f\356g\254\324\004\345\242\214\001\205\2639\344\347\002vm\262(&\340\3238\003\223\002^\357\326\375O\236|\357YG\334h\036\005m\255\266\030m\336\333\340\315#\320\232*\005\272JE\324\365X\207\265\010\302\320Y\306\035\234\377\036\341\313\335\350\247\364\272)\372\020\340\234\350\237 \302dW\266Dm\225\013n\361\313\333v\254E\235\321\373\205\335\030e\263\333q|\2707!\314\231! \365Fc\271[t\251\t\2062\345\315%\021\225\310\330 \365\214\276\333\035\267\3577\230I\231\tV\351\271\230\334\025\013:c\021\210\305\236\305\356\031\367\204\244\274dc\030F\020o]\033\030\034\214\025\360\206\030[h\313\353g^\251\3314\272\220e\275v\250\010\336N)\035\010d\320\350\354\260\202aV\242\310K\365\202\320&]\203\262\372\265\031\204\372\2115Uk\231\260\2732\n\nF\245C\255\364\347\321\337t\340\231;)\274\330s\177\236v\026Vu\014\002\316\t\264hC\202\321\256\205}\366y\030&\004\254' `p}z\220\246\374S\213V\350\332\276\000\324\302\323\306o\301\253I\327-j\237\342\241\363\277\247\260\357o\333z\215*\215\034\322\032a\373f\343D*\215\000\326\325\244\352\362\270u\246\340\024k\007\360""\230\025\n\372\021\326\222\325.p\264G\t\010&\341\324\035n\231u\314O \276\343\307\r-\300,\346u\243\252\321\277\004\265\216\023}\004t\237\014D\275\317.\327\261EZP\272c25-\317'ZY\207\325A\274\267\216\225\036\305<\227\025\207XQ\257\030\310\266&\300J\026\032\360$X\317\236mmr\3640@\306^\246\271\220\222\3463\232M\t\023\241\204AXj\330`\307k\214y\r\276\256v#\255\231\374I\336\235b\\\340\222\267\222\t\302\365\254e\216G.Ys\345\0336m\335\315\333e\372\262\020\360\311]n`&Q@\306\026)6vJ\342q\347\360\315\317\030Id\206\334a\262\252!\244\214\255\237\265~t\226\363\014\317v\020\323~\020bzU\3646OO\3227e\314\210a&\022\333\222\2723B\3100\254\347\214X\334\230\300I\255c\022\026\336r\007^3\3526\272z\023z\035\035.\205\022\003\247\351/\250\004\260C\371\327\2777\217\316t?\231dL\013\2422\374\340\307\025\206\215\251\261[F\031.JY\260|[_yu\030\332=F\364c\322@\223\323\322\222\364\020=\004H\313;\315\342\362\207\2151\366tC\244\210\3110y\372\035t\2618\234N\317w\236J\343D\224\220\350<k\314?\315\007a\230\351`\331~\202\"]/\026]\020<~d{\276D\227\304\207C9\357C\336\216S\014\303\214\307\224\347<\014\177Sy|\020\033\234P$=\236$4O\376\003\270s\367\316\367\204\357\220?\364%Hb\014.T\261\371\0350\30331\333;\251\240D\373\344p\213w\276G\347!;\213\227\273\314\006gs\242\003C\270\336e]\034\303\302\033\230\3075\272\362k`\201\220\351\265\371~W\221\313<\223\233\314#\254})\"\327\"+\263\330\3408O\323|\027\023p\312v~\036\016-\363\177\206*S\302e?\037\320G\214\3103Q\3528\276\007\201\277\331\022\314Kgxm\337\353k\206\367BC\233\206\326\332\032\307\306\200\200\3106\360\354\376\224-\263e\314,\274lk\353\261\3420\215\324\276\315\201`\014t\006\310%\241\245\372\222cQ\276\335Q\311\0045\304D\317\376\326\363\213U\203\333\242er3\2637\007\201\236/\322\304\256B~\244\270\324\374\352hv\263\327\2011\005\206\251\030h&\316\330;x\223\0256\206\217\276\2776\275\300y\320\303\262\267a\003\027\234`\370\267\301\217\224b,n\032\247xpp\373_N\003A\"\260`#\017\231\355~\212?[\342!\010\371_^\303\032\337\221\373Gq.\353B\300\313\353oH\234\3744D\326\0040ml\367""\325\266\361i\341\001w\206\030d\314b\332>\340_B\264,\257\354^\245\362\237\2402NS\351\3220\037!\247\226\026\002\231\272t\037\016\231\214\251\365S)\213\220\025=\023\024<\310\351\247\230\275hL\036\264%n\231\220\251 ?X\232\221CBy1%.\037\347\240R^T;M\265\362\236F:Cn\220\271\374\277\001\372\376\353\237\207\263\375\257\375e|\352\236\317\t/|\3471\374\021Q\037\304\240xB\022\242I\234y\264\211\204\327#\357\261)\242\201\211\254\024?/\337\177\305q\\\325U\3109E\256d\234\017\204\221\3558)\213\205/i\2567y\326\204b\361k/i\346]<\367e\347\02137\226YY`\253n\352\326D\354^\030\300\374w2f\r\221\303\025\205\263\246\231\014\026\312\353E\324Z]\\\031\037\262\024\tX\265\261;\3274\341\r\000h\364\346\2168C\216\246\206\n\010\252\031\3151\203\230\274\346g\232V\375\377G\333\347\347n\202\333\230\352(4Sx7a\321\024\016myk1jy\2502\217*\207k\regD\017#\026\231\304\024D\014\\\306\nT\300X\232\302\322\223\001\375\334\014\214fs$\022Aa\226\177\237u\226k1.\252\365X\206\355X\232F]\030\357%Jff\266\255'\337\265l_0\244\304V\206\025+R7\225\004\301e|\224z\252\241@\223)\312J\305\003t\241\261\203\t\2714\\)dr\014\302\004\014\327\tp\253\256\030\335Et\007\332\025\002\354\260\242\302\306$\322\264\310l\2431\310\256U\327\016 \0309\330\362\316\337c\354\300\225\262\260\346wG\340\325\n\005\252\241|M*\216U\357A\022h\013\26180M\013\220\251b\355^\333\335YD2\216\034\3150\357N2[\025\261\027\304\226IIS\025,\360[\024\017]\301@c\006b\345Q\202\221f,\312\202\317,.\022\"\013\320 \241b\244\321\220Dc\r\224!\342/\\MmT\203\301f\210X\243\203:\246B\234j\006\330\t\332A`'\024\262F\006=\032\310\251\374kmL\031Y\25604\262\221]\362F`\306g\307!\244\016A\353\024Ka(\275\035\233\306\325J\311S\357\223X\205\234\004\027@f\205(\363LlU\024h\202\264\177\255\253c\016\277\203\360}\353s\370:q\337\360q~\217\254\3630\310\346\227\265\361U\2134\342X\326\021\210\277\246\364/B\313%z\214$\304\326#\270\245\rT\3052\n\200\245\217\025\230un\351H\254\214\030\367\014\205\260<\037\001i\305`\304\026\2120\232X\233\005\336\224\301u\324\2765z\374\361\271\336\036_\270\317\361\004""\201\377\202\003\223\2168\351<R\236=\253wDw\026\035\331b~*\221tPiB\274\371\350\347\260&\240\261\314\347\233\2672u\033\225wn\220\315\257C\0348\016/\014\274\2578\023XJod\333\311\306f\210bW\205\320s\205K^\255\326\224\260U\216\350v\254Q;\223\005\"\245\210\204V\014\371V\345\233\326\306\266\314X\271\345\261\276\242/\022\353\370^Y\266a\223z\272\330\305\343EhKy\223.\311\332\352#8\240n\354\312:\340p\204\177\374]\311\024\341BB\324\314Gp";
    PyObject *data = __Pyx_DecompressString(cstring, 15576, 2);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (15905 bytes) */
const char* const cstring = "x\332\355}Kw\023W\326(NH0\304$6`\363\014\224\001#\233\330\302\362\013\343`\272\205\037\340\004\033\374\342\3214-\227\245\222-\220%\241*\331\230\316\327_\217\356\342\316\264\356H\203o\255OC\r5\324PC\017k\350\241\327]w}\343\374\204\273\367>\247N\235*\225d\311@:\335m\207Hu\352\274\367\331\357\263\317QO\377@\244\257\013>\272\254\2071\361\341J\372\273\372G\"\373\276\372\301j\254\177(\202\271\360\017\322\376\333\321\240\022I'S}\261\204\222\326Rq5\254mh\tC\211&\323\312\0235\021Que\345\256oR54#\266\241\315$\"\332;\337\275\025e+f\254+\332;C\203\027\021%\245\246\365Xb\255\367\204\002\177X\356}2\241)\211dzC\215\307\336\253F,\231\350\205\326\365d<\203\317J8\2310\322\311x\257\002\035(\021-n\250}\352\226\232\326\0245\r\355n@Wa\377\tjl\345I$b\254(\253\332\272\272\251\351J<\366FSV\034\243YQ`\344j<\016\215nl@\333\311\224\226\246\036\365^ek=\026\207F#\021\030\334\030k\260OYH\256ftC\211\360F\254\301+\335\2331U\tCVr\203\336i\351\036?\2572\247&\222\272\006\243\216\334\332\210\205\323\366s<\036\343\317\354K\311$b\006NoS\203Fa4\335+\252\036\302\227+\242\261\247Z\330H\246c\357\001na5\016\000T\323\322\240\225\356mMM\337\202\231\030\353\267\336f\324\264\241\245\025}=\0265p\2147\370\032\301\263h\357alm\275\017\352G\021\334\211\260f\317\314\206&\216#\022Y\351UV\364\314*\016\205\352^\273\246\314l\244\222iC\205\005\237K\032\232\014\362\030,\274\325\322\310\320\313\214\376j\005\220\002\340\243E\374\312\214\001\030\00007\322\333\212\221\204A\031*\254BB\200IZljsk]K(\251\244\256\307V\343Z\257\262\232\341\365\325\014@\033&\016\200\210o+\221\344V\"\254\302\332@\223\022\234\335\215\305\242\212\261\256)\233j<\243\001\016\2065-\242\323\233\325d&\001\217\311\250c\344\t\030\271_YZ\207\t\021\032\305\000\263\325T*\036\323t\206\257IB\037>m\000\327z2\2423\340\372\374'\202\341\260\2262\3641Ez\364\275\360\365*\276Y\374x\206\037\223\370\261\216\037\033\370\241\323\023}f\3503\241\373\202\221\327\210t8J\034\032!>\255Q4\246\305a\314DO\tm\213\315Jg\224D\220\203\214$\200K\215F\001o\020\007\260\rAc@\2338n I\276\246""\3707\006\350\253n(\210HX \226\300\3741%\270J`\324(\303\257LjQ5\0237t\004\300\312\342\324\334\322\314\334\324\243\025\245;\221T\302\353jbM\343\030&\265HX\351\331$\3454\326&\376\315D\025=\245\205c\000\205\210\322\275\226\326TDw\003\212*+\375+=\275J8\256n\244\250\271\227\001\277?0\360\252bL\021u\333sD\360\376\263\217gC}\027\333\310\320\030\030\006\002\246Bw\270J\004\220\312\321\302Zz\257\tf|\322\361\002\226k\300?\342\324\224{\354\375~\377\300`\345\3506b\t\034\213\347\002S\326o:\302\341;\225#\344\034\301k\204,\353\037>B\231qy\003R\344\377\246c\275C\177\225\343\225\230\266\327p\355\354\337z\264\362PA\300d\322\t]bwc\300\321ez\023BOpR\273k\342\261\234\263Jl\022\304\337}.\020\304;P\017l%HWP'Y\001\305\"\005\2746a\364m\201\264_\031s\314\361\246\022Ll\243\310\021\254\235s\364\r\340K\253\232\022\327\242\300\274q\344\343J\377\nN\357\215\246\245`\376\261\265X\002\346o\215\252j\233\262\224\250h\263\256&\373\224I\250\307\336\362\031!\254\265\010\325\305>,>\006eb\021\342\250 \315=\370\231\334\346\343\004Hl\032\234\200\017\023c\274j\014\2253Y\351\303\2367\222\021Z\222\037\245\371j\3765\177/\323\020X\035\020\324\320\306\n\310\321\025\251>\350.\022\351\254\220\004]\261\261sEj1\355^\302\330\032\350\242\240\2678\326~\352m&\266\211\n\230!\336\336\273wO\211\030~^\277\333\261(\370\207\202s\034?z+\262\010>\343\364Y\231\t\020\035\207\377+3\220\353\217\343\207G\203\304p\307\331We6\233\3658\373\362\252-@5.=;\013\366\210\224[=\001\274@,\350\376\341V_\017 bT\327\214\232\252\206]\304b K\324\324\266\225C-\325A\320*\rD\213\330\364L8\341Z\271w\200\276q\315\261l)\303o$C\320cw_\240\277\007\212)\201~&\227\325\265d\225\222TP*\031G\376T\013&\370\314\331JX\331\322\2647l\206\364>\234I\247\321p\302\3275ae\325c\300\272\245\033\351[s@>\004\202g<\217\210\325\305p\261\220\334\034#C\001rETNd6V\201\317v\367\217\317&\023~\277\177d|1\223p\261f\252\010];+\252\004o%\236\334\322\322\240\210\203\246\236I\245\330#rl#f\3045Jt3\242\365A\007\250\340FbZB7\3245|\376\237\334\177\377\317\177\375\367\377+\375o\237W\227|\246""\300e\321b`J\223`\\\03422\310\032\304\023\213o\311\213Q/\356`\235\020\037B7a\006!\007\366\006\323\254\262\322\373\265su)\243]\355\261\332\201\204\276_C\r\242]*\255\201\000\313\350\207x\367{\300;\307j\324\213xX\251.\304s\264\276_C51\317\273\245\006Q/\241\275;dw\277\013\264\023+Q/\312a\205\272PN\264\274_#5\321\255\262\225\006Q\215\260\354#\265\021j\303\251\216\034\342\352o\207\253\365\242\246\205P}\003\275\n\307L/\304\304b\275\212\261\225\244\247jZ\236\325\030\264U\023A\335\25595A\217\366z\004\354X{:\256\217\007\322Vo\2646\005\000\370\230\263\215<\344\266Af\251\014\226o\257*\r\310\256:'\"\317R\316\201\320\230U\265\22080\376\223\212H\034\030\030\237\324\302\265\260\230\327k\030\207\241}\304\333\250\266\232\316\250i|\004\344\375\237\377\372\3208\376r\363u\037\347\241\260\223ar}\203\201\236\306]\036\210\013Q\352Q\360\n\264g\235~nn~\273\255o\262A\370:W\214\367#\025ar\3716\242\010c\205nf\324^\235\326V\257\366\222\021\0130\261q>\256\3226\n\341\3734[\"O<\255\243\213@\240\307e\300Jd\305\273\230Knj\204x\215v\201\003\257h_t\021\260'!\267J\343\252\237X\275t+A\202U\211\364_\036\375\234\260hH!\246\032\335\204p\225\350V\331v\355f\002=\325\326\273J+\215,8i7\207\213-\301\241!5t\337\205\266\333\255\335D\365E\366h\241\221\005fk\373\221\352'k\244\212;\354\237\003C>\267\352\307\226\021\025\277\032\330\300\\\254\244V\321c5\325\2175\006m\311\"+\260_[\237BG\023,\345PI;T\322\032\222\222\215hi$\335>RKst\\G\037\007Q\323\352\357\243!=\355\240r\333\223bI>\034R\353!\265\326\255\3464B\251\244\242|$\245\212N\353h\377 TZ_\373\rQ\350A\224.O\352$\302\374H\355\213\332\250\355\374\373\034\344}@\352\226\210\273\033\251\267\017\210OK\3501#\266\251\365\364*\373\221\362!%\177\032}\224p\036\325QN\261U\264R\213V\231\"\211\225\252\351\244\324 \252\2442\021U'N\271\301j\036I\253I\007i\356\357\331\250\336t}4\332\227\214\366Y\321\251U\\\224<\333_\267L\225h\215\017\2317\321[\035EV0\014o\360\325\212\023\321\252!f\272*\366K\363\371\367\261\313\252\255X#~B^\307\022=\266X\363\266\336\020'-\274ak\357=\206\372\272\363v""\303K\335\r\000j~\212\356*\004\337\376\024&S\310>\235~4\311\te\370\220\346\376Yh\256b\311\0321\373>\025\321\271\007Q_\177\007\247\272F\373\3734dW\265\327\217\246;Rq\017i\356\237\205\346\034\313\325\210\361\366\251\350M\036@}}\035\234\326\032\351\353\323\320\231g\217\037Mc\326\353\2174\000\255fj:\340\017\251\364\237`\227\300BZ4\314\0025\267\n*\350\220Y=\374U5#\315j\037\232\037\350i\214\366\\\355W\263\331\244\036\004\3455Dq5\373idg\313\321\301\277\367\356\245\003\024\r\231@\373n`z\307\024x\266R'.T]l\3679B\217\363\203I(\234\266N\224\034\236\037\374g9?\330\300\021(\206\327\036\007\241\354\363I\237\3564\024\310\353\375\316?I j\340$\324\247<\266T\307\271\237\224}\356\307>\346\3438\326c\035\343\361<6S\3530\357\307\020\341\341\201\321\303\003\243\207\007F?\347\201\321\252\334\322&\351\317\300-\3679\325)\201\245\016F\371\257z\0263U\343,\346?\366\350$\376\331\023\036\267\037\253\236\260L\247a\231\365\330{\000<\312\014Xp\007~\367\367\002\240A=U#\312Z\322P\272\"\376\t5\221\200'5\302\257HAD\300\313B\240\235\227]: \373b&\205\227wh\362\005\031x;EB\272z\202]C\241\213\273)\326\331}\025V\343\210.\270(Nb\320\270\010\003\374\210j\244t\302\312\254\031\353\320\266\253^B\215m\262\313,\330\375-V;:\036\222\356\023\311@\3755\255\021\270\213\263\211W\031\030\021C\037\240W: \206*\032\300\273X\014\251\177\226v%\251uE\213\263\313o|]\272\217\235\201e\203\362{\226\216\246\223\033\212t\321\210\253\220\265V\356\201\360\266\023\311D_B[SqOW\211\306\223\2521F\367\342\220K`\003H\204\363\275\004\300\0068\322\006\020~*\t\334\326\337@{\300g#\3004\200\362\242x5\212\273*\255\224\001\\\264\372\204\tE\231^\227\241[r\370\0059\276\010\260_\035*U\026\244Ut\0256<K{\224\254^\220\321\200\253\264k\024k\032S\306\030\016 \237\265\226\235.\364q\247`\264\252\017\020N\2328wE8\313q\340\034`\221\032i@,\236\016,\262\316\006b\357\360\366\245$\213\014 j:H+\216a\210\326\366m\300\321\025\3030\320p\221\2431\244;h\345\272\001Y\005\275=\313:\246\325\350`kT\336\177\260\220\241\255i\351\217Yw\217&\016\264\362\373\r\245\216\265\027M""\034l\365\355\352\365\254\235(]\367\352\261k\260\350\312/Rt\340\337\201E\207\325\330\006j\214\251x,\254~\262&\365\314\252\221V\303\037\321^R\002\227\020[\360V7\322\2310H(eyi\202_\252\30649\222VO\036/\316<\267\371\276\256t[7I\261\262=5mQC\267\302\243\210.n\221N\323\207w\262\t\375\272\242\003X\305\260\030\025N\257J\264\024k\022C\224\202\030/\245\245ca\356\024\004\r\020\364\033\230\237|\371\025\265\356\021\347\344\030\222\022L0QM/\224\344\352k\260\276-\334\307\3268\340\364\032}\350\225` %\216\217:\230\330\266\343\304\020\000\206\232F)De\270W\204\340\357\030jw\032l\231\030h\301L\325^1t\272oMe\374\006m\035\216\371JO\203\001gA\233T\254&X\364\231\027\254\022\333XeI}\2431\357\323\n`W7\216\274g\205\303^\325%\373\001sj\204\226\3150\305\3365%\217\025\250\204(\277#\217G\300\331\000\235\260\024\225\244\313\211\3054\007\254\302\270\200@1 (o\210\311\303\346\2123\350\312d\330\2005\203z2}g\3707\350\320\036\004@\021y0\310\207\252\276\256\256\3065{\244\217S\3305\010\002*\"/\374>\013\330\270\245\352&Y\247%5\2274baM\262\r\351\342;v\253\035\260\032\364\251\013r\254\270\337\217w\340}\367^\217lq>Axh\010zq\301\241\245V\202\305H+\306\\\\\216\325\322\275\226\253\036C\020!\343G\016&\350\262\333\320{\t#\307\361\243W1\336\217\303(\343\272\037\370\236mu\311\0141\212\"\263/\212\244\247%\302\333|\262\236\374\316\256\346\202=1Q\3620\242\367\002\327\231\234\022\000U=\005V*\367\031\2202\000\274\025(\201\244\253\275\034\026k\017k`\000\032[\032P\n:\004p7G\215\274\206\026\200\213\363\332\260j6\316\257nS\257k@\327 \376\254)\330\363\3243\341u\024\343\244\376n\323}\206:H+=\272\255\254\000\270\200\204\356\276\034\177\245\274c_Z\002\257\202\024\243\003\310\244\301\"E\005\200\256%\224\306K;\031\224\221\326\350\006\317\224\277W\252\202\305\251\210<m\3629\300H\030\210\3501\212\003\342\2677\222K\303\272\254\021#\234\361\272F\234\322\212\322\035\213\362)\252\304\014\305R\301b\340\215\227\024\321\216\355\241TcN\337\250\344\177\361ne\214L\204\261\225\024]f\3527t\020-\232\356g\373\300\272\037\357\022}L\317+\300k\273g""`E\337\201`\216o\213fq\3728F\202#2\007\006>\030\013\357\020V\352&\010\343\233\366z!\214\220\352b:\231+)A,a\325\006\302*\363\326d\320\200g\343]\001\365 \226\214\350+\014\306<l\230{\213tCK\211M/\202\255_Y\324\330\002B\357\210P\361\344\226\277\247R\\\321\372K\227\270\366=\002^l\263\256G\350w\242\325\240K_\327\264\004\335E\312\005a\r\036\346\352Gc\016\301*\275,\304\326\326?I7\034F\226\000\026\035\314\thY%\240\r\336\213VW\313\270\232\226\010\022\026\347\255\373\252\316\021\304)\350m\354\254\301\355}\223>Oi\315\343\274\203\0258\316\316iPE\313[c\371q\320\347\211H\007\323\006\036\342[!0\342vi_\004p\213\363\322\212\236\304DX\177\302\300\267Mjt;\341\275\261\036\225\355\271s\335\202]\010L\356\000\036HQ\243\266P\014p\274\214k\210\331\nF\032K\000\005`\213\252\207\276\371\236f\360\036&\234tF\344\343\002$-\221\313U.K,\326\2531Y\303[\262\304)\271\244\252\007\345/\211{\215\201\230\177dK\021O\206\3258_\nz\266GQ\331\216\r{\232\021\003)X\002\304\240\034\267\326\362\022^\032\010\277S\231\324\220\325d2\316p_\274\245\235~$\370[Z\202\251J:\273M7\222@\002tj\241\262\023\032\327\022\n\366\273\025\316i5\256k\036\003\211%\302\361\214\216z\246\200\320\030\2544\274\214\010\336\216|\326E\017\253\240\025x\221\204\017\275\337\276\025\321\002\363\342X\214\t\304D\005<}i\234\220\253J\332\3462\236uX\367\3228\301\334\222\006[Q>\241\305P\213\201*S\357\252Tq\003\306S\221]$\311\300\204xD\323I\365\227\334\361\234\2030\225\257n\375\325\255\013\243\357\327\353\356\341F\364X$,\312\005\224\004S\333\016\275\370,\272l\335\272_w*\342\307\252!\022|\335~\277\277\307S\311K\270\3654+jb\205\250s\305\356\337\326\242\211\354k\033\276.\213o_c\357\037j\240\035\032W\237\304\270bh\361oc\\%\222[\335\302\222B8\332\364\365\312\177b\302\276\321>\036\333\2101p\263N\271\035S\215\367\374\337\377\365\177H\227\231t\005]\301h\343iM\215l+Ns\326\177b\031\035\200\306\373\020\237qw\217\017e-\276\321\267bFx\035_p\2203\347\222\205\305\306\232V\241\013Tvk\270\304\275\325\0351\010\000\200\263y\353\255\250F:X\206\327\331o@\353\025\003BK.\225Nn""\306\360'\t\300:Y\305\263\271\r\214\326c\007\307\316\266\361\241J\347\"\016\305\331\257\322\215\311\220\361\276\307?I*\241\017\227\326\207\326\nv\006\206\312\034\215\316;\017\230\256\266\2212,\r\326?\031#\324C\323\216v:\271\277M\361E\222\333>\345\r\230\247\250-E\324m\014h\244\0303v\262\262j=\274=\313\2568\263\370\230]\345VG-\350\244\262\242}\211[\325\2728*g\305z\306\351\254U9\301)\346m\244H\000%\274\256\205\337\240\r\356 d\276E\316\317-\240e\r\234\213~\346\342%*{\257\234\322\251:I\353Z<\252\334\265\265}\361@d\016\231\\\303\264\211\274\321\301E3\300Y\265\217\031\336\275\206\206\367\016D\024p\233@\337\244\345-wo\230\367E\240\205\204\316$\005\225\360[\265T\250W\221\333+\325\253ZR\364\345U6!\254\037\332jt\353\367\316\001\372\252UK\244\374\266\250h\240\222\265\277,\311\231\233\257^\271\033\220\nv\351\257|\376\032\r\n\223\260\3720\"\200\373b\273\201\224,+\247\302s\355Y\252\332\034\244\256\033\231D\315\276|U\000D\322\244\336\216\245^\247\325X\334\301\340+v\317\227\227&\354\237t!L\330\277\016\263\032+ki\2211\345\256\327\024\246\371\276\021\324bZ\204\216\007\234\3021\022\316Vh\211\345\\\354\007M\371NEdI\327\303\261\256\331\261\256E\177W\264\353\275\245n)\277\020\227\237I0\307\232\317wO\021\317\\\013\3611k]D\236T\032\034\344\021D\271\377#\203\237\324FX\213\305\273\261\225\036\257f\352\370\t\225\312&\001\347\222\351O\334f\032M\273O\320&\352=\370\0131\010S\374i\035\346\270\234\330\006\001\234@\301\016H\027[%\337T\234I\316\260\010\005z2\365\244oht\210`\231\326^\0232[n\002\215\034\005\253\231\030j\257\212\261\235B\023{&\252l'3JBc\346Z\n\335\tR\005\0037dt\036\032\341#\271M;\231!\250\016\002\333\007T\235F\377\321&\351\rd\360\373)\242L\347\363V\344\335I\246\365A\347/=\003\215^\271(\010\320\334O\n\246m\276)\335\361\030(\035\303C\201\036\236\263\035JFC\374\226-\312\033\n\214\014\262\314\230\036\342\242\206\347\334\031\030\0269$!\255\367\375\003\326\373\244 '\236\327\037\340\255\361h2\376~\240\3776\037\202\236PS\326\313;\243\243\354%\361\206(\177\035\270\023\030\342\257\345\200}\253""\322\360\355\333\316\\ql\211\345\017\216\016;\363-M\204\347\337\276\335\357\314g\227^\260\314\300\360\210\310$\337\033{?\030\030\350w\274g\206-\313\353\357\227\353\210~\356\014\332\343pL`D\032\200}\247\232\310\225F \237\034\263\362\207n\017;\363]\323\033\355\037r\346\313\323\203\326E\246}g\237\350zh\300\231\353\356z\370\2163\337\r\331\321\333\316|G\327C\366\254\335\355\336\t\210,\031\260\201Q\373\275{\226\003v\226\243\227;\242\027\273\364\355\021k^\357C\352&p|b\302\034a\007\254N2F\330\261\355ea\343\220\265\274P\300\205\247\326\224\370\340B\354\032\021\336n \320\303\203T+\016\005q\374\361\216a?<(r\370CS\207\347\006\016\317\r\374\253\237\033\2606\236\320\200\2236\237\234!>\300&+\367\231\252\014\263\352\276\323\030\320\360F\022\177\324\222\367\326\275A~^\227C\322rCV\331\225\032\373\034\333Rc\215\354K5\354be^J\374\005\306mk\367\327\375S]\362\241\201\177\303\037\354bM\002R\257px\243\301 \332\020\210\326\353<9.\274y1\235\377 '\236\2628\374\021\260\212\203'\222\373\336\002\031Pk$N?\022[s\r\016\010{\357\266h\263\242\327\005\341\212SI\3618!\020wC\263[\006\210'\254\270\017\244x\377R\250h\260.$\263\t\221na\020\201\250b?\255b\306\356Q\3245\035\2766\021\246e\262\273#\266\2526I\241\231\351MkFb\010\025S\253\347\327\335*\\\216\326\001#\333\327\270@\034MYY^\232Xa\310=\251\032\3524\356\311\260\363(\006\376\212-\033\373\n\265\261F\nzw\317\n\017\200a\205+\275\241U\316\221\223\376.\r`e\305F\344\020\200t\203Y\023\370\200\277pL\337H\237\370@z\036\275\211\261\034\240\004\372\336\262Jl\303\203h\256\237>\007\372\007\206Y:\020\340\031\201\001\353\241\337\371b\310\312P\370\303``D4\347\367\373=Gm\201\220\357\272\326\005D*\373/\004\307\321O\007GD{\334\205\020~\r\036gU\023<cn\370H\216\221\352@\252\365\307\240G\233/\326N\212\250\032\030\271}\273\257\377N\337@@\351\357\037\013\014\214\r\r\372\003C\303`a\007\356\014\262l\232\364\250\200\202\250:002\320\327?\324\0070\034\030\034\033\272=\026\030\361\217\016\017\335\276=<\332\177\233eS\017\303V\205\341\375`eG\316\221\301\244\307\022\334\336\365\272""\377\333\336\303\000\235td\250\356M\214\024y\256\274\272\337\222~\264\207[\3226c%4\2276N@\217{\345iU\333\005+B\237x\026\356\301\352\032iyr\227u\005@=bM`\350Xz\203E\303S\314\r\250\255\031u\215\266y\266\326c\030UJ?\357\35555\277\213O\243,\241\316pT\2722\225X\213\307\364uk\260\335+>-\021Z^\364\255Th\263\270\005K\301\032\311\215\r\222\350\274J\237\272\202\247#\226\023\261w\212\276\255\033\332\006\314\210\206K\372\274\253\373h,!\240+\246\021NF\264Jm\265\002\372\366/D\211u\253\013\007\034\277D\357\267\274-\335l\0246\215-rG=\213\331\260\234\3640\340\230\241\365\n?\351\":!\361$\037\220\231\206q\267a\364\004\342\312\330qs\236n\030N\360\272\255\331\360?\307Xc\221w\3128\213\246y\351\003\3165\330\327\037\200\177\350\266\025\251\001;5\340\310\033\300\274W=\356\006E\372\243\232\265\005~\004=\332\343>\347\257\267Cq\004\200+*\201\217\200\\\267\335\276\331E_O\235\203\t\324\030L\340\200\203\221v\010\350\267\341\347\033\376\201x4\334\350\266\251[\362O~\261\275\004\332}\377\274]8v\360?oW\264%P\253\013Q\271\021\020xU\252{R^\225\335\303D\376\013\205)\202\220m!\362\330@\2518]3$|\271\206l\231\223\201\254k\206\007\277\257\316^\2606\352\346~\321h\310jT\227D8\335M\305c\320TR\245\331\001e\213\321\250\0251g~a\371\3600\336\245\3646\005\202\301#\017\360\200\224\312\356\225\227\354/\377rB\027\301\207\254\023\242\022\205N\244\313\231a;b\210B\311|]\021\037I*i\307\265\341\n|[_\256&\214\000\311\310\244\265P\202\341\260\226\302\245{\321\253\314\366*\317z\225\311^e\275W\331\350Ut\370\204\3773\360\177Bw4\307\202T0\034\2316\327\224.w\266\201~\227\032\005@\311\252\221\r\212I\212\033\3144\311\356\271'/B\223\301\245\251\245\231\331\251\345\271\231%E\203\"=\212\317\321f2\035A\221W\253[\276\025\\\243\210\335\251\243\242Q\253\016m\351:r\237\222\004\303ea\220\022(\226\260P\313\271\377'\225ga<\rV\240\010\236\006\352\260\030\234\375*\340\346,\262\262g\350o \006\357c\347\357\310\037d\005) o\003\252\262\233\023J\234\237WD\010\260z\"&h\377J\206\324\027\035\224\240\243q\365w\3120\220\232\210\203\376\220\306@\000bq""\373V%\334lt\274\002\371b\272\003\236\373T\023\010\351y\256q\337\352\306\201kf\364\372\207\212x\200\302\240\353E_\327F_W\344\345+`\315J\357]\237\317\377\007\177\257\322\327\005|_\351R\225\256U\245+\242Xa\023P\\\215DBx\350\306:\230; \016\346B\"\024\211m\2060\334a\014\340\274\311\0023V\267\225\367Z\032\030\271\224\035\332\310\324*\022In%\366\311\336\247\005mSK\354\223\275O\013\024a\261_\376>m\030\351L\"\274_\376>mdR53k\324\336HF<r|\212jp\241\210o\223\3118\017\177\261\243T\300\030Y\215%\264n$\323^4\320\305\033$Z\376\206\3029\374\360\326\340\217\360\344\212Sw\\\20420&\205\211\021\263\371\205\037\212u\277\005\222\346C\252pY\301{G\314Xe\033\274\224G\033\314\327\347J:\213b\210\327/\300Zt\37422)\n\rJE\374\302\037\203nA\004\213\312\200@Ix\350\265\317\204H\357\010\226\021#\004\274\007O\276\343m\n\300\033R\025\301\245P\004\306 \212D7*\342O\355c\356R\334O4\031\217\010\302f\n\231\322\217\354\"`\205\3541\337\245\357\025\377\366\261o\374@(\320\022\211\004\205\326[)rE\311\331\364B*\262\235\214\262_EIn\323\033\331\277\002\317\326;6'\321\222\375F4%\271\264\365*o3:\275\343\314\270\233\177;\336\211\212\242%\366\355|g\025\222\017\322\366D\365T\267\010\"\353\341\026)2\307u\n\210CD\010&\266\305\003\307\024\226\266\237\030\253\266\220\221\275\223\237IJ\031\016d\303>\320\210\000p\254\327b\233\256|\346`V\"IP\253\021C\2421<\210\246\360\023+#C}\2531CT\251\302G]\371\r5Y\205\261\272\362\033j\262\032\247u\027h\250\321j\254\327]\240\241F=y\261#\267\356\346\274\2313\272\243\370F\024\250u6\023p\354\353J\273U\031\r\370\014\013\033\320\307\2553\267n\233\000\265\303\273R8\347=\277\362$\256\251\032\217\306g\016\250\025\224\030Xi\245\252f\316=\207\314\020\331\210\275S\214\367\354\340\002\273\221E\230g\344Ztx\203\010\327\321@&V \230\026^tk\355\204\250`\005A*l\035\n\323\2230\2117\261D\0048m(\004\206]($1^\021\237(\205\307>\331\216\030\257<\202\203I\\xf\340\207\234\341\020-\256\014\346 \305\211\200\215O\266\214?\024N\2465?]\221\302o\305\242\340U\272\275e\003\315\010\271X\006W\275\242\004\277\227\203q\004""\200p\306\300\271\363#\316\263\226\322F!\222\361m\021\332\372\262otd\250\277\337\357\247\257WJ\267\366\316\222>\237\242\r?]\255\0222\222!~\007\220\317H\276\321\022n\241$J\001h\252\226\221d'<K\361\362\"\005\260\245n\000\272\362;\006o\361\206\\\0072R\307\030}\t\203\315/E\257\342*!\266\365Za\302\343\"^\230$`\267+\211\033 \372\270\345\241\340W+\304ca\232]\206\003A\206\253\322M\007M+\013\271\324\355{\225w\333yT\301\246\244:\343\365T\362\204\266]\214\226\244\366\210\331\25250^^\241\221\321\326\300\014\362]\242;\261GO\207o\201\n\211B\371V\n\243\367R\333\362+v\265E\352]\304\026\235\354\to\\\240\007FD\250B\221\232\002\372S\017$R\224 \223\321\225\354U\260\210\017\030V\370\215\356}\227\240\345)k\310\363\347\321\242u6\265zN\343\335\340\006\235\255.j\357\360d:4\010\253\215\307\311\201\2145\r0{5\203\033\330\354\310\232\263\206\315\203\200\375\002\177\306\373\023\250\260\263\230\247\036\n\225|\316\333\362^\311\251\221\241\227\260\354\240\006\206\222QF\212\310D\360\276\014\361\302\363\032\266\030\017A\017\257\253\030\342\017\343\366Y\227`\201\216\357{\365JJH\227c\371\035\t<\325Y\2659\030\007\336\326\341\034F\315{\010\275\033!\364w\266\222Ip\351^\327@\024\242\206\020\350\312\343F2\251\304\361\230\232\353\354\334\204\022O\202Em\037\003D\211'%\215\367=\362\241=\236+\322\306{&#\355CzLb\222\003\314\206c&\021\327t]\311\030\341\361\245t\206\324Q\206b\312\246\016\037[\252N\321\364ZD\016\246\265\004z\020\314\301\265L2\243\2433u*\235N\246A7\016\246\322\301\314\032L>\032[\323'\005\337\2676\212\350~*\307\256\321\244\026\236\326V\247\3231\353 \006\275\345\347\021\202\351\265\014\332<\324\372Oj\342\247L\374\247LbvVM\317\252\333\263\250qX\216\\*1\233L\314%7\037\207\215\307\031\343q\364>\n\003\2352\236\240\230J\263s%\354E\004\007A\257yZ\252b\215\017\367Q(\224\230\353\036\354\031\036\305\003\300\003\361\306N\223<L\263\264+\324\235^\252\221\010\373f'J\370\263\2455Q\022U|\366\300\354m\366l\215\207\224\023\327\201\002\221\224\nmW\034-\220_\360Xo\371\025\232rVZ\017\255\272*\321\033W-z\347\254\026K\270""\253\301\233\212j\360\316\256\006\2262\273\335\010\365{q\317\221\230\245l|V\274\030\031\222^qsT\274\221\314Q\371\035cm\342\215le\212\227\334\244\024iw\2760\036\331\033\235}\243\006a\235\314\260\026\000\036\031'\024\20798#t\036\356\260R\234=\211\244\246\246lP\341\013\234\222\235H\2549rm\320\363\263!\326\263\274\002\220\264\370\227\225\006\362\267\036e\\\205\244\324\272\023\230N@B\n+\312\317v#I\321\010Mg\325\260[\225\200\317\323\361x\314\221F\243\206=\212\271\331\226\005;\270-\242\337\3709n~\025\210u\252\233\276\211,\351I\006\005\017}b\317H\371\354,\214\335\030\352'\354\201\353\025V\"e'2\253\342\260\214tjF<\332h\202)\343}\345\021\032\257c3^Ge*\216\307\310G_\334\307`\244\243/\326\243\204\207\222@\026\351tL*+\343!;)#e:Fm\237\225\361:\037\343u&\246\342\034L\345\331\027\257\363.^g\\*\316\265\270\316\262XI]\005\"\223\312;\010\000\323\031y~\306:X\002rZ\202\247\201\314!\315\261\n\323\031M.\272\245E\022\256\027\216\201\312c\334\306+\255\244Q\331O\025<\t\224\004\211#\031\316<\351\370\214\365\202+\tV\322\322\n\2544\323\010xJ\020\222\373\250\215\365\322\242!q\322\206R,\3460D\241\230\362q\233\212\2437\364\202\346\r\246\371\223m\343}\245\332\200oA\263\234z\027\003\210$\014\361\036$\356\366;\370\037O\234\207\346\000]\026\264\350\242j,j\361\350\242\226Z\244\213\314\0263\211\245\245\365\314RF{\366L\213\274\010\251<\236\036w(B\240\333\302\207\325\037\332\347@:)\374@\223\007\276\243\370?\262J\220\307\250\370s\261lKdx\332N\301\347v\"\034K\202D\0066a\200L\326C\036;\322\036\257\370\275\002h\354\342\3069\212\366pt-\274\336\037\nQt9~As(\021\361>TmU\r\277\t\307ux\253\207a\032\033\t\235+\001\341dj\233\300\317-\"\376\305\030[Z\244\000\326\342y\333~&\363)\202\236\023\344\017\370\377$~\314\342\307<~\274\260\225\t\2723\311b#\266\240\205\345\264VTV*\234\372\204\244J\300#\261\030\024\370\016\215\302\245L\310z\204C\205pi\017\262\342@\273\341\364\021J\241\376\020\nE\222a\374\330\006\3730\002\377\301p\201\302\323`\350\221\255G[\364\300\376\264tZC\274\322\243\244l\200m\203\356s\264?-\245\302\251\\\310)""\207\216\341R/\034\232\205[\251\220\364\tI\225pP\032&\220\372t\320$B\240\021$`2!\353\3526\266*k\232\261\276\016\330i\274G-\203|\0251\334n\000pG\305\266\003\005\031\323\355h!\220\335\002Y\231:\"4\021I\t\021\372\207\255z\310Z\207\245p\310\272\206\245fp\r\303V.$\275\202\251\024\2666\301\025\t\000\221\0044\0010\2560\330z\003W\031b\030\357&\253\014\314\354\330\010\2056\300\256\002\010\205@\236\252\234\214$\210\313\300\227\024\n\351\021^'\230j\301\275\246\033\330h2\222\001\322e\263\263u\014z\302\016\322(A\rd9\220\3207\364\265\215\355\020\340\030|\022=\30172\020\370B\326\002_\306{\370@fB,\022\233\n\205\254OKc\261\237t\036M\303\014\r\372\220\354\013\311\264\010%@\250\263\360F\371\t\204)c\236B\377\001\266\235H%tr?&\223\253\257\231\203\204\205\273@q\216\222I\230P\302@\267\001]m\307/\211\014\305c\253\272\037>x\232\234\227\354\020\264\2603t\032\017\363\377\021\220\330#t\343\364\034\312\036B\366\314\2279\025\341\027\025\246\222)\261\371\022BY\216\277x\200\017I(\000\244\253\247\214\224\201\260\206O\2025|#\254\341\313x\017\037\010d(\016\242b\323 \366\013\177x\344\211A\233\243\247\365cqi\025\220\000z\203\371\353\\\377c1\221\244\000\202d\327\371\202\260O\274\214\003f\031\n\001\324\370\362\301\023\007\273\276\036\213\032!\300\342-\340I\270\354\370?\220\036h\215D\n\300z,\305\321\322\031A]\32438-0\371a\364\241\020`\037\014\336\210\021sg\362\225\225\267\230\003S\033y\2046\217\330fa\332,\214\233\205j\363@m\036\246\315#\275\215\215\024\364\341P6]z\246\333F\255\222\244\306\270ri\353\230L\275\304O\030\275P0%\335R\250\225\266F)\224IK\217t\250\220.\355\321\2458\312:\243C]ti\212.%Q\326\017m\325\020\236\020\207$\345P\322\013\205J(i\203\\\021\224t@[\375\303\247\367\262\372gk~\\\351\223\365=R\365\310\003\344T\365\204\226'\024<CgW\024\260\317\020L\236]\314\242Co\222\332gk|\222\262'\364<\266\307\315\024=$\025\"\027\340\301\031\035\230\264[\351c\372\036|2F!t>\322 6A\351#\275\217)\177\262\n\270E\036\">gY\375\303g}\353M\004\201@\242\023q\003\037t+\270\357\311\213\320\243\307s\017\350\343\310\201\377""\236\220W\tU\307\220\365\240\334\224\337.\375i\006\267\372\361\335c\266\341r\263\262\225H2\003\360<r\004\210\313\225\203;\267/\003\203\257\370\3230<L.\215\014\205\346\026C\223\223\241\331\340sGrfN$\037>t\344bR\312\235\235q\344bR\316\235u\346\316:s\027\235\271\213\216\3349g\356\2343w\321\231\273\350\314]v\346.;s\237=s\344bR\312}\361\302\221\213I\310\235z\362x\342ah\"\320\337o=\016\211\007\373\335\375\340\342\024\177\236\014\276\340O\017\037//\360\307\331\231\211\205\307\213S\023\217\347&\305\233G\217f\\o\346\226\227\254Vf\037\317-=\344\317\216R/\246\202\013G\000b\330\r|Q\037\014\200X\031\236x\3519Vd\216\027!(\332c\240\244=\2009\321\300\234h`\2215\260\310\033X\024E\226&\001@\264\242v{\366;\273Q\353\335\\p\316]LN\022\234]-\321;WK\360\316\335\022\274\342\311e6\330e>\330e\347\364\226\305\330\227\027\235\320\234\\:\262\2744\301\326|r\351\305\223\251PpQNMN\312\251iG\336\303\207rjv\306\221\232u\244\034\365\346\034\251'\216\324\242#\265\354H={&\247^\300\332\006\227\216,\205p\233\373O\217\347`]B\370537\375\370\010\260\244\211\340#;+\004\223\014\005\037\315\000\226.\212E@\200Y`\304\347\311\245\020n\235\343\2269\203\202\235$0\330\311ig.\001\302N\022$\244\344\2543\351\254;\347L>q&\027\235\311eg\222\000b'\021\"\313\217`\326\177z<=\2758\265t\344\361\302\344\314\034\200\201\250:\370b1t\177\201\323\025\245f\346\344\024\344\315/\007\027\226\246\026D.O{2\350n\233\031\263@\033\246\307\351ob)\320*@\305\004\371\325\253\360\033%Y^\222t\3015=t\233[\267\241\021\256\031\013\005T\271)\212\322EQT\276\207\030\367g\350\220\035\242\372M\273\264\016\352xw*\340pD\032\340\021GM{H\322\350z\216\200\316\300<\245\025\"\3229\274\325\327\225#\343[>Pe\377\262l;\006\212\206&\247\246\203\313\217\200Rf\237\314\332\251\207\200\336\"\361\323\362\354\023;\305pM$\237L-,\005A\276\210\027K\177\262\237\221'\211\304\263\251\251\237\221>\305\013\340_\3233\017\244\216\236\004\027\026\247\026>\335\2221_C\210,\216\020%ja\311\247\351F\345\033f\277U\177\350Y\251\331\2274\373#^C<\342n\307<\252\344\233\013M\277\366\0379\336""\362a8\373e6\260{\312\227\177\273\333z&\033\334mm\203\177\277~}\344\270/\277V\230/\250\273\315\337|\270\223\235\310\276\255(s\342\310\361+\271\365\274\232\337,\314c\251\241\017z\366z6\222\353\311\017\346W\013G\013\017\213\301\342\323\322`)\\n\333m9\235\r`\243\347\262F.\260\333|\315\274v\273\370\266\324\264\327||\357dG6\234;\225\033\312\031\371\241|\2460Ul/j\245\341r\323^Kk\366x\356t\356~.\222\277\236\217\024\272\n\231\342d\251\271\334T\356(\353;\327v\346\367ZN\356\266\236\207\022A\034\325d\356Kh\031\036\036\346\202\271\2470\204p\241\315\225\204\001\234\274d^\274Ux[l\332m\371\356\303\273\254\236\353\334m=\013sk\271\014\275t\356\266\2345\317v\027\232\n\355\205hq\246\264Xn\24270\357\302W\205\027\305Xi\253\254\342T\206\262\031hu9\177-\277\004E\265\342P\361-N\356b\356zNuC\002*\2347\317\367\026\202\205\345b\017@\203\245{\nm\205^s\344\001\314\004z=\237\273\224\237\007p?+N\024a,\027s\010\253oOeO\303\254\216\346f\362\213\205&\217Vr\347\362my_\341ta\242\300+\265\0349\331\226=\n\213\365K>\220\237.\334(6\227\216\226\000:\337\233\337\367\027\233\000\260\261\222^\356\264\322\273g\024S\t\024\317\024\027\212z\251s\257\365J\016gq\372,,\307e\230\361\327\000\203\207\245I\200\201W\375>\300\215\2709\366\363\316\340\216\n/r\177\206\t\371\212gK_\225\346w\251\245\023G\316\366\026\002\273g\316\345\240\243v\374w\373N\251m\217\341\326\031\363\3645\030\342\203\302\035\000\363\263rp\267\371\273\017Fv8\327\224k\317\205\363g\362\313\260\332F1`\036\245I\376\332z\344\370\211\335\026\237\351\373\261\024(Q\341\377\200Eo9\225\275a\236\203\201\0002\356\301\260\337\347/\026\202\273\247\317\010\364\202\271cg-\037F\263\203YU\340 _\246\343\273-\327\362\3434\255hi\246<o5\213h\016\330\373\250\364m9\272\003\275\234\264V\264S\264\320\352=\330\013\271\356|\347g\034\354\275b[\261\253\270Yz\001X\350\036\354w\345\315\235\371F\006{>\327\266\327|\232\255\303$\340\0274\230\316vd\337\346\276\002\304\3564\2172|:~&\373\207|g~\310\364\335\006$\271V\232\367,G\343\036\342\364\0043\275\236\215\347o\024\216\003j\2750\357""\315\355\250{\364N\335\343u7s\177)\004\n\323\305k\305g\245\251r\033k\243\343\310\361\216\354R\256\r'0\370!\234m\0074<\235{\230\0172\202\333\312A+\370\360Wh\371+\240\224 \253\366\355\221\3437\362\317\200.\226\212\347K\2358\222\353\002\236\273\315\327\3633\200\247\221b'\266:\232\035\005\016\321\202\010y\262=\373<\007\340:\233\375\033\020\336\353\242\307\233_\233\021tl\270\317\362A\240\364\363\305\033\210\336\346\321s0w\230\001\202\007\201{\007x\301\313B\023\215\007\247h\230\247\257C\205y\363\010\300\366\327\233G\276j\376\373\346\207\305,\200\370\333\017\257a!\332v\201\377\036\203uk\332=z\354\357\357\201\312\tK\336b\217\347ap\315\347\021\n\310\225\232q\t\233\217|u\374\303W\037\226\263\235\300\247\233O~x\236\235\317\256\345\210\343\336\313\265Y\000_\005\3667\010+\334\006\274r\025\331\005M\263\225\230;\260:`\334\035\331\327y\"\305\3211\240v\327\273\273\367J\252\373]p\242\034\300\225\353\374$\355t\000R\003w\002Qp\022\033\275\231#1\322\325[xP\014\024\247J\310\026\000P\306\207\000\007\323n\313xi\241\364v\357\3507\037\002\037\036 \220-\2615p\344\370\267\037\226\262\227r\3639\225\311\2244\002\314\222)2E\261e'z:\013\230\003\210\234\337.~Q\204aSr\267\275\013\026;R\350)\336\001\016\360t\007\344\007Lw\317\215\342\027r\235\270\326\212ye\020\306:i\216>\334\371\222\370^sGV3/\336-\315\356\264\001\033\007l\233@YX\240Qqd\276\224\233+t\026\006\013\252yk\262<k\316/`\336\311\017S\200\337*\312\235\326\354W\260\236\004\263t\366\034\324h\2055\317\376\0044\017|\002\001\t\371K\346\371\233\254\021\034\332[\363\350\225\334/\205a\263\177\262\034\374\365\002\222\336\355\354\265\354<\243\023\304^Ub\034g\235\002\227\215\354/@\363S\200\317\327\212\363\364\302lgB/V|\007\020'\016\222\306\225\342\"\347\317\346\235\237P\340\322\013\224\236-\346\335YJ\222\334\212\027{Kj)S\376i'\014\363\263\245\331\363\342\"HxXsDpw[\370\376\024\342\024{\277\333z\311\274\324\007D|\2528XT\231\364\223\262k\r\201I\301\366B\270\330\346\352\033\345\375\205\272\246`Uhf\014x\324\274\370Ca\250\260m\216\376\274\3038\306\036\357\250""\027`\004\302\022\353\241\214l1\207\246\312\213;(\235sm\274;X*\324)\376fv\215\024\303 \361\260G\177A-\0209\337\315\275\005\322\337\302\301\312\274\371t\356\001,\311C\220\344Fq\030\230\314\022rE`3\346\367\303\260D7*\330\253EJ\214\255\322\327\233|\007hO\301\335j<\226\321\216RU\345\333k\276\261\237\302\327\334\020VU\325\r\033\326\210\352Q\206\234\313\334\270\372t\200\006\\5N\0349y%\027\007:\035)v\240\026\207\032\315\020@\261R{\312=\247\271-Y\252\227(r\311\034\237#\"\002P;\265\247G;\367A\214\2625\370\375`(\364hv\002\006\374z\216t\236\323\331\361\3747\204u\276R\233[C1G\347v\242\346\3222\212\311Q\363\032\350\202\277^\026\265\216\303\342\337(\036\003\260I\265\020\365\036\231\312h\351\353\222\372\367\340\356\345+$p\315\357@\252\376=\210\312?\212\307\335\346v`}\307O\240T8\235\355\311\005\240rs+(\301\304\373G\262gs\244\352\353Y\037\360\326\216\037\034\032).\331\267\010\211\377\310?\002\350\303\252\241\2121b\236\0076\277\333q\025\304\305\210\331s\027T\340\026\363\321\212\271\0225\243kH\t-g\262\323\346\205\301\342\210y\347\231\371\354\271(y\257\024)\367\232s\253\346\352\272\271\036\243\2228\267&\352\2660\211,\347\211\371\344\251\371\364\331\256\265\220\250\350p\343\350\204Ss9\316\014\224w\346\225[\000\361;\346\335\307;\010\020\363\014pjX\227\266sl\3208\233\346|S\376,\200\370\347\"\252\020V\016L\307(\375X&\221\261i\266\003\317\333=u9\247\3466\315\256Q\350\342\221\371\360\317\346\237a\254aR\032[\263_\233\035\267\n\233\346\360\242\271\270$J\216\225\256\227\342\346O\1771\377\0221#\032\225t\257\352\243\235isa\021\262`M\276\375n\027\3765\243\312@k\003\313\362\307\246#\307/\347\226\362\200\017]\371\247@\033mL\031\033\003\251\027E\275\030\371\330IPvr\307r\377\001\272\300@q\036\337\235\311\276B\240\002[W\255\334L>\310r\376\014X\216: 3\000\333Q\316\346:eX\313F\307\231vnr\\\316-\344\336Z\372@47\r\315W\360\300\335\323\227 \343\006\310BZ\2376\206F\255\331/pB-\037\246\001\211:\300L\035)\234\005\310#\214P\313Q],\262\005\346\266\210X\007x\212c'\246-?\203r\270\347\354\370~\371j\0311\232)\322""\037\301\236O\240\312\260\r\252\340\000\200\374\034\021\325\227(Pw[/\233\227Q\354\241A8\301\330\220\373\rb\325\025\353\3351xs\rl\"\273\224\365\246\002\001~\336\031!\261\177r\017H\021\327\246\273\320M2\200`\021\2609\355\205b\200\031\373\200\361\227rSf\347\375r\337\316[\363\311\374\036iA\313\271N\320\237[\257B\3116dP\247\263\003\244\222\343\n\236%el!\227\316_*,\024\322`g~Q\272\312\014\246V\256\253\021\202 K\272\230'\255\350\204m\250\277\002\233\347m\361\353\242\352m\342\231G\277\317\205\nA\264@$U*\360QJ\324\357\211O\003a\002\362\006+\330eG\366\005P\371[\007\273d\252Z\356|\2364\373MB\344V\234\376]\030\343\261\302_\231\211\325\342(iS\245\257p\261\010x\014$\355(%\014\321t\366\",\307\374\337q\341\276k\335e\243B\006\000*\277\352f\342\327\363?\303\252}\005\374\0008\007\263\360P\313\317\337\261\036\257\230WPh\236)>gf\251\236\355\"4Y\314\037\005\000\314\024\227K\235\326\322\236bd\271PI5\273\001`\366l\264\234l\371h\257W\230\345d=\222%\004\344g\000\211\001C\331\263\354\306\357>\274g\236\250\263L\253?@)\\\3653\016\274\373\246\022\203:P\337;k\236E\2212\005&/\232\344\240\377]\313>C\226\306z8\205\2160bL\027\315\213\350\250\321\200\007\204K\247KA\252\212\232VWA\007\304\345*\257\247\207\200I\334\326\332V9\t\314\361|\013,\311S@\267&\261\262\270\236\022\322\321\007\211\005\261\332\354\343\344\007\302\306\257\305\272\313,\020\227\002;\370\021\321\0243\210\246\007\263q\230(.\036\2422\232K\273\255\027\320\217G\037h;\267\"\373g\271\360\001\222\265\355\254\331\321S\350@=\257\361\372\204,\320\010@T^\301\266\203\267\325\314\333\252\250Oek\325?(|O\021\354n\026\2561\t\"\\R=\210)m\273\327n\344\337\000\035\315\003\207<}fO\266Y\247\313q\224\356\016Cw\257\3712 \312Y\364\031\265e;\310a\272\333\374}\356Oy\035\370U\363\025\344(\307\021\271\217\001z\264v\027N\200\300?s\036\004\347_\0137\213\017J#\345\3662\032xmg\210\277?\003T:s9\227 \242>\007j\343\031\224\222\327\200X\316\201Z\265\327~17\004\r\236\0011\024\000\325\341z1B\030\217i\344\204\200\247{\010\227\354kR!\257\303\344\010V\022E\330\223%\227\303""\037\313_\226\177\334a\363D\226\321\013t\006j\004\251!\344\267 GE\0135BO\310)X.|\034\024\376KMHe\344\225\253\354\313\356\320\321\027\202\260\211)U\215v\027\347\335u!\227i\264\303\306f\010\275}K\310\325\226\375\036\r>\033\2319E\374!\177\r\354'D\002\t\251\351\2118\224UTRS\231\253\024\271\324\315b\260B5e\271\310\376~b\002\035j\241\240d\357\321O2\206\"\343;\363;%\217\356{\324\271\220q\303\213~P\206\2103F\321\3270_x]j\332%\377\226\205#r\341\316\374i@MV\0305\240\023\245NQ\370o\314Sh\025\376\360\237\350xs\227\2456\220J*\333`\322p\023\320\1771\177\242p\225vJ\030m\203=\"A^\026\215\367\233\\<\0225h-7\234'\373&C\032!S~-\275\267\245\273\360\r\363\255\241\3769\214Z-bCk_\341EQ-n\201\265\342\322\232Y\305`\371T9\300\364\346\335\026_~\233D,\350h\240\375\014\3018\227J\347\312\234\367i0\230)\000\323d\241\271x\274\324^R\345\201\215\344\333p\004_\302B\001d\225\374\267@\256z\261\323\034|\270\323\002f\340n\313\205\\\227y\345\217\345\223;\363@\216\244 3g\030b\320\231\037\n\303\320o\0333\316\202\273\027\020/\316\235\347\377.\002\217\311\177\231\377\021t\037\306\264\316\235\337\203\221c\275\000z\201K\267\313\327\313\352>uE\255J\366\261g\315\016\361\367v\356\006\356\222\234\246\275\247\343;\355;\252\245\344\343,\007\300\226_\000\205\242\205\274Y\366\374\301\264\331kA\003\201l\317\033\2647\345\006\362 \361AX\361\366\253d\214\000\253\377\006t\267 >\264\240\003\031\270\247\331\215\273\010S\000\361\326+d\001\215L\224\003`+\264\366\202A\t\032-X\314P\372\333\274\212\314\327\374\341\217\345\226\035\250\1779\247\231\327\230\273\021\270\367\036\010\235)\020\356\250\353A\337\300W{\310H\357,\016\201\211\010C\272\230\033\0074\275\214V\357\245\357\255\177\227sQ\034\003<\357\001\330\200\201\267\345n\nozG'h{\235\244_\334\"\325\232i\027\362\014\207\212\367QieJMmh~\247\344\030\237\202\177}\240\337\003W/\006\211\034N\235\256E\016\014\324\261\334\333z(\240\013\2758H\001\355\331\247\271\333\240~\257IH\375\254\364\260\034\334\027\251_\347\277\316\253\037\201\324}\205\305}\220\272\031\306;\0102\256\023\226EBO4W}""\205K0\314`c\010\372:\377\005\230cWq\260\035\270i`\317\345\r\222g}\010\332\236\375\031\206\366U\376y\341\317\2456\364V]\314\215\222\355\323Q\370\005\306)\341\002\212\344M\320*\277,\005\274p\001\275\356\357\240\251\023\205\0364J\367\237\205\214\030\003\305\253\220\327Tb2\330)\024e\304\230n\262\2513P\017b\\5\257\336\201yu\225\240\253\206x\\\224i\334\007C\207\323\331\261\334<\211\21537\315\233\301r[\271\253\374v\317\003%\216\202\031\244\203\342\003\244.\360\201`\326n\251\220u2\252\371\003\014\365\030\310\270n`N\267\321\022\245\236\315\213\003\3008@\325\257s\000\362\022\372\013\253\305\243u\210\272\207b\t#\271\316\006h\273Ar\376X\031\265?9{\310(y\371~\00393Q\036@\257\2027\031\233\027\231C\373\367\300\317\3555\177\rc\234oH\247\361\345\337\243[\261A\025\345c\271\371\376*J\025n\376\032\030`g!\360\017\341\344\263l\235?\275^\301\364\203\237H\000 \272\023Fu\345\337\241\210@\251\305d\306O\2058\331o\237\017\337\234b\242:\217\271k\323\326(P\351j\361d\251:\322\265g_\346\233\362\355\270s\005m\200i\271\004\323\326PW\223\274\022\210j\223@\362C0\351m\212\203\221\275\215_\231}\367\3137v\274\354+yX'\230\341\326\007\330\363u^+\214\3103\335\247\352\030:\254\233)\276\240\216y\340.\363T\356Ln\031\026\351-m)\310\363\230\246\320\246s\240L\243Xt\315\343^)Z\016\242S\221\306\321\212\201\r\364\201\362\240\031-J\356\366?\301\271\025\023$\270G/?\264\344\356#\316\266f\277A\331\264W\207\307\325v\260\352\314\rI\035\220\207\221I\252N\307CKn\"\367\226u0\230C49\331Z\271\241r\t\370'\307\315G\300 NS\264\024QW\333%b\217\250\035\3373{\306\020m\367p\237\016\305\037\006e\240\203\026I\276\025\365\311\321\374ha\274\324RF?Q\325n\330\276_\234\357\037B\022wh\037\231\2433;\247w\354n/\233\337\203\032\345\335-\032\235\277P\334\324m\313\355\\\323\357+\343\2137\322,4yy\\-'\334\261l\006P\3728 \002\356\332\240\355\210\201K\270\373\202\301a\350\313\351`aG\322>\327\224\031x\300^2sf\272\320\271Os\273g\256\344\376J\333\177[\200Y\323;\235{u\264w#\377\222\366\2706q\246\215\272\205\t2\255\226\033C\206\207\337b\013k\271\272d""\020\240;,\377\020\260\320)\334\265p\221\321\003@\213;T\320EB\023\345\221\2356k\024\202I\271\250\271\241\201\234D\004z\221\217\301\002\3426\252\013\2023;\035\210\206\222P\014\022<\246p\203\255\360\036\344\345\371\235\256\235\267\266PY\007\353\357Aa\240\360\274\270P\374+\372\t\320\r)\t\277\316\374yP\342\003\024\257\350-\000)\2402?\002\362\231\213>d\336\344/\261\345\362\271\302\371b\027\355\357\313,\274\277\370\005\323w\235,\334\005\035d\223\376<\037\024R\340\210\305\257\004kB\217\227\345\022\273!\334\312\256\215\215{\270n,\264\014f\201\033\r\365m\374\264q\236\304\034\361\035\200\273Z9\360{\333\366q\202\241*\303\246$\000i\245\311^\177\036\350\372K\236<fk (n\200\016\325\\:Y\346\321\0351\212`kn\267\266\007\244 $\317J\315\030\266\365\034\000\377en\014\204\313%R\023`\\\013\037~A\2548\225\365\201P\215\302\034\036\026g\313\024],\355\306\r\320\376\022\017\315\302\310\257uD\365\006\246\010\263{\332d\341\300\000\214\271#\247\347\257\202^x\224\305\177\340\260\337\221\324]/\254\0277\312\001\234\322p\366\213\354\325\354d\356X.\235?\005\202}\013\364\004\304\315x\371j\371~9\262\363\203\271L\021\000R\355\265\302\374>q2n\2249\024du\0132\231\005\3642\026p=\253f7\201\227\341\272\305\212\231R\320\263\360\r\271\360\363\374\323\302h\361\016\013\213\302\ta\030\354\rPu\r`\256\316\330?@\260\266S\274)\3021y\013u\262\311{\017\365,R{\305\346i\323^\033z?\266\311d\021o\217\027/\322\006c\033\356\262]$\207\033\344\245)\372)F\333\255\315\316\215\324=\300\251mP\342\332\354\320F\217\270|)\212x4\367c>R\350%\217\357\233\035\3421\247\370vmO\341G@\345\037\230uc\321\030\276\004U\023\275\277\016\006\332\353\n4\224\230\345\005\036\254\365\024\026\266\371\302A\267\314\001\256,}\311\034\236.\207w\332\366h\3171\222\025\314\022c\360\303%\317(?\021\314u\0379\343a\010\343\357E\002\271\261Hqb\021;[q\254\360\266\221`\013N\0212l1(\35760\345\211\362[\tb\036\261~\030`\264\000J\3433(\232Fvu\210*\277\033eE\306\223n\027W\021\234\340\023\3048\343\214\\\274\346\024\206s\037\242\302\357\004\025X\001K\243\263\367\233]\273""\321\362\036\364\212\320\355\206Ar?\317/\202\260X$\277R{)\\>\303\206J\265\216\243\3216kv\006\212mr\364\236\035fq.w\2349\247\354@\014\214\"a[\266\356@J:\356t\267\024\254\035D\331e\376a\301\\xn>\177\341\016\241\004[\360\217\345\257\361T\331\311=a\253R(\233\233\"n0\240\215\202\3414\221\333\312\253U\363\007@\033:\226\177+\362i\317\232\224aJ\332\3722\001\226>\020\014\354\203\2536WI'=\305\3704;\206\347TN\277fa|h{-2\313P\274i&\017\244\374p\022F\324\344x \225\326\355\363\221\016B5\323\0211<\234A\232\311\030\254\3503\036V\334\322\016\244}\017Q\376$\363\226\311\261K/\330a\274\177\235\271\237\374\360,\033\314\376\211\234\311M\030v\212Q\312\245c\245\267x4\361\344\207\027\240\320\"7L\340\256Jm\210\354~\177Y\034l\331m\243s/\346\3151f/\343&\257un\200E\242\2371\207\247\312\313;\240\000\357\236=\347<\2675i\366\377\261\374Uy\036\262:\316\332Y\257\n\235\205!\363\326\037\200\037\002\356\242\321/\262B\350\2321\003A\214\374\201\254\363\027\244\3160\016#b\016\334\307\355/\310k\357\260\253\341\221\302\353\246\377\036ZI\300\024Zd\002\320)\252\244\211\353\357\322\231\253\243@\310\010\005\036\273\2131\324\233\024e\321U\330*FK\017\312\001\2543ev\342\301\212\013\354`E:\333\366\221\021\237x~\322>xw\310\361\033=H V\344\234}\244\016\310\305+\343>n\232b\306\303<\341\204\343\004ASex2\271\276\260\374\343B@\"\200s\271\257s\033\0266\037+gX\030\360<\006\001\003\365\261\332\3740\315\005\356\253j+t\027\273K\275V\310\360|\025r\022y\006sx\331i\201\243\354,\316U\3279\266\363,\254\351~\3415n\240\3576\237c\351\311\342\t\371\340\345&\2365,\\(\376\210d\201m/\233W\307\300N<\310!!>\362(,\206\016\314\265\275\244\322\271\320\177\310\241\312\316\374\245\302\013s\0047\226p.\027s~\230&\34669\235K\354\200v\333'\240U#+\005\247\237-~\301\313\"bW;\214\364\2404PZ(\245)\204\361\304\357\353\254X\023\242.\207\210b*C$\021,\374\335kU\362')\020x\204\271\206\256\344\376&'\025\n\341]\006h#\346U\026\376O\030S\2468Mx\350NBg\375\374\024\365\004X\361\255\274\363\345\322\2152\020\360\367\346\367\367J*r\3326g\224\271\345\265\230\312\265q""\277\305\267\322V\3047r\354\370\001\216\306\340F\306\321\342\303R\020O\227\313/\277.\3268\021\363\322|\251\232\352j\035'b^\231\257\302f8\342y\"F\034\2100\217B%\211K\220\217\311\374\341G\274\335\200\362\230\270\256\232\333b\023\213,\013E\263\310`\256\342\271X+-\030L\007;l\235\241\335\211\341<\265\267\206H\246\231?\002\264\360\344\2250\241?\231E\205\264\236[\003\276\361\000\004\333*\005\001\035ZT\277\017\366\340\\\375K\2544\206\325\353x\332\246j\376j\376K\014\375\301\374u\300\217\177\300}!\204\217\377*\027\207\234\345{\004\330\301\277\332-\"\355\300W?\315\r\"GK\367\t\005\250\265\346\306n\0219M\346\001F/\314W\275R\204\3412\277D\340\202\025O\375\331/\021\270\234\213\231\276\211r\000yo\253\305\252\377R\014\300\320\2372\236\356\310\347\324\331\351\225\201dI5\022\354\324\232\303S\346\320p\023\266\345\245\355@\225\356\302w\200d\255\2145\r|\364A7\313\223\206\000\210\233\003\023\030g\264\313O\001\342Y\260\031\344>\277/E\351j\336_lb@\273L\373/\035\354\320\261\r4~\262\304\034\004\230S\274\017\336\267\360V\022\343$\350\315\336\273l\003\211a\251-\306\235\271\300\",\233\034m\032\322\375\233\244\266\020\222g\314\276\361\322r\271\023\007w\0137/\366\031Mg^.\323\343\320\014 \3171\032g\356\205\334\255\202\253}:\261Nv\373&\332\373\330\302\225b\223{\266\205\307%\253wn_3S|4\037`\327cHo\356\024\202T\312\251\200\034\271\232\357\374\325\337\320](]y26\202\362\205(\316\253QN\354{5\312w\244\345\003\263?\233\377\202\\\006_\222E\205\324\353\365\022\343\324\002\265\356Na\367\233\320]&u\337\211\362\207`\271\355s\335\267\322X\333\215\337\301\362#\030<\363{\307\311\021\213'\213iU\267s\315\300\201\356\200\300\276_Tw\345\013Z\256\344\336\345\337\362\323f\237\341\006$\363\332 \r\364|\271\207\351\330\356\363\274\337`\\M\035\267 q\257\2305\340\317\177+F\333'\276\021\243\271\201\353)H\302~\314\215\030u7\340\252q\200\0331\332\361\254\272}\033\306\343\035\035\375\001\377\034\267a0\\\342^\035:\350|@\257\316\377\0073w.Q";
    PyObject *data = __Pyx_DecompressString(cstring, 15905, 1);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #else /* compression: none (66969 bytes) */
const char* const bytes = ")02d-%02d%02d-%02d:%02d:%02d-%02d:%02d:%02d.%06d%02d:%02d:%02d.%06d%02d:%02d:%02d+%02d%02d04d%06d06d2d%.7fA drop-in replacement for Pandas `<'DatetimeIndex'>` with extended parsing,\n    timezone normalization, resolution control, and delta-aware arithmetic.\n\n    `Pddt` behaves like `DatetimeIndex` in all common operations, while adding:\n\n    - Robust datetime parsing (via custom parser).\n    - Nanosecond/microsecond/millisecond/second unit conversion (`as_unit`).\n    - Vectorized calendar operations (year/month/quarter shifting & replacing).\n    - High-performance datetime arithmetic (`add`, `sub`).\n\n    ## Important Note\n    `Pddt` is `datetime64[us]` focused. It will try to retain nanosecond resolution\n    when possible, but will automatically downcast to microsecond resolution\n    if the value exceeds the bounds of `datetime64[ns]`. This behavior applies\n    to all `Pddt` methods.\n    '.\nAccepts: .\nAccepts: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'Adjust the date and time fields with new values,\n        without affecting the timezone `<'Pddt'>`.\n\n        :param year `<'int'>`: Absolute year. Defaults to `SENTINEL` (no change).\n        :param month `<'int'>`: Absolute month. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..12].\n        :param day `<'int'>`: Absolute day. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..maximum days the resulting month].\n        :param hour `<'int'>`: Absolute hour. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..23].\n        :param minute `<'int'>`: Absolute minute. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..59].\n        :param second `<'int'>`: Absolute second. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..59].\n       "" :param microsecond `<'int'>`: Absolute microsecond. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..999999].\n        :param nanosecond `<'int'>`: Absolute nanosecond. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..999].\n        :returns `<'Pddt'>`: The resulting datetime with new specified field values.\n\n        ## Behavior\n        - Replacements are `component-wise`:\n            * Any of the date fields may be left as `<= 0` to keep original values.\n            * Any of the time fields may be left as `< 0` to keep original values.\n        - Day values are `clamped` to the maximum valid day in the resulting month.\n        - Only time components within the index resolution are modified;\n          e.g., when index is in `'s'` resolution, `microsecond` and `nanosecond`\n          replacements are ignored.\n\n        ## Equivalent\n        >>> dt.replace(\n                year=year,\n                month=month,\n                day=day,\n                hour=hour,\n                minute=minute,\n                second=second,\n                microsecond=microsecond,\n            )\n        Adjust the date to day (+/-) offset `<'Pddt'>`.\n\n        :param offset `<'int'>`: The day offset (+/-).\n        :returns `<'Pddt'>`: The adjusted datetime index.\n\n        ## Example\n        >>> pt.to_day(-10)  # 10 days ago\n        >>> pt.to_day(10)   # 10 days later\n        Adjust the date to the specific weekday of the current week `<'Pddt'>`.\n\n        :param weekday `<'int/str/None'>`: Weekday value. Defaults to `None`.\n\n            - `<'int'>`  Weekday number (0=Mon...6=Sun).\n            - `<'str'>`  Weekday name in lowercase, uppercase or titlecase (e.g., 'Mon', 'dienstag', '\346\230\237\346\234\237\344\270\211').\n            - `<'None'>` Retains the original weekday.\n\n        :returns `<'Pddt'>`: The adjusted datetime index in the"" current week.\n\n        ## Example\n        >>> pt.to_curr_weekday(0)      # The Monday of the current week\n        >>> pt.to_curr_weekday(\"Tue\")  # The Tuesday of the current week\n        Adjust the date to the specific weekday of the previous week `<'Pddt'>`.\n\n        :param weekday `<'int/str/None'>`: Weekday value. Defaults to `None`.\n\n            - `<'int'>`  Weekday number (0=Mon...6=Sun).\n            - `<'str'>`  Weekday name in lowercase, uppercase or titlecase (e.g., 'Mon', 'dienstag', '\346\230\237\346\234\237\344\270\211').\n            - `<'None'>` Retains the original weekday.\n\n        :returns `<'Pddt'>`: The adjusted datetime index in the previous week.\n\n        ## Example\n        >>> pt.to_prev_weekday(0)      # The Monday of the previous week\n        >>> pt.to_prev_weekday(\"Tue\")  # The Tuesday of the previous week\n        Adjust the date to the specific weekday of the next week `<'Pddt'>`.\n\n        :param weekday `<'int/str/None'>`: Weekday value. Defaults to `None`.\n\n            - `<'int'>`  Weekday number (0=Mon...6=Sun).\n            - `<'str'>`  Weekday name in lowercase, uppercase or titlecase (e.g., 'Mon', 'dienstag', '\346\230\237\346\234\237\344\270\211').\n            - `<'None'>` Retains the original weekday.\n\n        :returns `<'Pddt'>`: The adjusted datetime index in the next week.\n\n        ## Example\n        >>> pt.to_next_weekday(0)      # The Monday of the next week\n        >>> pt.to_next_weekday(\"Tue\")  # The Tuesday of the next week\n        Adjust the date to the specific weekday of the week (+/-) offset `<'Pddt'>`.\n\n        :param offset `<'int'>`: The week offset (+/-).\n\n        :param weekday `<'int/str/None'>`: Weekday value. Defaults to `None`.\n\n            - `<'int'>`  Weekday number (0=Mon...6=Sun).\n            - `<'str'>`  Weekday name in lowercase, uppercase or titlecase (e.g., 'Mon', 'dienstag', '\346\230\237\346\234\237\344\270\211').\n            - `<'None'>` Retains the original ""weekday.\n\n        :returns `<'Pddt'>`: The adjusted datetime index.\n\n        ## Example\n        >>> pt.to_weekday(-2, 0)     # The Monday of the week, two weeks ago\n        >>> pt.to_weekday(2, \"Tue\")  # The Tuesday of the week, two weeks later\n        >>> pt.to_weekday(2)         # The same weekday of the week, two weeks later\n        Adjust the date to the specified month and day in the current year `<'Pddt'>`.\n\n        :param month `<'int/str/None'>`: Month value. Defaults to `None`.\n\n            - `<'int'>`  Month number (1=Jan...12=Dec).\n            - `<'str'>`  Month name in lowercase, uppercase or titlecase (e.g., 'Jan', 'februar', '\344\270\211\346\234\210').\n            - `<'None'>` Retains the original month.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n\n        :returns `<'Pddt'>`: The adjusted datetime index in the current year.\n\n        ## Example\n        >>> pt.to_curr_year(month=\"Feb\", day=31)    # The last day of February in the current year\n        >>> pt.to_curr_year(month=11)               # The same day of November in the current year\n        >>> pt.to_curr_year(day=1)                  # The 1st day of the current month\n        Adjust the date to the specified day of the previous month `<'Pddt'>`.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n\n        :returns `<'Pddt'>`: The adjusted datetime index in the previous month.\n\n        ## Example\n        >>> pt.to_prev_month(31)  # The last day of the previous month\n        >>> pt.to_prev_month(1)   # The 1st day of the previous month\n        Adjust the date to the specified day of the next month `<'Pddt'>`.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            ""The final day value is automatically clamped to the maximum days in the month.\n\n        :returns `<'Pddt'>`: The adjusted datetime index in the next month.\n\n        ## Example\n        >>> pt.to_next_month(31)  # The last day of the next month\n        >>> pt.to_next_month(1)   # The 1st day of the next month\n        Adjust the date to the specified day of the month (+/-) offset `<'Pddt'>`.\n\n        :param offset `<'int'>`: The month offset (+/-).\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pddt'>`: The adjusted datetime index.\n\n        ## Example\n        >>> pt.to_month(-2, 31)  # The last day of the month, two months ago\n        >>> pt.to_month(2, 1)    # The 1st day of the month, two months later\n        Adjust the date to the specified month and day in the previous year `<'Pddt'>`.\n\n        :param month `<'int/str/None'>`: Month value. Defaults to `None`.\n\n            - `<'int'>`  Month number (1=Jan...12=Dec).\n            - `<'str'>`  Month name in lowercase, uppercase or titlecase (e.g., 'Jan', 'februar', '\344\270\211\346\234\210').\n            - `<'None'>` Retains the original month.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n\n        :returns `<'Pddt'>`: The adjusted datetime index in the previous year.\n\n        ## Example\n        >>> pt.to_prev_year(month=\"Feb\", day=31)    # The last day of February in the previous year\n        >>> pt.to_prev_year(month=11)               # The same day of November in the previous year\n        >>> pt.to_prev_year(day=1)                  # The 1st day of the previous month\n        Adjust the date to the specified month and day in the next year `<'Pddt'>`.\n\n        :param month `<'int/str/None'>`: Month value. D""efaults to `None`.\n\n            - `<'int'>`  Month number (1=Jan...12=Dec).\n            - `<'str'>`  Month name in lowercase, uppercase or titlecase (e.g., 'Jan', 'februar', '\344\270\211\346\234\210').\n            - `<'None'>` Retains the original month.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n\n        :returns `<'Pddt'>`: The adjusted datetime index in the next year.\n\n        ## Example\n        >>> pt.to_next_year(month=\"Feb\", day=31)    # The last day of February in the next year\n        >>> pt.to_next_year(month=11)               # The same day of November in the next year\n        >>> pt.to_next_year(day=1)                  # The 1st day of the next month\n        Adjust the date to the specified month and day in the year (+/-) offset `<'Pddt'>`.\n\n        :param offset `<'int'>`: The year offset (+/-).\n\n        :param month `<'int/str/None'>`: Month value. Defaults to `None`.\n\n            - `<'int'>` Month number (1=Jan...12=Dec).\n            - `<'str'>` Month name (case-insensitive), e.g., 'Jan', 'februar', '\344\270\211\346\234\210'.\n            - `<'None'>` Retains the original month.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n\n        :returns `<'Pddt'>`: The adjusted datetime index.\n\n        ## Example\n        >>> pt.to_year(-2, \"Feb\", 31)  # The last day of February, two years ago\n        >>> pt.to_year(2, 11)          # The same day of November, two years later\n        >>> pt.to_year(2, day=1)       # The 1st day of the current month, two years later\n        Adjust the date to the specified month-of-quarter and day in the current quarter. `<'Pddt'>`.\n\n        :param month `<'int'>`: Month of the quarter, automatically clamped to `[1..3]`.\n            D""efaults to `SENTINEL` (retains the original month-of-quarter).\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pddt'>`: The adjusted datetime index in the current quarter.\n\n        ## Example\n        >>> pt.to_curr_quarter(month=1, day=31) # The last day of the 1st quarter month in the current quarter\n        >>> pt.to_curr_quarter(month=2)         # The same day of the 2nd quarter month in the current quarter\n        >>> pt.to_curr_quarter(day=1)           # The 1st day of the current month-of-quarter in the current quarter\n        Adjust the date to the specified month-of-quarter and day in the previous quarter. `<'Pddt'>`.\n\n        :param month `<'int'>`: Month of the quarter, automatically clamped to `[1..3]`.\n            Defaults to `SENTINEL` (retains the original month-of-quarter).\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pddt'>`: The adjusted datetime index in the previous quarter.\n\n        ## Example\n        >>> pt.to_prev_quarter(month=1, day=31) # The last day of the 1st quarter month in the previous quarter\n        >>> pt.to_prev_quarter(month=2)         # The same day of the 2nd quarter month in the previous quarter\n        >>> pt.to_prev_quarter(day=1)           # The 1st day of the current month-of-quarter in the previous quarter\n        Adjust the date to the specified month-of-quarter and day in the next quarter. `<'Pddt'>`.\n\n        :param month `<'int'>`: Month of the quarter, automatically clamped to `[1..3]`.\n            Defaults to `SENTINEL` (retains the original month-of-quarter).\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to"" the maximum days in the month.\n        :returns `<'Pddt'>`: The adjusted datetime index in the next quarter.\n\n        ## Example\n        >>> pt.to_next_quarter(month=1, day=31) # The last day of the 1st quarter month in the next quarter\n        >>> pt.to_next_quarter(month=2)         # The same day of the 2nd quarter month in the next quarter\n        >>> pt.to_next_quarter(day=1)           # The 1st day of the current month-of-quarter in the next quarter\n        Adjust the date to the specified month-of-quarter and day in the quarter (+/-) offset `<'Pddt'>`.\n\n        :param offset `<'int'>`: The quarter offset (+/-).\n        :param month `<'int'>`: Month of the quarter, automatically clamped to `[1..3]`.\n            Defaults to `SENTINEL` (retains the original month-of-quarter).\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pddt'>`: The adjusted datetime index.\n\n        ## Example\n        >>> pt.to_quarter(-2, 1, 31)  # The last day of the 1st quarter month, two quarters ago\n        >>> pt.to_quarter(2, 2)       # The same day of the 2nd quarter month, two quarters later\n        >>> pt.to_quarter(2, day=1)   # The 1st day of the current month-of-quarter, two quarters later\n        Adjust the date to the specified day of the current month `<'Pddt'>`.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n\n        :returns `<'Pddt'>`: The adjusted datetime index in the current month.\n\n        ## Example\n        >>> pt.to_curr_month(31)  # The last day of the current month\n        >>> pt.to_curr_month(1)   # The 1st day of the current month\n        Adjust the date with new values, without affecting other fields `<'Pddt'>`.\n\n        :param year `<'int'>`: Absolute year. De""faults to `SENTINEL` (no change).\n        :param month `<'int'>`: Absolute month. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..12].\n        :param day `<'int'>`: Absolute day. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..maximum days the resulting month].\n        :returns `<'Pddt'>`: The resulting datetime index with new specified date field values.\n\n        ## Behavior\n        - Replacements are `component-wise`: any of the date fields may be left\n          as `<= 0` to keep original values.\n        - Day values are `clamped` to the maximum valid day in the resulting month.\n\n        ## Equivalent\n        >>> pt.replace(year=year, month=month, day=day)\n        Adjust the time fields with new values, without affecting other fields `<'Pddt'>`.\n\n        :param hour `<'int'>`: Absolute hour. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..23].\n        :param minute `<'int'>`: Absolute minute. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..59].\n        :param second `<'int'>`: Absolute second. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..59].\n        :param microsecond `<'int'>`: Absolute microsecond. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..999999].\n        :param nanosecond `<'int'>`: Absolute nanosecond. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..999].\n        :returns `<'Pddt'>`: The resulting datetime index with new specified time field values.\n\n        ## Behavior\n        - Replacements are `component-wise`: any of time fields may be left as `< 0`\n          to keep original values.\n        - Only time components within the index re""solution are modified;\n          e.g., when index is in `'s'` resolution, `microsecond` and `nanosecond`\n          replacements are ignored.\n\n        ## Equivalent\n        >>> pt.replace(\n                hour=hour,\n                minute=minute,\n                second=second,\n                microsecond=microsecond,\n                nanosecond=nanosecond,\n            )\n        Array size must be greater than 0, instead got %d.Cannot add delta to ndarray[%s].\nSupported resolutions: 'ns', 'us', 'ms', 's', 'm', 'h', 'D'.Cannot compare datetime indexes with different length: 'Cannot compare naive and aware datetimes:\n  - datetime1: 'Cannot compare naive and aware datetime indexesCannot compare ndarrays with different lengths.\n  - arr1 length: Cannot convert 'Cannot convert Cannot convert array element '%s' to datetime.Cannot convert array from datetime64[Cannot convert ndarray[Cannot convert '%s' to non-negative float: contains more than one decimal point.Cannot convert '%s' to non-negative float: no digits found.Cannot convert timestamp '%s' to datetime.Cannot create date using custom 'dclass' Cannot create datetime using custom 'dtclass' Cannot create time using custom 'tclass' Cannot create timedelta using custom 'tdclass' Cannot get the length of 'Cannot parse 'Cannot parse 'data' into datetime index.Cannot parse '%s' to float: contains more than one decimal point.Cannot parse '%s' to float: contains more than one negative sign.Cannot parse '%s' to float: contains mixed positive and negative sign.Cannot parse '%s' to float: contains more than one positive sign.Cannot parse '%s' to float: negative sign found after digits.Cannot parse '%s' to float: negative sign found after decimal point.Cannot parse '%s' to float: no digits found.Cannot parse '%s' to float: positive sign found after digits.Cannot parse '%s' to float: positive sign found after decimal point.Cannot parse '%s' to integer: contains more than one negative sign.Cannot parse '%s' to integer: ""contains mixed positive and negative sign.Cannot parse '%s' to integer: contains more than one positive sign.Cannot parse '%s' to integer: negative sign found after digits.Cannot parse '%s' to integer: no digits found.Cannot parse '%s' to integer: positive sign found after digits.Cannot perform addition on ndarrays with different lengths.\n  - arr1 length: Cannot perform multiplication on ndarrays with different lengths.\n  - arr1 length: Cannot perform subtraction on ndarrays with different lengths.\n  - arr1 length: Connot parse element 'Construct a UTC-aware index from POSIX timestamps (timezone-aware) `<'Pddt'>`.\n\n        :param ts `<'int/float/Array-like'>`: The POSIX timestamps to construct with.\n\n            - `<'int/float'>` A numeric value representing the timestamp.\n            - `<'Array-like'>` An array-like object containing elements representing the timestamps.\n\n        :param size `<'int/Any/None'>`: The target size of the index\n            (required when `ts` is a float or integer ). Defaults to `None`.\n\n            - `<'int'>` A positive integer number.\n            - `<'Any'>` Takes the `len(size)` value as the index size.\n            - `<'None'>` Ignored when `ts` is an array-like object.\n\n        :param as_unit `<'str/None'>`: Convert to specified datetime unit after construction. Defaults to `None`.\n            Supports: `'s'`, `'ms'`, `'us'`, `'ns'`.\n\n        :param name `<'Hashable/None'>`: Optional name of the index. Defaults to `None`.\n\n        :returns `<'Pddt'>`: The resulting datetime index (timezone-aware).\n\n        ## Notice\n        - This method only construct `datetime64[us]` index (microsecond resolution).\n        - Parameter `as_unit` converts it to other datetime units after construction.\n\n        ## Equivalent\n        >>> Pddt.fromtimestamp(ts, size=size, tz=utils.UTC)\n        Construct a fixed-frequency index `<'Pddt'>`.\n\n        Construct datetime index from the range of equally spaced time points (wh""ere the\n        difference between any two adjacent points is specified by the given frequency)\n        such that they all satisfy `start <[=] x <[=] end`, where the first one and the\n        last one are, resp., the first and last time points in that range that fall on\n        the boundary of `freq` (if given as a frequency string) or that are valid for\n        `freq` (if given as a :class:`pandas.tseries.offsets.DateOffset`). (If exactly\n        one of `start`, `end`, or `freq` is *not* specified, this missing parameter can\n        be computed given `periods`, the number of timesteps in the range. See the note below.)\n\n        :param start `<'Datetime-Like/None'>`: Left bound for generating the index. Defaults to `None`.\n        :param end `<'Datetime-Like/None'>`: Right bound for generating the index. Defaults to `None`.\n        :param periods `<'int/None'>`: Number of periods to generate. Defaults to `None`.\n        :param freq `<'str/timedelta/BaseOffset/None'>`: The frequency of the index. Defaults to `'D'`.\n\n            - `<'str'>` A frequency string (e.g. `'D', 'h', 's', 'ms'`), or `'infer'` for auto-detection.\n            - `<'timedelta'>` A datetime.timedelta instance.\n            - `<'BaseOffset'>` A pandas date offset instance.\n            - `<'None'>` Infer the frequency from the input data.\n\n        :param tz `<'tzinfo/str/None'>`: The optional target timezone. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :param normalize `<'bool'>`: Normalize the start/end dates to midnight\n            (time fields set to 0). Defaults to `False`.\n\n        :param inclusive `<'str'>`: Include boundaries. Defaults to `'both'`.\n\n            - `'left'` Include the left boundary.\n            - `'right'` Include the right boundary.\n            - `'both'` Include both boundaries.""\n            - `'neither'` Exclude both boundaries.\n\n        :param unit `<'str/None'>`: Specify the desired resolution of the result. Defaults to `None`.\n            Supported datetime units: 's', 'ms', 'us', 'ns'.\n\n        :param name `<'Hashable/None'>`: The name assigned to the index. Defaults to `None`.\n\n        :returns `<'Pddt'>`: The resulting datetime index.\n\n        ## Equivalent\n        >>> Pddt(pd.date_range(...))\n        Construct an index from the current `local` datetime (timezone-naive) `<'Pddt'>`.\n\n        :param size `<'int/Any'>`: The target size of the index.\n\n            - `<'int'>` A positive integer number.\n            - `<'Any'>` Takes the `len(size)` value as the index size.\n\n        :param as_unit `<'str/None'>`: Convert to specified datetime unit after construction. Defaults to `None`.\n            Supports: `'s'`, `'ms'`, `'us'`, `'ns'`.\n\n        :param name `<'Hashable/None'>`: Optional name of the index. Defaults to `None`.\n\n        :returns `<'Pddt'>`: The resulting datetime index (timezone-naive).\n\n        ## Notice\n        - This method only construct `datetime64[us]` index (microsecond resolution).\n        - Parameter `as_unit` converts it to other datetime units after construction.\n\n        ## Equivalent\n        >>> Pddt.now(size, tz=None)\n        ].\nConversion limits to units between: 's', 'ms', 'us', 'ns'.\342\206\222'D', Datetime index is already timezone-aware.\nUse 'tz_convert()' or 'tz_switch()' method to convert to tge target timezone.Datetime index is timezone-naive.\nUse 'tz_localize()' method to localize timezone, or use 'tz_switch()' method to convert to the target timezone by providing a base timezone.Datetime index is timezone-naive.\nCannot convert timezone-naive datetime to the target timezone without a base timezone (base_tz).Delta 'unit' cannot be None.Delta 'unit' cannot be an empty string.Dictionary must contain 'doy' key for day-of-year value.Dictionary must contain 'week' key for"" ISO week value.Dictionary must contain 'weekday' key for ISO weekday value.Dictionary must contain 'year' key for ISO year value.Dictionary must contain 'year' key for day-of-year value.Element-wise check whether datetimes are in the past `<'Index[bool]'>`.\n\n        ## Equivalent\n        >>> self < datetime.datetime.now(self.tzinfo)\n        Element-wise check whether datetimes are in the future `<'Index[bool]'>`.\n\n        ## Equivalent\n        >>> self > datetime.datetime.now(self.tzinfo)\n        Expects 1-D ndarray, instead got %d-dimensional array.Expects a 1-dimensional array, got %d-dim.Expects a 1-dimensional ndarray, got %d-dim.Expects an instance of 'datetime.tzinfo', instead got 'Expects an instance of 'np.datetime64', instead got 'Expects an instance of 'np.ndarray[datetime64[*]]', instead got 'np.ndarray[%s]'.Expects an instance of 'np.timedelta64', instead got 'Expects dict element from Expects float or integer element from Expects instance of 'np.ndarray[timedelta64[*]]', instead got 'np.ndarray[%s]'.Expects integer element from Expects 'ndarray[datetime64[*]]' or 'ndarray[timedelta64[*]]', instead got 'ndarray[%s]'Fail to convert timestamp '%s' to UTC calendar time.Fail to convert timestamp '%s' to local calendar time.Failed: <'ndarray[datetime64[Fractional seconds precision must be between 0...9, instead got %d.%H:%M:%S.%f%zHashable | NoneInvalid ''> Invalid 'as_unit' input.\nSupports: 's', 'ms', 'us' and 'ns'; got '> Invalid 'ceil(unit)' input.\nSupports: 'D', 'h', 'm', 's', 'ms', 'us', 'ns'; got '> Invalid 'floor(unit)' input.\nSupports: 'D', 'h', 'm', 's', 'ms', 'us', 'ns'; got '> Invalid 'round(unit)' input.\nSupports: 'D', 'h', 'm', 's', 'ms', 'us', 'ns'; got \342\206\222'M', NoneNote that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.Only supports arrays with units in ['ns', 'us', 'ms', 's'], instead got '%s'.Pddt.da""te_range (line 541)Pddt.day_of_month (line 4163)Pddt.is_future (line 4925)Pddt.is_past (line 4902)Pddt.isocalendar (line 4013)Pddt.replace (line 2071)Pddt.snap (line 2988)Pddt.timedf (line 1914)Pddt.to_curr_month (line 2577)Pddt.to_curr_quarter (line 2385)Pddt.to_curr_weekday (line 2770)Pddt.to_curr_year (line 2156)Pddt.to_date (line 3120)Pddt.to_datetime (line 3006)Pddt.to_day (line 2935)Pddt.to_month (line 2670)Pddt.to_next_month (line 2656)Pddt.to_next_quarter (line 2475)Pddt.to_next_weekday (line 2804)Pddt.to_next_year (line 2265)Pddt.to_prev_month (line 2642)Pddt.to_prev_quarter (line 2459)Pddt.to_prev_weekday (line 2787)Pddt.to_prev_year (line 2240)Pddt.to_quarter (line 2491)Pddt.to_time (line 3181)Pddt.to_weekday (line 2821)Pddt.to_year (line 2290)Pddt.today (line 762)Pddt.tz_available (line 4281)Pddt.utcfromtimestamp (line 1406)Pddt.utctimedf (line 1940)Pddt.weekday_name (line 4211)Replace the specified datetime fields with new values `<'Pddt'>`.\n\n        :param year `<'int'>`: Absolute year. Defaults to `SENTINEL` (no change).\n        :param month `<'int'>`: Absolute month. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..12].\n        :param day `<'int'>`: Absolute day. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..maximum days the resulting month].\n        :param hour `<'int'>`: Absolute hour. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..23].\n        :param minute `<'int'>`: Absolute minute. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..59].\n        :param second `<'int'>`: Absolute second. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..59].\n        :param microsecond `<'int'>`: Absolute microsecond. Defaults to `SENTINEL` (no change).\n            If specified (greater ""than or equal to `0`), clamps to [0..999999].\n        :param nanosecond `<'int'>`: Absolute nanosecond. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..999].\n        :param tzinfo `<'tzinfo/None'>`: The timeone. Defaults to `SENTINEL` (no change).\n\n            - `<'None'>`: removes tzinfo (makes datetime index naive).\n            - `<'str'>`: Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>`: A subclass of `datetime.tzinfo`.\n\n        :returns `<'Pddt'>`: The resulting datetime index after applying the specified field replacements.\n\n        ## Behavior\n        - Replacements are `component-wise`:\n            * Any of the date fields may be left as `<= 0` to keep original values.\n            * Any of the time fields may be left as `< 0` to keep original values.\n            * If `tzinfo` is left as `SENTINEL`, the original timezone is retained.\n        - Day values are `clamped` to the maximum valid day in the resulting month.\n        - Only time components within the index resolution are modified;\n          e.g., when index is in `'s'` resolution, `microsecond` and `nanosecond`\n          replacements are ignored.\n        - Timezone handling:\n            * If `tzinfo` is `SENTINEL`, the original timezone is retained.\n            * If `tzinfo` is `None`, the resulting datetime index will be localized to `naive`,\n              without affecting the datetime values.\n            * If `tzinfo` is specified and different from the original timezone,\n              the resulting datetime index will be replaced with the new timezone,\n              preserving the original datetime values.\n\n        ## Equivalent\n        >>> datetime.datetime.replace()\n        Return `UTC` time DataFrame compatible with `time.gmtime()` `<'DataFrame'>`.\n\n        ## Example\n        >>> pt.timedf()\n        ```\n        _  tm_year  tm_mon  tm_mday  tm_hour  tm_min  tm_sec  tm_w""day  tm_yday\n        0     2025      11       12       10      12      42        2      316\n        ...\n        ```\n        Return `local` time DataFrame compatible with `time.localtime()` `<'DataFrame'>`.\n\n        ## Example\n        >>> pt.timedf()\n        ```\n        _  tm_year  tm_mon  tm_mday  tm_hour  tm_min  tm_sec  tm_wday  tm_yday\n        0     2025      11       12       18      12      42        2      316\n        ...\n        ```\n        Return the ISO calendar `<'DateFrame'>`.\n\n        ## Example:\n        >>> pt.isocalendar()\n        ```\n        _                              year  week  weekday\n        1677-09-21 00:12:43.145224193  1677    38        2\n        2262-04-11 23:47:16.854775807  2262    15        5\n        ```\n        Return the number of days since the 1st day of the month `<'Index[int64]'>`.\n\n        ## Equivalent\n        >>> pt.day\n        Return the weekday names with specified locale `<'Index[str]'>`.\n\n        :param locale `<'str/None'>`: The locale to use for weekday name. Defaults to `None`.\n\n            - Locale determining the language in which to return the weekday name.\n              If `None` uses English locale (`'en_US'`).\n            - Use the command `locale -a` on Unix systems terminal to\n              find locale language code.\n\n        :return `<'Index[str]'>`: The weekday names.\n\n        ## Equivalent\n        >>> DatetimeIndex.day_name(locale)\n        Seconds value must be finite, got '%s'Snap to nearest occurring frequency `<'Pddt'>`.\n\n        Examples\n        --------\n        >>> idx = Pddt(['2023-01-01', '2023-01-02', '2023-02-01', '2023-02-02'])\n        >>> idx\n        Pddt(['2023-01-01', '2023-01-02', '2023-02-01', '2023-02-02'],\n        dtype='datetime64[ns]', freq=None)\n        >>> idx.snap('MS')\n        Pddt(['2023-01-01', '2023-01-01', '2023-02-01', '2023-02-01'],\n        dtype='datetime64[ns]', freq=None)\n        Supports: 'Y', 'Q', 'M', 'W', 'D', 'h', 'm', 's', ""'ms', 'us', 'ns' or Month/Weekday name; got None.Supports: 'Y', 'Q', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns' or Month/Weekday name; got empty string.Supports: 'Y', 'Q', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns' or Month/Weekday name; got '%s'.Supports: 'Y', 'Q', 'M', 'W' or Month name; got None.Supports: 'Y', 'Q', 'M', 'W' or Month name; got empty string.Supports: 'Y', 'Q', 'M', 'W' or Month name; got '%s'.Supports: 'one', 'both' or 'neither'; got '%s'.The available timezone names `<'set[str]'>`.\n\n        ## Equivalent\n        >>> zoneinfo.available_timezones()\n        The size of a new array must be a positive integer.Timezone offset Try to set 'unit' to a lower resolution.Unsupported array dtype [%s].Unsupported conversion unit '%d' for timedelta64.Unsupported conversion unit '%d' for timedelta64 array.Unsupported datetime resolution '%s'. Accepts: Y, M, W, D, h, m, s, ms, us, ns.Unsupported 'doy' data type %s.Unsupported 'dtstr' data type %s.Unsupported 'iso' data type %s.Unsupported numpy time unit (NPY_DATETIMEUNIT enum) 'Unsupported 'ordinal' data type %s.Unsupported 'seconds' data type %s.Unsupported time unit Unsupported 'ts' data type %s.Unsupported 'us' data type %s.Value for 'doy' must be an integer, instead got Value for 'week' must be an integer, instead got Value for 'weekday' must be an integer, instead got Value for 'year' must be an integer, instead got \342\206\222'W', When 'date' is a date instance, 'size' must be specified.When 'doy' is a dictionary, 'size' must be specified.When 'dt' is a datetime-like instance, 'size' must be specified.When 'dtstr' is a literal string, 'size' must be specified.When 'iso' is a dictionary, 'size' must be specified.When 'ordinal' is an integer, 'size' must be specified.When 'seconds' is a float or integer, 'size' must be specified.When 'ts' is a float or integer, 'size' must be specified.When 'us' is an integer, 'size' must be specified.\342\206\222'Y', %Y-%m-%d[]]'> ,<''.?., -%: ' %a %b %d %H:%M:%""S %Yadd_note\n  - arr2 length: arr_div_ceil: division by zero.arr_div_ceil_mul: division by zero.arr_div_down: division by zero.arr_div_down_mul: division by zero.arr_div_even: division by zero.arr_div_even_mul: division by zero.arr_div_floor: division by zero.arr_div_floor_mul: division by zero.arr_div_trunc: division by zero.arr_div_trunc_mul: division by zero.arr_div_up: division by zero.arr_div_up_mul: division by zero.arr_mod: division by zero.' at position bool | Noneceil(unit)combine(date, ...)combine(time, ...)cython.bintcython.intdate_range(...)\n  - datetime2: 'datetime.date | objectdatetime.date | str | Nonedatetime.datetime | np.datetime64 | objectdatetime.time | str | Nonedatetime.tzinfodatetime.tzinfo | str | Nonedict | list | tuple | pd.DataFramediff(data, ...)diff(..., inclusive)diff(..., unit)dt_isoformat: 'sep' cannot be None.dt_strformat: 'fmt' cannot be None element 'floor(unit)fold must be either 0 or 1, got %d from '] from '' from fromdate(...)fromdate(size)fromdatetime(...)fromdatetime(size)fromdayofyear(doy)fromisocalendar(iso)fromisoformat(...)fromisoformat(size)frommicroseconds(size)frommicroseconds(us)fromordinal(ordinal)fromordinal(size)fromseconds(seconds)fromseconds(size)fromtimestamp(ts)fsp(precision), got '\342\206\222'h', int | Anyint | Any | Noneint | Noneint | float | objectint | objectint | strint | str | None\342\206\222'm', math_div_ceil: division by zero.math_div_ceil: result does not fit in signed 64-bitmath_div_down: division by zero.math_div_down: result does not fit in signed 64-bitmath_div_even: division by zero.math_div_even: result does not fit in signed 64-bitmath_div_floor: division by zero.math_div_floor: result does not fit in signed 64-bitmath_div_trunc: division by zero.math_div_trunc: result does not fit in signed 64-bitmath_div_up: division by zero.math_div_up: result does not fit in signed 64-bitmath_mod: division by zero.minimum value cannot be greater than maximum value., minutes=missing time resolution for <n""darray[%s]>. Pleae provide the `arr_reso` (NPY_DATETIMEUNIT enum) of the array.mix tz-awaremixed timezonesmonth_name(locale)\342\206\222'ms', (...) must be called with a collection of some kind, .__new__(data, ...)' input.\nnp.ndarray[Pydt]np.ndarray[datetime.date]np.ndarray[datetime.time]np.ndarray[np.datetime64]np.ndarray[np.int64]\342\206\222'ns'numpy._core.multiarray failed to importnumpy._core.umath failed to importobject | None) out of range. Must be strictly between [-86400..86400] (exclusive)) out of range. Must be strictly between [-86400..86400] (exclusive).parse_to_float: 'token' cannot be Noneparse_to_int: 'token' cannot be Nonepd.DataFramepd.Index[bool]pd.Index[np.float64]pd.Index[np.int64]pd.Index[str]' resolution is not supported.round(unit)\342\206\222's', , seconds= seconds from ( seconds from (hours=set[str] size=slice_to_ufloat: out of range (start=slice_to_ufloat: 'size' must be > 0, instead got %dslice_to_ufloat: 'start' must be >= 0, instead got %dslice_to_ufloat: 'token' cannot be Noneslice_to_uint: out of range (start=slice_to_uint: 'size' must be > 0, instead got %dslice_to_uint: 'start' must be >= 0, instead got %dslice_to_uint: 'token' cannot be Nonesnap(freq)src/cytimes/pddt.pysrc/cytimes/utils.pxdstr | Nonestr | intstr | objectstrftime(fmt)strptime(dtstr)strptime(dtstr, fmt)' ticks.\nSupported resolution: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'' ticks.\nSupported units: ' ticks.\nSupported units: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'tm_strformat: expanded output exceeds buffer limittm_strformat: failed to allocate buffertm_strformat: 'fmt' cannot be None to '' to datetime.] to datetime64[to_end_of(unit)to_first_of(unit)' to float: contains invalid character '' to int64 ']] to int64 ' to integer.' to integer. Contains invalid character 'to_last_of(unit)' to non-negative float: contains invalid character 'to_start_of(unit)' to unsigned integer. Contains invalid character ' token_len=too large to convert to C longt""z_convert(...)tz_convert(tz)tz_localize(...)tz_localize(tz, ...)tz_switch(...)' unit to int64 'unless utc=True\342\206\222'us', ' vs ' was passedweekday_name(locale)AmbiguousTimeErrorAnyAprAugConfigsDDataFrameDatetimeArrayDatetimeIndexDecFebFriHashableIndexInvalidArgumentErrorJanJulJunMMarMayMixedTimezoneErrorMonNovOctOutOfBoundsErrorParserFailedErrorPdDateParseErrorPdOutOfBoundsDatetimePddtPddt.__new__Pddt._newPddt._new_nativePddt._new_parserPddt._to_curr_weekdayPddt.addPddt.as_unitPddt.astimezonePddt.ceilPddt.combinePddt.ctimePddt.datePddt.date_rangePddt.datetimePddt.dayPddt.day_of_monthPddt.day_of_quarterPddt.day_of_yearPddt.days_bf_monthPddt.days_bf_quarterPddt.days_bf_yearPddt.days_in_monthPddt.days_in_quarterPddt.days_in_yearPddt.diffPddt.floorPddt.fromdatePddt.fromdatetimePddt.fromdatetime64Pddt.fromdayofyearPddt.fromisocalendarPddt.fromisoformatPddt.frommicrosecondsPddt.fromordinalPddt.fromsecondsPddt.fromtimestampPddt.fspPddt.hourPddt.is_dayPddt.is_end_ofPddt.is_first_ofPddt.is_futurePddt.is_last_ofPddt.is_leap_yearPddt.is_localPddt.is_long_yearPddt.is_monthPddt.is_pastPddt.is_quarterPddt.is_start_ofPddt.is_utcPddt.is_weekdayPddt.is_yearPddt.isocalendarPddt.isoformatPddt.isoweekPddt.isoweekdayPddt.isoyearPddt.leap_bt_yearPddt.microsecondPddt.millisecondPddt.minutePddt.monthPddt.month_namePddt.nanosecondPddt.normalizePddt.nowPddt.parsePddt.quarterPddt.replacePddt.roundPddt.secondPddt.snapPddt.strftimePddt.strptimePddt.subPddt.timePddt.timedfPddt.timestampPddt.timetzPddt.to_curr_monthPddt.to_curr_quarterPddt.to_curr_weekdayPddt.to_curr_yearPddt.to_datePddt.to_datetimePddt.to_dayPddt.to_end_ofPddt.to_first_ofPddt.to_fridayPddt.to_last_ofPddt.to_mondayPddt.to_monthPddt.to_next_monthPddt.to_next_quarterPddt.to_next_weekdayPddt.to_next_yearPddt.to_prev_monthPddt.to_prev_quarterPddt.to_prev_weekdayPddt.to_prev_yearPddt.to_quarterPddt.to_saturdayPddt.to_start_ofPddt.to_sundayPddt.to_thursdayPddt.to_timePddt.to_tomorrowPddt.to_tuesdayPddt.to_wednesdayPddt.to_weekday""Pddt.to_yearPddt.to_yesterdayPddt.todayPddt.tomicrosecondsPddt.toordinalPddt.tosecondsPddt.tz_availablePddt.tz_convertPddt.tz_localizePddt.tz_switchPddt.tznamePddt.utcfromtimestampPddt.utcnowPddt.utctimedfPddt.values_naivePddt.weekdayPddt.weekday_namePddt.yearPydtPytzAmbiguousTimeErrorPytzNonExistentTimeError__Pyx_PyDict_NextRefSatSelfSepSeriesSunTThuTueWWedY_absoluteadd__all__ambiguousarrarr_parr_sizearrfarrf_pasas_resoas_unitastimezoneastypeasyncio.coroutines_available_timezonesavailable_timezonesbase_tzboolbothceilcfgch0__class__cline_in_tracebackcls_clscolumnscombinecopyctimecytimescytimes.parsercytimes.pddtcytimes.pydtcytimes.utilsddatadatedateDdateMdateQdateYdate_rangedatesdatetimedatetime64dayday_nameday_of_monthday_of_quarterday_of_yeardayfirstdaysdays_bf_monthdays_bf_quarterdays_bf_yeardays_in_monthdays_in_quarterdays_in_yeardeltadelta_pdiff__doc__doydstdtdt64dtarrdtsdtstrdtypeenderrerrorsffloorfmtfoldfreqfromdatefromdatetime64fromdatetimefromdayofyearfromisocalendarfromisoformatfrommicrosecondsfromordinalfromsecondsfromtimestampfromutcfsfsp__func___generate_rangegethhas_tzhourhoursiincl_offinclusiveindexinfer_is_coroutineis_dayis_end_ofis_first_ofis_futureis_last_ofis_leap_yearis_localis_long_yearis_monthis_pastis_quarteris_start_ofis_utcis_weekdayis_yearisoisocalendarisoformatisoweekisoweekdayisoyearitemsleap_bt_yearlocalem__main____metaclass__microsecondmicrosecondsmillisecondmillisecondsminminuteminutesmm__module__monthmonth_namemonths__mro_entries__msmsgmy_arrmy_dateDmy_resomy_sizemy_tzmy_unitnaivename__name__nanosecondnanosecondsneither_new__new___new_native_new_parser_no_defaultno_defaultnonexistentnormalizenownpnsnumpyoobjobjectoffsetoneordinalorientoutpandaspandas._libs.libpandas.core.arrays.datetimesparseparse_monthparse_objparse_to_floatparse_to_intparse_weekdaypdperiodspopprecision__prepare__propertypsptpt_arrpt_dateDpt_resopt_tzpt_unit__pyx_vtable____qualname__quarterquartersraiserecordsreplacereturnroundrowssecondsecondsselfsep__set_name__setd""efaultshift_forwardsizesize_isnapstartstrstrftimestrptimesubsupertarg_tz__test__tictimetimedftimestimestamptimetztm_hourtm_mdaytm_mintm_montm_sectm_wdaytm_ydaytm_yeartmp_tzto_curr_monthto_curr_quarter_to_curr_weekdayto_curr_weekdayto_curr_yearto_dateto_datetimeto_dayto_dictto_end_ofto_first_ofto_fridayto_last_ofto_mondayto_monthto_next_monthto_next_quarterto_next_weekdayto_next_yearto_prev_monthto_prev_quarterto_prev_weekdayto_prev_yearto_quarterto_resoto_saturdayto_start_ofto_sundayto_thursdayto_timeto_tomorrowto_tuesdayto_tzto_wednesdayto_weekdayto_yearto_yesterdaytodaytokentomicrosecondstoordinaltosecondststypingtyping_extensionstztz_availabletz_converttz_localizetz_switchtzinfotznameunitunit_lenusutcutcfromtimestamputcnowutcoffsetutctimedfutilsvvalvaluevaluesvalues_naivewdweekweekdayweekday_nameweekswkdyearyearfirstyearszoneinfoPY_LONG_LONG\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000PyDateTime_DateTime *\000PyDateTime_TZInfo *\000PyObject *\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000double\000\000int\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000int [13]\000\000int [5]\000\000DT64_NS_DD_MAX\000DT64_NS_DD_MIN\000DT64_NS_HH_MAX\000DT64_NS_HH_MIN\000DT64_NS_MI_MAX\000DT64_NS_MI_MIN\000DT64_NS_MM_MAX\000DT64_NS_MM_MIN\000DT64_NS_MS_MAX\000DT64_NS_MS_MIN\000DT64_NS_NS_MAX\000DT64_NS_NS_MIN\000DT64_NS_SS_MAX\000DT64_NS_SS_MIN\000DT64_NS_US_MAX\000DT64_NS_US_MIN\000DT64_NS_WW_MAX\000DT64_NS_WW_MIN\000DT64_NS_YY_MAX\000DT64_NS_YY_MIN\000EPOCH_C100\000EPOCH_C4\000EPOCH_C400\000EPOCH_CBASE\000EPOCH_DAY\000EPOCH_HOUR\000EPOCH_MICROSECOND\000EPOCH_MILLISECOND\000EPOCH_MINUTE\000EPOCH_MONTH\000EPOCH_SECOND\000EPOCH_YEAR\000MS_DAY\000MS_HOUR\000MS_MINUTE\000MS_SECOND\000NS_DAY\000NS_HOUR\000NS_MICROSECOND\000NS_MILLISECOND\000NS_MINUTE\000NS_SECOND""\000SS_DAY\000SS_HOUR\000SS_MINUTE\000TD64_MM_MICROSECOND\000TD64_MM_MILLISECOND\000TD64_MM_NANOSECOND\000TD64_MM_SECOND\000TD64_YY_MICROSECOND\000TD64_YY_MILLISECOND\000TD64_YY_NANOSECOND\000TD64_YY_SECOND\000US_DAY\000US_HOUR\000US_MILLISECOND\000US_MINUTE\000US_SECOND\000EPOCH_DT\000UTC\000DT64_DTYPE_AS\000DT64_DTYPE_DD\000DT64_DTYPE_FS\000DT64_DTYPE_HH\000DT64_DTYPE_MI\000DT64_DTYPE_MM\000DT64_DTYPE_MS\000DT64_DTYPE_NS\000DT64_DTYPE_PS\000DT64_DTYPE_SS\000DT64_DTYPE_US\000DT64_DTYPE_WW\000DT64_DTYPE_YY\000NAT\000T_TIMEZONE\000T_ZONEINFO\000_LOCAL_TIMEZONE\000_UTC_ALIASES\000TD64_MM_DAY\000TD64_YY_DAY\000DT_NPY_UNIT_AS\000DT_NPY_UNIT_DD\000DT_NPY_UNIT_FS\000DT_NPY_UNIT_HH\000DT_NPY_UNIT_MI\000DT_NPY_UNIT_MM\000DT_NPY_UNIT_MS\000DT_NPY_UNIT_NS\000DT_NPY_UNIT_PS\000DT_NPY_UNIT_SS\000DT_NPY_UNIT_US\000DT_NPY_UNIT_WW\000DT_NPY_UNIT_YY\000NULL_TZOFFSET\000ORDINAL_MAX\000DAYS_BR_MONTH\000DAYS_IN_MONTH\000DAYS_BR_QUARTER\000DAYS_IN_QUARTERPyDateTime_DateTime *(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_parse_obj *__pyx_optional_args)\000int (PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_parse_month *__pyx_optional_args)\000int (PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_parse_weekday *__pyx_optional_args)\000parse_obj\000parse_month\000parse_weekdayPyObject *(PyObject *)\000tz_parsePyObject *\000\000\000\000\000\000\000\000struct __pyx_obj_7cytimes_6parser_Configs *\000struct __pyx_obj_7cytimes_6parser_Parser *\000_DEFAULT_AMPM\000_DEFAULT_HMS\000_DEFAULT_JUMP\000_DEFAULT_MONTH\000_DEFAULT_PERTAIN\000_DEFAULT_TZ\000_DEFAULT_UTC\000_DEFAULT_WEEKDAY\000_DEFAULT_CONFIGS\000_DEFAULT_PARSERint (PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6errors_raise_error *__pyx_optional_args)\000int (int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6errors_raise_argument_error *__pyx_optional_args)\000int (int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6e""rrors_raise_type_error *__pyx_optional_args)\000raise_error\000raise_argument_error\000raise_type_error\320\004 \240\010\250\001\3600\000\t\014\2105\220\003\2201\330\022'\240q\330\020\024\220A\330\020\021\330\020\021\360\006\000\t'\240g\250Q\250a\330\010\013\2109\220C\220q\330\022'\240q\330\020\024\220A\330\020\021\330\020\021\360\n\000\t\037\230h\240a\240v\250Q\330\010\013\2104\210s\220$\220d\230)\2403\240b\250\004\250H\260A\260V\2703\270c\300\021\330\014\023\2201\360\006\000\t\030\220t\2301\330\010#\320#7\260q\270\001\340\010\t\340\r\026\220c\230\022\2304\230t\2404\240u\250E\260\025\260e\2705\300\001\340\014\020\220\t\230\023\230B\230d\240$\240d\250%\250u\260D\270\010\300\001\300\026\300s\310#\310Q\340\014\r\330\020\031\230\023\230A\330\020\024\220D\230\003\2301\330\020\024\220H\230A\230V\2403\240c\250\021\330\020\024\220H\230A\230V\2403\240c\250\021\360\006\000\r\034\320\033/\250q\260\001\330\014\017\210x\220s\230!\330\020\027\220q\330\014\036\230d\240!\330\014\027\320\027(\250\001\250\025\250f\260I\270S\300\001\330\014\027\320\027'\240q\250\005\250Y\260i\270w\300a\330\014\023\2204\220u\230A\230U\240#\240T\250\025\250e\2604\260q\360\006\000\t\033\230$\230a\330\010\013\2104\210s\220$\220d\230)\2403\240a\330\014\031\320\031,\250A\250U\260)\2703\270a\330\014\031\320\031)\250\021\250,\3206G\300s\310!\330\014\031\230\034\240Q\240g\250W\260C\260q\330\014\033\2301\360\006\000\016\022\220\023\220D\230\004\230I\240S\250\001\330\014\031\320\031,\250A\250U\260)\2703\270a\330\014\031\230\030\240\021\240'\250\023\250C\250q\330\014\033\2301\360\014\000\r\021\220\004\220C\220|\2401\240F\250&\260\010\270\004\270A\330\020\035\320\0350\260\001\260\025\260i\270s\300!\330\020\035\320\0350\260\001\330\024 \320 1\260\024\260R\260s\270!\340\020\037\230q\360\006\000\023\027\220c\230\036\240q\250\006\250f\260H\270D\300\001\330\020\035\320\0350\260\001\260\025\260i\270s\300!\330\020\035\320\035-\250Q\250l\320:K\3103\310a\330\020\035\230\\\250\021\250'\260\027\270\005\270Q\330\020\037\230q""\360\n\000\027,\2501\330\024\030\230\001\330\024\025\330\024\025\33079\270\021\340\020\021\360\006\000\t\024\320\023#\2401\240G\2509\260I\270W\300A\330\010\017\210t\2205\230\001\230\025\230c\240\024\240U\250%\250t\2601\320\004\031\230\030\240\021\360\020\000\t\n\330\014'\320';\2701\270A\330\010\017\210}\230A\330\014\022\220&\320\030-\250Q\330\020\021\340\023\027\220z\240\033\250A\330\023\024\330\010#\320#7\260q\270\004\270A\360\006\000\t\014\2108\2203\220a\330\014\023\2201\360\006\000\t\033\230$\230a\330\010\t\330\014#\240=\260\001\260\025\260f\270I\300Q\330\010\017\210}\230A\330\022'\240q\250\004\250L\270\016\300f\310A\330\014\r\330\010\013\2104\210s\220!\330\014\023\2201\360\006\000\t\020\210t\2205\230\001\230\025\230c\240\024\240U\250%\250t\2601\320\004\032\230(\240!\360\020\000\t\n\330\014'\320';\2701\270A\330\010\017\210}\230A\330\014\022\220&\320\030-\250Q\330\020\021\340\023\027\220z\240\033\250A\330\023\024\330\010#\320#7\260q\270\004\270A\360\006\000\t\014\2108\2203\220a\330\014\023\2201\360\006\000\t\033\230$\230a\330\010\t\330\014#\240>\260\021\260%\260v\270Y\300a\330\010\017\210}\230A\330\022'\240q\250\004\250L\270\017\300v\310Q\330\014\r\330\010\013\2104\210s\220!\330\014\023\2201\360\006\000\t\020\210t\2205\230\001\230\025\230c\240\024\240U\250%\250t\2601\320\004\031\230\021\340\010\023\320\023#\2401\240D\250\001\330\010\017\210r\220\026\220q\230\005\230U\240!\320\004\033\2301\360\014\000\t\024\220?\240!\2404\320'7\260s\270#\270Q\330\010\017\210r\220\026\220q\230\005\230U\240!\320\004\033\2301\360\006\000\t\014\2104\210x\220s\230!\330\014\022\220$\220l\240&\250\t\260\024\260Y\320>N\310a\340\014\022\220$\220a\340\010\017\210r\220\026\220v\230^\2501\250F\260#\260W\270E\300\021\320\004\033\2301\360\026\000\t\026\220T\230\021\330\010\013\2103\210c\220\025\220c\230\023\230H\240A\330\014\023\2204\220w\230a\340\014\023\2204\220{\240&\250\005\250W\260A\320\004\033\2301\360\016\000\t&\240W\250A\250T\260\031\270!\360\006\000\t$\320#7\260q\270\004\270A\330\010$""\240I\250Q\250d\260!\330\010\013\2108\2208\2301\330\014\030\230\001\330\r\025\220X\230Q\330\014\027\220~\240Q\240j\260\001\330\r\025\220X\230Q\330\014\027\220~\240Q\240j\260\001\360\010\000\t\020\210r\220\026\220v\230W\240A\240T\250\031\260&\270\005\270Q\320\004\030\230\005\230^\2501\360\014\000\t\020\210t\2209\230A\230[\250\001\320\004\033\2301\340\010\017\210t\320\023$\240A\240Q\320\000#\2401\360*\000\005\010\200v\210S\220\001\330\010\016\210j\230\001\230\021\330\004 \240\007\240q\250\001\330\004\007\200z\220\023\220A\330\010\017\210q\360\010\000\t\031\230\001\330\010\031\230\021\330\010\027\220q\330\010\023\2201\360\010\000\005\t\210\005\210U\220!\2201\330\010\r\210X\220Q\220g\230Q\330\010\013\210>\230\021\230!\330\014\022\220$\220b\230\003\2303\230c\240\021\240$\240b\250\001\330\014\030\230\001\330\r\020\220\003\2201\330\014\017\210q\330\020\026\220j\240\001\330\024\025\3308:\270!\340\014\017\210q\330\020\026\220j\240\001\330\024\025\330<>\270a\340\014\017\210q\330\020\026\220j\240\001\330\024\025\330AC\3001\340\014\022\220!\330\r\020\220\003\2201\330\014\017\210q\330\020\026\220j\240\001\330\024\025\3308:\270!\340\014\017\210q\330\020\026\220j\240\001\330\024\025\330<>\270a\340\014\017\210q\330\020\026\220j\240\001\330\024\025\330AC\3001\340\014\026\220a\330\r\021\220\021\330\014\r\340\014\022\220*\230A\330\020\021\330%,\250G\2601\260E\270\021\360\006\000\005\010\200t\2101\330\010\016\210j\230\001\330\014=\270R\270q\340\004\013\2101\210G\2209\230A\320\004 \240\010\250\001\3602\000\t\016\210T\220\034\230Q\230a\360\006\000\t\030\220r\230\021\330\010#\320#7\260q\270\001\330\010#\320#7\260q\270\004\270A\330\010\013\2108\2203\220a\330\014\027\220{\240!\2404\240y\260\002\260!\340\014\027\220{\240!\330\025%\240Q\240d\250)\2609\270I\300V\3101\330\020\022\220!\340\010\017\210r\220\026\220q\230\005\230U\240!\320\004\032\230!\360\014\000\t \320\0373\2601\260D\3208H\310\003\3103\310a\330\010\026\220e\320\033<\270M\310\021\310!\330\010$\240C\240v\250Q\250a\360\006\000\t""\026\220T\230\021\330\010\034\230N\250!\2503\250a\320/D\300M\320QR\360\006\000\t\r\210E\220\025\220a\220q\330\014\020\220\005\220Q\220a\340\014\017\210r\220\030\230\021\330\020\023\2201\220J\230a\330\020\021\340\014\017\210q\220\005\220T\320\031*\250!\2503\250a\340\010\017\210q\320\004\037\230|\2505\3200D\300A\360\032\000\t\014\2107\220#\220Q\330\014\023\2204\220~\240Q\240a\360\006\000\t\033\230$\230a\330\010\027\220t\2301\330\010#\320#7\260q\270\001\360\006\000\t\026\220^\2401\240E\250\031\260#\260Q\360\006\000\t\026\320\025(\250\001\250\025\250i\260x\270q\340\010\013\2104\210r\220\021\330\014\031\320\031,\250A\250\\\3209J\310#\310Q\330\014\031\320\031/\250q\260\014\320<M\310Q\330\014\031\230\034\240Q\240l\260,\270a\270u\300J\310c\320QR\330\014\031\230\034\240Q\240g\250X\260S\270\001\340\r\021\220\023\220A\330\014\031\320\031,\250A\250\\\3209J\310#\310Q\340\r\021\220\022\2201\330\014\031\320\031,\250A\330\020\034\320\034-\250T\260\022\2603\260a\360\006\000\016\022\220\022\2201\330\014\031\320\031,\250A\250\\\3209J\310#\310Q\330\014\031\320\031/\250q\260\014\320<M\310Q\330\014\031\230\030\240\021\240'\250\025\250c\260\021\330\014\031\230\034\240Q\240g\250X\260S\270\001\360\006\000\r\032\320\031,\250A\250\\\3209J\310#\310Q\330\014\031\320\031/\250q\260\014\320<M\310Q\330\014\031\230\034\240Q\240g\250X\260S\270\001\360\010\000\t\014\2108\2208\320\033+\2504\250y\3208K\3101\330\014\030\230\001\340\014\031\230\030\240\021\240,\250i\260s\270!\330\014\031\230\036\240q\250\014\3204E\300S\310\001\330\014\031\230\021\360\006\000\r\032\320\031*\250!\330\020\027\220~\320%6\260c\270\021\340\014\031\320\031.\250a\250q\330\010\023\220<\230q\240\007\240w\250c\260\021\360\006\000\t\020\210t\2205\230\001\230\023\230G\2401\240H\250C\250t\2605\270\005\270T\300\021\320\004\030\230\005\320\0355\260Q\360&\000\t\014\2104\210x\220s\230!\330\014\022\220$\220a\330\r\021\220\021\330\014\022\220$\220a\340\014\022\220$\220k\240\026\240u\250A\330\010\017\210r\220\026\220v\230^\2501\250F\260#\260W""\270E\300\021\320\004 \240\010\250\001\360 \000\t\014\2105\220\003\2201\330\022'\240q\330\020\024\220A\330\020\021\330\020\021\340\010&\240g\250Q\250a\330\010\013\2109\220C\220q\330\022'\240q\330\020\024\220A\330\020\021\330\020\021\360\010\000\t\033\230$\230a\330\010\027\220t\2301\330\010#\320#7\260q\270\001\360\006\000\t\026\220^\2401\240E\250\031\260#\260Q\360\006\000\t\037\230h\240a\240v\250Q\330\010\013\2104\210s\220$\220d\230)\2403\240a\330\014\031\320\031,\250A\250U\260)\2703\270a\330\014\031\320\031)\250\021\250,\3206G\300s\310!\330\014\031\230\034\240Q\240g\250W\260C\260q\360\006\000\016\022\220\023\220D\230\004\230I\240S\250\001\330\014\031\320\031,\250A\250U\260)\2703\270a\330\014\031\320\031,\250A\250\\\3209J\310#\310Q\360\006\000\016\022\220\023\220D\230\004\230I\240S\250\001\330\014\031\320\031,\250A\250U\260)\2703\270a\330\014\031\230\030\240\021\240'\250\023\250C\250q\330\014\031\320\031,\250A\250\\\3209J\310#\310Q\360\006\000\016\022\220\023\220D\230\004\230I\240S\250\001\330\014\031\320\031,\250A\250U\260)\2703\270a\330\014\031\320\031,\250A\250\\\3209J\310#\310Q\360\n\000\r\037\230l\250!\2506\260\026\260q\330\014\017\210t\2204\220q\330\020\035\320\0350\260\001\260\025\260i\270s\300!\330\020\035\230X\240Q\240g\250T\260\024\260R\260s\270!\330\020\035\320\0350\260\001\260\034\320=N\310c\320QR\360\010\000\027,\2501\330\024\030\230\001\330\024\025\330\024L\310B\310a\340\020\021\360\010\000\t\014\2108\2208\320\033+\2504\250y\3208K\3101\330\014\030\230\001\340\014\031\230\030\240\021\240,\250i\260s\270!\330\014\031\230\036\240q\250\014\3204E\300S\310\001\330\014\031\230\021\360\006\000\r\032\320\031*\250!\330\020\027\220~\320%6\260c\270\021\340\014\031\320\031.\250a\250q\330\010\023\220<\230q\240\007\240w\250c\260\021\360\006\000\t\020\210t\2205\230\001\230\023\230G\2401\240H\250C\250t\2605\270\005\270T\300\021\320\004\031\230\030\320!7\260q\360\030\000\t\n\330\014\023\220=\240\013\2501\250F\260'\270\021\330\010\017\210}\230A\330\022'\240q\250\004\250L""\3208N\310f\320TU\320\004\033\2308\320#9\270\021\360\036\000\t\n\330\014\023\220=\240\t\250\021\250&\260\007\260q\330\010\017\210}\230A\330\022'\240q\330\020\024\220L\320 8\270\006\270a\200A\330\036\037\360\014\000\t\020\320\017#\2401\200A\340\014\r\330\010\023\2201\330\010\025\220Q\330\t\n\3602\000\t\023\220)\2301\230A\330\010\020\220\004\220A\330\010\013\2106\220\027\230\001\330\014\017\210s\220'\230\021\330\026+\2501\330\024\030\230\001\330\024\025\330\024\025\360\n\000\r\016\330\020\027\220}\240L\260\001\260\026\260q\340\014\023\2206\320\0313\2601\330\026\"\240!\2406\320)<\270D\300\014\320L`\320`f\320fg\330\020\021\330\014\024\220F\320\0323\2606\3209W\320WX\330\026\"\240!\2406\320)>\270d\300,\320Nb\320bh\320hi\330\020\021\330\014\023\220=\240\001\330\026+\2501\250D\260\014\320<P\320PV\320VW\330\020\021\360\010\000\t\014\2103\210c\220\021\330\014\023\2201\360\n\000\t$\320#7\260q\270\004\270A\330\010\t\330\014\017\210x\220x\320\037/\250t\2609\320<O\310q\330\020\024\320\024(\250\001\360\006\000\021\030\220}\240L\260\001\330\024\030\230\010\240\001\240\027\250\004\250K\260q\360\010\000\021\030\220}\240L\260\001\260\026\260t\270;\300a\340\010\017\210v\320\025/\250q\330\022\036\230a\230v\320%8\270\004\270L\320H\\\320\\b\320bc\330\014\r\330\010\020\220\006\320\026/\250v\3205S\320ST\330\022\036\230a\230v\320%:\270$\270l\320J^\320^d\320de\330\014\r\330\010\017\210}\230A\330\022'\240q\250\004\250L\3208L\310F\320RS\330\014\r\200A\340\016\017\330\016\017\330\010\022\220!\330\010\023\2201\330\t\n\360@\001\000\t\036\230T\240\021\330\010%\240V\2506\260\021\260!\330\010\013\210:\220Q\220f\230A\330\014\021\220\021\330\r\027\220q\230\007\230}\250G\2602\260Q\330\014\021\220\024\220]\240!\2406\250\025\250a\330\r\027\220q\230\007\230u\240A\330\014\021\220\024\220\\\240\021\240&\250\005\250Q\340\014\r\330\020\025\220T\230\021\230!\330\014\023\220=\240\001\330\026+\2501\330\024\030\230\001\330\024\025\330\024\025\330\024\025\340\020\021\360\006\000\t\036\230R\230q\330\010\013\2108""\2203\220f\230F\240!\2401\330\022'\240q\330\020\024\220A\330\020\021\330\020\021\330\023\034\230F\240&\250\001\250\021\360\010\000\t\021\220\004\220A\330\010\020\220\002\220!\330\010\014\210F\220'\230\026\230t\2406\250\027\260\001\330\022\036\230a\330\020\026\220a\330\020\024\220A\330\020\021\330\020\021\360\010\000\t\014\210:\220S\230\001\330\014#\2401\330\r\027\220s\230!\330\014#\2401\330\r\027\220s\230!\330\014$\240A\340\022'\240q\330\020\024\220A\330\020\021\330\020B\300\"\300A\340\014\r\360\006\000\t\014\2105\220\003\2201\330\022'\240q\330\020\024\220A\330\020\021\330\020\021\340\010&\240g\250Q\250a\330\010\013\2109\220C\220q\330\022'\240q\330\020\024\220A\330\020\021\330\020\021\360\010\000\t\n\340\014\017\210y\230\003\2302\230T\240\030\250\021\250&\260\003\2603\260a\330\020\036\320\036/\250q\260\010\270\004\270C\270s\300!\330\020\036\320\036/\250q\260\010\270\004\270C\270s\300!\360\006\000\021\037\320\036/\250q\260\010\270\007\270s\300#\300Q\330\020\036\320\036/\250q\260\010\270\007\270s\300#\300Q\330\010\017\210}\230A\330\022'\240q\250\004\250L\3208K\3106\320QR\330\014\r\340\010\025\220\\\240\021\240(\250(\260#\260Q\360\010\000\t\014\2101\330\014\031\230\030\240\021\240'\250\032\2601\340\r\026\220c\230\021\330\014\034\230E\320!B\300-\310q\320PQ\340\014\020\220\005\220U\230!\2301\340\020\"\240'\250\021\250!\330\020\023\2202\220X\230Q\330\024\025\340\020\027\220q\230\005\230R\230r\240\034\250R\250r\260\027\270\002\270\"\270A\360\006\000\t\020\210r\220\026\220q\230\007\230u\240A\320\004\031\230\033\240A\360\032\000\t\n\330\014\023\2204\220u\230A\230]\250%\250q\260\006\260a\330\010\017\210}\230A\330\022'\240q\250\004\250L\270\016\300f\310A\320\004\035\230_\250A\360\026\000\t\014\2107\220#\220Q\330\014\023\2201\360\006\000\t\033\230$\230a\330\010\027\220t\2301\330\010#\320#7\260q\270\001\360\006\000\t\026\220^\2401\240E\250\031\260#\260Q\360\006\000\t\026\320\025(\250\001\250\025\250i\260x\270q\360\010\000\t\014\2108\2208\320\033+\2504\250y\3208K\3101\330\014""\030\230\001\340\014\031\230\030\240\021\240,\250i\260s\270!\330\014\031\230\036\240q\250\014\3204E\300S\310\001\330\014\031\230\021\360\006\000\r\032\320\031*\250!\330\020\027\220~\320%6\260c\270\021\340\014\031\320\031.\250a\250q\330\010\023\220<\230q\240\007\240w\250c\260\021\360\006\000\t\020\210t\2205\230\001\230\023\230G\2401\240H\250C\250t\2605\270\005\270T\300\021\200A\340\010\014\210A\330\010\023\2201\330\010\025\220Q\330\t\n\3602\000\t\026\220Y\230a\230q\330\010\020\220\004\220A\330\010\013\2106\220\023\220A\330\014\031\230\031\240!\340\014\017\210v\220S\230\001\330\020\027\220t\230<\240q\250\007\250{\270!\360\006\000\t\014\2106\220\023\220A\330\014\031\230\031\240!\330\014\021\220\024\220\\\240\021\240'\250\033\260A\340\014\021\220\021\360\006\000\t\014\2106\220\023\220A\330\014\023\2201\360\006\000\t\020\210r\220\033\230A\230Q\200A\360\006\000\017\020\330\010\014\210A\330\010\021\220\021\330\010\016\210a\330\t\n\3602\000\t\023\220)\2301\230A\330\010$\240K\250q\260\005\260Q\330\010%\240W\250A\250T\260\021\330\010#\2409\250A\250T\260\021\330\010\037\320\0370\260\001\260\024\260X\270Q\330\010\017\210s\220%\220q\230\005\230S\240\004\240H\250I\260U\270!\320\004\035\230_\250A\360\022\000\t\014\210:\220R\220q\330\022'\240q\330\020\024\220A\330\020\021\330\020\021\33013\2601\360\006\000\t\014\210:\220S\230\001\330\014\023\2201\360\006\000\t$\320#7\260q\270\004\270A\360\006\000\t\014\2108\2208\2301\330\014\020\220\003\2201\220C\220t\2302\230R\230q\340\r\025\220X\230Q\330\014\017\210z\230\023\230A\330\020\027\220q\330\014\020\220\003\2201\220C\220t\2302\230R\230q\340\r\025\220X\230Q\330\014\017\210z\230\023\230A\330\020\027\220q\330\014\020\220\003\2201\220C\220t\2302\230R\230q\360\006\000\r\024\2201\360\006\000\t\033\230$\230a\330\010\013\2108\2208\320\033+\2504\250y\3208K\3101\330\014\026\220a\340\014\027\320\027+\2501\250E\260\031\270#\270Q\330\014\022\220#\220W\230F\240!\330\014\017\210z\230\022\2301\330\020\026\220a\330\020\033\320\033-\250Q\250e\2603\260c""\270\023\270A\340\014\027\320\027)\250\021\250%\250s\260#\260S\270\001\360\010\000\t\020\210t\2205\230\001\230\025\230c\240\024\240U\250%\250t\2601\200A\330\036\037\360\020\000\t\026\220T\230\021\330\010\013\2103\210c\220\025\220c\230\023\230H\240A\330\014\023\2204\220q\340\014\023\220=\240\014\250A\250V\2605\270\001\200A\360\006\000\017\020\330\010\016\210a\330\010\014\210A\330\010\023\2201\330\010\023\2201\330\010\022\220!\330\010\021\220\021\330\010\016\210a\330\010\016\210a\330\010\r\210Q\330\t\n\360\006\000\t\023\220)\2301\230A\360\006\000\t\014\2105\220\003\2201\330\014\023\2201\340\014\023\220;\230a\230q\360\006\000\t\n\330\014\023\2203\220l\240!\330\020\021\330\020\025\220Q\330\020\023\2201\330\020\032\230!\330\020\032\230!\330\020\031\230\021\330\020\030\230\001\330\020\025\220Q\330\020\025\220Q\360\n\000\021\027\320\026)\250\026\250q\330\014\023\2203\220l\240!\330\020\021\330\020\025\220Q\330\020\023\2201\330\020\032\230!\330\020\032\230!\330\020\031\230\021\330\020\030\230\001\330\020\025\220Q\330\020\025\220Q\330\020\024\220A\360\n\000\020\026\220Q\330\014\017\210z\230\023\230A\330\020\021\330\014\023\2203\220l\240!\330\020\021\330\020\025\220Q\330\020\023\2201\330\020\032\230!\330\020\032\230!\330\020\031\230\021\330\020\030\230\001\330\020\025\220Q\330\020\025\220Q\330\020\024\220A\360\010\000\020\026\220Q\330\014\023\2203\220l\240!\330\020\021\330\020\025\220Q\330\020\030\230\001\330\020\032\230!\330\020\032\230!\330\020\031\230\021\330\020\030\230\001\330\020\025\220Q\330\020\025\220Q\200A\360\006\000\017\020\330\010\016\210a\330\010\014\210A\330\010\023\2201\330\010\023\2201\330\010\022\220!\330\010\021\220\021\330\010\016\210a\330\010\016\210a\330\010\r\210Q\330\t\n\360\022\000\t\n\330\014*\250#\250Q\250a\330\010\017\210}\230A\330\014\022\220)\2301\330\020\021\330#&\240k\260\024\260Q\260a\330\023\024\340\010\034\230N\250!\2503\250a\320/F\300l\320RS\330\010\026\220e\320\033<\270M\310\021\310!\340\010\036\230c\240\027\250\001\330\010\021\220\026\320""\027(\250\001\330\010\035\230Z\240s\250!\330\010\037\230q\330\010\t\330\014\020\220\007\220q\340\020(\250\n\260!\330\024\031\230\026\230{\250*\260G\2706\300\025\300a\360\006\000\021\024\2202\220X\230W\240A\330\024\036\230n\250A\250T\260\030\270\021\330\024\027\220s\230#\230Q\330\030\"\240!\340\025\033\2304\230q\330\024\036\320\0361\260\021\260$\260d\270#\270Q\330\024\036\320\036.\250a\250t\2601\340\020\025\220Q\220j\240\t\250\021\250$\250a\330\020\025\220Q\330\014\022\220#\220W\230F\240!\330\010\017\210}\230A\330\014\022\220*\230A\330\020@\300\003\300;\310a\330\023\024\340\010\017\210s\220,\230a\330\014\r\330\014\021\220\021\330\014\017\210q\330\014\026\220a\330\014\025\220Q\330\014\026\220a\330\014\024\220A\330\014\021\220\021\330\014\021\220\021\200A\360\006\000\017\020\330\010\016\210a\330\010\014\210A\330\010\023\2201\330\010\023\2201\330\010\022\220!\330\010\021\220\021\330\010\016\210a\330\010\016\210a\330\010\r\210Q\330\t\n\360T\001\000\t\020\210s\220!\330\014\r\330\014\021\220\021\330\014\017\210q\330\014\026\220a\330\014\026\220a\330\014\025\220Q\330\014\024\220A\330\014\021\220\021\330\014\021\220\021\330\014\020\220\001\200A\340\016\017\330\010\016\210a\330\010\014\210A\330\010\023\2201\330\010\023\2201\330\010\022\220!\330\010\021\220\021\330\010\016\210a\330\010\016\210a\330\010\r\210Q\330\t\n\360l\001\000\t\020\210s\220%\220q\330\014\r\330\014\021\220\021\330\014\017\210q\330\014\026\220a\330\014\026\220a\330\014\025\220Q\330\014\024\220A\330\014\021\220\021\330\014\021\220\021\330\014\020\220\001\200A\360\006\000\017\020\330\010\016\210a\330\010\014\210A\330\010\023\2201\330\010\023\2201\330\010\022\220!\330\010\021\220\021\330\010\016\210a\330\010\016\210a\330\t\n\360\016\000\t\n\330\014\021\220\035\230h\240a\330\020\021\330\020\025\220Q\330\020\025\220Q\330\020\023\220?\240#\240S\250\n\260!\330\020\032\230!\330\020\031\230\021\330\020\032\230!\330\020\026\220a\330\020\025\220Q\330\020\025\220Q\340\010\017\210v\320\025/\250q\330\014\022\220&\320\030)""\250\021\250*\260A\330\010\020\220\006\320\026/\250v\3205S\320ST\330\014\022\220&\320\030+\2501\250J\260a\330\010\017\210v\320\025*\250!\330\014\022\220&\320\030*\250!\250:\260Q\330\010\017\320\017 \240\001\330\014\027\220s\230!\2301\330\014\017\320\0170\260\003\2601\330\020\026\220f\320\034-\250Q\250j\270\001\330\014\022\220!\330\010\017\210}\230A\330\014\027\220s\230!\2301\330\014\017\320\017!\240\023\240A\330\020\026\220f\320\034/\250q\260\n\270!\330\014\022\220!\330\010\017\210~\230Q\330\014\027\220s\230!\2301\330\014\017\210\177\230c\240\021\330\020\026\220f\320\034/\250q\260\n\270!\330\014\017\320\017!\240\027\250\001\330\020\026\220f\320\034/\250q\260\n\270!\330\014\022\220!\360\006\000\t\020\210v\220X\230S\240\n\250\"\250H\260A\260Q\200A\360\006\000\r\016\330\010\016\210a\330\010\014\210A\330\010\021\220\021\330\010\016\210a\330\t\n\360B\001\000\t\023\220)\2301\230A\360\006\000\t\014\210:\220Q\220e\2305\240\001\330\014\017\210u\220C\220q\330\026+\2501\330\024\025\330\024\025\330\024\025\340\014(\250\013\2601\260E\270\021\330\014#\2405\250\001\250\021\330\014\r\330\020-\250Y\260a\260w\270d\300!\330\014\023\220=\240\001\330\026+\2501\330\024\025\330\024\025\330\024A\300\022\3001\330\024\025\340\020\021\330\014'\240y\260\001\260\024\260Q\340\014#\320#4\260A\260T\270\030\300\021\330\014\023\2203\220e\2301\230E\240\023\240D\250\010\260\t\270\025\270a\360\006\000\t\014\210:\220Q\220e\2306\240\021\340\014(\250\003\2501\250A\330\014 \240\016\250a\250s\260!\3203H\310\014\320TU\330\014\032\230%\320\037@\300\r\310Q\310a\330\014#\2401\330\014\020\220\005\220Q\330\020\021\330\024+\2505\260\001\260\021\330\020\027\220}\240A\330\032/\250q\330\030\031\330\030\031\330\030\031\330\033\037\230q\240\003\240;\250c\260\024\260Q\260a\330\030\031\340\024\025\330\020\021\330\0241\260\031\270!\2707\300$\300a\330\020\027\220}\240A\330\032/\250q\330\030\031\330\030\031\330\030\031\330\033\037\230q\240\003\240;\250a\330\030\031\340\024\025\330\020\025\220Q\220j\240\t\250\021\250$\250a""\330\020\025\220Q\340\014\023\2203\220e\2301\330\020\023\2207\230&\320 1\260\023\260D\270\010\300\t\310\025\310a\360\010\000\t\014\210:\220Q\220e\2302\230X\240R\240q\330\014\021\220\022\2201\360\006\000\t\014\210:\220Q\220f\230A\340\014\036\230a\330\014\017\210s\220&\230\003\2301\330\026+\2501\330\024\025\330\024\025\330\024A\300\022\3003\300a\360\006\000\r\016\330\025\"\240!\2401\330\020\030\230\013\2401\240A\330\020\030\230\014\240A\240Q\340\020(\320(;\2701\270E\300\021\330\020\037\230u\240A\3306C\3001\300A\340\020,\250D\260\006\260a\260q\330\020\030\230\016\240a\240s\250!\320+@\300\014\310A\330\020\036\230e\320#D\300M\320QR\320RS\340\020\024\220E\230\025\230a\230q\330\024\025\330\030\"\240)\2501\250F\260!\2604\260t\2701\330\024\033\230=\250\001\330\0363\2601\330\034\035\330\034\035\330\034\035\330\034\036\230f\240A\240Q\330\034\035\340\030\031\330\024\031\230\021\230*\240I\250Q\250d\260!\330\026!\240\021\240!\330\020\033\320\033/\250q\260\006\260c\270\023\270A\340\026+\2501\330\024\025\330\024\025\330\0244\260B\260c\270\021\360\006\000\r\024\2203\220e\2301\330\020\023\2207\230&\320 1\260\023\260D\270\010\300\t\310\025\310a\360\010\000\017 \230q\330\014\r\330\014\r\330\014-\250R\250t\2601\260A\200A\360\006\000\022\023\330\010\016\210a\330\010\014\210A\330\010\021\220\021\330\010\016\210a\330\t\n\360B\001\000\t\014\210:\220Q\220i\230q\330\014\017\210u\220C\220q\330\026+\2501\330\024\025\330\024\025\330\024\025\340\014(\250\013\2601\260E\270\021\330\014%\240S\250\001\250\021\330\014\025\220V\2307\240,\250g\260Q\340\014#\320#4\260A\260W\270H\300A\330\014\023\2203\220e\2301\230E\240\023\240D\250\010\260\t\270\025\270a\360\006\000\t\014\210:\220Q\220j\240\006\240a\340\014(\250\003\2501\250A\330\014 \240\016\250a\250s\260!\3203H\310\014\320TU\330\014\032\230%\320\037@\300\r\310Q\310a\330\014#\2401\330\014\020\220\005\220Q\330\020\021\330\024-\250S\260\001\260\021\330\020\027\220}\240A\330\032/\250q\330\030\031\330\030\031\330\030\031\330\033\037\230q\240\010\250\013""\2603\260d\270!\2701\330\030\031\340\024\025\330\020\025\220Q\220f\230F\240'\250\034\260W\270A\330\020\025\220Q\340\014\023\2203\220e\2301\330\020\023\2207\230&\320 1\260\023\260D\270\010\300\t\310\025\310a\360\010\000\t\014\210:\220Q\220j\240\002\240(\250\"\250A\330\014\026\220g\230Q\360\006\000\t\014\210:\220Q\220k\240\021\340\014\036\230a\330\014\017\210s\220&\230\003\2301\330\026+\2501\330\024\025\330\024\025\330\024A\300\022\3003\300a\360\006\000\r\025\220K\230q\240\005\240X\250\\\270\021\270!\330\020\033\2308\2401\240E\250\026\250|\2701\330\026!\240\021\240!\330\020\033\320\033.\250a\250v\260S\270\003\2701\340\026+\2501\330\024\025\330\024\025\330\0244\260B\260c\270\021\340\014\027\220x\230q\240\n\250)\2603\260a\340\014\023\2203\220e\2301\330\020\023\2207\230&\320 1\260\023\260D\270\010\300\t\310\025\310a\360\010\000\017 \230q\330\014\r\330\014\r\330\0142\260\"\260D\270\001\270\021\200A\360\006\000\016\017\330\010\016\210a\330\010\014\210A\330\010\021\220\021\330\010\016\210a\330\t\n\360F\001\000\t\014\210:\220Q\220e\2301\330\014\017\210u\220C\220q\330\026+\2501\330\024\025\330\024\025\330\024\025\340\014(\250\013\2601\260E\270\021\330\014\"\320\"9\270\021\270%\270q\330\014#\320#4\260A\260T\270\030\300\021\330\014\023\2203\220e\2301\230E\240\023\240D\250\010\260\t\270\025\270a\360\006\000\t\014\210:\220Q\220f\230F\240!\330\014(\250\003\2501\250A\330\014 \240\016\250a\250s\260!\3203H\310\014\320TU\330\014\032\230%\320\037@\300\r\310Q\310a\330\014#\2401\330\014\020\220\005\220Q\330\020\023\220:\230Q\230c\240\021\330\024*\320*A\300\021\300%\300q\340\032/\250q\330\030\031\330\030\031\330\030\031\330\033\037\230q\240\004\240K\250s\260$\260a\260q\340\024\025\330\020\025\220Q\220e\2301\330\020\025\220Q\330\014\023\2203\220e\2301\330\020\023\2207\230&\320 1\260\023\260D\270\010\300\t\310\025\310a\360\010\000\t\014\210:\220Q\220e\2302\230Q\330\014(\250\003\2501\250A\330\014 \240\016\250a\250s\260!\3203H\310\014\320TU\330\014\032\230%\320\037@\300\r\310Q\310a\330\014#""\2401\330\014\020\220\007\220s\230(\240!\2407\250!\330\020\025\220Q\220e\320\0332\260!\2605\270\001\330\020\025\220Q\330\014\023\2203\220e\2301\330\020\023\2207\230&\320 1\260\023\260D\270\010\300\t\310\025\310a\360\010\000\017 \230q\330\014\r\330\014\r\330\014.\250b\260\004\260A\260Q\200A\360\006\000\r\016\330\010\016\210a\330\010\014\210A\330\010\021\220\021\330\010\016\210a\330\t\n\360H\001\000\t\014\210:\220Q\220d\230!\330\014\017\210u\220C\220q\330\026+\2501\330\024\025\330\024\025\330\024\025\340\014(\250\013\2601\260E\270\021\330\014%\240S\250\001\250\021\340\014#\320#4\260A\260W\270H\300A\330\014\023\2203\220e\2301\230E\240\023\240D\250\010\260\t\270\025\270a\360\006\000\t\014\210:\220Q\220e\2306\240\021\340\014(\250\003\2501\250A\330\014 \240\016\250a\250s\260!\3203H\310\014\320TU\330\014\032\230%\320\037@\300\r\310Q\310a\330\014#\2401\330\014\020\220\005\220Q\330\020\021\330\024-\250S\260\001\260\021\330\020\027\220}\240A\330\032/\250q\330\030\031\330\030\031\330\030\031\330\033\037\230q\240\003\240;\250c\260\024\260Q\260a\330\030\031\340\024\025\330\020\025\220Q\220e\2301\330\020\025\220Q\340\014\023\2203\220e\2301\330\020\023\2207\230&\320 1\260\023\260D\270\010\300\t\310\025\310a\360\010\000\t\014\210:\220Q\220e\2302\230X\240R\240q\330\014\021\220\022\2201\360\006\000\t\014\210:\220Q\220f\230A\340\014\036\230a\330\014\017\210s\220&\230\003\2301\330\026+\2501\330\024\025\330\024\025\330\024C\3002\300S\310\001\360\006\000\r\025\220K\230q\240\005\240X\250\\\270\021\270!\330\020\033\320\033,\250A\250U\260!\330\026!\240\021\240!\330\020\033\320\033/\250q\260\006\260c\270\023\270A\340\026+\2501\330\024\025\330\024\025\330\0244\260B\260c\270\021\360\006\000\r\024\2203\220e\2301\330\020\023\2207\230&\320 1\260\023\260D\270\010\300\t\310\025\310a\360\010\000\017 \230q\330\014\r\330\014\r\330\014-\250R\250t\2601\260A\200A\360\006\000\022\023\330\010\016\210a\330\010\014\210A\330\010\021\220\021\330\010\016\210a\330\t\n\360H\001\000\t\014\210:\220Q\220j\240\005""\240Q\330\014\017\210u\220C\220q\330\026+\2501\330\024\025\330\024\025\330\024\025\340\014(\250\013\2601\260E\270\021\330\014#\2405\250\001\250\021\330\014'\240z\260\021\260!\340\014#\320#4\260A\260T\270\030\300\021\330\014\023\2203\220e\2301\230E\240\023\240D\250\010\260\t\270\025\270a\360\006\000\t\014\210:\220Q\220j\240\006\240a\340\014(\250\003\2501\250A\330\014 \240\016\250a\250s\260!\3203H\310\014\320TU\330\014\032\230%\320\037@\300\r\310Q\310a\330\014#\2401\330\014\020\220\005\220Q\330\020\021\330\024+\2505\260\001\260\021\330\020\027\220}\240A\330\032/\250q\330\030\031\330\030\031\330\030\031\330\033\037\230q\240\010\250\013\2603\260d\270!\2701\330\030\031\340\024\025\330\020\025\220Q\220j\240\n\250!\2501\330\020\025\220Q\340\014\023\2203\220e\2301\330\020\023\2207\230&\320 1\260\023\260D\270\010\300\t\310\025\310a\360\010\000\t\014\210:\220Q\220j\240\002\240(\250\"\250A\330\014\026\220g\230Q\360\006\000\t\014\210:\220Q\220k\240\021\340\014\036\230a\330\014\017\210s\220&\230\003\2301\330\026+\2501\330\024\025\330\024\025\330\024A\300\022\3003\300a\360\006\000\r\025\220M\240\021\240!\330\020(\320(;\2701\270E\300\021\330\020\037\230u\240A\3306C\3001\300A\340\020,\250D\260\006\260a\260q\330\020\030\230\016\240a\240s\250!\320+@\300\014\310A\330\020\036\230e\320#D\300M\320QR\320RS\340\020\024\220E\230\025\230a\230q\330\024\031\230\021\230*\240J\250a\250v\260Q\260a\330\026!\240\021\240%\240x\250|\2701\270A\330\020\033\2308\2401\240J\250l\270#\270Q\330\026!\240\021\240!\330\020\033\320\033/\250q\260\006\260c\270\023\270A\340\026+\2501\330\024\025\330\024\025\330\0244\260B\260c\270\021\360\006\000\r\024\2203\220e\2301\330\020\023\2207\230&\320 1\260\023\260D\270\010\300\t\310\025\310a\360\010\000\017 \230q\330\014\r\330\014\r\330\0142\260\"\260D\270\001\270\021\200A\360\006\000\r\016\330\010\016\210a\330\010\014\210A\330\010\021\220\021\330\010\016\210a\330\t\n\360<\000\t\014\210:\220Q\220e\2308\240;\250b\260\r\270Q\330\014\017\210u\220C\220q\330\026+\2501\330\024""\025\330\024\025\330\024\025\340\014\025\220[\240\001\240\025\240a\330\014\021\220\021\220#\220T\230\025\230e\2401\240A\360\006\000\t\n\330\014\023\2203\220e\2301\230D\240\003\2404\240x\250y\270\005\270Q\330\010\017\210}\230A\330\022'\240q\250\005\320-B\300&\310\001\200A\360\006\000\017\020\330\010\016\210a\330\010\014\210A\330\010\021\220\021\330\010\016\210a\330\t\n\360\n\000\t\020\210s\220-\230q\240\006\240e\2506\260\023\260D\270\010\300\t\310\025\310a\200A\360\006\000\017\020\330\010\016\210a\330\010\014\210A\330\010\021\220\021\330\010\016\210a\330\t\n\360:\000\t\021\220\010\230\001\230\021\330\014\017\210u\220C\220q\330\026+\2501\330\024\025\330\024\025\330\024\025\340\014\025\220[\240\001\240\025\240a\330\014\023\2201\220E\230\024\230U\240%\240q\250\001\360\006\000\t\n\330\014\023\2203\220e\2301\230F\240#\240T\250\030\260\031\270%\270q\330\010\017\210}\230A\330\022'\240q\250\005\320->\270f\300A\200A\340\010\016\210a\330\010\020\220\001\330\010\020\220\001\330\010\025\220Q\330\010\024\220A\330\t\n\360@\001\000\t\n\330\014\021\220\022\2201\330\014\020\220\007\220r\230\021\330\014\020\220\007\220r\230\021\330\014\020\220\014\230B\230a\330\014\020\220\013\2302\230Q\340\014\023\2201\360\006\000\t\033\230$\230a\330\010\027\220t\2301\330\010#\320#7\260q\270\001\360\006\000\t\026\320\025(\250\001\250\025\250i\260s\270!\360\006\000\t\n\330\014\021\220\023\220A\330\014\020\220\007\220s\230!\330\014\020\220\007\220s\230!\330\014\020\220\014\230C\230q\330\014\020\220\013\2303\230a\360\010\000\r\020\210x\220x\320\037/\250t\2609\320<O\310q\330\020\034\230A\340\020\033\2308\2401\240L\260\t\270\023\270A\330\020\035\230Q\360\006\000\021\034\320\033,\250A\330\024\033\230>\320):\270#\270Q\340\020\035\320\0352\260!\2601\360\010\000\r\032\320\031/\250q\330\020\025\220V\2308\2408\250=\270\014\300A\360\n\000\r\020\210x\220x\320\037/\250t\2609\320<O\310q\330\020\034\230A\340\020\035\230X\240Q\240l\260)\2703\270a\330\020\035\230^\2501\250L\3208I\310\023\310A\330\020\035\230Q\360\006""\000\021\036\320\035.\250a\330\024\033\230>\320):\270#\270Q\340\020\035\320\0352\260!\2601\330\014\027\220|\2401\240G\2507\260#\260Q\360\006\000\t\020\210t\2205\230\001\230\023\230G\2401\240H\250C\250t\2605\270\005\270T\300\021\200A\360\006\000\017\020\330\010\016\210a\330\010\016\210a\330\010\014\210A\330\010\021\220\021\330\010\016\210a\330\t\n\360R\001\000\t\023\220)\2301\230A\330\010$\240K\250q\260\005\260Q\360\006\000\t\014\2105\220\007\220u\230D\240\t\250\030\260\021\260!\330\014\r\330\020\027\220z\240\021\240&\250\006\250f\260G\2706\300\026\300v\310Q\330\014\023\220=\240\001\330\026+\2501\250E\3201G\300v\310Q\330\014\030\230\013\2401\240F\250!\360\006\000\t\014\2105\220\007\220u\230D\240\t\250\030\260\021\260!\330\014\r\330\020\027\220z\240\021\330\024\037\230{\250&\260\007\260w\270f\300F\310!\340\014\023\220=\240\001\330\026+\2501\250E\3201G\300v\310Q\330\014\030\230\013\2401\240F\250!\360\006\000\t&\240[\260\001\260\026\260v\270T\300\021\330\010#\2409\250A\250T\260\021\330\010\037\320\0370\260\001\260\024\260X\270Q\330\010\017\210s\220%\220q\230\005\230S\240\004\240H\250I\260U\270!\200A\360\006\000\020\021\330\010\016\210a\330\010\021\220\021\330\010\016\210a\330\t\n\360.\000\t\014\210:\220Q\220g\230Q\330\014\017\210u\220C\220q\330\026+\2501\330\024\025\330\024\025\330\024\025\340\014(\250\013\2601\260E\270\021\330\014\024\220A\220V\2304\230u\240E\250\021\250!\360\006\000\t\n\330\014\023\2203\220e\2301\230G\2408\2509\260E\270\021\330\010\017\210}\230A\330\022'\240q\250\005\320-C\3006\310\021\200A\360\006\000\020\021\330\r\016\330\010\016\210a\330\010\021\220\021\330\010\016\210a\330\t\n\360:\000\t\014\210:\220Q\220g\230Q\330\014\017\210u\220C\220q\330\026+\2501\330\024\025\330\024\025\330\024\025\340\014(\250\013\2601\260E\270\021\330\014\r\330\020\035\230Y\240i\250q\260\007\260q\330\014\023\220=\240\001\330\026+\2501\250E\3201I\310\026\310q\330\020\021\330\014\023\2203\220e\2301\230A\230S\240\004\240E\250\025\250a\250z\270\030\300\031\310%\310q\360\006""\000\t\014\210:\220Q\220h\230f\240G\2502\250X\260R\260{\300!\330\014\030\230\001\330\014\020\220\005\220Q\330\020\021\330\024!\240\031\250)\2601\260C\260q\330\020\027\220}\240A\330\032/\250q\330\030\031\330\030\031\330\030\031\330\033\036\230d\240!\2406\250\021\330\030\031\340\024\025\330\020\023\2207\230!\2301\330\014\023\2203\220e\2301\230E\240\030\250\031\260%\260q\360\006\000\017 \230q\330\014\r\330\014\r\330\0140\260\002\260$\260a\260q\200A\360\006\000\r\016\330\010\016\210a\330\010\021\220\021\330\010\016\210a\330\t\n\360:\000\t\020\210s\220.\240\001\330\014\020\220\005\220V\2308\2406\250\030\260\031\270%\270q\200A\340\010\016\210a\330\010\017\210q\330\010\r\210Q\330\t\n\360&\000\t\014\2105\220\003\2201\340\014\017\210v\220S\230\001\330\020\027\220t\230>\250\021\250!\340\014\023\2204\220}\240A\240W\250A\360\006\000\t\033\230$\230a\330\010\027\220t\2301\330\010#\320#7\260q\270\001\360\006\000\t\026\220^\2401\240E\250\021\360\006\000\t\026\320\025+\2501\250E\260\026\260w\270e\3001\360\010\000\t\014\2108\2208\320\033+\2504\250y\3208K\3101\330\014\030\230\001\340\014\031\230\030\240\021\240,\250i\260s\270!\330\014\031\230\036\240q\250\014\3204E\300S\310\001\330\014\031\230\021\360\006\000\r\032\320\031*\250!\330\020\027\220~\320%6\260c\270\021\340\014\031\320\031.\250a\250q\330\010\023\220<\230q\240\007\240w\250c\260\021\360\006\000\t\020\210t\2205\230\001\230\023\230G\2401\240H\250C\250t\2605\270\005\270T\300\021\200A\340\010\016\210a\330\010\017\210q\330\010\r\210Q\330\010\016\210a\330\010\020\220\001\330\010\020\220\001\330\010\025\220Q\330\010\024\220A\330\010\020\220\001\330\t\n\360`\001\000\t\014\210:\220Q\220h\230a\330\014\023\2204\220|\2401\330\020\026\220g\230U\240&\250\010\260\010\270\r\300Q\360\006\000\t\037\230i\240q\250\001\330\010\025\220T\230\021\330\010\013\2107\220#\220Q\330\014\023\2204\220|\2401\330\020\026\220g\230U\240&\250\010\260\010\270\r\300Q\360\010\000\t\016\210X\220S\230\003\230:\240T\250\034\260Q\260a\330\010\r\210R\210|\2301\330\014""\022\220'\230\025\230f\240H\250H\260M\300\021\360\n\000\t\014\2107\220#\220Q\330\014\023\2202\220\\\240\021\240!\340\010\017\210r\220\034\230Q\230h\240i\250q\200A\340\010\016\210a\330\010\017\210q\330\010\r\210Q\330\010\016\210a\330\010\020\220\001\330\010\020\220\001\330\010\025\220Q\330\010\024\220A\330\t\n\360V\001\000\t\014\2105\220\003\2202\220T\230\026\230s\240\"\240D\250\004\250C\250q\330\014\023\2204\220x\230q\240\006\240h\250h\260m\3001\330\010\013\2105\220\002\220\"\220D\230\007\230r\240\022\2404\240w\250b\260\002\260$\260l\300\"\300B\300d\310+\320UW\320WX\330\014\023\2204\220x\230q\240\006\240g\250Q\360\010\000\t\033\230$\230a\330\010\027\220t\2301\330\010#\320#7\260q\270\001\360\006\000\t\026\320\025+\2501\250E\260\026\260w\270e\3001\360\006\000\t\n\330\014\021\220\023\220A\330\014\020\220\007\220s\230!\330\014\020\220\007\220s\230!\330\014\020\220\014\230C\230q\330\014\020\220\013\2303\230a\360\010\000\r\020\210x\220x\320\037/\250t\2609\320<O\310q\330\020\034\230A\340\020\033\2308\2401\240L\260\t\270\023\270A\330\020\035\230Q\360\006\000\021\034\320\033,\250A\330\024\033\230>\320):\270#\270Q\340\020\035\320\0352\260!\2601\360\010\000\r\032\320\031/\250q\330\020\025\220V\2308\2408\250=\270\014\300A\360\n\000\r\020\210x\220x\320\037/\250t\2609\320<O\310q\330\020\034\230A\340\020\035\230X\240Q\240l\260)\2703\270a\330\020\035\230^\2501\250L\3208I\310\023\310A\330\020\035\230Q\360\006\000\021\036\320\035.\250a\330\024\033\230>\320):\270#\270Q\340\020\035\320\0352\260!\2601\330\014\027\220|\2401\240G\2507\260#\260Q\360\006\000\t\020\210t\2205\230\001\230\023\230G\2401\240H\250C\250t\2605\270\005\270T\300\021\200A\360\006\000\017\020\330\010\021\220\021\330\010\016\210a\330\t\n\360,\000\t\020\210s\220$\220a\220v\230S\240\006\240h\250i\260u\270A\200A\360\006\000\017\020\330\010\021\220\021\330\010\016\210a\330\t\n\360&\000\t\020\210s\220$\220a\220v\230X\240V\2508\2609\270E\300\021\320\004\034\230A\340\010\023\320\023&\240a\240t\2501\330\010\017\210r\220\026""\220q\230\005\230U\240!\200A\340\021\022\330\010\021\220\021\330\010\017\210q\330\010\023\2201\330\010\025\220Q\330\t\n\360D\001\000\t\026\220Y\230a\230q\330\010\020\220\004\220A\330\010\013\2106\220\027\230\001\340\014\017\210v\220S\230\001\330\020\027\220t\230<\240q\250\001\340\021\027\220x\230y\250\001\250\021\330\020\027\220t\230<\240q\250\t\260\033\270A\360\006\000\021\026\220T\230\033\240A\240Q\330\020\027\220r\230\034\240Q\240i\250{\270!\360\010\000\t\014\2106\220\023\220A\330\014\023\2201\340\010\027\220y\240\001\240\021\330\010\013\2108\2203\220a\330\022'\240q\330\020\024\220A\330\020\021\330\020\021\360\n\000\t\014\2108\2203\220a\330\014\023\2208\230;\240d\250,\260a\260w\270k\310\021\360\006\000\r\022\220\024\220\\\240\021\240)\250;\260l\300+\310Q\310a\330\014\023\2202\220\\\240\021\240)\250;\260a\200A\340\020\021\330\010\017\210q\330\010\r\210Q\330\t\n\360,\000\t\014\2107\220#\220Q\330\014\023\2204\220}\240A\240W\250A\360\006\000\t\032\230\034\240Q\240g\250V\2601\330\010\032\230$\230a\330\010\027\220t\2301\330\010#\320#7\260q\270\001\360\006\000\t\026\220^\2401\240E\250\031\260#\260Q\360\006\000\t\026\320\025(\250\001\250\025\250i\260x\270q\330\010\025\320\025(\250\001\250\034\3205F\300c\310\021\340\010\013\2103\210d\220!\330\014\031\230\036\240q\250\005\250Y\260c\270\021\330\014\031\230\034\240Q\240g\250X\260S\270\001\360\006\000\r\032\230\030\240\021\240'\250\023\250B\250c\260\021\340\010\013\2104\210r\220\021\330\014\031\320\031,\250A\250\\\3209J\310#\310Q\330\014\031\320\031/\250q\260\014\320<M\310Q\330\014\031\230\034\240Q\240l\260,\270a\270u\300J\310c\320QR\330\014\031\230\034\240Q\240g\250X\260S\270\001\340\r\021\220\023\220A\330\014\031\320\031,\250A\250\\\3209J\310#\310Q\340\r\021\220\022\2201\330\014\031\320\031,\250A\330\020\034\320\034-\250T\260\022\2603\260a\360\006\000\016\022\220\022\2201\330\014\031\320\031,\250A\250\\\3209J\310#\310Q\330\014\031\320\031/\250q\260\014\320<M\310Q\330\014\031\230\030\240\021\240'\250\025\250c\260\021\330""\014\031\230\034\240Q\240g\250X\260S\270\001\360\006\000\r\032\320\031,\250A\250\\\3209J\310#\310Q\330\014\031\320\031/\250q\260\014\320<M\310Q\330\014\031\230\034\240Q\240g\250X\260S\270\001\360\010\000\t\014\2108\2208\320\033+\2504\250y\3208K\3101\330\014\030\230\001\340\014\031\230\030\240\021\240,\250i\260s\270!\330\014\031\230\036\240q\250\014\3204E\300S\310\001\330\014\031\230\021\360\006\000\r\032\320\031*\250!\330\020\027\220~\320%6\260c\270\021\340\014\031\320\031.\250a\250q\330\010\023\220<\230q\240\007\240w\250c\260\021\360\006\000\t\020\210t\2205\230\001\230\023\230G\2401\240H\250C\250t\2605\270\005\270T\300\021\200A\340\020\021\330\010\017\210q\330\010\r\210Q\330\t\n\360 \000\t\014\2107\220#\220Q\330\014\023\2204\320\027'\240q\250\007\250q\360\006\000\t\033\230$\230a\330\010\027\220t\2301\330\010#\320#7\260q\270\001\360\006\000\t\026\220^\2401\240E\250\031\260#\260Q\360\010\000\t\014\2106\220\022\2201\330\014\031\320\031,\250A\250U\260)\2707\300\"\300C\300q\360\006\000\r\032\320\031,\250A\250U\260)\2703\270a\330\014\031\230\030\240\021\240'\250\023\250G\2602\260R\260v\270W\300C\300r\310\023\310A\340\010\013\2104\210r\220\021\330\014\031\320\031,\250A\250\\\3209J\310#\310Q\330\014\031\320\031/\250q\260\014\320<M\310Q\330\014\031\230\034\240Q\240l\260,\270a\270u\300J\310c\320QR\330\014\031\230\034\240Q\240g\250X\260S\270\001\340\r\021\220\023\220A\330\014\031\320\031,\250A\250\\\3209J\310#\310Q\340\r\021\220\022\2201\330\014\031\320\031,\250A\330\020\034\320\034-\250T\260\022\2603\260a\360\006\000\016\022\220\022\2201\330\014\031\320\031,\250A\250\\\3209J\310#\310Q\330\014\031\320\031/\250q\260\014\320<M\310Q\330\014\031\230\030\240\021\240'\250\025\250c\260\021\330\014\031\230\034\240Q\240g\250X\260S\270\001\360\006\000\r\032\320\031,\250A\250\\\3209J\310#\310Q\330\014\031\320\031/\250q\260\014\320<M\310Q\330\014\031\230\034\240Q\240g\250X\260S\270\001\360\010\000\t\014\2108\2208\320\033+\2504\250y\3208K\3101\330\014\030\230\001\340\014\031\230\030\240""\021\240,\250i\260s\270!\330\014\031\230\036\240q\250\014\3204E\300S\310\001\330\014\031\230\021\360\006\000\r\032\320\031*\250!\330\020\027\220~\320%6\260c\270\021\340\014\031\320\031.\250a\250q\330\010\023\220<\230q\240\007\240w\250c\260\021\360\006\000\t\020\210t\2205\230\001\230\023\230G\2401\240H\250C\250t\2605\270\005\270T\300\021\200A\340\010\017\210q\330\010\r\210Q\330\t\n\360(\000\t\032\230\034\240Q\240g\250V\2601\330\010\013\2103\210d\220!\330\014\023\2204\220~\240Q\240a\360\006\000\t\033\230$\230a\330\010\027\220t\2301\330\010#\320#7\260q\270\001\360\006\000\t\026\220^\2401\240E\250\031\260#\260Q\360\006\000\t\026\320\025(\250\001\250\025\250i\260s\270!\330\010\025\320\025(\250\001\250\034\3205F\300c\310\022\3103\310a\340\010\013\2104\210r\220\021\330\014\031\320\031,\250A\250\\\3209J\310#\310Q\330\014\031\320\031/\250q\260\014\320<M\310Q\330\014\031\230\034\240Q\240l\260,\270a\270u\300J\310c\320QR\330\014\031\230\034\240Q\240g\250X\260S\270\001\340\r\021\220\023\220A\330\014\031\320\031,\250A\250\\\3209J\310#\310Q\340\r\021\220\022\2201\330\014\031\320\031,\250A\330\020\034\320\034-\250T\260\022\2603\260a\360\006\000\016\022\220\022\2201\330\014\031\320\031,\250A\250\\\3209J\310#\310Q\330\014\031\320\031/\250q\260\014\320<M\310Q\330\014\031\230\030\240\021\240'\250\025\250c\260\021\330\014\031\230\034\240Q\240g\250X\260S\270\001\360\006\000\r\032\320\031,\250A\250\\\3209J\310#\310Q\330\014\031\320\031/\250q\260\014\320<M\310Q\330\014\031\230\034\240Q\240g\250X\260S\270\001\360\010\000\t\014\2108\2208\320\033+\2504\250y\3208K\3101\330\014\030\230\001\340\014\031\230\030\240\021\240,\250i\260s\270!\330\014\031\230\036\240q\250\014\3204E\300S\310\001\330\014\031\230\021\360\006\000\r\032\320\031*\250!\330\020\027\220~\320%6\260c\270\021\340\014\031\320\031.\250a\250q\330\010\023\220<\230q\240\007\240w\250c\260\021\360\006\000\t\020\210t\2205\230\001\230\023\230G\2401\240H\250C\250t\2605\270\005\270T\300\021\200A\360\006\000\t\020\210q\330\010\r\210Q\330""\010\021\220\021\330\010\016\210a\330\010\014\210A\330\010\023\2201\330\010\023\2201\330\010\016\210a\330\010\016\210a\330\t\n\360`\001\000\t\014\2105\220\003\2205\230\005\230X\240S\250\005\250S\260\006\260c\270\025\270c\300\024\300S\310\001\330\014\023\2201\330\010\t\330\014\024\220M\320!1\260\021\330\020\026\220a\330\020\024\220A\330\020\030\230\001\330\020\025\220Q\330\020\030\230\t\240\021\240!\330\020\032\230!\330\020\032\230!\330\020\025\220Q\360\006\000\t\020\210v\320\025/\250q\330\022\036\230a\230v\320%8\270\005\270Q\330\020<\270A\330\014\r\330\010\020\220\006\320\026/\250v\3205S\320ST\330\022\036\230a\230v\320%:\270%\320?R\320RX\320XY\330\014\r\330\010\017\210}\230A\330\022'\240q\250\005\320-@\300\006\300a\330\014\r\340\010\017\210s\220%\220q\230\007\230u\240A\200A\340\010\017\210q\330\010\r\210Q\330\t\n\360&\000\t\020\210t\2208\2301\230C\230w\240a\200A\340\010\017\210q\330\010\r\210Q\330\t\n\360&\000\t\020\210t\2208\2302\230S\240\007\240q\200A\340\010\017\210q\330\010\022\220!\330\010\020\220\001\330\010\017\210q\330\010\016\210a\330\010\017\210q\330\010\021\220\021\330\010\021\220\021\330\010\026\220a\330\010\026\220a\330\010\025\220Q\330\t\n\360\"\000\t\n\330\014\022\220#\220Q\330\014\020\220\t\230\023\230A\330\014\020\220\007\220s\230!\330\014\020\220\006\220c\230\021\330\014\020\220\005\220S\230\001\330\014\020\220\006\220c\230\021\330\014\020\220\010\230\003\2301\330\014\020\220\010\230\003\2301\330\014\020\220\r\230S\240\001\330\014\020\220\r\230S\240\001\330\014\020\220\014\230C\230q\340\014\023\2201\360\006\000\t\033\230$\230a\330\010#\320#7\260q\270\004\270A\360\010\000\t\024\320\023%\240Q\240a\330\014\023\220:\230X\240W\250F\260'\270\021\330\014\025\220^\240>\260\021\330\014\r\360\n\000\t\020\210t\2205\230\001\230\025\230c\240\024\240Y\250e\2604\260q\200A\340\010\017\210q\330\010\022\220!\330\010\020\220\001\330\010\017\210q\330\010\016\210a\330\010\017\210q\330\010\021\220\021\330\010\021\220\021\330\010\026\220a\330\010\026\220a\330\010\025""\220Q\330\t\n\360\"\000\t\n\330\014\022\220#\220Q\330\014\020\220\t\230\023\230A\330\014\020\220\007\220s\230!\330\014\020\220\006\220c\230\021\330\014\020\220\005\220S\230\001\330\014\020\220\006\220c\230\021\330\014\020\220\010\230\003\2301\330\014\020\220\010\230\003\2301\330\014\020\220\r\230S\240\001\330\014\020\220\r\230S\240\001\330\014\020\220\014\230C\230q\340\014\023\2201\360\006\000\t\033\230$\230a\330\010#\320#7\260q\270\004\270A\360\010\000\t\024\320\023%\240Q\240a\330\014\r\210W\220A\220Z\230q\240\010\250\001\250\027\260\001\260\026\260q\270\007\270q\300\001\330\014\r\210Y\220a\220~\240Q\240n\260A\260Q\330\014\r\360\n\000\t\020\210t\2205\230\001\230\025\230c\240\024\240Y\250e\2604\260q\200A\330\035\036\340\010\017\210r\220\026\220q\330\021%\240Q\240d\320*:\270%\270q\200A\330\034\035\340\010\017\210r\220\026\220v\320\0350\260\001\260\024\3205E\300U\310!\200A\330\027\030\340\010\017\210r\220\026\220v\230^\2501\250D\3200@\300\005\300Q\200A\330\026\027\340\010\017\210r\220\026\220v\230]\250!\2504\320/?\270u\300A\200A\330\030\031\340\010\017\210r\220\026\220v\230_\250A\250T\3201A\300\025\300a\200A\330\031\032\340\010\017\210r\220\026\220v\320\035-\250Q\250d\3202B\300%\300q\200A\330\025\026\340\010\017\210r\220\026\220v\230\\\250\021\250$\320.>\270e\3001\200A\360\014\000\t\020\210t\2208\2301\230C\230s\240#\240S\250\001\320\004\034\230A\340\010\017\210t\320\023$\240A\240Q\320\004\030\230\001\360\n\000\t\021\220\004\220A\330\010\017\210x\220v\230S\240\n\250%\250w\260f\270G\3001\320\004\034\230E\320!5\260Q\360\032\000\t\014\2104\210r\220\021\330\014\023\2201\360\006\000\t\033\230$\230a\330\010\027\220t\2301\330\010#\320#7\260q\270\001\360\006\000\t\026\220^\2401\240E\250\031\260#\260Q\360\006\000\t\026\320\025(\250\001\250\025\250i\260s\270!\340\010\013\2104\210s\220!\330\014\031\320\031,\250A\250\\\3209J\310#\310Q\340\r\021\220\022\2201\330\014\031\320\031,\250A\330\020\034\320\034-\250T\260\022\2603\260a\360\006\000\016\022\220\022\2201\330\014\031\320\031,""\250A\250\\\3209J\310#\310Q\330\014\031\320\031/\250q\260\014\320<M\310Q\330\014\031\230\030\240\021\240'\250\025\250c\260\021\330\014\031\230\034\240Q\240g\250X\260S\270\001\360\006\000\r\032\320\031,\250A\250\\\3209J\310#\310Q\330\014\031\320\031/\250q\260\014\320<M\310Q\330\014\031\230\034\240Q\240g\250X\260S\270\001\360\010\000\t\014\2108\2208\320\033+\2504\250y\3208K\3101\330\014\030\230\001\340\014\031\230\030\240\021\240,\250i\260s\270!\330\014\031\230\036\240q\250\014\3204E\300S\310\001\330\014\031\230\021\360\006\000\r\032\320\031*\250!\330\020\027\220~\320%6\260c\270\021\340\014\031\320\031.\250a\250q\330\010\023\220<\230q\240\007\240w\250c\260\021\360\006\000\t\020\210t\2205\230\001\230\023\230G\2401\240H\250C\250t\2605\270\005\270T\300\021\320\004\034\230E\320!5\260Q\360\030\000\t\020\210t\2209\230A\230S\240\001\320\004\034\230E\320!5\260Q\360\030\000\t\020\210t\2209\230B\230c\240\021\320\004\034\230H\240A\360\014\000\t\n\330\014\023\220=\240\t\250\021\250&\260\001\330\010\017\210}\230A\330\022'\240q\250\004\250L\3208I\310\026\310q\320\004\034\230O\2501\340\010\017\210r\220\026\220q\330\021\030\230\006\230m\2501\250D\3200@\300\007\300u\310A\320\004\035\230Q\360\026\000\t\024\320\023'\240q\250\004\250A\330\010\017\210r\220\032\2301\230E\240\030\250\021\250(\260(\270,\300f\310A\320\004\035\230Q\340\010\017\210r\220\026\220q\330\021%\240Q\240d\320*:\270%\270q\320\004\035\230Q\340\010\017\210t\2207\230!\2301\320\004\035\230Q\340\010\017\210t\320\023$\240A\240Q\320\004 \240\010\250\001\360\"\000\t\016\210T\220\034\230Q\230a\360\006\000\t\031\320\030+\2501\250B\250j\270\003\2701\330\010\030\320\030+\2501\250D\260\n\270#\270Q\330\010\017\210r\220\026\220v\230[\250\001\250\032\260;\270e\3001\320\004\035\230U\320\":\270!\360&\000\t\014\2104\210x\220s\230!\330\014\022\220$\220a\330\r\021\220\021\330\014\022\220$\220a\340\014\022\220$\220k\240\026\240u\250A\330\010\017\210r\220\026\220q\330\021%\240Q\240f\250C\250s\260'\270\025\270a\320\004\031\230\021\360\016\000""\t&\240W\250A\250T\260\031\270!\360\006\000\t$\320#7\260q\270\004\270A\330\010$\240I\250Q\250d\260!\330\010\013\2108\2208\2301\330\014\030\230\001\330\r\025\220X\230Q\330\014\027\220~\240Q\240j\260\001\330\r\025\220X\230Q\330\014\027\220~\240Q\240j\260\001\360\010\000\t\020\210r\220\026\220v\230W\240A\240T\250\031\260&\270\005\270Q\320\004!\240\034\250Y\3206R\320RS\360&\000\t\033\230.\250\001\250\031\260&\270\001\330\010\013\2107\220#\220Q\330\014\023\2204\320\027(\250\001\250\021\360\006\000\t\033\230$\230a\330\010\027\220t\2301\330\010#\320#7\260q\270\001\360\006\000\t\026\220^\2401\240E\250\031\260#\260Q\360\006\000\t\026\320\025(\250\001\250\025\250i\260s\270!\340\010\013\2104\210t\2201\330\014\031\230\030\240\021\240'\250\027\260\002\260#\260Q\360\006\000\r\032\320\031)\250\021\250,\3206G\300s\310!\330\014\031\230\034\240Q\240g\250W\260G\2702\270R\270r\300\025\300a\360\n\000\t\014\2108\2208\320\033+\2504\250y\3208K\3101\330\014\030\230\001\340\014\031\230\030\240\021\240,\250i\260s\270!\330\014\031\230\036\240q\250\014\3204E\300S\310\001\330\014\031\230\021\360\006\000\r\032\320\031*\250!\330\020\027\220~\320%6\260c\270\021\340\014\031\320\031.\250a\250q\330\010\023\220<\230q\240\007\240w\250c\260\021\360\006\000\t\020\210t\2205\230\001\230\023\230G\2401\240H\250C\250t\2605\270\005\270T\300\021\320\004\030\230\001\360\026\000\t\033\230$\230a\330\010 \320 4\260A\260Q\330\010\017\210r\220\032\2301\340\020 \240\r\250Q\250e\2606\270\023\270A\330\020\037\230~\250Q\250e\2606\270\023\270A\330\020 \240\014\250A\250U\260&\270\003\2701\330\020 \240\r\250Q\250e\2606\270\023\270A\330\020\037\230\177\250a\250u\260F\270#\270Q\330\020\037\230\177\250a\250u\260F\270#\270Q\330\020 \320 0\260\001\260\025\260f\270C\270q\330\020 \320 4\260A\260U\270&\300\001\320\004\035\320\035>\270a\360\032\000\t\021\220\004\220A\330\010\013\2106\220\023\220A\330\022'\240q\330\020\024\220E\230\021\330\020\021\330\020\021\360\016\000\t\023\220)\2301\230A\330\010\013\2106\220\023\220A\330\014\023""\2201\360\n\000\t$\320#7\260q\270\004\270A\330\010\t\330\014\017\210x\220x\320\037/\250t\2609\320<O\310q\330\020\024\320\024(\250\001\360\006\000\021\030\220}\240K\250q\260\004\260H\270A\270W\300A\360\006\000\021\030\220}\240K\250q\260\006\260a\340\010\017\210v\320\025/\250q\330\022\036\230a\230v\320%8\270\004\270L\320H[\320[a\320ab\330\014\r\330\010\020\220\006\320\026/\250v\3205S\320ST\330\022\036\230a\230v\320%:\270$\270l\320J]\320]c\320cd\330\014\r\330\010\017\210}\230A\330\022'\240q\250\004\250L\3208K\3106\320QR\330\014\r\320\004\036\230a\340\010\017\210r\220\026\220q\330\021&\240a\240t\320+;\2705\300\001\320\004\036\230a\360\n\000\t\020\210r\220\026\220q\330\021&\240a\240t\320+;\2705\300\001\320\004\036\230a\360\014\000\t\020\210r\220\026\220v\230\\\250\021\250$\320.>\270e\3001\320\004\036\230a\340\010\017\210t\2207\230\"\230A\320\004\036\230a\340\010\017\210t\320\023$\240A\240Q\320\004\026\220a\340\010\017\210u\220A\220V\2305\240\001\320\004\036\230g\320%6\260e\320;O\310q\360\036\000\t\014\2106\220\022\2201\330\014\023\2204\220~\240Q\240a\360\006\000\t\033\230$\230a\330\010\027\220t\2301\330\010#\320#7\260q\270\001\360\006\000\t\026\220^\2401\240E\250\031\260#\260Q\360\006\000\t\026\320\025(\250\001\250\025\250i\260s\270!\330\010\025\220X\230Q\230g\240W\250G\2603\260b\270\003\2701\340\010\013\2104\210r\220\021\330\014\031\320\031,\250A\250\\\3209J\310#\310Q\330\014\031\320\031/\250q\260\014\320<M\310Q\330\014\031\230\034\240Q\240l\260,\270a\270u\300J\310c\320QR\330\014\031\230\034\240Q\240g\250X\260S\270\001\340\r\021\220\023\220A\330\014\031\320\031,\250A\250\\\3209J\310#\310Q\340\r\021\220\022\2201\330\014\031\320\031,\250A\330\020\034\320\034-\250T\260\022\2603\260a\360\006\000\016\022\220\022\2201\330\014\031\320\031,\250A\250\\\3209J\310#\310Q\330\014\031\320\031/\250q\260\014\320<M\310Q\330\014\031\230\030\240\021\240'\250\025\250c\260\021\330\014\031\230\034\240Q\240g\250X\260S\270\001\360\006\000\r\032\320\031,\250A\250\\\3209J\310#\310Q\330\014\031""\320\031/\250q\260\014\320<M\310Q\330\014\031\230\034\240Q\240g\250X\260S\270\001\360\010\000\t\014\2108\2208\320\033+\2504\250y\3208K\3101\330\014\030\230\001\340\014\031\230\030\240\021\240,\250i\260s\270!\330\014\031\230\036\240q\250\014\3204E\300S\310\001\330\014\031\230\021\360\006\000\r\032\320\031*\250!\330\020\027\220~\320%6\260c\270\021\340\014\031\320\031.\250a\250q\330\010\023\220<\230q\240\007\240w\250c\260\021\360\006\000\t\020\210t\2205\230\001\230\023\230G\2401\240H\250C\250t\2605\270\005\270T\300\021\320\004\036\230g\320%6\260e\320;O\310q\360\034\000\t\020\210t\220;\230a\230s\240'\250\021\320\004\036\230g\320%6\260e\320;O\310q\360\034\000\t\020\210t\220;\230b\240\003\2407\250!\320\004\036\230h\240a\3600\000\t\014\2105\220\003\2201\330\022'\240q\330\020\024\220A\330\020\021\330\020\021\360\006\000\t'\240g\250Q\250a\330\010\013\2109\220C\220q\330\022'\240q\330\020\024\220A\330\020\021\330\020\021\360\n\000\t\037\230h\240a\240v\250Q\330\010\013\2104\210s\220$\220d\230)\2403\240b\250\004\250H\260A\260V\2703\270c\300\021\330\014\023\2201\360\006\000\t\033\230$\230a\360\006\000\t\030\220t\2301\330\010#\320#7\260q\270\001\340\010\t\340\r\026\220c\230\022\2304\230t\2404\240u\250E\260\025\260e\2705\300\001\340\014\020\220\t\230\023\230B\230d\240$\240d\250%\250u\260D\270\010\300\001\300\026\300s\310#\310Q\340\014\r\330\020\031\230\023\230A\330\020\024\220D\230\003\2301\330\020\024\220H\230A\230V\2403\240c\250\021\330\020\024\220H\230A\230V\2403\240c\250\021\360\006\000\r\034\320\033/\250q\260\001\330\014\017\210x\220s\230!\330\020\027\220q\330\014\036\230d\240!\330\014\027\320\027(\250\001\250\025\250f\260I\270S\300\001\330\014\027\320\027'\240q\250\005\250Y\260i\270w\300a\330\014\027\220x\230q\240\006\240c\250\021\330\014\023\2204\220u\230A\230U\240#\240T\250\025\250e\2604\260q\360\006\000\t\033\230$\230a\330\010\013\2104\210s\220$\220d\230)\2403\240a\330\014\031\320\031,\250A\250U\260)\2703\270a\330\014\031\320\031)\250\021\250,\3206G\300s\310!\330\014\031""\230\034\240Q\240g\250W\260C\260q\330\014\033\2301\360\006\000\016\022\220\023\220D\230\004\230I\240S\250\001\330\014\031\320\031,\250A\250U\260)\2703\270a\330\014\031\230\030\240\021\240'\250\023\250C\250q\330\014\033\2301\360\014\000\r\021\220\004\220C\220|\2401\240F\250&\260\010\270\004\270A\330\020\035\320\0350\260\001\260\025\260i\270s\300!\330\020\035\320\0350\260\001\330\024 \320 1\260\025\260a\340\020\037\230q\360\006\000\023\027\220c\230\036\240q\250\006\250f\260H\270D\300\001\330\020\035\320\0350\260\001\260\025\260i\270s\300!\330\020\035\320\035-\250Q\250l\320:K\3103\310a\330\020\035\230\\\250\021\250'\260\027\270\004\270B\270c\300\021\330\020\037\230q\360\010\000\027,\2501\330\024\030\230\001\330\024\025\330\024\025\33079\270\021\340\020\021\360\006\000\t\024\320\023#\2401\240G\2509\260I\270W\300A\330\010\023\2208\2301\230F\240#\240Q\330\010\017\210t\2205\230\001\230\025\230c\240\024\240U\250%\250t\2601\320\004\036\230h\240a\3602\000\t\016\210T\220\032\2301\230A\360\006\000\t\030\220r\230\021\330\010#\320#7\260q\270\001\330\010#\320#7\260q\270\004\270A\330\010\013\2108\2203\220a\330\014\027\220{\240!\2404\240y\260\002\260!\340\014\027\220{\240!\330\025%\240Q\240d\250)\2609\270I\300V\3101\330\020\022\220!\340\010\017\210r\220\026\220q\230\005\230U\240!\320\004\036\230i\320'C\3001\360\036\000\t\020\210t\320\023$\240A\240^\2601\260I\270V\3001\320\004\036\230i\320'C\3001\360\036\000\t\020\210t\220;\230a\230s\240!\320\004\036\230i\320'C\3001\360\036\000\t\020\210t\220;\230b\240\003\2401\320\004\036\230n\250A\360\026\000\t\032\230\034\240Q\240g\250V\2601\330\010\017\210r\220\026\220q\330\021\030\230\006\230n\250A\250T\3201A\300\025\300e\3101\320\004(\250\017\260q\360\020\000\t\014\2108\2202\220Q\330\014\023\2201\360\006\000\t\033\230$\230a\330\010\027\220t\2301\330\010#\320#7\260q\270\001\360\006\000\t\026\220^\2401\240E\250\031\260#\260Q\360\006\000\t\026\320\025(\250\001\250\025\250i\260s\270!\330\010\025\320\025%\240Q\240l\3202C\3003\300a\330\010\025\220""\\\240\021\240'\250\033\260I\270T\300\021\360\n\000\t\014\2108\2208\320\033+\2504\250y\3208K\3101\330\014\030\230\001\340\014\031\230\030\240\021\240,\250i\260s\270!\330\014\031\230\036\240q\250\014\3204E\300S\310\001\330\014\031\230\021\360\006\000\r\032\320\031*\250!\330\020\027\220~\320%6\260c\270\021\340\014\031\320\031.\250a\250q\330\010\023\220<\230q\240\007\240w\250c\260\021\360\006\000\t\020\210t\2205\230\001\230\023\230G\2401\240H\250C\250t\2605\270\005\270T\300\021\320\004\"\240.\260\001\360\026\000\t\032\230\036\240q\250\t\260\026\260q\330\010\017\210r\220\026\220q\330\021\030\230\006\320\036.\250a\250t\3203C\3001\330\014\021\220\021\320\004\037\230q\340\010\017\210r\220\026\220q\330\021'\240q\250\004\320,<\270E\300\021\320\004\037\230q\360\010\000\t\020\210r\220\026\220q\330\021'\240q\250\004\320,<\270E\300\021\320\004\027\220q\360\n\000\t\020\210t\2209\230A\230Q\320\004 \240\001\340\010\017\210r\220\026\220q\330\021(\250\001\250\024\320-=\270U\300!\320\004\"\240/\260\021\340\010\017\210r\220\026\220q\330\021\030\230\006\320\036.\250a\250t\3203C\3001\330\014\021\220\021\320\004!\240\021\340\010\017\210r\220\026\220q\330\021)\250\021\250$\320.>\270e\3001\320\004!\240\021\360\010\000\t\020\210r\220\026\220q\330\021)\250\021\250$\320.>\270e\3001\320\004\032\230/\250\021\340\010\017\210r\220\026\220q\330\021\030\230\006\230l\250!\2504\320/?\270v\300U\310!\320\004!\240\037\260\001\340\010\017\210r\220\026\220q\330\021'\240q\250\004\250O\2701\330\014\021\220\021\320\004\030\230\001\360\n\000\t\020\210t\2208\2308\2401\320\004\032\230!\360\n\000\t\020\210t\2208\2308\2409\250A\320\004\030\230\001\340\010\017\210u\220A\220V\2305\240\001\320\000\"\240!\360.\000\005\010\200v\210S\220\001\330\010\016\210j\230\001\230\021\330\004 \240\007\240q\250\001\330\004\007\200z\220\023\220A\330\010\017\210q\360\010\000\t%\240A\330\010$\240A\330\010\031\230\021\330\010\027\220q\330\010\031\230\021\330\010\027\220q\330\010\023\2201\360\n\000\005\t\210\005\210U\220!\2201\330\010""\r\210X\220Q\220g\230Q\330\010\013\210>\230\021\230!\330\014\017\210t\2201\330\020\031\230\027\240\002\240#\240S\250\003\2501\250D\260\002\260!\340\020\031\230\027\240\002\240#\240S\250\003\2501\250D\260\002\260!\330\020\033\2301\330\014\030\230\001\330\r\020\220\003\2201\330\014\017\210q\330\020\026\220j\240\001\330\024\025\330<>\270a\340\014\026\220a\330\r\020\220\003\2201\330\014\017\210q\330\020\026\220j\240\001\330\024\025\3308:\270!\340\014\017\210q\330\020\026\220j\240\001\330\024\025\330?A\300\021\340\014\017\210q\330\020\026\220j\240\001\330\024\025\330<>\270a\340\014\017\210q\330\020\026\220j\240\001\330\024\025\330AC\3001\340\014\022\220!\330\r\020\220\003\2201\330\014\017\210q\330\020\026\220j\240\001\330\024\025\3308:\270!\340\014\017\210q\330\020\026\220j\240\001\330\024\025\330?A\300\021\340\014\017\210q\330\020\026\220j\240\001\330\024\025\330<>\270a\340\014\017\210q\330\020\026\220j\240\001\330\024\025\330AC\3001\340\014\026\220a\330\r\021\220\021\330\014\r\340\014\022\220*\230A\330\020\021\330%,\250G\2601\260E\270\021\360\006\000\005\010\200t\2101\330\010\016\210j\230\001\330\014;\2702\270Q\340\t\r\210Q\330\010\017\210y\230\001\340\010\017\210y\230\010\240\003\2409\250H\260B\260a\330\004\013\2101\210G\2209\230A\320\004\037\230x\240q\360\022\000\t\n\330\014'\320';\2701\270A\330\010\017\210}\230A\330\014\022\220&\320\030-\250Q\330\020\021\340\023\027\220z\240\033\250A\330\023\024\330\010#\320#7\260q\270\004\270A\360\006\000\t\014\2108\2203\220a\330\014\023\2201\360\006\000\t\033\230$\230a\330\010\t\330\014#\320#3\2601\260E\270\031\300)\3106\320QR\330\010\017\210}\230A\330\022'\240q\250\004\250L\270\013\3006\310\021\330\014\r\330\010\013\2104\210s\220!\330\014\023\2201\360\006\000\t\020\210t\2205\230\001\230\025\230c\240\024\240Y\250e\2604\260q\320\004\037\230x\240q\360 \000\t\014\2105\220\003\2201\330\022'\240q\330\020\024\220A\330\020\021\330\020\021\340\010&\240g\250Q\250a\330\010\013\2109\220C\220q\330\022'\240q\330\020\024\220A\330\020\021\330""\020\021\360\010\000\t\033\230$\230a\330\010\027\220t\2301\330\010#\320#7\260q\270\001\360\006\000\t\026\220^\2401\240E\250\021\360\006\000\t\037\230h\240a\240v\250Q\330\010\013\2104\210s\220$\220d\230)\2403\240a\330\014\031\320\031,\250A\250U\260)\2703\270a\330\014\031\320\031)\250\021\250,\3206G\300s\310!\330\014\031\230\034\240Q\240g\250W\260C\260q\360\010\000\016\022\220\023\220D\230\004\230I\240S\250\001\330\014\031\320\031,\250A\250U\260)\2703\270a\330\014\031\320\031,\250A\250\\\3209K\3103\310a\360\006\000\016\022\220\023\220D\230\004\230I\240S\250\001\330\014\031\320\031,\250A\250U\260)\2703\270a\330\014\031\230\030\240\021\240'\250\023\250C\250q\330\014\031\320\031,\250A\250\\\3209K\3103\310a\360\006\000\016\022\220\023\220D\230\004\230I\240S\250\001\330\014\031\320\031,\250A\250U\260)\2703\270a\330\014\031\320\031,\250A\250\\\3209K\3103\310a\360\n\000\r\037\230l\250!\2506\260\026\260q\330\014\017\210t\2204\220q\330\020\035\320\0350\260\001\260\025\260i\270s\300!\330\020\035\230X\240Q\240g\250T\260\025\260a\330\020\035\320\0350\260\001\260\034\320=O\310s\320RS\360\010\000\027,\2501\330\024\030\230\001\330\024\025\330\024L\310B\310a\340\020\021\360\010\000\t\014\2108\2208\320\033+\2504\250y\3208K\3101\330\014\030\230\001\340\014\031\230\030\240\021\240,\250i\260s\270!\330\014\031\230\036\240q\250\014\3204E\300S\310\001\330\014\031\230\021\360\006\000\r\032\320\031*\250!\330\020\027\220~\320%6\260c\270\021\340\014\031\320\031.\250a\250q\330\010\023\220<\230q\240\007\240w\250c\260\021\360\006\000\t\020\210t\2205\230\001\230\023\230G\2401\240H\250C\250t\2605\270\005\270T\300\021\320\004\037\230x\240q\360\"\000\t\016\210T\220\033\230A\230Q\360\006\000\t\031\320\030+\2501\250B\250j\270\003\2701\330\010\030\320\030+\2501\250D\260\n\270#\270Q\330\010\017\210r\220\026\220v\230[\250\001\250\032\260;\270e\3001";
    PyObject *data = NULL;
    CYTHON_UNUSED_VAR(__Pyx_DecompressString);
    #endif
    PyObject **stringtab = __pyx_mstate->__pyx_string_tab;
    Py_ssize_t pos = 0;
    for (int i = 0; i < 879; i++) {
      Py_ssize_t bytes_length = index[i].length;
      PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL);
      if (likely(string) && i >= 382) PyUnicode_InternInPlace(&string);
      if (unlikely(!string)) {
        Py_XDECREF(data);
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
      stringtab[i] = string;
      pos += bytes_length;
    }
    for (int i = 879; i < 1002; i++) {
      Py_ssize_t bytes_length = index[i].length;
      PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length);
      stringtab[i] = string;
      pos += bytes_length;
      if (unlikely(!string)) {
        Py_XDECREF(data);
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
    }
    Py_XDECREF(data);
    for (Py_ssize_t i = 0; i < 1002; i++) {
      if (unlikely(PyObject_Hash(stringtab[i]) == -1)) {
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
    }
    #if CYTHON_IMMORTAL_CONSTANTS
    {
      PyObject **table = stringtab + 879;
      for (Py_ssize_t i=0; i<123; ++i) {
        #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
        #else
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
        #endif
      }
    }
    #endif
  }
  {
    PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 0;
    int8_t const cint_constants_1[] = {0,-1,1,2,3,4,5,6};
    for (int i = 0; i < 8; i++) {
      numbertab[i] = PyLong_FromLong(cint_constants_1[i - 0]);
      if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_number_tab;
    for (Py_ssize_t i=0; i<8; ++i) {
      #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
      #else
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
      #endif
    }
  }
  #endif
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: init_codeobjects ### */
typedef struct {
    unsigned int argcount : 4;
    unsigned int num_posonly_args : 1;
    unsigned int num_kwonly_args : 1;
    unsigned int nlocals : 5;
    unsigned int flags : 10;
    unsigned int first_line : 13;
} __Pyx_PyCode_New_function_description;
/* NewCodeObj.proto */
static PyObject* __Pyx_PyCode_New(
        const __Pyx_PyCode_New_function_description descr,
        PyObject * const *varnames,
        PyObject *filename,
        PyObject *funcname,
        PyObject *line_table,
        PyObject *tuple_dedup_map
);


static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
  PyObject* tuple_dedup_map = PyDict_New();
  if (unlikely(!tuple_dedup_map)) return -1;
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1438};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_token};
    __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_pxd, __pyx_mstate->__pyx_n_u_parse_to_int, __pyx_mstate->__pyx_kp_b_iso88591_1_vS_j_q_z_A_q_q_1_U_1_XQgQ_b_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1527};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_token};
    __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_pxd, __pyx_mstate->__pyx_n_u_parse_to_float, __pyx_mstate->__pyx_kp_b_iso88591_vS_j_q_z_A_q_A_A_q_q_1_U_1_XQgQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {11, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 243};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_freq, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_ambiguous, __pyx_mstate->__pyx_n_u_yearfirst, __pyx_mstate->__pyx_n_u_dayfirst, __pyx_mstate->__pyx_n_u_as_unit, __pyx_mstate->__pyx_n_u_copy, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_cfg};
    __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_new_2, __pyx_mstate->__pyx_kp_b_iso88591_A_a_A_1_1_a_a_Q_l_s_q_q_a_a_Q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {11, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 323};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_freq, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_ambiguous, __pyx_mstate->__pyx_n_u_yearfirst, __pyx_mstate->__pyx_n_u_dayfirst, __pyx_mstate->__pyx_n_u_as_unit, __pyx_mstate->__pyx_n_u_copy, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_cfg};
    __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_a_A_1_1_a_a_Q_1A_5_1_1_aq_3l_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {10, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 409};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_freq, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_ambiguous, __pyx_mstate->__pyx_n_u_yearfirst, __pyx_mstate->__pyx_n_u_dayfirst, __pyx_mstate->__pyx_n_u_as_unit, __pyx_mstate->__pyx_n_u_copy, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_pt, __pyx_mstate->__pyx_n_u_err, __pyx_mstate->__pyx_n_u_msg};
    __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_new_native, __pyx_mstate->__pyx_kp_b_iso88591_A_a_A_1_1_a_a_ha_Q_Q_S_a_Q_Q_v_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {11, 0, 0, 21, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 468};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_freq, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_ambiguous, __pyx_mstate->__pyx_n_u_yearfirst, __pyx_mstate->__pyx_n_u_dayfirst, __pyx_mstate->__pyx_n_u_as_unit, __pyx_mstate->__pyx_n_u_copy, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_cfg, __pyx_mstate->__pyx_n_u_arr_size, __pyx_mstate->__pyx_n_u_err, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_arr_p, __pyx_mstate->__pyx_n_u_has_tz, __pyx_mstate->__pyx_n_u_tmp_tz, __pyx_mstate->__pyx_n_u_infer, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_dt};
    __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_new_parser, __pyx_mstate->__pyx_kp_b_iso88591_A_a_A_1_1_a_a_Q_Qa_A_1_k_Qa_N_3a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {10, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 541};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_n_u_end, __pyx_mstate->__pyx_n_u_periods, __pyx_mstate->__pyx_n_u_freq, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_normalize, __pyx_mstate->__pyx_n_u_inclusive, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_dtarr, __pyx_mstate->__pyx_n_u_err};
    __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_date_range_2, __pyx_mstate->__pyx_kp_b_iso88591_A_q_Q_a_A_1_1_a_a_5_5_XS_S_c_c_S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {11, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 628};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_freq, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_ambiguous, __pyx_mstate->__pyx_n_u_yearfirst, __pyx_mstate->__pyx_n_u_dayfirst, __pyx_mstate->__pyx_n_u_as_unit, __pyx_mstate->__pyx_n_u_copy, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_cfg};
    __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_parse, __pyx_mstate->__pyx_kp_b_iso88591_A_a_A_1_1_a_a_Q_T_s_q_a_a_Q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 696};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_size_2, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_as_unit, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_size_i, __pyx_mstate->__pyx_n_u_dt, __pyx_mstate->__pyx_n_u_us, __pyx_mstate->__pyx_n_u_arr};
    __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_now, __pyx_mstate->__pyx_kp_b_iso88591_A_A_a_2_1A_Kq_Q_WAT_9AT_0_XQ_s_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 735};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_size_2, __pyx_mstate->__pyx_n_u_as_unit, __pyx_mstate->__pyx_n_u_name};
    __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_utcnow, __pyx_mstate->__pyx_kp_b_iso88591_A_a_s_avXV89E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 762};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_size_2, __pyx_mstate->__pyx_n_u_as_unit, __pyx_mstate->__pyx_n_u_name};
    __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_today, __pyx_mstate->__pyx_kp_b_iso88591_A_a_s_avS_hiuA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {7, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 792};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_size_2, __pyx_mstate->__pyx_n_u_date, __pyx_mstate->__pyx_n_u_time, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_as_unit, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_size_i, __pyx_mstate->__pyx_n_u_err, __pyx_mstate->__pyx_n_u_dt, __pyx_mstate->__pyx_n_u_us, __pyx_mstate->__pyx_n_u_arr};
    __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_combine, __pyx_mstate->__pyx_kp_b_iso88591_A_a_a_A_a_R_1A_Kq_Q_5_uD_z_fG6_v, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 869};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_ordinal, __pyx_mstate->__pyx_n_u_size_2, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_as_unit, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_size_i, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_arr_p, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_o, __pyx_mstate->__pyx_n_u_err};
    __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_fromordinal, __pyx_mstate->__pyx_kp_b_iso88591_A_a_A_a_B_Qiq_uCq_1_1E_S_V7_gQ_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 16, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 988};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_seconds, __pyx_mstate->__pyx_n_u_size_2, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_as_unit, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_size_i, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_us, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_arr_p, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_o, __pyx_mstate->__pyx_n_u_err, __pyx_mstate->__pyx_n_u_arrf, __pyx_mstate->__pyx_n_u_arrf_p};
    __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_fromseconds, __pyx_mstate->__pyx_kp_b_iso88591_A_a_A_a_H_Qj_Q_uCq_1_1E_5_z_4AT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1120};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_us, __pyx_mstate->__pyx_n_u_size_2, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_as_unit, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_size_i, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_arr_p, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_o, __pyx_mstate->__pyx_n_u_err};
    __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_frommicroseconds, __pyx_mstate->__pyx_kp_b_iso88591_A_a_A_a_H_Qd_uCq_1_1E_S_4AWHA_3e, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 17, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1240};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_ts, __pyx_mstate->__pyx_n_u_size_2, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_as_unit, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_size_i, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_dt, __pyx_mstate->__pyx_n_u_err, __pyx_mstate->__pyx_n_u_us, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_arr_p, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_o, __pyx_mstate->__pyx_n_u_arrf, __pyx_mstate->__pyx_n_u_arrf_p};
    __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_fromtimestamp, __pyx_mstate->__pyx_kp_b_iso88591_A_a_A_a_B_1A_Qe5_uCq_1_1E_5_Yawd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1406};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_ts, __pyx_mstate->__pyx_n_u_size_2, __pyx_mstate->__pyx_n_u_as_unit, __pyx_mstate->__pyx_n_u_name};
    __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_utcfromtimestamp, __pyx_mstate->__pyx_kp_b_iso88591_A_a_a_s_V86_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1446};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_dtstr, __pyx_mstate->__pyx_n_u_size_2, __pyx_mstate->__pyx_n_u_as_unit, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_size_i, __pyx_mstate->__pyx_n_u_err, __pyx_mstate->__pyx_n_u__16};
    __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_fromisoformat_2, __pyx_mstate->__pyx_kp_b_iso88591_A_a_a_QgQ_uCq_1_1E_AV4uE_3e1G89E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1492};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_iso, __pyx_mstate->__pyx_n_u_size_2, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_as_unit, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_size_i, __pyx_mstate->__pyx_n_u_us, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_arr_p, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_o, __pyx_mstate->__pyx_n_u_row};
    __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_fromisocalendar, __pyx_mstate->__pyx_kp_b_iso88591_A_a_A_a_F_Qe1_uCq_1_1E_9_q_4AT_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1590};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_doy, __pyx_mstate->__pyx_n_u_size_2, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_as_unit, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_size_i, __pyx_mstate->__pyx_n_u_us, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_arr_p, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_o, __pyx_mstate->__pyx_n_u_row};
    __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_fromdayofyear, __pyx_mstate->__pyx_kp_b_iso88591_A_a_A_a_F_Qe1_uCq_1_1E_9_q_4AT_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1688};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_date, __pyx_mstate->__pyx_n_u_size_2, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_as_unit, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_size_i, __pyx_mstate->__pyx_n_u_err, __pyx_mstate->__pyx_n_u__16};
    __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_fromdate_2, __pyx_mstate->__pyx_kp_b_iso88591_A_a_A_a_uCq_1_a_1E_U_q_3e1F_T_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1741};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_dt, __pyx_mstate->__pyx_n_u_size_2, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_as_unit, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_size_i, __pyx_mstate->__pyx_n_u_err, __pyx_mstate->__pyx_n_u__16};
    __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_fromdatetime_2, __pyx_mstate->__pyx_kp_b_iso88591_A_a_A_a_Qe8_b_Q_uCq_1_a_T_e1A_3e, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1795};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_dt64, __pyx_mstate->__pyx_n_u_size_2, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_as_unit, __pyx_mstate->__pyx_n_u_name};
    __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_fromdatetime64, __pyx_mstate->__pyx_kp_b_iso88591_A_a_A_a_s_q_e6_D_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1810};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_dtstr, __pyx_mstate->__pyx_n_u_fmt, __pyx_mstate->__pyx_n_u_size_2, __pyx_mstate->__pyx_n_u_as_unit, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_size_i, __pyx_mstate->__pyx_n_u_dt, __pyx_mstate->__pyx_n_u_err, __pyx_mstate->__pyx_n_u_dts, __pyx_mstate->__pyx_n_u_o, __pyx_mstate->__pyx_n_u__16};
    __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_strptime, __pyx_mstate->__pyx_kp_b_iso88591_A_a_a_QgQ_uCq_1_1E_Yiq_q_1E1I_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1888};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_ctime, __pyx_mstate->__pyx_kp_b_iso88591_q_t9AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1895};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fmt, __pyx_mstate->__pyx_n_u_err};
    __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_strftime, __pyx_mstate->__pyx_kp_b_iso88591_HA_A_q_L8I_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1906};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sep};
    __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_isoformat, __pyx_mstate->__pyx_kp_b_iso88591_1_t9A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1914};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_unit};
    __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_timedf, __pyx_mstate->__pyx_kp_b_iso88591_a_4AQ_r_1_Qe6_A_Qe6_A_AU_1_Qe6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1940};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_tz};
    __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_utctimedf, __pyx_mstate->__pyx_kp_b_iso88591_1_T_3c_c_HA_4wa_4_WA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1957};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_arr};
    __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_toordinal, __pyx_mstate->__pyx_kp_b_iso88591_1_4_7s_Q_r_q_U, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1966};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_utc, __pyx_mstate->__pyx_n_u_arr};
    __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_toseconds, __pyx_mstate->__pyx_kp_b_iso88591_5Q_4xs_a_a_k_uA_r_v_1F_WE, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1993};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_utc, __pyx_mstate->__pyx_n_u_arr};
    __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_tomicroseconds, __pyx_mstate->__pyx_kp_b_iso88591_U_4xs_a_a_k_uA_r_q_QfCs_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2022};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_arr};
    __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_timestamp, __pyx_mstate->__pyx_kp_b_iso88591_1_4xs_l_Y_Na_a_r_v_1F_WE, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2032};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_arr_p, __pyx_mstate->__pyx_n_u_size_i, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_v};
    __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_datetime, __pyx_mstate->__pyx_kp_b_iso88591_31D8H_3a_e_M_CvQa_T_N_3a_DMQR_E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2058};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_date, __pyx_mstate->__pyx_kp_b_iso88591_a_uAV5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2062};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_time, __pyx_mstate->__pyx_kp_b_iso88591_a_uAV5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2066};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_timetz, __pyx_mstate->__pyx_kp_b_iso88591_uAV5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {10, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2071};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_year, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day, __pyx_mstate->__pyx_n_u_hour, __pyx_mstate->__pyx_n_u_minute, __pyx_mstate->__pyx_n_u_second, __pyx_mstate->__pyx_n_u_microsecond, __pyx_mstate->__pyx_n_u_nanosecond, __pyx_mstate->__pyx_n_u_tzinfo, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_pt};
    __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_replace, __pyx_mstate->__pyx_kp_b_iso88591_A_a_q_Q_a_Q_A_Qha_4_1_gU_Q_iq_T, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 14, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2156};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day, __pyx_mstate->__pyx_n_u_mm, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_my_unit, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_times, __pyx_mstate->__pyx_n_u_dateY, __pyx_mstate->__pyx_n_u_dateM, __pyx_mstate->__pyx_n_u_dateD, __pyx_mstate->__pyx_n_u_delta, __pyx_mstate->__pyx_n_u_dates, __pyx_mstate->__pyx_n_u_dtype};
    __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_curr_year, __pyx_mstate->__pyx_kp_b_iso88591_A_q_Q_QgV1_3d_4_Qa_a_t1_7q_1E_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2240};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day};
    __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_prev_year, __pyx_mstate->__pyx_kp_b_iso88591_A_q_Q_t82S_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2265};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day};
    __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_next_year, __pyx_mstate->__pyx_kp_b_iso88591_A_q_Q_t81Cwa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2290};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_offset, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day, __pyx_mstate->__pyx_n_u_mm, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_my_unit, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_times, __pyx_mstate->__pyx_n_u_dateY, __pyx_mstate->__pyx_n_u_dateM, __pyx_mstate->__pyx_n_u_delta, __pyx_mstate->__pyx_n_u_dateD, __pyx_mstate->__pyx_n_u_dates, __pyx_mstate->__pyx_n_u_dtype};
    __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_year, __pyx_mstate->__pyx_kp_b_iso88591_A_q_Q_7_Q_4_AWA_QgV1_a_t1_7q_1E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2385};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_my_unit, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_times, __pyx_mstate->__pyx_n_u_dateQ, __pyx_mstate->__pyx_n_u_dateM, __pyx_mstate->__pyx_n_u_dateD, __pyx_mstate->__pyx_n_u_delta, __pyx_mstate->__pyx_n_u_dates, __pyx_mstate->__pyx_n_u_dtype};
    __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_curr_quarter, __pyx_mstate->__pyx_kp_b_iso88591_g_6e_Oq_6_1_4_Qa_a_t1_7q_1E_Q_i, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2459};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day};
    __pyx_mstate_global->__pyx_codeobj_tab[43] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_prev_quarter, __pyx_mstate->__pyx_kp_b_iso88591_g_6e_Oq_t_b_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2475};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day};
    __pyx_mstate_global->__pyx_codeobj_tab[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_next_quarter, __pyx_mstate->__pyx_kp_b_iso88591_g_6e_Oq_t_as, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 14, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2491};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_offset, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_my_unit, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_times, __pyx_mstate->__pyx_n_u_dateM, __pyx_mstate->__pyx_n_u_dateQ, __pyx_mstate->__pyx_n_u_dateD, __pyx_mstate->__pyx_n_u_delta, __pyx_mstate->__pyx_n_u_dates, __pyx_mstate->__pyx_n_u_dtype};
    __pyx_mstate_global->__pyx_codeobj_tab[45] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_quarter, __pyx_mstate->__pyx_kp_b_iso88591_A_q_Q_7_Q_4_q_q_a_t1_7q_1E_Q_6_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2577};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_day, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_my_unit, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_times, __pyx_mstate->__pyx_n_u_dateM, __pyx_mstate->__pyx_n_u_dateD, __pyx_mstate->__pyx_n_u_delta, __pyx_mstate->__pyx_n_u_dates, __pyx_mstate->__pyx_n_u_dtype};
    __pyx_mstate_global->__pyx_codeobj_tab[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_curr_month, __pyx_mstate->__pyx_kp_b_iso88591_E_5Q_4r_1_a_t1_7q_1E_Q_is_4s_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[46])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2642};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_day};
    __pyx_mstate_global->__pyx_codeobj_tab[47] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_prev_month, __pyx_mstate->__pyx_kp_b_iso88591_E_5Q_t9Bc, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[47])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2656};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_day};
    __pyx_mstate_global->__pyx_codeobj_tab[48] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_next_month, __pyx_mstate->__pyx_kp_b_iso88591_E_5Q_t9AS, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[48])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2670};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_offset, __pyx_mstate->__pyx_n_u_day, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_my_unit, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_times, __pyx_mstate->__pyx_n_u_dateM, __pyx_mstate->__pyx_n_u_dateD, __pyx_mstate->__pyx_n_u_delta, __pyx_mstate->__pyx_n_u_dates, __pyx_mstate->__pyx_n_u_dtype};
    __pyx_mstate_global->__pyx_codeobj_tab[49] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_month, __pyx_mstate->__pyx_kp_b_iso88591_50DA_7_Q_4_Qa_a_t1_7q_1E_Q_ixq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[49])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2742};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[50] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_monday, __pyx_mstate->__pyx_kp_b_iso88591_1_t_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[50])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2746};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[51] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_tuesday, __pyx_mstate->__pyx_kp_b_iso88591_A_t_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[51])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2750};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[52] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_wednesday, __pyx_mstate->__pyx_kp_b_iso88591_a_t_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[52])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2754};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[53] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_thursday, __pyx_mstate->__pyx_kp_b_iso88591_Q_t_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[53])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2758};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[54] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_friday, __pyx_mstate->__pyx_kp_b_iso88591_1_t_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[54])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2762};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[55] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_saturday, __pyx_mstate->__pyx_kp_b_iso88591_Q_t_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[55])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2766};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[56] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_sunday, __pyx_mstate->__pyx_kp_b_iso88591_1_t_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[56])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2770};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_weekday};
    __pyx_mstate_global->__pyx_codeobj_tab[57] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_curr_weekday_2, __pyx_mstate->__pyx_kp_b_iso88591_i_C1_t_A_1IV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[57])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2787};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_weekday};
    __pyx_mstate_global->__pyx_codeobj_tab[58] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_prev_weekday, __pyx_mstate->__pyx_kp_b_iso88591_i_C1_t_b_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[58])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2804};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_weekday};
    __pyx_mstate_global->__pyx_codeobj_tab[59] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_next_weekday, __pyx_mstate->__pyx_kp_b_iso88591_i_C1_t_as, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[59])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2821};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_offset, __pyx_mstate->__pyx_n_u_weekday, __pyx_mstate->__pyx_n_u_wkd, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_my_unit, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_times, __pyx_mstate->__pyx_n_u_dateD, __pyx_mstate->__pyx_n_u_delta, __pyx_mstate->__pyx_n_u_dates, __pyx_mstate->__pyx_n_u_dtype};
    __pyx_mstate_global->__pyx_codeobj_tab[60] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_weekday, __pyx_mstate->__pyx_kp_b_iso88591_Y6RRS_7_Q_4_a_t1_7q_1E_Q_is_4t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[60])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2882};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_weekday, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_my_unit, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_times, __pyx_mstate->__pyx_n_u_dateD, __pyx_mstate->__pyx_n_u_delta, __pyx_mstate->__pyx_n_u_dates, __pyx_mstate->__pyx_n_u_dtype};
    __pyx_mstate_global->__pyx_codeobj_tab[61] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_curr_weekday, __pyx_mstate->__pyx_kp_b_iso88591_q_82Q_1_a_t1_7q_1E_Q_is_Ql2C3a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[61])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2927};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[62] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_yesterday, __pyx_mstate->__pyx_kp_b_iso88591_a_t7_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[62])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2931};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[63] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_tomorrow, __pyx_mstate->__pyx_kp_b_iso88591_Q_t7_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[63])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2935};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_offset, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_my_unit, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_times, __pyx_mstate->__pyx_n_u_dateD, __pyx_mstate->__pyx_n_u_dates, __pyx_mstate->__pyx_n_u_dtype};
    __pyx_mstate_global->__pyx_codeobj_tab[64] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_day, __pyx_mstate->__pyx_kp_b_iso88591_A_7_Q_1_a_t1_7q_1E_Q_ixq_88_4y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[64])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2980};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[65] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_normalize, __pyx_mstate->__pyx_kp_b_iso88591_A_t81Cs_S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[65])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2988};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_freq, __pyx_mstate->__pyx_n_u_err};
    __pyx_mstate_global->__pyx_codeobj_tab[66] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_snap, __pyx_mstate->__pyx_kp_b_iso88591_A_4uA_q_a_A_q_L_fA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[66])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {9, 0, 0, 16, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3006};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_year, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day, __pyx_mstate->__pyx_n_u_hour, __pyx_mstate->__pyx_n_u_minute, __pyx_mstate->__pyx_n_u_second, __pyx_mstate->__pyx_n_u_microsecond, __pyx_mstate->__pyx_n_u_nanosecond, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_my_unit, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_dateD, __pyx_mstate->__pyx_n_u_dtype, __pyx_mstate->__pyx_n_u_times, __pyx_mstate->__pyx_n_u_dates};
    __pyx_mstate_global->__pyx_codeobj_tab[67] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_datetime_2, __pyx_mstate->__pyx_kp_b_iso88591_A_a_q_Q_a_Q_A_V_5_2T_s_D_Cq_4xq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[67])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3120};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_year, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_my_unit, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_times, __pyx_mstate->__pyx_n_u_dateD, __pyx_mstate->__pyx_n_u_dates, __pyx_mstate->__pyx_n_u_dtype};
    __pyx_mstate_global->__pyx_codeobj_tab[68] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_date, __pyx_mstate->__pyx_kp_b_iso88591_A_a_q_Q_5_1_vS_t_4_AWA_a_t1_7q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[68])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3181};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_hour, __pyx_mstate->__pyx_n_u_minute, __pyx_mstate->__pyx_n_u_second, __pyx_mstate->__pyx_n_u_microsecond, __pyx_mstate->__pyx_n_u_nanosecond, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_my_unit, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_dateD, __pyx_mstate->__pyx_n_u_dtype, __pyx_mstate->__pyx_n_u_times, __pyx_mstate->__pyx_n_u_dates};
    __pyx_mstate_global->__pyx_codeobj_tab[69] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_time, __pyx_mstate->__pyx_kp_b_iso88591_A_a_Q_A_1_r_r_Ba_2Q_1_a_t1_7q_is, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[69])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 16, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3284};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_unit_len, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_my_unit, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_times, __pyx_mstate->__pyx_n_u_ch0, __pyx_mstate->__pyx_n_u_dateD, __pyx_mstate->__pyx_n_u_delta, __pyx_mstate->__pyx_n_u_dateM, __pyx_mstate->__pyx_n_u_dateQ, __pyx_mstate->__pyx_n_u_dateY, __pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_dates, __pyx_mstate->__pyx_n_u_dtype};
    __pyx_mstate_global->__pyx_codeobj_tab[70] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_first_of, __pyx_mstate->__pyx_kp_b_iso88591_5_1_q_A_gQa_9Cq_q_A_a_t1_7q_1E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[70])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 16, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3382};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_unit_len, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_my_unit, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_times, __pyx_mstate->__pyx_n_u_ch0, __pyx_mstate->__pyx_n_u_dateD, __pyx_mstate->__pyx_n_u_delta, __pyx_mstate->__pyx_n_u_dateM, __pyx_mstate->__pyx_n_u_dateQ, __pyx_mstate->__pyx_n_u_dateY, __pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_dates, __pyx_mstate->__pyx_n_u_dtype};
    __pyx_mstate_global->__pyx_codeobj_tab[71] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_last_of, __pyx_mstate->__pyx_kp_b_iso88591_xq_5_1_q_A_gQa_9Cq_q_A_a_t1_7q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[71])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 14, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3481};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_unit_len, __pyx_mstate->__pyx_n_u_ch0, __pyx_mstate->__pyx_n_u_my_unit, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_to_reso, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_dateD, __pyx_mstate->__pyx_n_u_delta, __pyx_mstate->__pyx_n_u_dates, __pyx_mstate->__pyx_n_u_dateQ, __pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_dateY};
    __pyx_mstate_global->__pyx_codeobj_tab[72] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_start_of, __pyx_mstate->__pyx_kp_b_iso88591_0_5_1_q_A_gQa_9Cq_q_A_havQ_4s_d, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[72])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 14, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3598};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_unit_len, __pyx_mstate->__pyx_n_u_ch0, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_my_unit, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_to_reso, __pyx_mstate->__pyx_n_u_dateD, __pyx_mstate->__pyx_n_u_delta, __pyx_mstate->__pyx_n_u_dates, __pyx_mstate->__pyx_n_u_dateQ, __pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_dateY};
    __pyx_mstate_global->__pyx_codeobj_tab[73] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_to_end_of, __pyx_mstate->__pyx_kp_b_iso88591_ha0_5_1_q_A_gQa_9Cq_q_A_havQ_4s, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[73])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3719};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_pt, __pyx_mstate->__pyx_n_u_pt_dateD, __pyx_mstate->__pyx_n_u_my_dateD};
    __pyx_mstate_global->__pyx_codeobj_tab[74] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_is_first_of, __pyx_mstate->__pyx_kp_b_iso88591_T_Qa_1Bj_1_1D_Q_r_v_e1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[74])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3743};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_pt, __pyx_mstate->__pyx_n_u_pt_dateD, __pyx_mstate->__pyx_n_u_my_dateD};
    __pyx_mstate_global->__pyx_codeobj_tab[75] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_is_last_of, __pyx_mstate->__pyx_kp_b_iso88591_xq_T_AQ_1Bj_1_1D_Q_r_v_e1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[75])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3767};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_pt, __pyx_mstate->__pyx_n_u_pt_unit, __pyx_mstate->__pyx_n_u_pt_reso, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_arr};
    __pyx_mstate_global->__pyx_codeobj_tab[76] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_is_start_of, __pyx_mstate->__pyx_kp_b_iso88591_2_T_Qa_r_7q_7q_A_83a_4y_Qd_9IV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[76])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3807};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_pt, __pyx_mstate->__pyx_n_u_pt_unit, __pyx_mstate->__pyx_n_u_pt_reso, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_arr};
    __pyx_mstate_global->__pyx_codeobj_tab[77] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_is_end_of, __pyx_mstate->__pyx_kp_b_iso88591_ha2_T_1A_r_7q_7q_A_83a_4y_Qd_9I, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[77])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3848};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_to_reso, __pyx_mstate->__pyx_n_u_err, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_out};
    __pyx_mstate_global->__pyx_codeobj_tab[78] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_round, __pyx_mstate->__pyx_kp_b_iso88591_1A_A_Q_z_A_7q_A_83a_1_a_vYa_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[78])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3883};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_to_reso, __pyx_mstate->__pyx_n_u_err, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_out};
    __pyx_mstate_global->__pyx_codeobj_tab[79] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_ceil, __pyx_mstate->__pyx_kp_b_iso88591_1A_A_Q_z_A_7q_A_83a_1_a_fIQ_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[79])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3918};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_to_reso, __pyx_mstate->__pyx_n_u_err, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_out};
    __pyx_mstate_global->__pyx_codeobj_tab[80] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_floor, __pyx_mstate->__pyx_kp_b_iso88591_1A_A_Q_z_A_7q_A_83a_1_a_vYa_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[80])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3954};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_precision, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_f, __pyx_mstate->__pyx_n_u_arr};
    __pyx_mstate_global->__pyx_codeobj_tab[81] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_fsp, __pyx_mstate->__pyx_kp_b_iso88591_A_Rq_q_A_131_S_1_7q_A_881_1Ct2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[81])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4013};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_arr};
    __pyx_mstate_global->__pyx_codeobj_tab[82] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_isocalendar, __pyx_mstate->__pyx_kp_b_iso88591_Q_q_A_r_1E_fA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[82])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4027};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_arr};
    __pyx_mstate_global->__pyx_codeobj_tab[83] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_isoyear, __pyx_mstate->__pyx_kp_b_iso88591_1D_r_q_U, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[83])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4032};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_arr};
    __pyx_mstate_global->__pyx_codeobj_tab[84] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_isoweek, __pyx_mstate->__pyx_kp_b_iso88591_1D_r_q_U, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[84])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4037};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_arr};
    __pyx_mstate_global->__pyx_codeobj_tab[85] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_isoweekday, __pyx_mstate->__pyx_kp_b_iso88591_A_at1_r_q_U, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[85])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4043};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[86] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_year, __pyx_mstate->__pyx_kp_b_iso88591_A_r_v_4_uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[86])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4048};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_year};
    __pyx_mstate_global->__pyx_codeobj_tab[87] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_is_year, __pyx_mstate->__pyx_kp_b_iso88591_O1_r_q_m1D0_uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[87])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4054};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[88] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_is_leap_year, __pyx_mstate->__pyx_kp_b_iso88591_a_r_q_at_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[88])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4060};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[89] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_is_long_year, __pyx_mstate->__pyx_kp_b_iso88591_a_r_q_at_5_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[89])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4069};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_year};
    __pyx_mstate_global->__pyx_codeobj_tab[90] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_leap_bt_year, __pyx_mstate->__pyx_kp_b_iso88591_r_q_q_O1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[90])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4076};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[91] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_days_in_year, __pyx_mstate->__pyx_kp_b_iso88591_a_r_q_at_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[91])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4082};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[92] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_days_bf_year, __pyx_mstate->__pyx_kp_b_iso88591_a_r_q_at_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[92])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4088};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[93] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_day_of_year, __pyx_mstate->__pyx_kp_b_iso88591_Q_r_q_Qd_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[93])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4095};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[94] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_quarter, __pyx_mstate->__pyx_kp_b_iso88591_A_r_v_Qd2B_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[94])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4100};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_quarter};
    __pyx_mstate_global->__pyx_codeobj_tab[95] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_is_quarter, __pyx_mstate->__pyx_kp_b_iso88591_r_q_at3C1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[95])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4107};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[96] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_days_in_quarter, __pyx_mstate->__pyx_kp_b_iso88591_r_q_e1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[96])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4113};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[97] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_days_bf_quarter, __pyx_mstate->__pyx_kp_b_iso88591_r_q_e1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[97])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4121};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[98] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_day_of_quarter, __pyx_mstate->__pyx_kp_b_iso88591_r_q_U, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[98])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4128};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[99] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_kp_b_iso88591_A_r_v_1D0_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[99])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4133};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_mm};
    __pyx_mstate_global->__pyx_codeobj_tab[100] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_is_month, __pyx_mstate->__pyx_kp_b_iso88591_nA_QgV1_r_q_nAT1A_e1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[100])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4149};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[101] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_days_in_month, __pyx_mstate->__pyx_kp_b_iso88591_q_r_q_q_E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[101])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4155};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[102] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_days_bf_month, __pyx_mstate->__pyx_kp_b_iso88591_q_r_q_q_E_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[102])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4163};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[103] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_day_of_month, __pyx_mstate->__pyx_kp_b_iso88591_a_r_v_e1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[103])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4171};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_locale, __pyx_mstate->__pyx_n_u_err};
    __pyx_mstate_global->__pyx_codeobj_tab[104] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_month_name, __pyx_mstate->__pyx_kp_b_iso88591_7q_1F_A_q_L8NfTU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[104])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4189};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[105] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_weekday, __pyx_mstate->__pyx_kp_b_iso88591_A_r_v_Qd2B_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[105])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4194};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_weekday, __pyx_mstate->__pyx_n_u_wd};
    __pyx_mstate_global->__pyx_codeobj_tab[106] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_is_weekday, __pyx_mstate->__pyx_kp_b_iso88591_q_q_r_q_at3C1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[106])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4211};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_locale, __pyx_mstate->__pyx_n_u_err};
    __pyx_mstate_global->__pyx_codeobj_tab[107] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_weekday_name, __pyx_mstate->__pyx_kp_b_iso88591_8_9_q_A_q_L_8_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[107])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4234};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[108] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_day, __pyx_mstate->__pyx_kp_b_iso88591_A_r_v_e1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[108])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4239};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_day};
    __pyx_mstate_global->__pyx_codeobj_tab[109] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_is_day, __pyx_mstate->__pyx_kp_b_iso88591_r_q_l_4_vU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[109])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4246};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[110] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_hour, __pyx_mstate->__pyx_kp_b_iso88591_A_r_v_4_uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[110])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4251};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[111] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_minute, __pyx_mstate->__pyx_kp_b_iso88591_A_r_v_AT1A_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[111])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4256};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[112] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_second, __pyx_mstate->__pyx_kp_b_iso88591_A_r_v_AT1A_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[112])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4261};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[113] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_millisecond, __pyx_mstate->__pyx_kp_b_iso88591_A_r_q_Qd_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[113])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4268};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[114] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_microsecond, __pyx_mstate->__pyx_kp_b_iso88591_A_r_q_Qd_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[114])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4275};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[115] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_nanosecond, __pyx_mstate->__pyx_kp_b_iso88591_A_r_v_0_5EU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[115])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4281};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[116] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_tz_available, __pyx_mstate->__pyx_kp_b_iso88591_A_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[116])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4290};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[117] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_is_local, __pyx_mstate->__pyx_kp_b_iso88591_t889A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[117])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4297};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[118] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_is_utc, __pyx_mstate->__pyx_kp_b_iso88591_t881, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[118])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4304};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_my_tz};
    __pyx_mstate_global->__pyx_codeobj_tab[119] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_tzname, __pyx_mstate->__pyx_kp_b_iso88591_A_xvS_wfG1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[119])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4312};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_ambiguous, __pyx_mstate->__pyx_n_u_nonexistent, __pyx_mstate->__pyx_n_u_to_tz, __pyx_mstate->__pyx_n_u_my_tz, __pyx_mstate->__pyx_n_u_pt};
    __pyx_mstate_global->__pyx_codeobj_tab[120] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_astimezone, __pyx_mstate->__pyx_kp_b_iso88591_A_A_1_Q_2_Yaq_A_6_A_vS_t_q_6_A_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[120])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4364};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_ambiguous, __pyx_mstate->__pyx_n_u_nonexistent, __pyx_mstate->__pyx_n_u_my_tz, __pyx_mstate->__pyx_n_u_err, __pyx_mstate->__pyx_n_u_my_reso};
    __pyx_mstate_global->__pyx_codeobj_tab[121] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_tz_localize, __pyx_mstate->__pyx_kp_b_iso88591_A_1_Q_2_1A_A_6_s_1_L_q_6_31_6_D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[121])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4451};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_my_tz, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_err};
    __pyx_mstate_global->__pyx_codeobj_tab[122] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_tz_convert, __pyx_mstate->__pyx_kp_b_iso88591_a_A_6_A_q_E_1A_6_A_1_7q_A_xx_t9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[122])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4505};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_targ_tz, __pyx_mstate->__pyx_n_u_base_tz, __pyx_mstate->__pyx_n_u_naive, __pyx_mstate->__pyx_n_u_ambiguous, __pyx_mstate->__pyx_n_u_nonexistent, __pyx_mstate->__pyx_n_u_to_tz, __pyx_mstate->__pyx_n_u_my_tz, __pyx_mstate->__pyx_n_u_pt};
    __pyx_mstate_global->__pyx_codeobj_tab[123] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_tz_switch_2, __pyx_mstate->__pyx_kp_b_iso88591_A_q_1_Q_D_Yaq_A_6_vS_t_q_xy_t_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[123])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4583};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_tz};
    __pyx_mstate_global->__pyx_codeobj_tab[124] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_values_naive, __pyx_mstate->__pyx_kp_b_iso88591_A_T_3c_c_HA_4q_AV5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[124])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4598};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_as_unit, __pyx_mstate->__pyx_n_u_as_reso, __pyx_mstate->__pyx_n_u_err, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_out};
    __pyx_mstate_global->__pyx_codeobj_tab[125] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_as_unit, __pyx_mstate->__pyx_kp_b_iso88591_xq_1A_A_Q_z_A_7q_A_83a_1_a_31E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[125])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {12, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4635};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_years, __pyx_mstate->__pyx_n_u_quarters, __pyx_mstate->__pyx_n_u_months, __pyx_mstate->__pyx_n_u_weeks, __pyx_mstate->__pyx_n_u_days, __pyx_mstate->__pyx_n_u_hours, __pyx_mstate->__pyx_n_u_minutes_2, __pyx_mstate->__pyx_n_u_seconds, __pyx_mstate->__pyx_n_u_milliseconds, __pyx_mstate->__pyx_n_u_microseconds, __pyx_mstate->__pyx_n_u_nanoseconds, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_out};
    __pyx_mstate_global->__pyx_codeobj_tab[126] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_add, __pyx_mstate->__pyx_kp_b_iso88591_A_q_q_a_q_a_a_Q_Q_A_s_c_S_c_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[126])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {12, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4696};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_years, __pyx_mstate->__pyx_n_u_quarters, __pyx_mstate->__pyx_n_u_months, __pyx_mstate->__pyx_n_u_weeks, __pyx_mstate->__pyx_n_u_days, __pyx_mstate->__pyx_n_u_hours, __pyx_mstate->__pyx_n_u_minutes_2, __pyx_mstate->__pyx_n_u_seconds, __pyx_mstate->__pyx_n_u_milliseconds, __pyx_mstate->__pyx_n_u_microseconds, __pyx_mstate->__pyx_n_u_nanoseconds, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_out};
    __pyx_mstate_global->__pyx_codeobj_tab[127] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_sub, __pyx_mstate->__pyx_kp_b_iso88591_A_q_q_a_q_a_a_Q_Q_A_s_c_S_c_1_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[127])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 18, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4757};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_absolute, __pyx_mstate->__pyx_n_u_inclusive, __pyx_mstate->__pyx_n_u_my_arr, __pyx_mstate->__pyx_n_u_my_size, __pyx_mstate->__pyx_n_u_pt, __pyx_mstate->__pyx_n_u_err, __pyx_mstate->__pyx_n_u_pt_arr, __pyx_mstate->__pyx_n_u_my_tz, __pyx_mstate->__pyx_n_u_pt_tz, __pyx_mstate->__pyx_n_u_incl_off, __pyx_mstate->__pyx_n_u_unit_len, __pyx_mstate->__pyx_n_u_delta, __pyx_mstate->__pyx_n_u_delta_p, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_v};
    __pyx_mstate_global->__pyx_codeobj_tab[128] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_diff, __pyx_mstate->__pyx_kp_b_iso88591_A_1_T_V6_QfA_q_G2Q_6_a_q_uA_Q_T, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[128])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4902};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_dt, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_tic};
    __pyx_mstate_global->__pyx_codeobj_tab[129] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_is_past, __pyx_mstate->__pyx_kp_b_iso88591_WAT_7q_A_IQd_881_XQ_Qj_XQ_Qj_r, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[129])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4925};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_dt, __pyx_mstate->__pyx_n_u_my_reso, __pyx_mstate->__pyx_n_u_tic};
    __pyx_mstate_global->__pyx_codeobj_tab[130] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pddt_py, __pyx_mstate->__pyx_n_u_is_future, __pyx_mstate->__pyx_kp_b_iso88591_1_WAT_7q_A_IQd_881_XQ_Qj_XQ_Qj, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[130])) goto bad;
  }
  Py_DECREF(tuple_dedup_map);
  return 0;
  bad:
  Py_DECREF(tuple_dedup_map);
  return -1;
}
/* #### Code section: init_globals ### */

static int __Pyx_InitGlobals(void) {
  /* PythonCompatibility.init */
  if (likely(__Pyx_init_co_variables() == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CommonTypesMetaclass.init */
  if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CachedMethodType.init */
  #if CYTHON_COMPILING_IN_LIMITED_API
  {
      PyObject *typesModule=NULL;
      typesModule = PyImport_ImportModule("types");
      if (typesModule) {
          __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType");
          Py_DECREF(typesModule);
      }
  } // error handling follows
  #endif
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CythonFunctionShared.init */
  if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cleanup_globals ### */
/* #### Code section: cleanup_module ### */
/* #### Code section: main_method ### */
/* #### Code section: utility_code_pragmas ### */
#ifdef _MSC_VER
#pragma warning( push )
/* Warning 4127: conditional expression is constant
 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
 * compile-time, so this warning is not useful
 */
#pragma warning( disable : 4127 )
#endif



/* #### Code section: utility_code_def ### */

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    int result;
    PyObject *exc_type;
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *current_exception = tstate->current_exception;
    if (unlikely(!current_exception)) return 0;
    exc_type = (PyObject*) Py_TYPE(current_exception);
    if (exc_type == err) return 1;
#else
    exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
#endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(exc_type);
    #endif
    if (unlikely(PyTuple_Check(err))) {
        result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    } else {
        result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
    }
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(exc_type);
    #endif
    return result;
}
#endif

/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *tmp_value;
    assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
    if (value) {
        #if CYTHON_COMPILING_IN_CPYTHON
        if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
        #endif
            PyException_SetTraceback(value, tb);
    }
    tmp_value = tstate->current_exception;
    tstate->current_exception = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
#else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    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);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject* exc_value;
    exc_value = tstate->current_exception;
    tstate->current_exception = 0;
    *value = exc_value;
    *type = NULL;
    *tb = NULL;
    if (exc_value) {
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        #if CYTHON_COMPILING_IN_CPYTHON
        *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
        Py_XINCREF(*tb);
        #else
        *tb = PyException_GetTraceback(exc_value);
        #endif
    }
#else
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#endif
}
#endif

/* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
    return result;
#else
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
#endif
}

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name);
    if (unlikely(!result) && !PyErr_Occurred()) {
        PyErr_Format(PyExc_NameError,
            "name '%U' is not defined", name);
    }
    return result;
}

/* GetTopmostException (used by SaveResetException) */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    PyObject *exc_value = exc_info->exc_value;
    if (exc_value == NULL || exc_value == Py_None) {
        *value = NULL;
        *type = NULL;
        *tb = NULL;
    } else {
        *value = exc_value;
        Py_INCREF(*value);
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        *tb = PyException_GetTraceback(exc_value);
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #endif
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    PyObject *tmp_value = exc_info->exc_value;
    exc_info->exc_value = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
  #else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    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;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
  #endif
}
#endif

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type = NULL, *local_value, *local_tb = NULL;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if PY_VERSION_HEX >= 0x030C0000
    local_value = tstate->current_exception;
    tstate->current_exception = 0;
  #else
    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;
  #endif
#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000
    local_value = PyErr_GetRaisedException();
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
#if __PYX_LIMITED_VERSION_HEX > 0x030C0000
    if (likely(local_value)) {
        local_type = (PyObject*) Py_TYPE(local_value);
        Py_INCREF(local_type);
        local_tb = PyException_GetTraceback(local_value);
    }
#else
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
      #if PY_VERSION_HEX >= 0x030B00a4
        tmp_value = exc_info->exc_value;
        exc_info->exc_value = local_value;
        tmp_type = NULL;
        tmp_tb = NULL;
        Py_XDECREF(local_type);
        Py_XDECREF(local_tb);
      #else
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
      #endif
    }
    #else
    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;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000
    PyErr_SetHandledException(local_value);
    Py_XDECREF(local_value);
    Py_XDECREF(local_type);
    Py_XDECREF(local_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
#endif
}

/* PyObjectCall (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallMethO (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
    self = __Pyx_CyOrPyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectFastCall */
#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) {
    PyObject *argstuple;
    PyObject *result = 0;
    size_t i;
    argstuple = PyTuple_New((Py_ssize_t)nargs);
    if (unlikely(!argstuple)) return NULL;
    for (i = 0; i < nargs; i++) {
        Py_INCREF(args[i]);
        if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad;
    }
    result = __Pyx_PyObject_Call(func, argstuple, kwargs);
  bad:
    Py_DECREF(argstuple);
    return result;
}
#endif
#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API
  #if PY_VERSION_HEX < 0x03090000
    #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable)
  #elif CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) {
    PyTypeObject *tp = Py_TYPE(callable);
    #if defined(__Pyx_CyFunction_USED)
    if (__Pyx_CyFunction_CheckExact(callable)) {
        return __Pyx_CyFunction_func_vectorcall(callable);
    }
    #endif
    if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
        return NULL;
    }
    assert(PyCallable_Check(callable));
    Py_ssize_t offset = tp->tp_vectorcall_offset;
    assert(offset > 0);
    vectorcallfunc ptr;
    memcpy(&ptr, (char *) callable + offset, sizeof(ptr));
    return ptr;
}
  #else
    #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable)
  #endif
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) {
    Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
#if CYTHON_COMPILING_IN_CPYTHON
    if (nargs == 0 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
            return __Pyx_PyObject_CallMethO(func, NULL);
    }
    else if (nargs == 1 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
            return __Pyx_PyObject_CallMethO(func, args[0]);
    }
#endif
    if (kwargs == NULL) {
        #if CYTHON_VECTORCALL
          #if CYTHON_COMPILING_IN_LIMITED_API
            return PyObject_Vectorcall(func, args, _nargs, NULL);
          #else
            vectorcallfunc f = __Pyx_PyVectorcall_Function(func);
            if (f) {
                return f(func, args, _nargs, NULL);
            }
          #endif
        #endif
    }
    if (nargs == 0) {
        return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs);
    }
    #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
    #else
    return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
    #endif
}

/* RaiseException */
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 *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            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 = PyObject_Call(type, args, NULL);
            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) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if PY_VERSION_HEX >= 0x030C00A6
        PyException_SetTraceback(value, tb);
#elif CYTHON_FAST_THREAD_STATE
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#else
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}

/* ExtTypeTest */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    __Pyx_TypeName obj_type_name;
    __Pyx_TypeName type_name;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    type_name = __Pyx_PyType_GetFullyQualifiedName(type);
    PyErr_Format(PyExc_TypeError,
                 "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME,
                 obj_type_name, type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    __Pyx_DECREF_TypeName(type_name);
    return 0;
}

/* ModInt[long] */
static CYTHON_INLINE long __Pyx_mod_long(long a, long b, int b_is_constant) {
    long r = a % b;
    long adapt_python = (b_is_constant ?
        ((r != 0) & ((r < 0) ^ (b < 0))) :
        ((r != 0) & ((r ^ b) < 0))
    );
    return r + adapt_python * b;
}

/* py_unicode_predicate */
#if CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_Py_UNICODE_ISALPHA(Py_UCS4 uchar) {
    int result;
    PyObject *py_result, *ustring;
    if (uchar < 170) {
        switch (uchar) {
            case (Py_UCS4)'A':
            case (Py_UCS4)'B':
            case (Py_UCS4)'C':
            case (Py_UCS4)'D':
            case (Py_UCS4)'E':
            case (Py_UCS4)'F':
            case (Py_UCS4)'G':
            case (Py_UCS4)'H':
            case (Py_UCS4)'I':
            case (Py_UCS4)'J':
            case (Py_UCS4)'K':
            case (Py_UCS4)'L':
            case (Py_UCS4)'M':
            case (Py_UCS4)'N':
            case (Py_UCS4)'O':
            case (Py_UCS4)'P':
            case (Py_UCS4)'Q':
            case (Py_UCS4)'R':
            case (Py_UCS4)'S':
            case (Py_UCS4)'T':
            case (Py_UCS4)'U':
            case (Py_UCS4)'V':
            case (Py_UCS4)'W':
            case (Py_UCS4)'X':
            case (Py_UCS4)'Y':
            case (Py_UCS4)'Z':
            case (Py_UCS4)'a':
            case (Py_UCS4)'b':
            case (Py_UCS4)'c':
            case (Py_UCS4)'d':
            case (Py_UCS4)'e':
            case (Py_UCS4)'f':
            case (Py_UCS4)'g':
            case (Py_UCS4)'h':
            case (Py_UCS4)'i':
            case (Py_UCS4)'j':
            case (Py_UCS4)'k':
            case (Py_UCS4)'l':
            case (Py_UCS4)'m':
            case (Py_UCS4)'n':
            case (Py_UCS4)'o':
            case (Py_UCS4)'p':
            case (Py_UCS4)'q':
            case (Py_UCS4)'r':
            case (Py_UCS4)'s':
            case (Py_UCS4)'t':
            case (Py_UCS4)'u':
            case (Py_UCS4)'v':
            case (Py_UCS4)'w':
            case (Py_UCS4)'x':
            case (Py_UCS4)'y':
            case (Py_UCS4)'z':
            return 1;
        }
        return 0;
    }
    ustring = PyUnicode_FromOrdinal(uchar);
    if (!ustring) goto bad;
    py_result = PyObject_CallMethod(ustring, "isalpha", NULL);
    Py_DECREF(ustring);
    if (!py_result) goto bad;
    result = PyObject_IsTrue(py_result);
    Py_DECREF(py_result);
    if (result == -1) goto bad;
    return result != 0;
bad:
    PyErr_Clear();
    return 0;
}
#endif

/* CIntToDigits (used by CIntToPyUnicode) */
static const char DIGIT_PAIRS_10[2*10*10+1] = {
    "00010203040506070809"
    "10111213141516171819"
    "20212223242526272829"
    "30313233343536373839"
    "40414243444546474849"
    "50515253545556575859"
    "60616263646566676869"
    "70717273747576777879"
    "80818283848586878889"
    "90919293949596979899"
};
static const char DIGIT_PAIRS_8[2*8*8+1] = {
    "0001020304050607"
    "1011121314151617"
    "2021222324252627"
    "3031323334353637"
    "4041424344454647"
    "5051525354555657"
    "6061626364656667"
    "7071727374757677"
};
static const char DIGITS_HEX[2*16+1] = {
    "0123456789abcdef"
    "0123456789ABCDEF"
};

/* BuildPyUnicode (used by COrdinalToPyUnicode) */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength,
                                                int prepend_sign, char padding_char) {
    PyObject *uval;
    Py_ssize_t uoffset = ulength - clength;
#if CYTHON_USE_UNICODE_INTERNALS
    Py_ssize_t i;
    void *udata;
    uval = PyUnicode_New(ulength, 127);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_DATA(uval);
    if (uoffset > 0) {
        i = 0;
        if (prepend_sign) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-');
            i++;
        }
        for (; i < uoffset; i++) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
        }
    }
    for (i=0; i < clength; i++) {
        __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
    }
#else
    {
        PyObject *sign = NULL, *padding = NULL;
        uval = NULL;
        if (uoffset > 0) {
            prepend_sign = !!prepend_sign;
            if (uoffset > prepend_sign) {
                padding = PyUnicode_FromOrdinal(padding_char);
                if (likely(padding) && uoffset > prepend_sign + 1) {
                    PyObject *tmp = PySequence_Repeat(padding, uoffset - prepend_sign);
                    Py_DECREF(padding);
                    padding = tmp;
                }
                if (unlikely(!padding)) goto done_or_error;
            }
            if (prepend_sign) {
                sign = PyUnicode_FromOrdinal('-');
                if (unlikely(!sign)) goto done_or_error;
            }
        }
        uval = PyUnicode_DecodeASCII(chars, clength, NULL);
        if (likely(uval) && padding) {
            PyObject *tmp = PyUnicode_Concat(padding, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
        if (likely(uval) && sign) {
            PyObject *tmp = PyUnicode_Concat(sign, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
done_or_error:
        Py_XDECREF(padding);
        Py_XDECREF(sign);
    }
#endif
    return uval;
}

/* COrdinalToPyUnicode (used by CIntToPyUnicode) */
static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value) {
    return value <= 1114111;
}
static PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t ulength, char padding_char) {
    Py_ssize_t padding_length = ulength - 1;
    if (likely((padding_length <= 250) && (value < 0xD800 || value > 0xDFFF))) {
        char chars[256];
        if (value <= 255) {
            memset(chars, padding_char, (size_t) padding_length);
            chars[ulength-1] = (char) value;
            return PyUnicode_DecodeLatin1(chars, ulength, NULL);
        }
        char *cpos = chars + sizeof(chars);
        if (value < 0x800) {
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0xc0 | (value & 0x1f));
        } else if (value < 0x10000) {
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0xe0 | (value & 0x0f));
        } else {
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0xf0 | (value & 0x07));
        }
        cpos -= padding_length;
        memset(cpos, padding_char, (size_t) padding_length);
        return PyUnicode_DecodeUTF8(cpos, chars + sizeof(chars) - cpos, NULL);
    }
    if (value <= 127 && CYTHON_USE_UNICODE_INTERNALS) {
        const char chars[1] = {(char) value};
        return __Pyx_PyUnicode_BuildFromAscii(ulength, chars, 1, 0, padding_char);
    }
    {
        PyObject *uchar, *padding_uchar, *padding, *result;
        padding_uchar = PyUnicode_FromOrdinal(padding_char);
        if (unlikely(!padding_uchar)) return NULL;
        padding = PySequence_Repeat(padding_uchar, padding_length);
        Py_DECREF(padding_uchar);
        if (unlikely(!padding)) return NULL;
        uchar = PyUnicode_FromOrdinal(value);
        if (unlikely(!uchar)) {
            Py_DECREF(padding);
            return NULL;
        }
        result = PyUnicode_Concat(padding, uchar);
        Py_DECREF(padding);
        Py_DECREF(uchar);
        return result;
    }
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
                    !(sizeof(value) <= 2 || value & ~ (Py_ssize_t) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
        PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
        return NULL;
    }
    if (width <= 1) {
        return PyUnicode_FromOrdinal((int) value);
    }
    return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char);
}
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(Py_ssize_t)*3+2];
    char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    Py_ssize_t remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (Py_ssize_t) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (Py_ssize_t) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (Py_ssize_t) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* JoinPyUnicode */
static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char) {
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyObject *result_uval;
    int result_ukind, kind_shift;
    Py_ssize_t i, char_pos;
    void *result_udata;
    if (max_char > 1114111) max_char = 1114111;
    result_uval = PyUnicode_New(result_ulength, max_char);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
    kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1;
    result_udata = PyUnicode_DATA(result_uval);
    assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
    if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0))
        goto overflow;
    char_pos = 0;
    for (i=0; i < value_count; i++) {
        int ukind;
        Py_ssize_t ulength;
        void *udata;
        PyObject *uval = values[i];
        #if !CYTHON_COMPILING_IN_LIMITED_API
        if (__Pyx_PyUnicode_READY(uval) == (-1))
            goto bad;
        #endif
        ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(ulength < 0)) goto bad;
        #endif
        if (unlikely(!ulength))
            continue;
        if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
            goto overflow;
        ukind = __Pyx_PyUnicode_KIND(uval);
        udata = __Pyx_PyUnicode_DATA(uval);
        if (ukind == result_ukind) {
            memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
        } else {
            #if PY_VERSION_HEX >= 0x030d0000
            if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad;
            #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters)
            _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
            #else
            Py_ssize_t j;
            for (j=0; j < ulength; j++) {
                Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
                __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
            }
            #endif
        }
        char_pos += ulength;
    }
    return result_uval;
overflow:
    PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
bad:
    Py_DECREF(result_uval);
    return NULL;
#else
    Py_ssize_t i;
    PyObject *result = NULL;
    PyObject *value_tuple = PyTuple_New(value_count);
    if (unlikely(!value_tuple)) return NULL;
    CYTHON_UNUSED_VAR(max_char);
    CYTHON_UNUSED_VAR(result_ulength);
    for (i=0; i<value_count; i++) {
        if (__Pyx_PyTuple_SET_ITEM(value_tuple, i, values[i]) != (0)) goto bad;
        Py_INCREF(values[i]);
    }
    result = PyUnicode_Join(__pyx_mstate_global->__pyx_empty_unicode, value_tuple);
bad:
    Py_DECREF(value_tuple);
    return result;
#endif
}

/* PyUnicode_Substring */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Substring(
            PyObject* text, Py_ssize_t start, Py_ssize_t stop) {
    Py_ssize_t length;
    #if !CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(__Pyx_PyUnicode_READY(text) == -1)) return NULL;
    #endif
    length = __Pyx_PyUnicode_GET_LENGTH(text);
    #if !CYTHON_ASSUME_SAFE_SIZE
    if (unlikely(length < 0)) return NULL;
    #endif
    if (start < 0) {
        start += length;
        if (start < 0)
            start = 0;
    }
    if (stop < 0)
        stop += length;
    else if (stop > length)
        stop = length;
    if (stop <= start)
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_unicode);
    if (start == 0 && stop == length)
        return __Pyx_NewRef(text);
#if CYTHON_COMPILING_IN_LIMITED_API
    return PyUnicode_Substring(text, start, stop);
#else
    return PyUnicode_FromKindAndData(PyUnicode_KIND(text),
        PyUnicode_1BYTE_DATA(text) + start*PyUnicode_KIND(text), stop-start);
#endif
}

/* PyUnicode_Unicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) {
    if (unlikely(obj == Py_None))
        obj = __pyx_mstate_global->__pyx_kp_u_None;
    return __Pyx_NewRef(obj);
}

/* TupleAndListFromArray (used by fastcall) */
#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    Py_ssize_t i;
    if (n <= 0) {
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    for (i = 0; i < n; i++) {
        if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) {
            Py_DECREF(res);
            return NULL;
        }
        Py_INCREF(src[i]);
    }
    return res;
}
#elif CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
    PyObject *v;
    Py_ssize_t i;
    for (i = 0; i < length; i++) {
        v = dest[i] = src[i];
        Py_INCREF(v);
    }
}
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
    return res;
}
static CYTHON_INLINE PyObject *
__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return PyList_New(0);
    }
    res = PyList_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
    return res;
}
#endif

/* BytesEquals (used by UnicodeEquals) */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\
        !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS)
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals (used by fastcall) */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length, length2;
        int kind;
        void *data1, *data2;
        #if !CYTHON_COMPILING_IN_LIMITED_API
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        #endif
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(length < 0)) return -1;
        #endif
        length2 = __Pyx_PyUnicode_GET_LENGTH(s2);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(length2 < 0)) return -1;
        #endif
        if (length != length2) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    return (equals == Py_EQ);
return_ne:
    return (equals == Py_NE);
#endif
}

/* fastcall */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
{
    Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames);
    #if !CYTHON_ASSUME_SAFE_SIZE
    if (unlikely(n == -1)) return NULL;
    #endif
    for (i = 0; i < n; i++)
    {
        PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!namei)) return NULL;
        #endif
        if (s == namei) return kwvalues[i];
    }
    for (i = 0; i < n; i++)
    {
        PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!namei)) return NULL;
        #endif
        int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ);
        if (unlikely(eq != 0)) {
            if (unlikely(eq < 0)) return NULL;
            return kwvalues[i];
        }
    }
    return NULL;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
    Py_ssize_t i, nkwargs;
    PyObject *dict;
#if !CYTHON_ASSUME_SAFE_SIZE
    nkwargs = PyTuple_Size(kwnames);
    if (unlikely(nkwargs < 0)) return NULL;
#else
    nkwargs = PyTuple_GET_SIZE(kwnames);
#endif
    dict = PyDict_New();
    if (unlikely(!dict))
        return NULL;
    for (i=0; i<nkwargs; i++) {
#if !CYTHON_ASSUME_SAFE_MACROS
        PyObject *key = PyTuple_GetItem(kwnames, i);
        if (!key) goto bad;
#else
        PyObject *key = PyTuple_GET_ITEM(kwnames, i);
#endif
        if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
            goto bad;
    }
    return dict;
bad:
    Py_DECREF(dict);
    return NULL;
}
#endif
#endif

/* PyObjectCallOneArg (used by CallUnboundCMethod0) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *args[2] = {NULL, arg};
    return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
    PyObject *result;
    PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
    if (unlikely(!selfless_args)) return NULL;
    result = PyObject_Call(method, selfless_args, kwargs);
    Py_DECREF(selfless_args);
    return result;
}
#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) {
        return _PyObject_Vectorcall
            (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames);
}
#else
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) {
    return
#if PY_VERSION_HEX < 0x03090000
    _PyObject_Vectorcall
#else
    PyObject_Vectorcall
#endif
        (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames);
}
#endif
static PyMethodDef __Pyx_UnboundCMethod_Def = {
     "CythonUnboundCMethod",
     __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
     METH_VARARGS | METH_KEYWORDS,
#else
     METH_FASTCALL | METH_KEYWORDS,
#endif
     NULL
};
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method, *result=NULL;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    result = method;
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    } else
#endif
#if CYTHON_COMPILING_IN_PYPY
#else
    if (PyCFunction_Check(method))
#endif
    {
        PyObject *self;
        int self_found;
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        self = PyObject_GetAttrString(method, "__self__");
        if (!self) {
            PyErr_Clear();
        }
#else
        self = PyCFunction_GET_SELF(method);
#endif
        self_found = (self && self != Py_None);
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        Py_XDECREF(self);
#endif
        if (self_found) {
            PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
            if (unlikely(!unbound_method)) return -1;
            Py_DECREF(method);
            result = unbound_method;
        }
    }
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    if (unlikely(target->method)) {
        Py_DECREF(result);
    } else
#endif
    target->method = result;
    return 0;
}

/* CallUnboundCMethod0 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        if (likely(cfunc->flag == METH_NOARGS))
            return __Pyx_CallCFunction(cfunc, self, NULL);
        if (likely(cfunc->flag == METH_FASTCALL))
            return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0);
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL);
        if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS)))
            return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL);
        if (cfunc->flag == METH_VARARGS)
            return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple);
        return __Pyx__CallUnboundCMethod0(cfunc, self);
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self);
    }
#endif
    PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    PyObject *result;
    if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
    result = __Pyx_PyObject_CallOneArg(cfunc->method, self);
    return result;
}

/* py_dict_items (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
    return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d);
}

/* py_dict_values (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
    return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d);
}

/* OwnedDictNext (used by ParseKeywordsImpl) */
#if CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) {
    PyObject *next = NULL;
    if (!*ppos) {
        if (pvalue) {
            PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p);
            if (unlikely(!dictview)) goto bad;
            *ppos = PyObject_GetIter(dictview);
            Py_DECREF(dictview);
        } else {
            *ppos = PyObject_GetIter(p);
        }
        if (unlikely(!*ppos)) goto bad;
    }
    next = PyIter_Next(*ppos);
    if (!next) {
        if (PyErr_Occurred()) goto bad;
        return 0;
    }
    if (pkey && pvalue) {
        *pkey = __Pyx_PySequence_ITEM(next, 0);
        if (unlikely(*pkey)) goto bad;
        *pvalue = __Pyx_PySequence_ITEM(next, 1);
        if (unlikely(*pvalue)) goto bad;
        Py_DECREF(next);
    } else if (pkey) {
        *pkey = next;
    } else {
        assert(pvalue);
        *pvalue = next;
    }
    return 1;
  bad:
    Py_XDECREF(next);
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
    PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef");
#else
    PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef);
#endif
    if (pkey) *pkey = NULL;
    if (pvalue) *pvalue = NULL;
    return 0;
}
#else // !CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) {
    int result = PyDict_Next(p, ppos, pkey, pvalue);
    if (likely(result == 1)) {
        if (pkey) Py_INCREF(*pkey);
        if (pvalue) Py_INCREF(*pvalue);
    }
    return result;
}
#endif

/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
}

/* CallUnboundCMethod2 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            return __Pyx_CallCFunctionFast(cfunc, self, args, 2);
        }
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL);
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2);
    }
#endif
    PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        PyObject *result = NULL;
        PyObject *args = PyTuple_New(2);
        if (unlikely(!args)) return NULL;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
        else
            result = __Pyx_CallCFunction(cfunc, self, args);
        Py_DECREF(args);
        return result;
    }
#endif
    {
        PyObject *args[4] = {NULL, self, arg1, arg2};
        return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
    }
}

/* ParseKeywordsImpl (used by ParseKeywords) */
static int __Pyx_ValidateDuplicatePosArgs(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    const char* function_name)
{
    PyObject ** const *name = argnames;
    while (name != first_kw_arg) {
        PyObject *key = **name;
        int found = PyDict_Contains(kwds, key);
        if (unlikely(found)) {
            if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key);
            goto bad;
        }
        name++;
    }
    return 0;
bad:
    return -1;
}
#if CYTHON_USE_UNICODE_INTERNALS
static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) {
    int kind;
    Py_ssize_t len = PyUnicode_GET_LENGTH(s1);
    if (len != PyUnicode_GET_LENGTH(s2)) return 0;
    kind = PyUnicode_KIND(s1);
    if (kind != PyUnicode_KIND(s2)) return 0;
    const void *data1 = PyUnicode_DATA(s1);
    const void *data2 = PyUnicode_DATA(s2);
    return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0);
}
#endif
static int __Pyx_MatchKeywordArg_str(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    PyObject ** const *name;
    #if CYTHON_USE_UNICODE_INTERNALS
    Py_hash_t key_hash = ((PyASCIIObject*)key)->hash;
    if (unlikely(key_hash == -1)) {
        key_hash = PyObject_Hash(key);
        if (unlikely(key_hash == -1))
            goto bad;
    }
    #endif
    name = first_kw_arg;
    while (*name) {
        PyObject *name_str = **name;
        #if CYTHON_USE_UNICODE_INTERNALS
        if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) {
            *index_found = (size_t) (name - argnames);
            return 1;
        }
        #else
        #if CYTHON_ASSUME_SAFE_SIZE
        if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
        #endif
        {
            int cmp = PyUnicode_Compare(name_str, key);
            if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
            if (cmp == 0) {
                *index_found = (size_t) (name - argnames);
                return 1;
            }
        }
        #endif
        name++;
    }
    name = argnames;
    while (name != first_kw_arg) {
        PyObject *name_str = **name;
        #if CYTHON_USE_UNICODE_INTERNALS
        if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) {
            if (__Pyx_UnicodeKeywordsEqual(name_str, key))
                goto arg_passed_twice;
        }
        #else
        #if CYTHON_ASSUME_SAFE_SIZE
        if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
        #endif
        {
            if (unlikely(name_str == key)) goto arg_passed_twice;
            int cmp = PyUnicode_Compare(name_str, key);
            if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
            if (cmp == 0) goto arg_passed_twice;
        }
        #endif
        name++;
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
bad:
    return -1;
}
static int __Pyx_MatchKeywordArg_nostr(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    PyObject ** const *name;
    if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type;
    name = first_kw_arg;
    while (*name) {
        int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
        if (cmp == 1) {
            *index_found = (size_t) (name - argnames);
            return 1;
        }
        if (unlikely(cmp == -1)) goto bad;
        name++;
    }
    name = argnames;
    while (name != first_kw_arg) {
        int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
        if (unlikely(cmp != 0)) {
            if (cmp == 1) goto arg_passed_twice;
            else goto bad;
        }
        name++;
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
bad:
    return -1;
}
static CYTHON_INLINE int __Pyx_MatchKeywordArg(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    return likely(PyUnicode_CheckExact(key)) ?
        __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) :
        __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name);
}
static void __Pyx_RejectUnknownKeyword(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    const char *function_name)
{
    #if CYTHON_AVOID_BORROWED_REFS
    PyObject *pos = NULL;
    #else
    Py_ssize_t pos = 0;
    #endif
    PyObject *key = NULL;
    __Pyx_BEGIN_CRITICAL_SECTION(kwds);
    while (
        #if CYTHON_AVOID_BORROWED_REFS
        __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL)
        #else
        PyDict_Next(kwds, &pos, &key, NULL)
        #endif
    ) {
        PyObject** const *name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (!*name) {
            size_t index_found = 0;
            int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
            if (cmp != 1) {
                if (cmp == 0) {
                    PyErr_Format(PyExc_TypeError,
                        "%s() got an unexpected keyword argument '%U'",
                        function_name, key);
                }
                #if CYTHON_AVOID_BORROWED_REFS
                Py_DECREF(key);
                #endif
                break;
            }
        }
        #if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(key);
        #endif
    }
    __Pyx_END_CRITICAL_SECTION();
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(pos);
    #endif
    assert(PyErr_Occurred());
}
static int __Pyx_ParseKeywordDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    PyObject** const *name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    Py_ssize_t extracted = 0;
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
    if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
#endif
    name = first_kw_arg;
    while (*name && num_kwargs > extracted) {
        PyObject * key = **name;
        PyObject *value;
        int found = 0;
        #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
        found = PyDict_GetItemRef(kwds, key, &value);
        #else
        value = PyDict_GetItemWithError(kwds, key);
        if (value) {
            Py_INCREF(value);
            found = 1;
        } else {
            if (unlikely(PyErr_Occurred())) goto bad;
        }
        #endif
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
            extracted++;
        }
        name++;
    }
    if (num_kwargs > extracted) {
        if (ignore_unknown_kwargs) {
            if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1))
                goto bad;
        } else {
            __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name);
            goto bad;
        }
    }
    return 0;
bad:
    return -1;
}
static int __Pyx_ParseKeywordDictToDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject** const *name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    Py_ssize_t len;
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
    if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
#endif
    if (PyDict_Update(kwds2, kwds) < 0) goto bad;
    name = first_kw_arg;
    while (*name) {
        PyObject *key = **name;
        PyObject *value;
#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop))
        int found = PyDict_Pop(kwds2, key, &value);
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
        }
#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
        int found = PyDict_GetItemRef(kwds2, key, &value);
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
            if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad;
        }
#else
    #if CYTHON_COMPILING_IN_CPYTHON
        value = _PyDict_Pop(kwds2, key, kwds2);
    #else
        value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2);
    #endif
        if (value == kwds2) {
            Py_DECREF(value);
        } else {
            if (unlikely(!value)) goto bad;
            values[name-argnames] = value;
        }
#endif
        name++;
    }
    len = PyDict_Size(kwds2);
    if (len > 0) {
        return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name);
    } else if (unlikely(len == -1)) {
        goto bad;
    }
    return 0;
bad:
    return -1;
}
static int __Pyx_ParseKeywordsTuple(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    PyObject *key = NULL;
    PyObject** const * name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) {
#if CYTHON_AVOID_BORROWED_REFS
        key = __Pyx_PySequence_ITEM(kwds, pos);
#else
        key = __Pyx_PyTuple_GET_ITEM(kwds, pos);
#endif
#if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!key)) goto bad;
#endif
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            PyObject *value = kwvalues[pos];
            values[name-argnames] = __Pyx_NewRef(value);
        } else {
            size_t index_found = 0;
            int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
            if (cmp == 1) {
                PyObject *value = kwvalues[pos];
                values[index_found] = __Pyx_NewRef(value);
            } else {
                if (unlikely(cmp == -1)) goto bad;
                if (kwds2) {
                    PyObject *value = kwvalues[pos];
                    if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
                } else if (!ignore_unknown_kwargs) {
                    goto invalid_keyword;
                }
            }
        }
        #if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(key);
        key = NULL;
        #endif
    }
    return 0;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    goto bad;
bad:
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(key);
    #endif
    return -1;
}

/* ParseKeywords */
static int __Pyx_ParseKeywords(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)))
        return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
    else if (kwds2)
        return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name);
    else
        return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
}

/* RaiseArgTupleInvalid */
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,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* ArgTypeTestFunc (used by ArgTypeTest) */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    __Pyx_TypeName type_name;
    __Pyx_TypeName obj_type_name;
    PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode;
    int from_annotation_subclass = 0;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (!exact) {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    } else if (exact == 2) {
        if (__Pyx_TypeCheck(obj, type)) {
            from_annotation_subclass = 1;
            extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately;
        }
    }
    type_name = __Pyx_PyType_GetFullyQualifiedName(type);
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
        ", got " __Pyx_FMT_TYPENAME ")"
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
        "%s%U"
#endif
        , name, type_name, obj_type_name
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
        , (from_annotation_subclass ? ". " : ""), extra_info
#endif
        );
#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    if (exact == 2 && from_annotation_subclass) {
        PyObject *res;
        PyObject *vargs[2];
        vargs[0] = PyErr_GetRaisedException();
        vargs[1] = extra_info;
        res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL);
        Py_XDECREF(res);
        PyErr_SetRaisedException(vargs[0]);
    }
#endif
    __Pyx_DECREF_TypeName(type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_value = exc_info->exc_value;
    exc_info->exc_value = *value;
    if (tmp_value == NULL || tmp_value == Py_None) {
        Py_XDECREF(tmp_value);
        tmp_value = NULL;
        tmp_type = NULL;
        tmp_tb = NULL;
    } else {
        tmp_type = (PyObject*) Py_TYPE(tmp_value);
        Py_INCREF(tmp_type);
        #if CYTHON_COMPILING_IN_CPYTHON
        tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
        Py_XINCREF(tmp_tb);
        #else
        tmp_tb = PyException_GetTraceback(tmp_value);
        #endif
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
  #else
    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;
  #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* ModInt[PY_LONG_LONG] */
static CYTHON_INLINE PY_LONG_LONG __Pyx_mod_PY_LONG_LONG(PY_LONG_LONG a, PY_LONG_LONG b, int b_is_constant) {
    PY_LONG_LONG r = a % b;
    PY_LONG_LONG adapt_python = (b_is_constant ?
        ((r != 0) & ((r < 0) ^ (b < 0))) :
        ((r != 0) & ((r ^ b) < 0))
    );
    return r + adapt_python * b;
}

/* WriteUnraisableException */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
    else state = (PyGILState_STATE)0;
    CYTHON_UNUSED_VAR(clineno);
    CYTHON_UNUSED_VAR(lineno);
    CYTHON_UNUSED_VAR(filename);
    CYTHON_MAYBE_UNUSED_VAR(nogil);
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(0);
    }
    ctx = PyUnicode_FromString(name);
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
    if (nogil)
        PyGILState_Release(state);
}

/* PyObjectVectorCallKwBuilder */
#if CYTHON_VECTORCALL
static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    (void)__Pyx_PyObject_FastCallDict;
    if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1;
    Py_INCREF(key);
    args[n] = value;
    return 0;
}
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    (void)__Pyx_VectorcallBuilder_AddArgStr;
    if (unlikely(!PyUnicode_Check(key))) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        return -1;
    }
    return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n);
}
static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    PyObject *pyKey = PyUnicode_FromString(key);
    if (!pyKey) return -1;
    return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n);
}
#else // CYTHON_VECTORCALL
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) {
    if (unlikely(!PyUnicode_Check(key))) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        return -1;
    }
    return PyDict_SetItem(builder, key, value);
}
#endif

/* PyObjectFormatAndDecref */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
    if (unlikely(!s)) return NULL;
    if (likely(PyUnicode_CheckExact(s))) return s;
    return __Pyx_PyObject_FormatAndDecref(s, f);
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
    PyObject *result;
    if (unlikely(!s)) return NULL;
    result = PyObject_Format(s, f);
    Py_DECREF(s);
    return result;
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
                    !(sizeof(value) <= 2 || value & ~ (int) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
        PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
        return NULL;
    }
    if (width <= 1) {
        return PyUnicode_FromOrdinal((int) value);
    }
    return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char);
}
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(int)*3+2];
    char *dpos, *end = digits + sizeof(int)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    int remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (int) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (int) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (int) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* RaiseUnexpectedTypeError */
static int
__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
{
    __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
                 expected, obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* PyObjectFastCallMethod */
#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) {
    PyObject *result;
    PyObject *attr = PyObject_GetAttr(args[0], name);
    if (unlikely(!attr))
        return NULL;
    result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1);
    Py_DECREF(attr);
    return result;
}
#endif

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_PY_LONG_LONG(PY_LONG_LONG value, Py_ssize_t width, char padding_char) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = (PY_LONG_LONG) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
                    !(sizeof(value) <= 2 || value & ~ (PY_LONG_LONG) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
        PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
        return NULL;
    }
    if (width <= 1) {
        return PyUnicode_FromOrdinal((int) value);
    }
    return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char);
}
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_PY_LONG_LONG(PY_LONG_LONG value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(PY_LONG_LONG)*3+2];
    char *dpos, *end = digits + sizeof(PY_LONG_LONG)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    PY_LONG_LONG remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = (PY_LONG_LONG) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (PY_LONG_LONG) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (PY_LONG_LONG) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (PY_LONG_LONG) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_npy_intp(npy_intp value, Py_ssize_t width, char padding_char) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const npy_intp neg_one = (npy_intp) -1, const_zero = (npy_intp) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
                    !(sizeof(value) <= 2 || value & ~ (npy_intp) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
        PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
        return NULL;
    }
    if (width <= 1) {
        return PyUnicode_FromOrdinal((int) value);
    }
    return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char);
}
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_npy_intp(npy_intp value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(npy_intp)*3+2];
    char *dpos, *end = digits + sizeof(npy_intp)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    npy_intp remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const npy_intp neg_one = (npy_intp) -1, const_zero = (npy_intp) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (npy_intp) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (npy_intp) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (npy_intp) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* ModInt[npy_int64] */
static CYTHON_INLINE npy_int64 __Pyx_mod_npy_int64(npy_int64 a, npy_int64 b, int b_is_constant) {
    npy_int64 r = a % b;
    npy_int64 adapt_python = (b_is_constant ?
        ((r != 0) & ((r < 0) ^ (b < 0))) :
        ((r != 0) & ((r ^ b) < 0))
    );
    return r + adapt_python * b;
}

/* DivInt[npy_int64] */
static CYTHON_INLINE npy_int64 __Pyx_div_npy_int64(npy_int64 a, npy_int64 b, int b_is_constant) {
    npy_int64 q = a / b;
    npy_int64 r = a - q*b;
    npy_int64 adapt_python = (b_is_constant ?
        ((r != 0) & ((r < 0) ^ (b < 0))) :
        ((r != 0) & ((r ^ b) < 0))
    );
    return q - adapt_python;
}

/* UnicodeConcatInPlace */
# if CYTHON_COMPILING_IN_CPYTHON
static int
__Pyx_unicode_modifiable(PyObject *unicode, int unsafe_shared)
{
    if (!__Pyx_IS_UNIQUELY_REFERENCED(unicode, unsafe_shared))
        return 0;
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030F0000
    if (PyUnstable_Unicode_GET_CACHED_HASH(unicode) != -1)
        return 0;
#endif
    if (!PyUnicode_CheckExact(unicode))
        return 0;
    if (PyUnicode_CHECK_INTERNED(unicode))
        return 0;
    return 1;
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right, int unsafe_shared
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    ) {
    PyObject *left = *p_left;
    Py_ssize_t left_len, right_len, new_len;
    if (unlikely(__Pyx_PyUnicode_READY(left) == -1))
        return NULL;
    if (unlikely(__Pyx_PyUnicode_READY(right) == -1))
        return NULL;
    left_len = PyUnicode_GET_LENGTH(left);
    if (left_len == 0) {
        Py_INCREF(right);
        return right;
    }
    right_len = PyUnicode_GET_LENGTH(right);
    if (right_len == 0) {
        Py_INCREF(left);
        return left;
    }
    if (unlikely(left_len > PY_SSIZE_T_MAX - right_len)) {
        PyErr_SetString(PyExc_OverflowError,
                        "strings are too large to concat");
        return NULL;
    }
    new_len = left_len + right_len;
    if (__Pyx_unicode_modifiable(left, unsafe_shared)
            && PyUnicode_CheckExact(right)
            && PyUnicode_KIND(right) <= PyUnicode_KIND(left)
            && !(PyUnicode_IS_ASCII(left) && !PyUnicode_IS_ASCII(right))) {
        int ret;
        __Pyx_GIVEREF(*p_left);
        ret = PyUnicode_Resize(p_left, new_len);
        __Pyx_GOTREF(*p_left);
        if (unlikely(ret != 0))
            return NULL;
        #if PY_VERSION_HEX >= 0x030d0000
        if (unlikely(PyUnicode_CopyCharacters(*p_left, left_len, right, 0, right_len) < 0)) return NULL;
        #else
        _PyUnicode_FastCopyCharacters(*p_left, left_len, right, 0, right_len);
        #endif
        __Pyx_INCREF(*p_left);
        __Pyx_GIVEREF(*p_left);
        return *p_left;
    } else {
        return __Pyx_PyUnicode_Concat(left, right);
    }
  }
#endif

/* PyObjectCall2Args (used by CallUnboundCMethod1) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args[3] = {NULL, arg1, arg2};
    return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* CallUnboundCMethod1 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
    int was_initialized =  __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        int flag = cfunc->flag;
        if (flag == METH_O) {
            return __Pyx_CallCFunction(cfunc, self, arg);
        } else if (flag == METH_FASTCALL) {
            return __Pyx_CallCFunctionFast(cfunc, self, &arg, 1);
        } else if (flag == (METH_FASTCALL | METH_KEYWORDS)) {
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, &arg, 1, NULL);
        }
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod1(&tmp_cfunc, self, arg);
    }
#endif
    PyObject* result = __Pyx__CallUnboundCMethod1(cfunc, self, arg);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
    PyObject *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        PyObject *args = PyTuple_New(1);
        if (unlikely(!args)) return NULL;
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 0, arg);
        if (cfunc->flag & METH_KEYWORDS)
            result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
        else
            result = __Pyx_CallCFunction(cfunc, self, args);
        Py_DECREF(args);
    } else
#endif
    {
        result = __Pyx_PyObject_Call2Args(cfunc->method, self, arg);
    }
    return result;
}

/* dict_getitem_default */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
    PyObject* value;
#if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (unlikely(PyErr_Occurred()))
            return NULL;
        value = default_value;
    }
    Py_INCREF(value);
    if ((1));
#else
    if (PyBytes_CheckExact(key) || PyUnicode_CheckExact(key) || PyLong_CheckExact(key)) {
        value = PyDict_GetItem(d, key);
        if (unlikely(!value)) {
            value = default_value;
        }
        Py_INCREF(value);
    }
#endif
    else {
        if (default_value == Py_None)
            value = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_get, d, key);
        else
            value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_get, d, key, default_value);
    }
    return value;
}

/* PyObjectVectorCallMethodKwBuilder */
#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames) {
    PyObject *result;
    PyObject *obj = PyObject_GetAttr(args[0], name);
    if (unlikely(!obj))
        return NULL;
    result = __Pyx_Object_Vectorcall_CallFromBuilder(obj, args+1, nargsf-1, kwnames);
    Py_DECREF(obj);
    return result;
}
#endif

/* PyDictVersioning (used by GetModuleGlobalName) */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(!__pyx_m)) {
        if (!PyErr_Occurred())
            PyErr_SetNone(PyExc_NameError);
        return NULL;
    }
    result = PyObject_GetAttr(__pyx_m, name);
    if (likely(result)) {
        return result;
    }
    PyErr_Clear();
#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear();
    __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return result;
    }
#else
    result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (cls == a || cls == b) return 1;
    mro = cls->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            PyObject *base = PyTuple_GET_ITEM(mro, i);
            if (base == (PyObject *)a || base == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
}
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    if (exc_type1) {
        return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
    } else {
        return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
}
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* pybuiltin_invalid (used by pyint_simplify) */
static void __Pyx_PyBuiltin_Invalid(PyObject *obj, const char *type_name, const char *argname) {
    __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    if (argname) {
        PyErr_Format(PyExc_TypeError,
            "Argument '%.200s' has incorrect type (expected %.200s, got " __Pyx_FMT_TYPENAME ")",
            argname, type_name, obj_type_name
        );
    } else {
        PyErr_Format(PyExc_TypeError,
            "Expected %.200s, got " __Pyx_FMT_TYPENAME,
            type_name, obj_type_name
        );
    }
    __Pyx_DECREF_TypeName(obj_type_name);
}

/* pyint_simplify */
static CYTHON_INLINE int __Pyx_PyInt_FromNumber(PyObject **number_var, const char *argname, int accept_none) {
    PyObject *number = *number_var;
    if (likely((accept_none && number == Py_None) || PyLong_CheckExact(number))) {
        return 0;
    }
    PyObject *int_object;
    if (likely(PyNumber_Check(number))) {
        int_object = PyNumber_Long(number);
        if (unlikely(!int_object)) goto bad;
    } else {
        __Pyx_PyBuiltin_Invalid(number, "int", argname);
        goto bad;
    }
    *number_var = int_object;
    Py_DECREF(number);
    return 0;
bad:
    *number_var = NULL;
    Py_DECREF(number);
    return -1;
}

/* pybytes_as_double (used by pyobject_as_double) */
static double __Pyx_SlowPyString_AsDouble(PyObject *obj) {
    PyObject *float_value = PyFloat_FromString(obj);
    if (likely(float_value)) {
        double value = __Pyx_PyFloat_AS_DOUBLE(float_value);
        Py_DECREF(float_value);
        return value;
    }
    return (double)-1;
}
static const char* __Pyx__PyBytes_AsDouble_Copy(const char* start, char* buffer, Py_ssize_t length) {
    int last_was_punctuation = 1;
    int parse_error_found = 0;
    Py_ssize_t i;
    for (i=0; i < length; i++) {
        char chr = start[i];
        int is_punctuation = (chr == '_') | (chr == '.') | (chr == 'e') | (chr == 'E');
        *buffer = chr;
        buffer += (chr != '_');
        parse_error_found |= last_was_punctuation & is_punctuation;
        last_was_punctuation = is_punctuation;
    }
    parse_error_found |= last_was_punctuation;
    *buffer = '\0';
    return unlikely(parse_error_found) ? NULL : buffer;
}
static double __Pyx__PyBytes_AsDouble_inf_nan(const char* start, Py_ssize_t length) {
    int matches = 1;
    char sign = start[0];
    int is_signed = (sign == '+') | (sign == '-');
    start += is_signed;
    length -= is_signed;
    switch (start[0]) {
        #ifdef Py_NAN
        case 'n':
        case 'N':
            if (unlikely(length != 3)) goto parse_failure;
            matches &= (start[1] == 'a' || start[1] == 'A');
            matches &= (start[2] == 'n' || start[2] == 'N');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_NAN : Py_NAN;
        #endif
        case 'i':
        case 'I':
            if (unlikely(length < 3)) goto parse_failure;
            matches &= (start[1] == 'n' || start[1] == 'N');
            matches &= (start[2] == 'f' || start[2] == 'F');
            if (likely(length == 3 && matches))
                return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
            if (unlikely(length != 8)) goto parse_failure;
            matches &= (start[3] == 'i' || start[3] == 'I');
            matches &= (start[4] == 'n' || start[4] == 'N');
            matches &= (start[5] == 'i' || start[5] == 'I');
            matches &= (start[6] == 't' || start[6] == 'T');
            matches &= (start[7] == 'y' || start[7] == 'Y');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
        case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
            break;
        default:
            goto parse_failure;
    }
    return 0.0;
parse_failure:
    return -1.0;
}
static CYTHON_INLINE int __Pyx__PyBytes_AsDouble_IsSpace(char ch) {
    return (ch == 0x20) | !((ch < 0x9) | (ch > 0xd));
}
CYTHON_UNUSED static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length) {
    double value;
    Py_ssize_t i, digits;
    const char *last = start + length;
    char *end;
    while (__Pyx__PyBytes_AsDouble_IsSpace(*start))
        start++;
    while (start < last - 1 && __Pyx__PyBytes_AsDouble_IsSpace(last[-1]))
        last--;
    length = last - start;
    if (unlikely(length <= 0)) goto fallback;
    value = __Pyx__PyBytes_AsDouble_inf_nan(start, length);
    if (unlikely(value == -1.0)) goto fallback;
    if (value != 0.0) return value;
    digits = 0;
    for (i=0; i < length; digits += start[i++] != '_');
    if (likely(digits == length)) {
        value = PyOS_string_to_double(start, &end, NULL);
    } else if (digits < 40) {
        char number[40];
        last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
        if (unlikely(!last)) goto fallback;
        value = PyOS_string_to_double(number, &end, NULL);
    } else {
        char *number = (char*) PyMem_Malloc((digits + 1) * sizeof(char));
        if (unlikely(!number)) goto fallback;
        last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
        if (unlikely(!last)) {
            PyMem_Free(number);
            goto fallback;
        }
        value = PyOS_string_to_double(number, &end, NULL);
        PyMem_Free(number);
    }
    if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) {
        return value;
    }
fallback:
    return __Pyx_SlowPyString_AsDouble(obj);
}

/* pyobject_as_double */
static double __Pyx__PyObject_AsDouble(PyObject* obj) {
    if (PyUnicode_CheckExact(obj)) {
        return __Pyx_PyUnicode_AsDouble(obj);
    } else if (PyBytes_CheckExact(obj)) {
        return __Pyx_PyBytes_AsDouble(obj);
    } else if (PyByteArray_CheckExact(obj)) {
        return __Pyx_PyByteArray_AsDouble(obj);
    } else {
        PyObject* float_value;
#if !CYTHON_USE_TYPE_SLOTS
        float_value = PyNumber_Float(obj);  if ((0)) goto bad;
        (void)__Pyx_PyObject_CallOneArg;
#else
        PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number;
        if (likely(nb) && likely(nb->nb_float)) {
            float_value = nb->nb_float(obj);
            if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) {
                __Pyx_TypeName float_value_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(float_value));
                PyErr_Format(PyExc_TypeError,
                    "__float__ returned non-float (type " __Pyx_FMT_TYPENAME ")",
                    float_value_type_name);
                __Pyx_DECREF_TypeName(float_value_type_name);
                Py_DECREF(float_value);
                goto bad;
            }
        } else {
            float_value = __Pyx_PyObject_CallOneArg((PyObject*)&PyFloat_Type, obj);
        }
#endif
        if (likely(float_value)) {
            double value = __Pyx_PyFloat_AS_DOUBLE(float_value);
            Py_DECREF(float_value);
            return value;
        }
    }
bad:
    return (double)-1;
}

/* SetItemInt */
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (unlikely(!j)) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
                                               int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared))) {
            Py_INCREF(v);
            return PyList_SetItem(o, n, v);
        } else if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
            PyObject* old;
            Py_INCREF(v);
            old = PyList_GET_ITEM(o, n);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 0;
        }
    } else
#endif
#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
    {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (!is_list && mm && mm->mp_ass_subscript) {
            int r;
            PyObject *key = PyLong_FromSsize_t(i);
            if (unlikely(!key)) return -1;
            r = mm->mp_ass_subscript(o, key, v);
            Py_DECREF(key);
            return r;
        }
        if (is_list || likely(sm && sm->sq_ass_item)) {
            if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
                Py_ssize_t l = sm->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return -1;
                    PyErr_Clear();
                }
            }
            return sm->sq_ass_item(o, i, v);
        }
    }
#else
    if (is_list || !PyMapping_Check(o)) {
        return PySequence_SetItem(o, i, v);
    }
#endif
    (void)wraparound;
    (void)boundscheck;
    return __Pyx_SetItemInt_Generic(o, PyLong_FromSsize_t(i), v);
}

/* DivInt[PY_LONG_LONG] */
static CYTHON_INLINE PY_LONG_LONG __Pyx_div_PY_LONG_LONG(PY_LONG_LONG a, PY_LONG_LONG b, int b_is_constant) {
    PY_LONG_LONG q = a / b;
    PY_LONG_LONG r = a - q*b;
    PY_LONG_LONG adapt_python = (b_is_constant ?
        ((r != 0) & ((r < 0) ^ (b < 0))) :
        ((r != 0) & ((r ^ b) < 0))
    );
    return q - adapt_python;
}

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType_3_2_1
#define __PYX_HAVE_RT_ImportType_3_2_1
static PyTypeObject *__Pyx_ImportType_3_2_1(PyObject *module, const char *module_name, const char *class_name,
    size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_1 check_size)
{
    PyObject *result = 0;
    Py_ssize_t basicsize;
    Py_ssize_t itemsize;
#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API)
    PyObject *py_basicsize;
    PyObject *py_itemsize;
#endif
    result = PyObject_GetAttrString(module, class_name);
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) )
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
    itemsize = ((PyTypeObject *)result)->tp_itemsize;
#else
    if (size == 0) {
        return (PyTypeObject *)result;
    }
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
    py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
    if (!py_itemsize)
        goto bad;
    itemsize = PyLong_AsSsize_t(py_itemsize);
    Py_DECREF(py_itemsize);
    py_itemsize = 0;
    if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if (itemsize) {
        if (size % alignment) {
            alignment = size % alignment;
        }
        if (itemsize < (Py_ssize_t)alignment)
            itemsize = (Py_ssize_t)alignment;
    }
    if ((size_t)(basicsize + itemsize) < size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize+itemsize);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error_3_2_1 &&
            ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd-%zd from PyObject",
            module_name, class_name, size, basicsize, basicsize+itemsize);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_2_1 && (size_t)basicsize > size) {
        if (PyErr_WarnFormat(NULL, 0,
                "%.200s.%.200s size changed, may indicate binary incompatibility. "
                "Expected %zd from C header, got %zd from PyObject",
                module_name, class_name, size, basicsize) < 0) {
            goto bad;
        }
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* GetVTable */
static void* __Pyx_GetVtable(PyTypeObject *type) {
    void* ptr;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable);
#else
    PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable);
#endif
    if (!ob)
        goto bad;
    ptr = PyCapsule_GetPointer(ob, 0);
    if (!ptr && !PyErr_Occurred())
        PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
    Py_DECREF(ob);
    return ptr;
bad:
    Py_XDECREF(ob);
    return NULL;
}

/* PxdImportShared (used by VoidPtrImport) */
#ifndef __PYX_HAVE_RT_ImportFromPxd_3_2_1
#define __PYX_HAVE_RT_ImportFromPxd_3_2_1
static int __Pyx_ImportFromPxd_3_2_1(PyObject *module, const char *name, void **p, const char *sig, const char *what) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    d = PyObject_GetAttrString(module, "__pyx_capi__");
    if (!d)
        goto bad;
#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000)
    PyDict_GetItemStringRef(d, name, &cobj);
#else
    cobj = PyDict_GetItemString(d, name);
    Py_XINCREF(cobj);
#endif
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C %.8s %.200s",
                PyModule_GetName(module), what, name);
        goto bad;
    }
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C %.8s %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             what, PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    *p = PyCapsule_GetPointer(cobj, sig);
    if (!(*p))
        goto bad;
    Py_DECREF(d);
    Py_DECREF(cobj);
    return 0;
bad:
    Py_XDECREF(d);
    Py_XDECREF(cobj);
    return -1;
}
#endif

/* VoidPtrImport */
#ifndef __PYX_HAVE_RT_ImportVoidPtr_3_2_1
#define __PYX_HAVE_RT_ImportVoidPtr_3_2_1
static int __Pyx_ImportVoidPtr_3_2_1(PyObject *module, const char *name, void **p, const char *sig) {
    return __Pyx_ImportFromPxd_3_2_1(module, name, p, sig, "variable");
}
#endif

/* FunctionImport */
#ifndef __PYX_HAVE_RT_ImportFunction_3_2_1
#define __PYX_HAVE_RT_ImportFunction_3_2_1
static int __Pyx_ImportFunction_3_2_1(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    int result = __Pyx_ImportFromPxd_3_2_1(module, funcname, &tmp.p, sig, "function");
    if (result == 0) {
        *f = tmp.fp;
    }
    return result;
}
#endif

/* dict_setdefault (used by FetchCommonType) */
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) {
    PyObject* value;
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    PyObject *args[] = {d, key, default_value};
    value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#elif CYTHON_COMPILING_IN_LIMITED_API
    value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL);
#elif PY_VERSION_HEX >= 0x030d0000
    PyDict_SetDefaultRef(d, key, default_value, &value);
#else
    value = PyDict_SetDefault(d, key, default_value);
    if (unlikely(!value)) return NULL;
    Py_INCREF(value);
#endif
    return value;
}

/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */
#if CYTHON_COMPILING_IN_LIMITED_API
static Py_ssize_t __Pyx_GetTypeDictOffset(void) {
    PyObject *tp_dictoffset_o;
    Py_ssize_t tp_dictoffset;
    tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__");
    if (unlikely(!tp_dictoffset_o)) return -1;
    tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o);
    Py_DECREF(tp_dictoffset_o);
    if (unlikely(tp_dictoffset == 0)) {
        PyErr_SetString(
            PyExc_TypeError,
            "'type' doesn't have a dictoffset");
        return -1;
    } else if (unlikely(tp_dictoffset < 0)) {
        PyErr_SetString(
            PyExc_TypeError,
            "'type' has an unexpected negative dictoffset. "
            "Please report this as Cython bug");
        return -1;
    }
    return tp_dictoffset;
}
static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) {
    static Py_ssize_t tp_dictoffset = 0;
    if (unlikely(tp_dictoffset == 0)) {
        tp_dictoffset = __Pyx_GetTypeDictOffset();
        if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) {
            tp_dictoffset = 0; // try again next time?
            return NULL;
        }
    }
    return *(PyObject**)((char*)tp + tp_dictoffset);
}
#endif

/* SetItemOnTypeDict (used by FixUpExtensionType) */
static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) {
    int result;
    PyObject *tp_dict;
#if CYTHON_COMPILING_IN_LIMITED_API
    tp_dict = __Pyx_GetTypeDict(tp);
    if (unlikely(!tp_dict)) return -1;
#else
    tp_dict = tp->tp_dict;
#endif
    result = PyDict_SetItem(tp_dict, k, v);
    if (likely(!result)) {
        PyType_Modified(tp);
        if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) {
            PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name,  (PyObject *) tp, k, NULL);
            if (!setNameResult) return -1;
            Py_DECREF(setNameResult);
        }
    }
    return result;
}

/* FixUpExtensionType (used by FetchCommonType) */
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
#if __PYX_LIMITED_VERSION_HEX > 0x030900B1
    CYTHON_UNUSED_VAR(spec);
    CYTHON_UNUSED_VAR(type);
    CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
#else
    const PyType_Slot *slot = spec->slots;
    int changed = 0;
#if !CYTHON_COMPILING_IN_LIMITED_API
    while (slot && slot->slot && slot->slot != Py_tp_members)
        slot++;
    if (slot && slot->slot == Py_tp_members) {
#if !CYTHON_COMPILING_IN_CPYTHON
        const
#endif  // !CYTHON_COMPILING_IN_CPYTHON)
            PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
        while (memb && memb->name) {
            if (memb->name[0] == '_' && memb->name[1] == '_') {
                if (strcmp(memb->name, "__weaklistoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_weaklistoffset = memb->offset;
                    changed = 1;
                }
                else if (strcmp(memb->name, "__dictoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_dictoffset = memb->offset;
                    changed = 1;
                }
#if CYTHON_METH_FASTCALL
                else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_vectorcall_offset = memb->offset;
                    changed = 1;
                }
#endif  // CYTHON_METH_FASTCALL
#if !CYTHON_COMPILING_IN_PYPY
                else if (strcmp(memb->name, "__module__") == 0) {
                    PyObject *descr;
                    assert(memb->type == T_OBJECT);
                    assert(memb->flags == 0 || memb->flags == READONLY);
                    descr = PyDescr_NewMember(type, memb);
                    if (unlikely(!descr))
                        return -1;
                    int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
                    Py_DECREF(descr);
                    if (unlikely(set_item_result < 0)) {
                        return -1;
                    }
                    changed = 1;
                }
#endif  // !CYTHON_COMPILING_IN_PYPY
            }
            memb++;
        }
    }
#endif  // !CYTHON_COMPILING_IN_LIMITED_API
#if !CYTHON_COMPILING_IN_PYPY
    slot = spec->slots;
    while (slot && slot->slot && slot->slot != Py_tp_getset)
        slot++;
    if (slot && slot->slot == Py_tp_getset) {
        PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc;
        while (getset && getset->name) {
            if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) {
                PyObject *descr = PyDescr_NewGetSet(type, getset);
                if (unlikely(!descr))
                    return -1;
                #if CYTHON_COMPILING_IN_LIMITED_API
                PyObject *pyname = PyUnicode_FromString(getset->name);
                if (unlikely(!pyname)) {
                    Py_DECREF(descr);
                    return -1;
                }
                int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr);
                Py_DECREF(pyname);
                #else
                CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
                int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
                #endif
                Py_DECREF(descr);
                if (unlikely(set_item_result < 0)) {
                    return -1;
                }
                changed = 1;
            }
            ++getset;
        }
    }
#else
    CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
#endif  // !CYTHON_COMPILING_IN_PYPY
    if (changed)
        PyType_Modified(type);
#endif  // PY_VERSION_HEX > 0x030900B1
    return 0;
}

/* AddModuleRef (used by FetchSharedCythonModule) */
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) {
      PyObject *module_dict = PyImport_GetModuleDict();
      PyObject *m;
      if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) {
          return NULL;
      }
      if (m != NULL && PyModule_Check(m)) {
          return m;
      }
      Py_XDECREF(m);
      m = PyModule_NewObject(name);
      if (m == NULL)
          return NULL;
      if (PyDict_CheckExact(module_dict)) {
          PyObject *new_m;
          (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m);
          Py_DECREF(m);
          return new_m;
      } else {
           if (PyObject_SetItem(module_dict, name, m) != 0) {
                Py_DECREF(m);
                return NULL;
            }
            return m;
      }
  }
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *py_name = PyUnicode_FromString(name);
      if (!py_name) return NULL;
      PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name);
      Py_DECREF(py_name);
      return module;
  }
#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#else
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *module = PyImport_AddModule(name);
      Py_XINCREF(module);
      return module;
  }
#endif

/* FetchSharedCythonModule (used by FetchCommonType) */
static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
    return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME);
}

/* FetchCommonType (used by CommonTypesMetaclass) */
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases);
    if (result && metaclass) {
        PyObject *old_tp = (PyObject*)Py_TYPE(result);
    Py_INCREF((PyObject*)metaclass);
#if __PYX_LIMITED_VERSION_HEX >= 0x03090000
        Py_SET_TYPE(result, metaclass);
#else
        result->ob_type = metaclass;
#endif
        Py_DECREF(old_tp);
    }
    return result;
}
#else
#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b)
#endif
static int __Pyx_VerifyCachedType(PyObject *cached_type,
                               const char *name,
                               Py_ssize_t expected_basicsize) {
    Py_ssize_t basicsize;
    if (!PyType_Check(cached_type)) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s is not a type object", name);
        return -1;
    }
    if (expected_basicsize == 0) {
        return 0; // size is inherited, nothing useful to check
    }
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_basicsize;
    py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
    if (unlikely(!py_basicsize)) return -1;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = NULL;
    if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1;
#else
    basicsize = ((PyTypeObject*) cached_type)->tp_basicsize;
#endif
    if (basicsize != expected_basicsize) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s has the wrong size, try recompiling",
            name);
        return -1;
    }
    return 0;
}
static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name;
    int get_item_ref_result;
    const char* object_name = strrchr(spec->name, '.');
    object_name = object_name ? object_name+1 : spec->name;
    py_object_name = PyUnicode_FromString(object_name);
    if (!py_object_name) return NULL;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) goto done;
    abi_module_dict = PyModule_GetDict(abi_module);
    if (!abi_module_dict) goto done;
    get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type);
    if (get_item_ref_result == 1) {
        if (__Pyx_VerifyCachedType(
              cached_type,
              object_name,
              spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    } else if (unlikely(get_item_ref_result == -1)) {
        goto bad;
    }
    cached_type = __Pyx_PyType_FromMetaclass(
        metaclass,
        CYTHON_USE_MODULE_STATE ? module : abi_module,
        spec, bases);
    if (unlikely(!cached_type)) goto bad;
    if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
    new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type);
    if (unlikely(new_cached_type != cached_type)) {
        if (unlikely(!new_cached_type)) goto bad;
        Py_DECREF(cached_type);
        cached_type = new_cached_type;
        if (__Pyx_VerifyCachedType(
                cached_type,
                object_name,
                spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    } else {
        Py_DECREF(new_cached_type);
    }
done:
    Py_XDECREF(abi_module);
    Py_DECREF(py_object_name);
    assert(cached_type == NULL || PyType_Check(cached_type));
    return (PyTypeObject *) cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CommonTypesMetaclass (used by CythonFunctionShared) */
static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) {
    return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
}
#if __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) {
    PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types");
    return NULL;
}
static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) {
    PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable");
    return -1;
}
#endif
static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
    {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL},
    {0, 0, 0, 0, 0}
};
static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = {
    {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset},
    #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
    {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call},
    {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call},
    {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr},
    #endif
    {0, 0}
};
static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
    __PYX_TYPE_MODULE_PREFIX "_common_types_metatype",
    0,
    0,
    Py_TPFLAGS_IMMUTABLETYPE |
    Py_TPFLAGS_DISALLOW_INSTANTIATION |
    Py_TPFLAGS_DEFAULT,
    __pyx_CommonTypesMetaclass_slots
};
static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
    __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
    PyObject *bases = PyTuple_Pack(1, &PyType_Type);
    if (unlikely(!bases)) {
        return -1;
    }
    mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
    Py_DECREF(bases);
    if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
        return -1;
    }
    return 0;
}

/* CallTypeTraverse (used by CythonFunctionShared) */
#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
#else
static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) {
    #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000
    if (__Pyx_get_runtime_version() < 0x03090000) return 0;
    #endif
    if (!always_call) {
        PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*);
        unsigned long flags = PyType_GetFlags(base);
        if (flags & Py_TPFLAGS_HEAPTYPE) {
            return 0;
        }
    }
    Py_VISIT((PyObject*)Py_TYPE(o));
    return 0;
}
#endif

/* PyMethodNew (used by CythonFunctionShared) */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    PyObject *result;
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    {
        PyObject *args[] = {func, self};
        result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL);
    }
    #else
    result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL);
    #endif
    return result;
}
#else
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    return PyMethod_New(func, self);
}
#endif

/* PyVectorcallFastCallDict (used by CythonFunctionShared) */
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    PyObject *res = NULL;
    PyObject *kwnames;
    PyObject **newargs;
    PyObject **kwvalues;
    Py_ssize_t i;
    #if CYTHON_AVOID_BORROWED_REFS
    PyObject *pos;
    #else
    Py_ssize_t pos;
    #endif
    size_t j;
    PyObject *key, *value;
    unsigned long keys_are_strings;
    #if !CYTHON_ASSUME_SAFE_SIZE
    Py_ssize_t nkw = PyDict_Size(kw);
    if (unlikely(nkw == -1)) return NULL;
    #else
    Py_ssize_t nkw = PyDict_GET_SIZE(kw);
    #endif
    newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
    if (unlikely(newargs == NULL)) {
        PyErr_NoMemory();
        return NULL;
    }
    for (j = 0; j < nargs; j++) newargs[j] = args[j];
    kwnames = PyTuple_New(nkw);
    if (unlikely(kwnames == NULL)) {
        PyMem_Free(newargs);
        return NULL;
    }
    kwvalues = newargs + nargs;
    pos = 0;
    i = 0;
    keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
    while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) {
        keys_are_strings &=
        #if CYTHON_COMPILING_IN_LIMITED_API
            PyType_GetFlags(Py_TYPE(key));
        #else
            Py_TYPE(key)->tp_flags;
        #endif
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup;
        #else
        PyTuple_SET_ITEM(kwnames, i, key);
        #endif
        kwvalues[i] = value;
        i++;
    }
    if (unlikely(!keys_are_strings)) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        goto cleanup;
    }
    res = vc(func, newargs, nargs, kwnames);
cleanup:
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(pos);
    #endif
    Py_DECREF(kwnames);
    for (i = 0; i < nkw; i++)
        Py_DECREF(kwvalues[i]);
    PyMem_Free(newargs);
    return res;
}
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    Py_ssize_t kw_size =
        likely(kw == NULL) ?
        0 :
#if !CYTHON_ASSUME_SAFE_SIZE
        PyDict_Size(kw);
#else
        PyDict_GET_SIZE(kw);
#endif
    if (kw_size == 0) {
        return vc(func, args, nargs, NULL);
    }
#if !CYTHON_ASSUME_SAFE_SIZE
    else if (unlikely(kw_size == -1)) {
        return NULL;
    }
#endif
    return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
}
#endif

/* CythonFunctionShared (used by CythonFunction) */
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) {
    if (__Pyx_CyFunction_Check(func)) {
        return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
    } else if (PyCFunction_Check(func)) {
        return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
    if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) {
        int result;
        PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func);
        if (unlikely(!newFunc)) {
            PyErr_Clear(); // It's only an optimization, so don't throw an error
            return 0;
        }
        result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc);
        Py_DECREF(newFunc);
        return result;
    }
    return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc);
}
#else
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
    if (PyMethod_Check(func)) {
        func = PyMethod_GET_FUNCTION(func);
    }
    return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
}
#endif
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    __Pyx_Py_XDECREF_SET(
        __Pyx_CyFunction_GetClassObj(f),
            ((classobj) ? __Pyx_NewRef(classobj) : NULL));
#else
    __Pyx_Py_XDECREF_SET(
        ((PyCMethodObject *) (f))->mm_class,
        (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
#endif
}
static PyObject *
__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_doc == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
        if (unlikely(!op->func_doc)) return NULL;
#else
        if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
            op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
#endif
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) {
    PyObject *result;
    CYTHON_UNUSED_VAR(closure);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_doc_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_doc, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_name == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_name = PyObject_GetAttrString(op->func, "__name__");
#else
        op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
{
    PyObject *result = NULL;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_name_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_name, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    PyObject *result;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    Py_INCREF(op->func_qualname);
    result = op->func_qualname;
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_qualname, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
#endif
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(op);
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = NULL;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_defaults_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_kwdefaults_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value || value == Py_None) {
        value = NULL;
    } else if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_annotations, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
    PyObject *result;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_annotations_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) {
    int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
    if (is_coroutine) {
        PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine;
        fromlist = PyList_New(1);
        if (unlikely(!fromlist)) return NULL;
        Py_INCREF(marker);
#if CYTHON_ASSUME_SAFE_MACROS
        PyList_SET_ITEM(fromlist, 0, marker);
#else
        if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
            Py_DECREF(marker);
            Py_DECREF(fromlist);
            return NULL;
        }
#endif
        module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
        if (unlikely(!module)) goto ignore;
        is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker);
        Py_DECREF(module);
        if (likely(is_coroutine_value)) {
            return is_coroutine_value;
        }
ignore:
        PyErr_Clear();
    }
    return __Pyx_PyBool_FromLong(is_coroutine);
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
    PyObject *result;
    CYTHON_UNUSED_VAR(context);
    if (op->func_is_coroutine) {
        return __Pyx_NewRef(op->func_is_coroutine);
    }
    result = __Pyx_CyFunction_get_is_coroutine_value(op);
    if (unlikely(!result))
        return NULL;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    if (op->func_is_coroutine) {
        Py_DECREF(result);
        result = __Pyx_NewRef(op->func_is_coroutine);
    } else {
        op->func_is_coroutine = __Pyx_NewRef(result);
    }
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
    if (!py_name) return;
    PyErr_Format(PyExc_TypeError,
        "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
        py_name, message, size);
    Py_DECREF(py_name);
#else
    const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
    PyErr_Format(PyExc_TypeError,
        "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
        name, message, size);
#endif
}
static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
    if (!py_name) return;
    PyErr_Format(PyExc_TypeError,
        "%.200S() %s",
        py_name, message);
    Py_DECREF(py_name);
#else
    const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
    PyErr_Format(PyExc_TypeError,
        "%.200s() %s",
        name, message);
#endif
}
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *
__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_GetAttrString(op->func, "__module__");
}
static int
__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_SetAttrString(op->func, "__module__", value);
}
#endif
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {"__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
    {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
    {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
#else
    {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
    {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
#endif
    {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
#endif
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
#if !CYTHON_COMPILING_IN_LIMITED_API
    {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
#endif
#if CYTHON_METH_FASTCALL
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
#else
    {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
#else
    {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
#endif
#endif
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
{
    PyObject *result = NULL;
    CYTHON_UNUSED_VAR(args);
    __Pyx_BEGIN_CRITICAL_SECTION(m);
    Py_INCREF(m->func_qualname);
    result = m->func_qualname;
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
#if !CYTHON_COMPILING_IN_LIMITED_API
    PyCFunctionObject *cf = (PyCFunctionObject*) op;
#endif
    if (unlikely(op == NULL))
        return NULL;
#if CYTHON_COMPILING_IN_LIMITED_API
    op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
    if (unlikely(!op->func)) return NULL;
#endif
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
#if !CYTHON_COMPILING_IN_LIMITED_API
    cf->m_ml = ml;
    cf->m_self = (PyObject *) op;
#endif
    Py_XINCREF(closure);
    op->func_closure = closure;
#if !CYTHON_COMPILING_IN_LIMITED_API
    Py_XINCREF(module);
    cf->m_module = module;
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    op->func_dict = NULL;
#endif
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    op->func_classobj = NULL;
#else
    ((PyCMethodObject*)op)->mm_class = NULL;
#endif
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    op->func_is_coroutine = NULL;
#if CYTHON_METH_FASTCALL
    switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
    case METH_NOARGS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
        break;
    case METH_O:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
        break;
    case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
        break;
    case METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
        break;
    case METH_VARARGS | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = NULL;
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        Py_DECREF(op);
        return NULL;
    }
#endif
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(m->func);
#else
    Py_CLEAR(((PyCFunctionObject*)m)->m_module);
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(m->func_dict);
#elif PY_VERSION_HEX < 0x030d0000
    _PyObject_ClearManagedDict((PyObject*)m);
#else
    PyObject_ClearManagedDict((PyObject*)m);
#endif
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
#if !CYTHON_COMPILING_IN_LIMITED_API
#if PY_VERSION_HEX < 0x030900B1
    Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
#else
    {
        PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
        ((PyCMethodObject *) (m))->mm_class = NULL;
        Py_XDECREF(cls);
    }
#endif
#endif
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    Py_CLEAR(m->func_is_coroutine);
    Py_CLEAR(m->defaults);
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    __Pyx_PyHeapTypeObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    {
        int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg);
        if (e) return e;
    }
    Py_VISIT(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(m->func);
#else
    Py_VISIT(((PyCFunctionObject*)m)->m_module);
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(m->func_dict);
#else
    {
        int e =
#if PY_VERSION_HEX < 0x030d0000
            _PyObject_VisitManagedDict
#else
            PyObject_VisitManagedDict
#endif
                ((PyObject*)m, visit, arg);
        if (e != 0) return e;
    }
#endif
    __Pyx_VISIT_CONST(m->func_name);
    __Pyx_VISIT_CONST(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    __Pyx_VISIT_CONST(m->func_code);
#if !CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
#endif
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    Py_VISIT(m->func_is_coroutine);
    Py_VISIT(m->defaults);
    return 0;
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
    PyObject *repr;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    repr = PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
    __Pyx_END_CRITICAL_SECTION();
    return repr;
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
    PyCFunction meth;
    int flags;
    meth = PyCFunction_GetFunction(f);
    if (unlikely(!meth)) return NULL;
    flags = PyCFunction_GetFlags(f);
    if (unlikely(flags < 0)) return NULL;
#else
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    int flags = f->m_ml->ml_flags;
#endif
    Py_ssize_t size;
    switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_SIZE
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 0))
                return (*meth)(self, NULL);
            __Pyx_CyFunction_raise_argument_count_error(
                (__pyx_CyFunctionObject*)func,
                "takes no arguments", size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_SIZE
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            __Pyx_CyFunction_raise_argument_count_error(
                (__pyx_CyFunctionObject*)func,
                "takes exactly one argument", size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        return NULL;
    }
    __Pyx_CyFunction_raise_type_error(
        (__pyx_CyFunctionObject*)func, "takes no keyword arguments");
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *self, *result;
#if CYTHON_COMPILING_IN_LIMITED_API
    self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
    if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
    self = ((PyCFunctionObject*)func)->m_self;
#endif
    result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
    return result;
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
     __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
    if (vc) {
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
        return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
#else
        (void) &__Pyx_PyVectorcall_FastCallDict;
        return PyVectorcall_Call(func, args, kw);
#endif
    }
#endif
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
#if CYTHON_ASSUME_SAFE_SIZE
        argc = PyTuple_GET_SIZE(args);
#else
        argc = PyTuple_Size(args);
        if (unlikely(argc < 0)) return NULL;
#endif
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            PyErr_Format(PyExc_TypeError,
                         "unbound method %.200S() needs an argument",
                         cyfunc->func_qualname);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
{
    int ret = 0;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        if (unlikely(nargs < 1)) {
            __Pyx_CyFunction_raise_type_error(
                cyfunc, "needs an argument");
            return -1;
        }
        ret = 1;
    }
    if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) {
        __Pyx_CyFunction_raise_type_error(
            cyfunc, "takes no keyword arguments");
        return -1;
    }
    return ret;
}
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 0)) {
        __Pyx_CyFunction_raise_argument_count_error(
            cyfunc, "takes no arguments", nargs);
        return NULL;
    }
    return meth(self, NULL);
}
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 1)) {
        __Pyx_CyFunction_raise_argument_count_error(
            cyfunc, "takes exactly one argument", nargs);
        return NULL;
    }
    return meth(self, args[0]);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    #if PY_VERSION_HEX < 0x030e00A6
    size_t nargs_value = (size_t) nargs;
    #else
    Py_ssize_t nargs_value = nargs;
    #endif
    return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames);
}
#endif
static PyType_Slot __pyx_CyFunctionType_slots[] = {
    {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
    {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
    {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
    {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
    {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
    {Py_tp_methods, (void *)__pyx_CyFunction_methods},
    {Py_tp_members, (void *)__pyx_CyFunction_members},
    {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
    {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
    {0, 0},
};
static PyType_Spec __pyx_CyFunctionType_spec = {
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#if CYTHON_METH_FASTCALL
#if defined(Py_TPFLAGS_HAVE_VECTORCALL)
    Py_TPFLAGS_HAVE_VECTORCALL |
#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL)
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
#endif // CYTHON_METH_FASTCALL
#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API
    Py_TPFLAGS_MANAGED_DICT |
#endif
    Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION |
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    __pyx_CyFunctionType_slots
};
static int __pyx_CyFunction_init(PyObject *module) {
    __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
    mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(
        mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL);
    if (unlikely(mstate->__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type);
    if (unlikely(!m->defaults))
        return NULL;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* HasAttr (used by ImportImpl) */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!PyUnicode_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_PyObject_GetAttrStrNoError(o, n);
    if (!r) {
        return (unlikely(PyErr_Occurred())) ? -1 : 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}
#endif

/* ImportImpl (used by Import) */
static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) {
    PyObject *imported_module = PyImport_GetModule(qualname);
    if (unlikely(!imported_module)) {
        *module = NULL;
        if (PyErr_Occurred()) {
            return -1;
        }
        return 0;
    }
    *module = imported_module;
    return 1;
}
static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) {
    PyObject *imported_module;
    PyObject *top_level_package_name;
    Py_ssize_t i;
    int status, module_found;
    Py_ssize_t dot_index;
    module_found = __Pyx__Import_GetModule(qualname, &imported_module);
    if (unlikely(!module_found || module_found == -1)) {
        *module = NULL;
        return module_found;
    }
    if (imported_names) {
        for (i = 0; i < len_imported_names; i++) {
            PyObject *imported_name = imported_names[i];
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
            int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name);
#else
            int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name);
            if (unlikely(has_imported_attribute == -1)) goto error;
#endif
            if (!has_imported_attribute) {
                goto not_found;
            }
        }
        *module = imported_module;
        return 1;
    }
    dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1);
    if (dot_index == -1) {
        *module = imported_module;
        return 1;
    }
    if (unlikely(dot_index == -2)) goto error;
    top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index);
    if (unlikely(!top_level_package_name)) goto error;
    Py_DECREF(imported_module);
    status = __Pyx__Import_GetModule(top_level_package_name, module);
    Py_DECREF(top_level_package_name);
    return status;
error:
    Py_DECREF(imported_module);
    *module = NULL;
    return -1;
not_found:
    Py_DECREF(imported_module);
    *module = NULL;
    return 0;
}
static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) {
    PyObject *module = 0;
    PyObject *empty_dict = 0;
    PyObject *from_list = 0;
    int module_found;
    if (!qualname) {
        qualname = name;
    }
    module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module);
    if (likely(module_found == 1)) {
        return module;
    } else if (unlikely(module_found == -1)) {
        return NULL;
    }
    empty_dict = PyDict_New();
    if (unlikely(!empty_dict))
        goto bad;
    if (imported_names) {
#if CYTHON_COMPILING_IN_CPYTHON
        from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names);
        if (unlikely(!from_list))
            goto bad;
#else
        from_list = PyList_New(len_imported_names);
        if (unlikely(!from_list)) goto bad;
        for (Py_ssize_t i=0; i<len_imported_names; ++i) {
            if (PyList_SetItem(from_list, i, __Pyx_NewRef(imported_names[i])) < 0) goto bad;
        }
#endif
    }
    if (level == -1) {
        const char* package_sep = strchr(__Pyx_MODULE_NAME, '.');
        if (package_sep != (0)) {
            module = PyImport_ImportModuleLevelObject(
                name, moddict, empty_dict, from_list, 1);
            if (unlikely(!module)) {
                if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
                    goto bad;
                PyErr_Clear();
            }
        }
        level = 0;
    }
    if (!module) {
        module = PyImport_ImportModuleLevelObject(
            name, moddict, empty_dict, from_list, level);
    }
bad:
    Py_XDECREF(from_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level) {
    return __Pyx__Import(name, imported_names, len_imported_names, qualname, __pyx_mstate_global->__pyx_d, level);
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        const char* module_name_str = 0;
        PyObject* module_name = 0;
        PyObject* module_dot = 0;
        PyObject* full_name = 0;
        PyErr_Clear();
        module_name_str = PyModule_GetName(module);
        if (unlikely(!module_name_str)) { goto modbad; }
        module_name = PyUnicode_FromString(module_name_str);
        if (unlikely(!module_name)) { goto modbad; }
        module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u__2);
        if (unlikely(!module_dot)) { goto modbad; }
        full_name = PyUnicode_Concat(module_dot, name);
        if (unlikely(!full_name)) { goto modbad; }
        #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400) ||\
                CYTHON_COMPILING_IN_GRAAL
        {
            PyObject *modules = PyImport_GetModuleDict();
            if (unlikely(!modules))
                goto modbad;
            value = PyObject_GetItem(modules, full_name);
        }
        #else
        value = PyImport_GetModule(full_name);
        #endif
      modbad:
        Py_XDECREF(full_name);
        Py_XDECREF(module_dot);
        Py_XDECREF(module_name);
    }
    if (unlikely(!value)) {
        PyErr_Format(PyExc_ImportError, "cannot import name %S", name);
    }
    return value;
}

/* ListPack */
static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...) {
    va_list va;
    PyObject *l = PyList_New(n);
    va_start(va, n);
    if (unlikely(!l)) goto end;
    for (Py_ssize_t i=0; i<n; ++i) {
        PyObject *arg = va_arg(va, PyObject*);
        Py_INCREF(arg);
        if (__Pyx_PyList_SET_ITEM(l, i, arg) != (0)) {
            Py_CLEAR(l);
            goto end;
        }
    }
    end:
    va_end(va);
    return l;
}

/* Py3UpdateBases */
static PyObject*
__Pyx_PEP560_update_bases(PyObject *bases)
{
    Py_ssize_t i, j, size_bases;
    PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL;
#if CYTHON_ASSUME_SAFE_SIZE
    size_bases = PyTuple_GET_SIZE(bases);
#else
    size_bases = PyTuple_Size(bases);
    if (size_bases < 0) return NULL;
#endif
    for (i = 0; i < size_bases; i++) {
#if CYTHON_AVOID_BORROWED_REFS
        Py_CLEAR(base);
#endif
#if CYTHON_ASSUME_SAFE_MACROS
        base = PyTuple_GET_ITEM(bases, i);
#else
        base = PyTuple_GetItem(bases, i);
        if (!base) goto error;
#endif
#if CYTHON_AVOID_BORROWED_REFS
        Py_INCREF(base);
#endif
        if (PyType_Check(base)) {
            if (new_bases) {
                if (PyList_Append(new_bases, base) < 0) {
                    goto error;
                }
            }
            continue;
        }
        meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries);
        if (!meth && PyErr_Occurred()) {
            goto error;
        }
        if (!meth) {
            if (new_bases) {
                if (PyList_Append(new_bases, base) < 0) {
                    goto error;
                }
            }
            continue;
        }
        new_base = __Pyx_PyObject_CallOneArg(meth, bases);
        Py_DECREF(meth);
        if (!new_base) {
            goto error;
        }
        if (!PyTuple_Check(new_base)) {
            PyErr_SetString(PyExc_TypeError,
                            "__mro_entries__ must return a tuple");
            Py_DECREF(new_base);
            goto error;
        }
        if (!new_bases) {
            if (!(new_bases = PyList_New(i))) {
                goto error;
            }
            for (j = 0; j < i; j++) {
                PyObject *base_from_list;
#if CYTHON_ASSUME_SAFE_MACROS
                base_from_list = PyTuple_GET_ITEM(bases, j);
                PyList_SET_ITEM(new_bases, j, base_from_list);
                Py_INCREF(base_from_list);
#else
                base_from_list = PyTuple_GetItem(bases, j);
                if (!base_from_list) goto error;
                Py_INCREF(base_from_list);
                if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error;
#endif
            }
        }
#if CYTHON_ASSUME_SAFE_SIZE
        j = PyList_GET_SIZE(new_bases);
#else
        j = PyList_Size(new_bases);
        if (j < 0) goto error;
#endif
        if (PyList_SetSlice(new_bases, j, j, new_base) < 0) {
            goto error;
        }
        Py_DECREF(new_base);
    }
    if (!new_bases) {
        Py_INCREF(bases);
        return bases;
    }
    result = PyList_AsTuple(new_bases);
    Py_DECREF(new_bases);
#if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(base);
#endif
    return result;
error:
    Py_XDECREF(new_bases);
#if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(base);
#endif
    return NULL;
}

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases;
#if CYTHON_ASSUME_SAFE_SIZE
    nbases = PyTuple_GET_SIZE(bases);
#else
    nbases = PyTuple_Size(bases);
    if (nbases < 0) return NULL;
#endif
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
#if CYTHON_ASSUME_SAFE_MACROS
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *tmp = PyTuple_GetItem(bases, i);
        if (!tmp) return NULL;
#endif
        tmptype = Py_TYPE(tmp);
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
        metaclass = &PyType_Type;
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* SetNewInClass */
static int __Pyx_SetNewInClass(PyObject *ns, PyObject *name, PyObject *value) {
#ifdef __Pyx_CyFunction_USED
    int ret;
    if (__Pyx_CyFunction_Check(value)) {
        PyObject *staticnew;
#if !CYTHON_COMPILING_IN_LIMITED_API
        staticnew = PyStaticMethod_New(value);
#else
        PyObject *builtins, *staticmethod_str, *staticmethod;
        builtins = PyEval_GetBuiltins(); // borrowed
        if (!builtins) return -1;
        staticmethod_str = PyUnicode_FromStringAndSize("staticmethod", 12);
        if (!staticmethod_str) return -1;
        staticmethod = PyObject_GetItem(builtins, staticmethod_str);
        Py_DECREF(staticmethod_str);
        if (!staticmethod) return -1;
        staticnew = PyObject_CallFunctionObjArgs(staticmethod, value, NULL);
        Py_DECREF(staticmethod);
#endif
        if (unlikely(!staticnew)) return -1;
        ret = __Pyx_SetNameInClass(ns, name, staticnew);
        Py_DECREF(staticnew);
        return ret;
    }
#endif
    return __Pyx_SetNameInClass(ns, name, value);
}

/* ClassMethod */
static PyObject* __Pyx_Method_ClassMethod(PyObject *method) {
#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000
    if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) {
        return PyClassMethod_New(method);
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (PyMethodDescr_Check(method))
#else
    if (__Pyx_TypeCheck(method, &PyMethodDescr_Type))
#endif
    {
#if CYTHON_COMPILING_IN_LIMITED_API
        return PyErr_Format(
            PyExc_SystemError,
            "Cython cannot yet handle classmethod on a MethodDescriptorType (%S) in limited API mode. "
            "This is most likely a classmethod in a cdef class method with binding=False. "
            "Try setting 'binding' to True.",
            method);
#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
        PyTypeObject *d_type = GraalPyDescrObject_GetType(method);
        return PyDescr_NewClassMethod(d_type, GraalPyMethodDescrObject_GetMethod(method));
#elif CYTHON_COMPILING_IN_GRAAL
        PyTypeObject *d_type = PyDescrObject_GetType(method);
        return PyDescr_NewClassMethod(d_type, PyMethodDescrObject_GetMethod(method));
#else
        PyMethodDescrObject *descr = (PyMethodDescrObject *)method;
        PyTypeObject *d_type = descr->d_common.d_type;
        return PyDescr_NewClassMethod(d_type, descr->d_method);
#endif
    }
#endif
#if !CYTHON_COMPILING_IN_LIMITED_API
    else if (PyMethod_Check(method)) {
        return PyClassMethod_New(PyMethod_GET_FUNCTION(method));
    }
    else {
        return PyClassMethod_New(method);
    }
#else
    {
        PyObject *func=NULL;
        PyObject *builtins, *classmethod, *classmethod_str, *result=NULL;
        if (__Pyx_TypeCheck(method, __pyx_mstate_global->__Pyx_CachedMethodType)) {
            func = PyObject_GetAttrString(method, "__func__");
            if (!func) goto bad;
        } else {
            func = method;
            Py_INCREF(func);
        }
        builtins = PyEval_GetBuiltins(); // borrowed
        if (unlikely(!builtins)) goto bad;
        classmethod_str = PyUnicode_FromString("classmethod");
        if (unlikely(!classmethod_str)) goto bad;
        classmethod = PyObject_GetItem(builtins, classmethod_str);
        Py_DECREF(classmethod_str);
        if (unlikely(!classmethod)) goto bad;
        result = PyObject_CallFunctionObjArgs(classmethod, func, NULL);
        Py_DECREF(classmethod);
        bad:
        Py_XDECREF(func);
        return result;
    }
#endif
}

/* PyObjectLookupSpecial (used by Py3ClassCreate) */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) {
    PyObject *res;
    PyTypeObject *tp = Py_TYPE(obj);
    res = _PyType_Lookup(tp, attr_name);
    if (likely(res)) {
        descrgetfunc f = Py_TYPE(res)->tp_descr_get;
        if (!f) {
            Py_INCREF(res);
        } else {
            res = f(res, obj, (PyObject *)tp);
        }
    } else if (with_error) {
        PyErr_SetObject(PyExc_AttributeError, attr_name);
    }
    return res;
}
#endif

/* Py3ClassCreate */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare);
        if (prep) {
            PyObject *pargs[3] = {NULL, name, bases};
            ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
            Py_DECREF(prep);
        } else {
            if (unlikely(PyErr_Occurred()))
                return NULL;
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result;
    PyObject *owned_metaclass = NULL;
    PyObject *margs[4] = {NULL, name, bases, dict};
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
    Py_XDECREF(owned_metaclass);
    return result;
}

/* CLineInTraceback (used by AddTraceback) */
#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o))
#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL);
#else
PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) {
    PyObject **dict_ptr = _PyObject_GetDictPtr(o);
    return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL;
}
#endif
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
    PyObject *use_cline = NULL;
    PyObject *ptype, *pvalue, *ptraceback;
    PyObject *cython_runtime_dict;
    CYTHON_MAYBE_UNUSED_VAR(tstate);
    if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
    cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, cython_runtime_dict,
            __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False))
    }
    if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    Py_XDECREF(use_cline);
    Py_XDECREF(cython_runtime_dict);
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache (used by AddTraceback) */
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 - start) / 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 __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) {
    __Pyx_CachedCodeObjectType* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!code_cache->entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
    if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = code_cache->entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) {
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
    (void)__pyx__find_code_object;
    return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss.
#else
    struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count);
    if (old_count < 0) {
        __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
        return NULL;
    }
#endif
    __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line);
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
#endif
    return result;
#endif
}
static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object)
{
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = code_cache->entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            code_cache->entries = entries;
            code_cache->max_count = 64;
            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(code_cache->entries, code_cache->count, code_line);
    if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) {
        __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_INCREF(code_object);
        Py_DECREF(tmp);
        return;
    }
    if (code_cache->count == code_cache->max_count) {
        int new_max = code_cache->max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        code_cache->entries = entries;
        code_cache->max_count = new_max;
    }
    for (i=code_cache->count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    code_cache->count++;
    Py_INCREF(code_object);
}
static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) {
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
    (void)__pyx__insert_code_object;
    return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail.
#else
    struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_nonatomic_int_type expected = 0;
    if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) {
        return;
    }
#endif
    __pyx__insert_code_object(code_cache, code_line, code_object);
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN);
#endif
#endif
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION)
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
                                                       PyObject *firstlineno, PyObject *name) {
    PyObject *replace = NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
    replace = PyObject_GetAttrString(code, "replace");
    if (likely(replace)) {
        PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict);
        Py_DECREF(replace);
        return result;
    }
    PyErr_Clear();
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
    PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
    PyObject *exc_type, *exc_value, *exc_traceback;
    int success = 0;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
    }
    PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
    code_object = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!code_object) {
        code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
        if (unlikely(!code_object)) goto bad;
        py_py_line = PyLong_FromLong(py_line);
        if (unlikely(!py_py_line)) goto bad;
        if (c_line) {
            py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        } else {
            py_funcname = PyUnicode_FromString(funcname);
        }
        if (unlikely(!py_funcname)) goto bad;
        dict = PyDict_New();
        if (unlikely(!dict)) goto bad;
        {
            PyObject *old_code_object = code_object;
            code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
            Py_DECREF(old_code_object);
        }
        if (unlikely(!code_object)) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, code_object);
    } else {
        dict = PyDict_New();
    }
    getframe = PySys_GetObject("_getframe");
    if (unlikely(!getframe)) goto bad;
    if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
    frame = PyEval_EvalCode(code_object, dict, dict);
    if (unlikely(!frame) || frame == Py_None) goto bad;
    success = 1;
  bad:
    PyErr_Restore(exc_type, exc_value, exc_traceback);
    Py_XDECREF(code_object);
    Py_XDECREF(py_py_line);
    Py_XDECREF(py_funcname);
    Py_XDECREF(dict);
    Py_XDECREF(replace);
    if (success) {
        PyTraceBack_Here(
            (struct _frame*)frame);
    }
    Py_XDECREF(frame);
}
#else
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    if (c_line) {
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
    }
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    Py_XDECREF(py_funcname);
    return py_code;
bad:
    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;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject *ptype, *pvalue, *ptraceback;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) {
            /* If the code object creation fails, then we should clear the
               fetched exception references and propagate the new exception */
            Py_XDECREF(ptype);
            Py_XDECREF(pvalue);
            Py_XDECREF(ptraceback);
            goto bad;
        }
        __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_mstate_global->__pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}
#endif

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* Declarations */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
  #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

/* Arithmetic */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
#else
    static CYTHON_INLINE int __Pyx_c_eq_float(__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_sum_float(__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_diff_float(__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_prod_float(__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;
    }
    #if 1
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        if (b.imag == 0) {
            return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else if (fabsf(b.real) >= fabsf(b.imag)) {
            if (b.real == 0 && b.imag == 0) {
                return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
            } else {
                float r = b.imag / b.real;
                float s = (float)(1.0) / (b.real + b.imag * r);
                return __pyx_t_float_complex_from_parts(
                    (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
            }
        } else {
            float r = b.real / b.imag;
            float s = (float)(1.0) / (b.imag + b.real * r);
            return __pyx_t_float_complex_from_parts(
                (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
        }
    }
    #else
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        if (b.imag == 0) {
            return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else {
            float denom = b.real * b.real + b.imag * b.imag;
            return __pyx_t_float_complex_from_parts(
                (a.real * b.real + a.imag * b.imag) / denom,
                (a.imag * b.real - a.real * b.imag) / denom);
        }
    }
    #endif
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__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_zero_float(__pyx_t_float_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__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_abs_float(__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_pow_float(__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:
                        return __Pyx_c_prod_float(a, a);
                    case 3:
                        z = __Pyx_c_prod_float(a, a);
                        return __Pyx_c_prod_float(z, a);
                    case 4:
                        z = __Pyx_c_prod_float(a, a);
                        return __Pyx_c_prod_float(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                } else if ((b.imag == 0) && (a.real >= 0)) {
                    z.real = powf(a.real, b.real);
                    z.imag = 0;
                    return z;
                } else if (a.real > 0) {
                    r = a.real;
                    theta = 0;
                } else {
                    r = -a.real;
                    theta = atan2f(0.0, -1.0);
                }
            } else {
                r = __Pyx_c_abs_float(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

/* Declarations */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
  #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

/* Arithmetic */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
#else
    static CYTHON_INLINE int __Pyx_c_eq_double(__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_double(__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_double(__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_double(__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;
    }
    #if 1
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        if (b.imag == 0) {
            return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else if (fabs(b.real) >= fabs(b.imag)) {
            if (b.real == 0 && b.imag == 0) {
                return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
            } else {
                double r = b.imag / b.real;
                double s = (double)(1.0) / (b.real + b.imag * r);
                return __pyx_t_double_complex_from_parts(
                    (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
            }
        } else {
            double r = b.real / b.imag;
            double s = (double)(1.0) / (b.imag + b.real * r);
            return __pyx_t_double_complex_from_parts(
                (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
        }
    }
    #else
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        if (b.imag == 0) {
            return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else {
            double denom = b.real * b.real + b.imag * b.imag;
            return __pyx_t_double_complex_from_parts(
                (a.real * b.real + a.imag * b.imag) / denom,
                (a.imag * b.real - a.real * b.imag) / denom);
        }
    }
    #endif
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__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_double(__pyx_t_double_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__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_double(__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_double(__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:
                        return __Pyx_c_prod_double(a, a);
                    case 3:
                        z = __Pyx_c_prod_double(a, a);
                        return __Pyx_c_prod_double(z, a);
                    case 4:
                        z = __Pyx_c_prod_double(a, a);
                        return __Pyx_c_prod_double(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                } else if ((b.imag == 0) && (a.real >= 0)) {
                    z.real = pow(a.real, b.real);
                    z.imag = 0;
                    return z;
                } else if (a.real > 0) {
                    r = a.real;
                    theta = 0;
                } else {
                    r = -a.real;
                    theta = atan2(0.0, -1.0);
                }
            } else {
                r = __Pyx_c_abs_double(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

/* Declarations */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
      return ::std::complex< long double >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
      return x + y*(__pyx_t_long_double_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
      __pyx_t_long_double_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

/* Arithmetic */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
#else
    static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
        __pyx_t_long_double_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
        __pyx_t_long_double_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
        __pyx_t_long_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;
    }
    #if 1
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
        if (b.imag == 0) {
            return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else if (fabsl(b.real) >= fabsl(b.imag)) {
            if (b.real == 0 && b.imag == 0) {
                return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
            } else {
                long double r = b.imag / b.real;
                long double s = (long double)(1.0) / (b.real + b.imag * r);
                return __pyx_t_long_double_complex_from_parts(
                    (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
            }
        } else {
            long double r = b.real / b.imag;
            long double s = (long double)(1.0) / (b.imag + b.real * r);
            return __pyx_t_long_double_complex_from_parts(
                (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
        }
    }
    #else
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
        if (b.imag == 0) {
            return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else {
            long double denom = b.real * b.real + b.imag * b.imag;
            return __pyx_t_long_double_complex_from_parts(
                (a.real * b.real + a.imag * b.imag) / denom,
                (a.imag * b.real - a.real * b.imag) / denom);
        }
    }
    #endif
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex a) {
        __pyx_t_long_double_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex a) {
        __pyx_t_long_double_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrtl(z.real*z.real + z.imag*z.imag);
          #else
            return hypotl(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
            __pyx_t_long_double_complex z;
            long double r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    long 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:
                        return __Pyx_c_prod_long__double(a, a);
                    case 3:
                        z = __Pyx_c_prod_long__double(a, a);
                        return __Pyx_c_prod_long__double(z, a);
                    case 4:
                        z = __Pyx_c_prod_long__double(a, a);
                        return __Pyx_c_prod_long__double(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                } else if ((b.imag == 0) && (a.real >= 0)) {
                    z.real = powl(a.real, b.real);
                    z.imag = 0;
                    return z;
                } else if (a.real > 0) {
                    r = a.real;
                    theta = 0;
                } else {
                    r = -a.real;
                    theta = atan2l(0.0, -1.0);
                }
            } else {
                r = __Pyx_c_abs_long__double(a);
                theta = atan2l(a.imag, a.real);
            }
            lnr = logl(r);
            z_r = expl(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cosl(z_theta);
            z.imag = z_r * sinl(z_theta);
            return z;
        }
    #endif
#endif

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        int val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyLong_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (int) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(int) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(int) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
        } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        int val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (int) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (int) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (int) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (int) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((int) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((int) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (int) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE PY_LONG_LONG __Pyx_PyLong_As_PY_LONG_LONG(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = (PY_LONG_LONG) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (PY_LONG_LONG) -1;
        val = __Pyx_PyLong_As_PY_LONG_LONG(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(PY_LONG_LONG) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PY_LONG_LONG) >= 2 * PyLong_SHIFT)) {
                            return (PY_LONG_LONG) (((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(PY_LONG_LONG) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PY_LONG_LONG) >= 3 * PyLong_SHIFT)) {
                            return (PY_LONG_LONG) (((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(PY_LONG_LONG) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PY_LONG_LONG) >= 4 * PyLong_SHIFT)) {
                            return (PY_LONG_LONG) (((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (PY_LONG_LONG) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(PY_LONG_LONG) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(PY_LONG_LONG) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT)) {
                            return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(PY_LONG_LONG) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT)) {
                            return (PY_LONG_LONG) ((((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT)) {
                            return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(PY_LONG_LONG) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT)) {
                            return (PY_LONG_LONG) ((((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT)) {
                            return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(PY_LONG_LONG) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT)) {
                            return (PY_LONG_LONG) ((((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(PY_LONG_LONG) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, long, PyLong_AsLong(x))
        } else if ((sizeof(PY_LONG_LONG) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        PY_LONG_LONG val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (PY_LONG_LONG) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (PY_LONG_LONG) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (PY_LONG_LONG) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (PY_LONG_LONG) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(PY_LONG_LONG) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((PY_LONG_LONG) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(PY_LONG_LONG) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((PY_LONG_LONG) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((PY_LONG_LONG) 1) << (sizeof(PY_LONG_LONG) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (PY_LONG_LONG) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to PY_LONG_LONG");
    return (PY_LONG_LONG) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to PY_LONG_LONG");
    return (PY_LONG_LONG) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_npy_int64(npy_int64 value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const npy_int64 neg_one = (npy_int64) -1, const_zero = (npy_int64) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(npy_int64) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(npy_int64) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(npy_int64) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(npy_int64) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(npy_int64) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(npy_int64),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(npy_int64));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PY_LONG_LONG(PY_LONG_LONG value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = (PY_LONG_LONG) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PY_LONG_LONG) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(PY_LONG_LONG) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(PY_LONG_LONG) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(PY_LONG_LONG),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(PY_LONG_LONG));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_npy_intp(npy_intp value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const npy_intp neg_one = (npy_intp) -1, const_zero = (npy_intp) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(npy_intp) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(npy_intp) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(npy_intp) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(npy_intp) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(npy_intp) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(npy_intp),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(npy_intp));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE npy_intp __Pyx_PyLong_As_npy_intp(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const npy_intp neg_one = (npy_intp) -1, const_zero = (npy_intp) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        npy_intp val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (npy_intp) -1;
        val = __Pyx_PyLong_As_npy_intp(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(npy_intp, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(npy_intp) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_intp, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_intp) >= 2 * PyLong_SHIFT)) {
                            return (npy_intp) (((((npy_intp)digits[1]) << PyLong_SHIFT) | (npy_intp)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(npy_intp) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_intp, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_intp) >= 3 * PyLong_SHIFT)) {
                            return (npy_intp) (((((((npy_intp)digits[2]) << PyLong_SHIFT) | (npy_intp)digits[1]) << PyLong_SHIFT) | (npy_intp)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(npy_intp) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_intp, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_intp) >= 4 * PyLong_SHIFT)) {
                            return (npy_intp) (((((((((npy_intp)digits[3]) << PyLong_SHIFT) | (npy_intp)digits[2]) << PyLong_SHIFT) | (npy_intp)digits[1]) << PyLong_SHIFT) | (npy_intp)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (npy_intp) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(npy_intp) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(npy_intp, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(npy_intp) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(npy_intp, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(npy_intp, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(npy_intp) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_intp, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_intp) - 1 > 2 * PyLong_SHIFT)) {
                            return (npy_intp) (((npy_intp)-1)*(((((npy_intp)digits[1]) << PyLong_SHIFT) | (npy_intp)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(npy_intp) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_intp, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_intp) - 1 > 2 * PyLong_SHIFT)) {
                            return (npy_intp) ((((((npy_intp)digits[1]) << PyLong_SHIFT) | (npy_intp)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(npy_intp) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_intp, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_intp) - 1 > 3 * PyLong_SHIFT)) {
                            return (npy_intp) (((npy_intp)-1)*(((((((npy_intp)digits[2]) << PyLong_SHIFT) | (npy_intp)digits[1]) << PyLong_SHIFT) | (npy_intp)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(npy_intp) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_intp, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_intp) - 1 > 3 * PyLong_SHIFT)) {
                            return (npy_intp) ((((((((npy_intp)digits[2]) << PyLong_SHIFT) | (npy_intp)digits[1]) << PyLong_SHIFT) | (npy_intp)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(npy_intp) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_intp, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_intp) - 1 > 4 * PyLong_SHIFT)) {
                            return (npy_intp) (((npy_intp)-1)*(((((((((npy_intp)digits[3]) << PyLong_SHIFT) | (npy_intp)digits[2]) << PyLong_SHIFT) | (npy_intp)digits[1]) << PyLong_SHIFT) | (npy_intp)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(npy_intp) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_intp, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_intp) - 1 > 4 * PyLong_SHIFT)) {
                            return (npy_intp) ((((((((((npy_intp)digits[3]) << PyLong_SHIFT) | (npy_intp)digits[2]) << PyLong_SHIFT) | (npy_intp)digits[1]) << PyLong_SHIFT) | (npy_intp)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(npy_intp) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(npy_intp, long, PyLong_AsLong(x))
        } else if ((sizeof(npy_intp) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(npy_intp, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        npy_intp val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (npy_intp) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (npy_intp) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (npy_intp) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (npy_intp) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(npy_intp) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((npy_intp) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(npy_intp) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((npy_intp) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((npy_intp) 1) << (sizeof(npy_intp) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (npy_intp) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to npy_intp");
    return (npy_intp) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to npy_intp");
    return (npy_intp) -1;
}

/* FormatTypeName */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
static __Pyx_TypeName
__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp)
{
    PyObject *module = NULL, *name = NULL, *result = NULL;
    #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
    name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_mstate_global->__pyx_n_u_qualname);
    #else
    name = PyType_GetQualName(tp);
    #endif
    if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad;
    module = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_mstate_global->__pyx_n_u_module);
    if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad;
    if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) {
        result = name;
        name = NULL;
        goto done;
    }
    result = PyUnicode_FromFormat("%U.%U", module, name);
    if (unlikely(result == NULL)) goto bad;
  done:
    Py_XDECREF(name);
    Py_XDECREF(module);
    return result;
  bad:
    PyErr_Clear();
    if (name) {
        result = name;
        name = NULL;
    } else {
        result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__15);
    }
    goto done;
}
#endif

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyLong_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (long) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(long) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(long) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
        } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        long val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (long) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (long) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (long) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (long) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((long) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((long) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (long) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* GetRuntimeVersion */
#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
void __Pyx_init_runtime_version(void) {
    if (__Pyx_cached_runtime_version == 0) {
        const char* rt_version = Py_GetVersion();
        unsigned long version = 0;
        unsigned long factor = 0x01000000UL;
        unsigned int digit = 0;
        int i = 0;
        while (factor) {
            while ('0' <= rt_version[i] && rt_version[i] <= '9') {
                digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
                ++i;
            }
            version += factor * digit;
            if (rt_version[i] != '.')
                break;
            digit = 0;
            factor >>= 8;
            ++i;
        }
        __Pyx_cached_runtime_version = version;
    }
}
#endif
static unsigned long __Pyx_get_runtime_version(void) {
#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
    return Py_Version & ~0xFFUL;
#else
    return __Pyx_cached_runtime_version;
#endif
}

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
    const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
    if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
        return 0;
    if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
        return 1;
    {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compile time Python version %d.%d "
                      "of module '%.100s' "
                      "%s "
                      "runtime version %d.%d",
                       (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
                       __Pyx_MODULE_NAME,
                       (allow_newer) ? "was newer than" : "does not match",
                       (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
       );
        return PyErr_WarnEx(NULL, message, 1);
    }
}

/* NewCodeObj */
#if CYTHON_COMPILING_IN_LIMITED_API
    static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
                                       PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                       PyObject *fv, PyObject *cell, PyObject* fn,
                                       PyObject *name, int fline, PyObject *lnos) {
        PyObject *exception_table = NULL;
        PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
        #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
        PyObject *version_info;
        PyObject *py_minor_version = NULL;
        #endif
        long minor_version = 0;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
        minor_version = 11;
        #else
        if (!(version_info = PySys_GetObject("version_info"))) goto end;
        if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
        minor_version = PyLong_AsLong(py_minor_version);
        Py_DECREF(py_minor_version);
        if (minor_version == -1 && PyErr_Occurred()) goto end;
        #endif
        if (!(types_module = PyImport_ImportModule("types"))) goto end;
        if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
        if (minor_version <= 7) {
            (void)p;
            result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else if (minor_version <= 10) {
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else {
            if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
        }
    end:
        Py_XDECREF(code_type);
        Py_XDECREF(exception_table);
        Py_XDECREF(types_module);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return result;
    }
#elif PY_VERSION_HEX >= 0x030B0000
  static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
                                         PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                         PyObject *fv, PyObject *cell, PyObject* fn,
                                         PyObject *name, int fline, PyObject *lnos) {
    PyCodeObject *result;
    result =
      #if PY_VERSION_HEX >= 0x030C0000
        PyUnstable_Code_NewWithPosOnlyArgs
      #else
        PyCode_NewWithPosOnlyArgs
      #endif
        (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
    if (likely(result))
        result->_co_firsttraceable = 0;
    #endif
    return result;
  }
#elif !CYTHON_COMPILING_IN_PYPY
  #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx__PyCode_New(a, p, 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
static PyObject* __Pyx_PyCode_New(
        const __Pyx_PyCode_New_function_description descr,
        PyObject * const *varnames,
        PyObject *filename,
        PyObject *funcname,
        PyObject *line_table,
        PyObject *tuple_dedup_map
) {
    PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL;
    Py_ssize_t var_count = (Py_ssize_t) descr.nlocals;
    PyObject *varnames_tuple = PyTuple_New(var_count);
    if (unlikely(!varnames_tuple)) return NULL;
    for (Py_ssize_t i=0; i < var_count; i++) {
        Py_INCREF(varnames[i]);
        if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done;
    }
    #if CYTHON_COMPILING_IN_LIMITED_API
    varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple);
    if (!varnames_tuple_dedup) {
        if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done;
        varnames_tuple_dedup = varnames_tuple;
    }
    #else
    varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple);
    if (unlikely(!varnames_tuple_dedup)) goto done;
    #endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(varnames_tuple_dedup);
    #endif
    if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) {
        Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(line_table_length == -1)) goto done;
        #endif
        Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL;
        code_bytes = PyBytes_FromStringAndSize(NULL, code_len);
        if (unlikely(!code_bytes)) goto done;
        char* c_code_bytes = PyBytes_AsString(code_bytes);
        if (unlikely(!c_code_bytes)) goto done;
        memset(c_code_bytes, 0, (size_t) code_len);
    }
    code_obj = (PyObject*) __Pyx__PyCode_New(
        (int) descr.argcount,
        (int) descr.num_posonly_args,
        (int) descr.num_kwonly_args,
        (int) descr.nlocals,
        0,
        (int) descr.flags,
        code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes,
        __pyx_mstate_global->__pyx_empty_tuple,
        __pyx_mstate_global->__pyx_empty_tuple,
        varnames_tuple_dedup,
        __pyx_mstate_global->__pyx_empty_tuple,
        __pyx_mstate_global->__pyx_empty_tuple,
        filename,
        funcname,
        (int) descr.first_line,
        (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes
    );
done:
    Py_XDECREF(code_bytes);
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(varnames_tuple_dedup);
    #endif
    Py_DECREF(varnames_tuple);
    return code_obj;
}

/* DecompressString */
static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) {
    PyObject *module, *decompress, *compressed_bytes, *decompressed;
    const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib";
    PyObject *methodname = PyUnicode_FromString("decompress");
    if (unlikely(!methodname)) return NULL;
    #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
    if (algo == 3) {
        PyObject *fromlist = Py_BuildValue("[O]", methodname);
        if (unlikely(!fromlist)) return NULL;
        module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
    } else
    #endif
        module = PyImport_ImportModule(module_name);
    if (unlikely(!module)) goto import_failed;
    decompress = PyObject_GetAttr(module, methodname);
    if (unlikely(!decompress)) goto import_failed;
    {
        #ifdef __cplusplus
            char *memview_bytes = const_cast<char*>(s);
        #else
            #if defined(__clang__)
              #pragma clang diagnostic push
              #pragma clang diagnostic ignored "-Wcast-qual"
            #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
              #pragma GCC diagnostic push
              #pragma GCC diagnostic ignored "-Wcast-qual"
            #endif
            char *memview_bytes = (char*) s;
            #if defined(__clang__)
              #pragma clang diagnostic pop
            #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
              #pragma GCC diagnostic pop
            #endif
        #endif
        #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ)
        int memview_flags = 0x100;
        #else
        int memview_flags = PyBUF_READ;
        #endif
        compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags);
    }
    if (unlikely(!compressed_bytes)) {
        Py_DECREF(decompress);
        goto bad;
    }
    decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL);
    Py_DECREF(compressed_bytes);
    Py_DECREF(decompress);
    Py_DECREF(module);
    Py_DECREF(methodname);
    return decompressed;
import_failed:
    PyErr_Format(PyExc_ImportError,
        "Failed to import '%.20s.decompress' - cannot initialise module strings. "
        "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.",
        module_name, algo);
bad:
    Py_XDECREF(module);
    Py_DECREF(methodname);
    return NULL;
}

#include <string.h>
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
    size_t len = strlen(s);
    if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
        PyErr_SetString(PyExc_OverflowError, "byte string is too long");
        return -1;
    }
    return (Py_ssize_t) len;
}
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return PyByteArray_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if CYTHON_COMPILING_IN_LIMITED_API
    {
        const char* result;
        Py_ssize_t unicode_length;
        CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
        if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL;
        #else
        result = PyUnicode_AsUTF8AndSize(o, length);
        #endif
        #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        unicode_length = PyUnicode_GetLength(o);
        if (unlikely(unicode_length < 0)) return NULL;
        if (unlikely(unicode_length != *length)) {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
        #endif
        return result;
    }
#else
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
#endif
}
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
    if (PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
    if (PyByteArray_Check(o)) {
#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)))
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
#else
        *length = PyByteArray_Size(o);
        if (*length == -1) return NULL;
        return PyByteArray_AsString(o);
#endif
    } else
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) {
    __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result));
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ").  "
                "The ability to return an instance of a strict subclass of int is deprecated, "
                "and may be removed in a future version of Python.",
                result_type_name)) {
            __Pyx_DECREF_TypeName(result_type_name);
            Py_DECREF(result);
            return NULL;
        }
        __Pyx_DECREF_TypeName(result_type_name);
        return result;
    }
    PyErr_Format(PyExc_TypeError,
                 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")",
                 result_type_name);
    __Pyx_DECREF_TypeName(result_type_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  PyObject *res = NULL;
  if (likely(PyLong_Check(x)))
      return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  if (likely(m && m->nb_int)) {
      res = m->nb_int(x);
  }
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
      res = PyNumber_Long(x);
  }
#endif
  if (likely(res)) {
      if (unlikely(!PyLong_CheckExact(res))) {
          return __Pyx_PyNumber_LongWrongResultType(res);
      }
  }
  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;
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(__Pyx_PyLong_IsCompact(b))) {
        return __Pyx_PyLong_CompactValue(b);
    } else {
      const digit* digits = __Pyx_PyLong_Digits(b);
      const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyLong_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyLong_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) {
    CYTHON_UNUSED_VAR(b);
    return __Pyx_NewRef(Py_None);
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return __Pyx_NewRef(b ? Py_True: Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) {
    return PyLong_FromSize_t(ival);
}


/* MultiPhaseInitModuleState */
#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000)
  #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1
#else
  #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0
#endif
#endif
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS
#error "Module state with PEP489 requires atomics. Currently that's one of\
 C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics"
#endif
#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
#define __Pyx_ModuleStateLookup_Lock()
#define __Pyx_ModuleStateLookup_Unlock()
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
static PyMutex __Pyx_ModuleStateLookup_mutex = {0};
#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(__cplusplus) && __cplusplus >= 201103L
#include <mutex>
static std::mutex __Pyx_ModuleStateLookup_mutex;
#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock()
#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock()
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__)
#include <threads.h>
static mtx_t __Pyx_ModuleStateLookup_mutex;
static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT;
static void __Pyx_ModuleStateLookup_initialize_mutex(void) {
    mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain);
}
#define __Pyx_ModuleStateLookup_Lock()\
  call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\
  mtx_lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(HAVE_PTHREAD_H)
#include <pthread.h>
static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER;
#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(_WIN32)
#include <Windows.h>  // synchapi.h on its own doesn't work
static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT;
#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
#else
#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\
 Requires C standard >= C11, or C++ standard >= C++11,\
 or pthreads, or the Windows 32 API, or Python >= 3.13."
#endif
typedef struct {
    int64_t id;
    PyObject *module;
} __Pyx_InterpreterIdAndModule;
typedef struct {
    char interpreter_id_as_index;
    Py_ssize_t count;
    Py_ssize_t allocated;
    __Pyx_InterpreterIdAndModule table[1];
} __Pyx_ModuleStateLookupData;
#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0;
#endif
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0;
#else
static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL;
#endif
static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound(
        __Pyx_InterpreterIdAndModule* table,
        Py_ssize_t count,
        int64_t interpreterId) {
    __Pyx_InterpreterIdAndModule* begin = table;
    __Pyx_InterpreterIdAndModule* end = begin + count;
    if (begin->id == interpreterId) {
        return begin;
    }
    while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
        __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2;
        if (halfway->id == interpreterId) {
            return halfway;
        }
        if (halfway->id < interpreterId) {
            begin = halfway;
        } else {
            end = halfway;
        }
    }
    for (; begin < end; ++begin) {
        if (begin->id >= interpreterId) return begin;
    }
    return begin;
}
static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return NULL;
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
    {
        __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
        if (likely(data)) {
            __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data);
            if (likely(data == new_data)) {
                goto read_finished;
            }
        }
        __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
        __Pyx_ModuleStateLookup_Lock();
        __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter);
        data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
        __Pyx_ModuleStateLookup_Unlock();
    }
  read_finished:;
#else
    __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data;
#endif
    __Pyx_InterpreterIdAndModule* found = NULL;
    if (unlikely(!data)) goto end;
    if (data->interpreter_id_as_index) {
        if (interpreter_id < data->count) {
            found = data->table+interpreter_id;
        }
    } else {
        found = __Pyx_State_FindModuleStateLookupTableLowerBound(
            data->table, data->count, interpreter_id);
    }
  end:
    {
        PyObject *result=NULL;
        if (found && found->id == interpreter_id) {
            result = found->module;
        }
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
        __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
#endif
        return result;
    }
}
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) {
    while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0);
}
#else
#define __Pyx_ModuleStateLookup_wait_until_no_readers()
#endif
static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) {
    Py_ssize_t to_allocate = (*old_data)->allocated;
    while (to_allocate <= interpreter_id) {
        if (to_allocate == 0) to_allocate = 1;
        else to_allocate *= 2;
    }
    __Pyx_ModuleStateLookupData *new_data = *old_data;
    if (to_allocate != (*old_data)->allocated) {
         new_data = (__Pyx_ModuleStateLookupData *)realloc(
            *old_data,
            sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
        if (!new_data) {
            PyErr_NoMemory();
            return -1;
        }
        for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) {
            new_data->table[i].id = i;
            new_data->table[i].module = NULL;
        }
        new_data->allocated = to_allocate;
    }
    new_data->table[interpreter_id].module = module;
    if (new_data->count < interpreter_id+1) {
        new_data->count = interpreter_id+1;
    }
    *old_data = new_data;
    return 0;
}
static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) {
    __Pyx_InterpreterIdAndModule *read = data->table;
    __Pyx_InterpreterIdAndModule *write = data->table;
    __Pyx_InterpreterIdAndModule *end = read + data->count;
    for (; read<end; ++read) {
        if (read->module) {
            write->id = read->id;
            write->module = read->module;
            ++write;
        }
    }
    data->count = write - data->table;
    for (; write<end; ++write) {
        write->id = 0;
        write->module = NULL;
    }
    data->interpreter_id_as_index = 0;
}
static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return -1;
    int result = 0;
    __Pyx_ModuleStateLookup_Lock();
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *)
            __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
#else
    __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data;
#endif
    __Pyx_ModuleStateLookupData *new_data = old_data;
    if (!new_data) {
        new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData));
        if (!new_data) {
            result = -1;
            PyErr_NoMemory();
            goto end;
        }
        new_data->allocated = 1;
        new_data->interpreter_id_as_index = 1;
    }
    __Pyx_ModuleStateLookup_wait_until_no_readers();
    if (new_data->interpreter_id_as_index) {
        if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
            result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id);
            goto end;
        }
        __Pyx_State_ConvertFromInterpIdAsIndex(new_data);
    }
    {
        Py_ssize_t insert_at = 0;
        {
            __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
                new_data->table, new_data->count, interpreter_id);
            assert(lower_bound);
            insert_at = lower_bound - new_data->table;
            if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) {
                lower_bound->module = module;
                goto end;  // already in table, nothing more to do
            }
        }
        if (new_data->count+1 >= new_data->allocated) {
            Py_ssize_t to_allocate = (new_data->count+1)*2;
            new_data =
                (__Pyx_ModuleStateLookupData*)realloc(
                    new_data,
                    sizeof(__Pyx_ModuleStateLookupData) +
                    (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
            if (!new_data) {
                result = -1;
                new_data = old_data;
                PyErr_NoMemory();
                goto end;
            }
            new_data->allocated = to_allocate;
        }
        ++new_data->count;
        int64_t last_id = interpreter_id;
        PyObject *last_module = module;
        for (Py_ssize_t i=insert_at; i<new_data->count; ++i) {
            int64_t current_id = new_data->table[i].id;
            new_data->table[i].id = last_id;
            last_id = current_id;
            PyObject *current_module = new_data->table[i].module;
            new_data->table[i].module = last_module;
            last_module = current_module;
        }
    }
  end:
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data);
#else
    __Pyx_ModuleStateLookup_data = new_data;
#endif
    __Pyx_ModuleStateLookup_Unlock();
    return result;
}
static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return -1;
    __Pyx_ModuleStateLookup_Lock();
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *)
            __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
#else
    __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data;
#endif
    if (data->interpreter_id_as_index) {
        if (interpreter_id < data->count) {
            data->table[interpreter_id].module = NULL;
        }
        goto done;
    }
    {
        __Pyx_ModuleStateLookup_wait_until_no_readers();
        __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
            data->table, data->count, interpreter_id);
        if (!lower_bound) goto done;
        if (lower_bound->id != interpreter_id) goto done;
        __Pyx_InterpreterIdAndModule *end = data->table+data->count;
        for (;lower_bound<end-1; ++lower_bound) {
            lower_bound->id = (lower_bound+1)->id;
            lower_bound->module = (lower_bound+1)->module;
        }
    }
    --data->count;
    if (data->count == 0) {
        free(data);
        data = NULL;
    }
  done:
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data);
#else
    __Pyx_ModuleStateLookup_data = data;
#endif
    __Pyx_ModuleStateLookup_Unlock();
    return 0;
}
#endif

/* #### Code section: utility_code_pragmas_end ### */
#ifdef _MSC_VER
#pragma warning( pop )
#endif



/* #### Code section: end ### */
#endif /* Py_PYTHON_H */
