/* Generated by Cython 3.0.8 */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
#if defined(CYTHON_LIMITED_API) && 0
  #ifndef Py_LIMITED_API
    #if CYTHON_LIMITED_API+0 > 0x03030000
      #define Py_LIMITED_API CYTHON_LIMITED_API
    #else
      #define Py_LIMITED_API 0x03030000
    #endif
  #endif
#endif

#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.7+ or Python 3.3+.
#else
#if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API
#define __PYX_EXTRA_ABI_MODULE_NAME "limited"
#else
#define __PYX_EXTRA_ABI_MODULE_NAME ""
#endif
#define CYTHON_ABI "3_0_8" __PYX_EXTRA_ABI_MODULE_NAME
#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
#define CYTHON_HEX_VERSION 0x030008F0
#define CYTHON_FUTURE_DIVISION 1
#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 HAVE_LONG_LONG
  #define HAVE_LONG_LONG
#endif
#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_NOGIL 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
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #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_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 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 (PY_MAJOR_VERSION >= 3)
  #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_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 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 0
  #endif
#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_NOGIL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #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_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 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 (PY_MAJOR_VERSION >= 3)
  #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_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00)
  #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
#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_NOGIL 0
  #undef CYTHON_CLINE_IN_TRACEBACK
  #define CYTHON_CLINE_IN_TRACEBACK 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_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 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
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 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 0
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 1
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #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
#elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #ifndef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #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_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #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
#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
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef 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
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0 || 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
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_GIL
    #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6)
  #endif
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1)
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #if PY_VERSION_HEX < 0x03050000
    #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
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #if PY_VERSION_HEX < 0x030400a1
    #undef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #elif !defined(CYTHON_USE_TP_FINALIZE)
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #if PY_VERSION_HEX < 0x030600B1
    #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)
  #endif
  #if PY_VERSION_HEX < 0x030700A3
    #undef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 0
  #elif !defined(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
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if !defined(CYTHON_VECTORCALL)
#define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1)
#endif
#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1)
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_MAJOR_VERSION < 3
    #include "longintrepr.h"
  #endif
  #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
#  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)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
            typedef unsigned char     uint8_t;
            typedef unsigned short    uint16_t;
            typedef unsigned int      uint32_t;
        #else
            typedef unsigned __int8   uint8_t;
            typedef unsigned __int16  uint16_t;
            typedef unsigned __int32  uint32_t;
        #endif
    #endif
    #if _MSC_VER < 1300
        #ifdef _WIN64
            typedef unsigned long long  __pyx_uintptr_t;
        #else
            typedef unsigned int        __pyx_uintptr_t;
        #endif
    #else
        #ifdef _WIN64
            typedef unsigned __int64    __pyx_uintptr_t;
        #else
            typedef unsigned __int32    __pyx_uintptr_t;
        #endif
    #endif
#else
    #include <stdint.h>
    typedef uintptr_t  __pyx_uintptr_t;
#endif
#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
#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 >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000)
#else
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000)
#endif
#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))

#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

#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_DefaultClassType PyClass_Type
  #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)
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_DefaultClassType PyType_Type
#if CYTHON_COMPILING_IN_LIMITED_API
    static CYTHON_INLINE 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, "iiiiiOOOOOOiOO", 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, "iiiiiiOOOOOOiOO", 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, "iiiiiiOOOOOOOiOO", 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;
    }
    #ifndef CO_OPTIMIZED
    #define CO_OPTIMIZED 0x0001
    #endif
    #ifndef CO_NEWLOCALS
    #define CO_NEWLOCALS 0x0002
    #endif
    #ifndef CO_VARARGS
    #define CO_VARARGS 0x0004
    #endif
    #ifndef CO_VARKEYWORDS
    #define CO_VARKEYWORDS 0x0008
    #endif
    #ifndef CO_ASYNC_GENERATOR
    #define CO_ASYNC_GENERATOR 0x0200
    #endif
    #ifndef CO_GENERATOR
    #define CO_GENERATOR 0x0020
    #endif
    #ifndef CO_COROUTINE
    #define CO_COROUTINE 0x0080
    #endif
#elif PY_VERSION_HEX >= 0x030B0000
  static CYTHON_INLINE 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;
    PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0);
    if (!empty_bytes) return NULL;
    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, empty_bytes);
    Py_DECREF(empty_bytes);
    return result;
  }
#elif PY_VERSION_HEX >= 0x030800B2 && !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
#endif
#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 CO_COROUTINE
  #define CO_COROUTINE 0x80
#endif
#ifndef CO_ASYNC_GENERATOR
  #define CO_ASYNC_GENERATOR 0x200
#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 METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(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
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#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))
#elif CYTHON_BACKPORT_VECTORCALL
  typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args,
                                            size_t nargsf, PyObject *kwnames);
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  ((size_t)1 << (8 * sizeof(size_t) - 1))
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET))
#else
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  0
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(n))
#endif
#if PY_MAJOR_VERSION >= 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) {
#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 __PYX_LIMITED_VERSION_HEX < 0x030900B1
  #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_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_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()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
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;
}
#endif
#define __Pyx_PyObject_GetSlot(obj, name, func_ctype)  __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype)
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((func_ctype) PyType_GetSlot((type), Py_##name))
#else
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((type)->name)
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if PY_MAJOR_VERSION < 3
    #if CYTHON_COMPILING_IN_PYPY
        #if PYPY_VERSION_NUM < 0x07030600
            #if defined(__cplusplus) && __cplusplus >= 201402L
                [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]]
            #elif defined(__GNUC__) || defined(__clang__)
                __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")))
            #elif defined(_MSC_VER)
                __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))
            #endif
            static CYTHON_INLINE int PyGILState_Check(void) {
                return 0;
            }
        #else  // PYPY_VERSION_NUM < 0x07030600
        #endif  // PYPY_VERSION_NUM < 0x07030600
    #else
        static CYTHON_INLINE int PyGILState_Check(void) {
            PyThreadState * tstate = _PyThreadState_Current;
            return tstate && (tstate == PyGILState_GetThisThreadState());
        }
    #endif
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && 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 PY_MAJOR_VERSION >= 3 && (!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)
  #define __Pyx_PyObject_GetIterNextFunc(obj)  (Py_TYPE(obj)->tp_iternext)
#else
  #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
  #define __Pyx_PyType_HasFeature(type, feature)  PyType_HasFeature(type, feature)
  #define __Pyx_PyObject_GetIterNextFunc(obj)  PyIter_Next
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v)
#else
  #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v)
#endif
#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000
#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 CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GetLength(u)
  #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))
#elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #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_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #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
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U)
  #define __Pyx_PyUnicode_KIND(u)         ((int)sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#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) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500)
    #undef 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_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#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 PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#if 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
#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_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
  #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)
#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_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
  #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)
#endif
#if PY_VERSION_HEX >= 0x030d00A1
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#else
  static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *module = PyImport_AddModule(name);
      Py_XINCREF(module);
      return module;
  }
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define __Pyx_Py3Int_Check(op)       PyLong_Check(op)
  #define __Pyx_Py3Int_CheckExact(op)  PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#else
  #define __Pyx_Py3Int_Check(op)       (PyLong_Check(op) || PyInt_Check(op))
  #define __Pyx_Py3Int_CheckExact(op)  (PyLong_CheckExact(op) || PyInt_CheckExact(op))
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
  #if !defined(_USE_MATH_DEFINES)
    #define _USE_MATH_DEFINES
  #endif
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#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; }
#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__pysdif___pysdif
#define __PYX_HAVE_API__pysdif___pysdif
/* Early includes */
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "sdif.h"
#include "string.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"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

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

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

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#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 PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_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_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_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const wchar_t *u)
{
    const wchar_t *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#else
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
{
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#endif
#define __Pyx_PyUnicode_FromOrdinal(o)       PyUnicode_FromOrdinal((int)o)
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
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_IntOrLong(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_PyInt_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))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#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 PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
#include <string.h>
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = (char) c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#include <string.h>
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#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__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_m = NULL;
#endif
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __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 *__pyx_f[] = {
  "pysdif/_pysdif.pyx",
  "<stringsource>",
  "__init__.cython-30.pxd",
  "type.pxd",
};
/* #### Code section: utility_code_proto_before_types ### */
/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

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

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":730
 * # 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;

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":731
 * 
 * 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;

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":732
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int64      int64_t
 * #ctypedef npy_int96      int96_t
 */
typedef npy_int32 __pyx_t_5numpy_int32_t;

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":733
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_int96      int96_t
 * #ctypedef npy_int128     int128_t
 */
typedef npy_int64 __pyx_t_5numpy_int64_t;

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":737
 * #ctypedef npy_int128     int128_t
 * 
 * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 */
typedef npy_uint8 __pyx_t_5numpy_uint8_t;

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":738
 * 
 * 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;

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":739
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint64     uint64_t
 * #ctypedef npy_uint96     uint96_t
 */
typedef npy_uint32 __pyx_t_5numpy_uint32_t;

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":740
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_uint96     uint96_t
 * #ctypedef npy_uint128    uint128_t
 */
typedef npy_uint64 __pyx_t_5numpy_uint64_t;

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":744
 * #ctypedef npy_uint128    uint128_t
 * 
 * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_float64    float64_t
 * #ctypedef npy_float80    float80_t
 */
typedef npy_float32 __pyx_t_5numpy_float32_t;

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":745
 * 
 * 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;

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":754
 * # The int types are mapped a bit surprising --
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   longlong_t
 * 
 */
typedef npy_long __pyx_t_5numpy_int_t;

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":755
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_ulong      uint_t
 */
typedef npy_longlong __pyx_t_5numpy_longlong_t;

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":757
 * ctypedef npy_longlong   longlong_t
 * 
 * ctypedef npy_ulong      uint_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 */
typedef npy_ulong __pyx_t_5numpy_uint_t;

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":758
 * 
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_intp       intp_t
 */
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":760
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uintp      uintp_t
 * 
 */
typedef npy_intp __pyx_t_5numpy_intp_t;

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":761
 * 
 * ctypedef npy_intp       intp_t
 * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_double     float_t
 */
typedef npy_uintp __pyx_t_5numpy_uintp_t;

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":763
 * 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;

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":764
 * 
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longdouble longdouble_t
 * 
 */
typedef npy_double __pyx_t_5numpy_double_t;

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":765
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cfloat      cfloat_t
 */
typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
/* #### 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);

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

/*--- Type declarations ---*/
struct __pyx_obj_6pysdif_7_pysdif_StreamID;
struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition;
struct __pyx_obj_6pysdif_7_pysdif_Component;
struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition;
struct __pyx_obj_6pysdif_7_pysdif_Matrix;
struct __pyx_obj_6pysdif_7_pysdif_FrameR;
struct __pyx_obj_6pysdif_7_pysdif_FrameW;
struct __pyx_obj_6pysdif_7_pysdif_SdifFile;
struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct__genexpr;
struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr;

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":767
 * ctypedef npy_longdouble longdouble_t
 * 
 * ctypedef npy_cfloat      cfloat_t             # <<<<<<<<<<<<<<
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t
 */
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":768
 * 
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t             # <<<<<<<<<<<<<<
 * ctypedef npy_clongdouble clongdouble_t
 * 
 */
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":769
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cdouble     complex_t
 */
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":771
 * ctypedef npy_clongdouble clongdouble_t
 * 
 * ctypedef npy_cdouble     complex_t             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 */
typedef npy_cdouble __pyx_t_5numpy_complex_t;
struct __pyx_opt_args_6pysdif_7_pysdif_FrameW_new;

/* "pysdif/_pysdif.pyx":575
 * 
 * # enums to keep state of reading
 * cdef enum MatrixStatusE:             # <<<<<<<<<<<<<<
 *     eMatrixInvalid,
 *     eMatrixNothingRead,
 */
enum __pyx_t_6pysdif_7_pysdif_MatrixStatusE {
  __pyx_e_6pysdif_7_pysdif_eMatrixInvalid,
  __pyx_e_6pysdif_7_pysdif_eMatrixNothingRead,
  __pyx_e_6pysdif_7_pysdif_eMatrixHeaderRead,
  __pyx_e_6pysdif_7_pysdif_eMatrixDataRead,
  __pyx_e_6pysdif_7_pysdif_eMatrixDataSkipped,
  __pyx_e_6pysdif_7_pysdif_eMatrixOffline
};

/* "pysdif/_pysdif.pyx":583
 *     eMatrixOffline
 * 
 * cdef enum FrameStatusE:             # <<<<<<<<<<<<<<
 *     eFrameInvalid,
 *     eFrameNothingRead,
 */
enum __pyx_t_6pysdif_7_pysdif_FrameStatusE {
  __pyx_e_6pysdif_7_pysdif_eFrameInvalid,
  __pyx_e_6pysdif_7_pysdif_eFrameNothingRead,
  __pyx_e_6pysdif_7_pysdif_eFrameHeaderRead,
  __pyx_e_6pysdif_7_pysdif_eFrameSomeDataRead,
  __pyx_e_6pysdif_7_pysdif_eFrameAllDataRead,
  __pyx_e_6pysdif_7_pysdif_eFrameSignatureRead
};

/* "pysdif/_pysdif.pyx":591
 *     eFrameSignatureRead
 * 
 * cdef enum SdifStatusE:             # <<<<<<<<<<<<<<
 *     eSdifNothing,
 *     eSdifGeneralHeader,
 */
enum __pyx_t_6pysdif_7_pysdif_SdifStatusE {
  __pyx_e_6pysdif_7_pysdif_eSdifNothing,
  __pyx_e_6pysdif_7_pysdif_eSdifGeneralHeader,
  __pyx_e_6pysdif_7_pysdif_eSdifAllASCIIChunks,
  __pyx_e_6pysdif_7_pysdif_eSdifSignature,
  __pyx_e_6pysdif_7_pysdif_eSdifFrameHeader,
  __pyx_e_6pysdif_7_pysdif_eSdifMatrixHeader,
  __pyx_e_6pysdif_7_pysdif_eSdifMatrixData
};

/* "pysdif/_pysdif.pyx":32
 *     void import_array()
 * 
 * ctypedef char* charptr             # <<<<<<<<<<<<<<
 * 
 * import os.path
 */
typedef char *__pyx_t_6pysdif_7_pysdif_charptr;

/* "pysdif/_pysdif.pyx":1075
 * 
 * 
 * cdef FrameW FrameW_new(SdifFile sdiffile, SdifSignature sig,             # <<<<<<<<<<<<<<
 *                        SdifFloat8 time, SdifUInt4 streamID=0):
 *     cdef FrameW f = FrameW()
 */
struct __pyx_opt_args_6pysdif_7_pysdif_FrameW_new {
  int __pyx_n;
  SdifUInt4 streamID;
};

/* "pysdif/_pysdif.pyx":251
 *     return streams
 * 
 * cdef class StreamID:             # <<<<<<<<<<<<<<
 *     cdef SdifStreamIDT *this
 *     cdef int own_this
 */
struct __pyx_obj_6pysdif_7_pysdif_StreamID {
  PyObject_HEAD
  SdifStreamIDT *this;
  int own_this;
};


/* "pysdif/_pysdif.pyx":331
 *         raise TypeError("s should be either a str or bytes, got {}".format(type(s)))
 * 
 * cdef class MatrixTypeDefinition:             # <<<<<<<<<<<<<<
 *     cdef public bytes signature
 *     cdef public list column_names
 */
struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition {
  PyObject_HEAD
  struct __pyx_vtabstruct_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_vtab;
  PyObject *signature;
  PyObject *column_names;
};


/* "pysdif/_pysdif.pyx":375
 *     return out
 * 
 * cdef class Component:             # <<<<<<<<<<<<<<
 *     cdef readonly bytes signature
 *     cdef readonly bytes name
 */
struct __pyx_obj_6pysdif_7_pysdif_Component {
  PyObject_HEAD
  PyObject *signature;
  PyObject *name;
  unsigned int num;
};


/* "pysdif/_pysdif.pyx":414
 *     return out
 * 
 * cdef class FrameTypeDefinition:             # <<<<<<<<<<<<<<
 *     cdef readonly bytes signature
 *     cdef readonly list components
 */
struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition {
  PyObject_HEAD
  PyObject *signature;
  PyObject *components;
};


/* "pysdif/_pysdif.pyx":641
 * # -----------------------------------------------------------------------------------------------
 * 
 * cdef class Matrix:             # <<<<<<<<<<<<<<
 *     """
 *     Matrix is a placeholder class to iterate through data while reading a SdifFile
 */
struct __pyx_obj_6pysdif_7_pysdif_Matrix {
  PyObject_HEAD
  SdifFileT *source_this;
  struct __pyx_obj_6pysdif_7_pysdif_SdifFile *source;
  PyArrayObject *data;
  SdifSignature _signature;
  enum __pyx_t_6pysdif_7_pysdif_MatrixStatusE _status;
  int _valid;
};


/* "pysdif/_pysdif.pyx":571
 * 
 * # Forward declarations
 * cdef class FrameR             # <<<<<<<<<<<<<<
 * cdef class SdifFile
 * 
 */
struct __pyx_obj_6pysdif_7_pysdif_FrameR {
  PyObject_HEAD
  SdifFrameHeaderT *header;
  struct __pyx_obj_6pysdif_7_pysdif_SdifFile *source;
  SdifFileT *source_this;
};


/* "pysdif/_pysdif.pyx":951
 * 
 * 
 * cdef class FrameW:             # <<<<<<<<<<<<<<
 *     """
 *     Class to write frames to a SdifFile
 */
struct __pyx_obj_6pysdif_7_pysdif_FrameW {
  PyObject_HEAD
  struct __pyx_obj_6pysdif_7_pysdif_SdifFile *sdiffile;
  SdifSignature signature;
  SdifFloat8 time;
  SdifUInt4 streamID;
  SdifSignature signatures[0x64];
  int datatypes[0x64];
  PyObject *matrices;
  SdifUInt4 frame_size;
  SdifUInt4 num_matrices;
  int _written;
};


/* "pysdif/_pysdif.pyx":572
 * # Forward declarations
 * cdef class FrameR
 * cdef class SdifFile             # <<<<<<<<<<<<<<
 * 
 * # enums to keep state of reading
 */
struct __pyx_obj_6pysdif_7_pysdif_SdifFile {
  PyObject_HEAD
  struct __pyx_vtabstruct_6pysdif_7_pysdif_SdifFile *__pyx_vtab;
  SdifFileT *this;
  int eof;
  struct __pyx_obj_6pysdif_7_pysdif_FrameR *frame;
  struct __pyx_obj_6pysdif_7_pysdif_Matrix *matrix;
  enum __pyx_t_6pysdif_7_pysdif_FrameStatusE frame_status;
  int matrix_idx;
  enum __pyx_t_6pysdif_7_pysdif_MatrixStatusE matrix_status;
  enum __pyx_t_6pysdif_7_pysdif_SdifStatusE write_status;
  PyObject *_frametypes_defined;
  PyObject *_matrixtypes_defined;
};


/* "pysdif/_pysdif.pyx":429
 *         assert len(signature) == 4
 *         assert isinstance(components, list)
 *         assert all(isinstance(c, Component) for c in components)             # <<<<<<<<<<<<<<
 *         self.signature = asbytes(signature)
 *         self.components = components
 */
struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct__genexpr {
  PyObject_HEAD
  PyObject *__pyx_genexpr_arg_0;
  PyObject *__pyx_v_c;
};


/* "pysdif/_pysdif.pyx":2097
 * 
 *         if signatures_to_clone is not None:
 *             sigs = set(asbytes(sig) for sig in signatures_to_clone)             # <<<<<<<<<<<<<<
 *         for frame0 in source:
 *             if signatures_to_clone is None or frame0.signature in sigs:
 */
struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr {
  PyObject_HEAD
  PyObject *__pyx_genexpr_arg_0;
  PyObject *__pyx_v_sig;
};



/* "pysdif/_pysdif.pyx":331
 *         raise TypeError("s should be either a str or bytes, got {}".format(type(s)))
 * 
 * cdef class MatrixTypeDefinition:             # <<<<<<<<<<<<<<
 *     cdef public bytes signature
 *     cdef public list column_names
 */

struct __pyx_vtabstruct_6pysdif_7_pysdif_MatrixTypeDefinition {
  SdifMatrixTypeT *(*toSdifMatrixType)(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *);
};
static struct __pyx_vtabstruct_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_vtabptr_6pysdif_7_pysdif_MatrixTypeDefinition;


/* "pysdif/_pysdif.pyx":1091
 * # -----------------------------------------------------------------------------------------------
 * 
 * cdef class SdifFile:             # <<<<<<<<<<<<<<
 *     """
 *     This is a wrapper around a SdifFileT c-struct (`sdif.h`)
 */

struct __pyx_vtabstruct_6pysdif_7_pysdif_SdifFile {
  void (*init_read)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *);
  void (*init_containers)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *);
  void (*init_write)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *);
  int (*curr_matrix_numerical_signature)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *);
  int (*_frame_read_header)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *);
  int (*_read_signature)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *, int __pyx_skip_dispatch);
  size_t (*_read_matrix_header)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *);
  int (*_matrix_read_data)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *);
  int (*_finalize_matrix)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *);
  void (*_next_frame)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *);
  int (*_frame_skip_rest)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *);
  int (*_finalize_frame)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *);
  void (*reinit)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *);
};
static struct __pyx_vtabstruct_6pysdif_7_pysdif_SdifFile *__pyx_vtabptr_6pysdif_7_pysdif_SdifFile;
static CYTHON_INLINE size_t __pyx_f_6pysdif_7_pysdif_8SdifFile__read_matrix_header(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *);
static CYTHON_INLINE int __pyx_f_6pysdif_7_pysdif_8SdifFile__matrix_read_data(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *);
static CYTHON_INLINE int __pyx_f_6pysdif_7_pysdif_8SdifFile__finalize_matrix(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *);
static CYTHON_INLINE void __pyx_f_6pysdif_7_pysdif_8SdifFile__next_frame(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *);
static CYTHON_INLINE int __pyx_f_6pysdif_7_pysdif_8SdifFile__finalize_frame(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *);
/* #### 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;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
          }
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__))
  #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext()
#endif
  #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 */
#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 */
#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 */
#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 */
#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 */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

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

/* GetTopmostException.proto */
#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

/* 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)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (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)

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

/* PyObjectCall.proto */
#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

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

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

/* IncludeStringH.proto */
#include <string.h>

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

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

/* fastcall.proto */
#if CYTHON_AVOID_BORROWED_REFS
    #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i)
#elif CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i)
#else
    #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i)
#endif
#if CYTHON_AVOID_BORROWED_REFS
    #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg)
    #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg)
#else
    #define __Pyx_Arg_NewRef_VARARGS(arg) arg
    #define __Pyx_Arg_XDECREF_VARARGS(arg)
#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_Arg_FASTCALL(args, i) args[i]
    #define __Pyx_NumKwargs_FASTCALL(kwds) 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_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
  #else
    #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
  #endif
    #define __Pyx_Arg_NewRef_FASTCALL(arg) arg  /* no-op, __Pyx_Arg_FASTCALL is direct and this needs
                                                   to have the same reference counting */
    #define __Pyx_Arg_XDECREF_FASTCALL(arg)
#else
    #define __Pyx_Arg_FASTCALL __Pyx_Arg_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
    #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg)
    #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start)
#else
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
#endif

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

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

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

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

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

/* KeywordStringCheck.proto */
static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed);

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

/* UnpackUnboundCMethod.proto */
typedef struct {
    PyObject *type;
    PyObject **method_name;
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;

/* CallUnboundCMethod0.proto */
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CallUnboundCMethod0(cfunc, self)\
    (likely((cfunc)->func) ?\
        (likely((cfunc)->flag == METH_NOARGS) ?  (*((cfunc)->func))(self, NULL) :\
         (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\
            (PY_VERSION_HEX >= 0x030700A0 ?\
                (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\
                (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\
          (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\
            (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\
            (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ?  ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\
               ((cfunc)->flag == METH_VARARGS ?  (*((cfunc)->func))(self, __pyx_empty_tuple) :\
               __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\
        __Pyx__CallUnboundCMethod0(cfunc, self))
#else
#define __Pyx_CallUnboundCMethod0(cfunc, self)  __Pyx__CallUnboundCMethod0(cfunc, self)
#endif

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

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

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

/* PyDictVersioning.proto */
#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_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_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

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#if !CYTHON_VECTORCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
    (sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
#if !CYTHON_VECTORCALL
#if PY_VERSION_HEX >= 0x03080000
  #include "frameobject.h"
#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
  #define __Pxy_PyFrame_Initialize_Offsets()
  #define __Pyx_PyFrame_GetLocalsplus(frame)  ((frame)->f_localsplus)
#else
  static size_t __pyx_pyframe_localsplus_offset = 0;
  #include "frameobject.h"
  #define __Pxy_PyFrame_Initialize_Offsets()\
    ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
     (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  #define __Pyx_PyFrame_GetLocalsplus(frame)\
    (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif
#endif
#endif

/* PyObjectCallMethO.proto */
#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 **args, size_t nargs, PyObject *kwargs);

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

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

/* 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))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

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

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

/* RaiseUnboundLocalError.proto */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

/* pep479.proto */
static void __Pyx_Generator_Replace_StopIteration(int in_async_gen);

/* AssertionsEnabled.proto */
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define __Pyx_init_assertions_enabled()  (0)
  #define __pyx_assertions_enabled()  (1)
#elif CYTHON_COMPILING_IN_LIMITED_API  ||  (CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030C0000)
  static int __pyx_assertions_enabled_flag;
  #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag)
  static int __Pyx_init_assertions_enabled(void) {
    PyObject *builtins, *debug, *debug_str;
    int flag;
    builtins = PyEval_GetBuiltins();
    if (!builtins) goto bad;
    debug_str = PyUnicode_FromStringAndSize("__debug__", 9);
    if (!debug_str) goto bad;
    debug = PyObject_GetItem(builtins, debug_str);
    Py_DECREF(debug_str);
    if (!debug) goto bad;
    flag = PyObject_IsTrue(debug);
    Py_DECREF(debug);
    if (flag == -1) goto bad;
    __pyx_assertions_enabled_flag = flag;
    return 0;
  bad:
    __pyx_assertions_enabled_flag = 1;
    return -1;
  }
#else
  #define __Pyx_init_assertions_enabled()  (0)
  #define __pyx_assertions_enabled()  (!Py_OptimizeFlag)
#endif

/* DictGetItem.proto */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
#define __Pyx_PyObject_Dict_GetItem(obj, name)\
    (likely(PyDict_CheckExact(obj)) ?\
     __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
#else
#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
#endif

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

/* PyObjectGetMethod.proto */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);

/* PyObjectCallMethod1.proto */
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

/* StringJoin.proto */
#if PY_MAJOR_VERSION < 3
#define __Pyx_PyString_Join __Pyx_PyBytes_Join
#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
#else
#define __Pyx_PyString_Join PyUnicode_Join
#define __Pyx_PyBaseString_Join PyUnicode_Join
#endif
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);

/* PyObjectCallNoArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);

/* PyObjectCallMethod0.proto */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);

/* RaiseNoneIterError.proto */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

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

/* UnpackTuple2.proto */
#define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\
    (likely(is_tuple || PyTuple_Check(tuple)) ?\
        (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\
            __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\
            (__Pyx_UnpackTupleError(tuple, 2), -1)) :\
        __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple))
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
    PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple);
static int __Pyx_unpack_tuple2_generic(
    PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple);

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

/* IncludeStructmemberH.proto */
#include <structmember.h>

/* FixUpExtensionType.proto */
#if CYTHON_USE_TYPE_SPECS
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
#endif

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

/* FetchCommonType.proto */
#if !CYTHON_USE_TYPE_SPECS
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
#else
static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases);
#endif

/* PyMethodNew.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    PyObject *typesModule=NULL, *methodType=NULL, *result=NULL;
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    typesModule = PyImport_ImportModule("types");
    if (!typesModule) return NULL;
    methodType = PyObject_GetAttrString(typesModule, "MethodType");
    Py_DECREF(typesModule);
    if (!methodType) return NULL;
    result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL);
    Py_DECREF(methodType);
    return result;
}
#elif PY_MAJOR_VERSION >= 3
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);
}
#else
    #define __Pyx_PyMethod_New PyMethod_New
#endif

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

/* CythonFunctionShared.proto */
#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_BACKPORT_VECTORCALL
    __pyx_vectorcallfunc func_vectorcall;
#endif
#if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    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
    void *defaults;
    int defaults_pyobjects;
    size_t defaults_size;
    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_CyFunctionType)
#define __Pyx_CyOrPyCFunction_Check(obj)  __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type)
#define __Pyx_CyFunction_CheckExact(obj)  __Pyx_IS_TYPE(obj, __pyx_CyFunctionType)
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc);
#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 void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(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_BACKPORT_VECTORCALL
#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);

/* StrEquals.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportDottedModule.proto */
static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple);
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple);
#endif

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

/* CallUnboundCMethod1.proto */
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

/* CallUnboundCMethod2.proto */
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
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

/* PyObject_Str.proto */
#define __Pyx_PyObject_Str(obj)\
    (likely(PyString_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))

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

/* pyfrozenset_new.proto */
static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it);

/* PySetContains.proto */
static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq);

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

/* decode_c_string_utf16.proto */
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 0;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = -1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}

/* decode_c_bytes.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
         const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));

/* decode_bytes.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_bytes(
         PyObject* string, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    char* as_c_string;
    Py_ssize_t size;
#if CYTHON_ASSUME_SAFE_MACROS
    as_c_string = PyBytes_AS_STRING(string);
    size = PyBytes_GET_SIZE(string);
#else
    if (PyBytes_AsStringAndSize(string, &as_c_string, &size) < 0) {
        return NULL;
    }
#endif
    return __Pyx_decode_c_bytes(
        as_c_string, size,
        start, stop, encoding, errors, decode_func);
}

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

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

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

/* ValidateBasesTuple.proto */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
#endif

/* PyType_Ready.proto */
CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);

/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif

/* PyObject_GenericGetAttr.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
#endif

/* SetupReduce.proto */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_setup_reduce(PyObject* type_obj);
#endif

/* SetVTable.proto */
static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable);

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

/* MergeVTables.proto */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_MergeVtables(PyTypeObject *type);
#endif

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto_3_0_8
#define __PYX_HAVE_RT_ImportType_proto_3_0_8
#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_0_8(s) alignof(s)
#else
#define __PYX_GET_STRUCT_ALIGNMENT_3_0_8(s) sizeof(void*)
#endif
enum __Pyx_ImportType_CheckSize_3_0_8 {
   __Pyx_ImportType_CheckSize_Error_3_0_8 = 0,
   __Pyx_ImportType_CheckSize_Warn_3_0_8 = 1,
   __Pyx_ImportType_CheckSize_Ignore_3_0_8 = 2
};
static PyTypeObject *__Pyx_ImportType_3_0_8(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_8 check_size);
#endif

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

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

/* PyObjectLookupSpecial.proto */
#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 */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

/* CodeObjectCache.proto */
#if !CYTHON_COMPILING_IN_LIMITED_API
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
#endif

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

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

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

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

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

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

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SdifUInt4(SdifUInt4 value);

/* CIntFromPy.proto */
static CYTHON_INLINE SdifUInt4 __Pyx_PyInt_As_SdifUInt4(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__SdifFileModeE(enum SdifFileModeE value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value);

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

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__SdifDataTypeE(enum SdifDataTypeE value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_6pysdif_7_pysdif_MatrixStatusE(enum __pyx_t_6pysdif_7_pysdif_MatrixStatusE value);

/* CIntFromPy.proto */
static CYTHON_INLINE enum SdifFileModeE __Pyx_PyInt_As_enum__SdifFileModeE(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_6pysdif_7_pysdif_FrameStatusE(enum __pyx_t_6pysdif_7_pysdif_FrameStatusE value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SdiffPosT(SdiffPosT value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__SdifErrorTagE(enum SdifErrorTagE value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__SdifErrorLevelE(enum SdifErrorLevelE value);

/* CIntFromPy.proto */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);

/* FormatTypeName.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%U"
static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp);
#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
#else
typedef const char *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%.200s"
#define __Pyx_PyType_GetName(tp) ((tp)->tp_name)
#define __Pyx_DECREF_TypeName(obj)
#endif

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

/* CoroutineBase.proto */
struct __pyx_CoroutineObject;
typedef PyObject *(*__pyx_coroutine_body_t)(struct __pyx_CoroutineObject *, PyThreadState *, PyObject *);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_ExcInfoStruct  _PyErr_StackItem
#else
typedef struct {
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
} __Pyx_ExcInfoStruct;
#endif
typedef struct __pyx_CoroutineObject {
    PyObject_HEAD
    __pyx_coroutine_body_t body;
    PyObject *closure;
    __Pyx_ExcInfoStruct gi_exc_state;
    PyObject *gi_weakreflist;
    PyObject *classobj;
    PyObject *yieldfrom;
    PyObject *gi_name;
    PyObject *gi_qualname;
    PyObject *gi_modulename;
    PyObject *gi_code;
    PyObject *gi_frame;
    int resume_label;
    char is_running;
} __pyx_CoroutineObject;
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
    PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
    PyObject *name, PyObject *qualname, PyObject *module_name);
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name);
static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
static int __Pyx_Coroutine_clear(PyObject *self);
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
static PyObject *__Pyx_Coroutine_Close(PyObject *self);
static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_Coroutine_SwapException(self)
#define __Pyx_Coroutine_ResetAndClearException(self)  __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
#else
#define __Pyx_Coroutine_SwapException(self) {\
    __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
    __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
    }
#define __Pyx_Coroutine_ResetAndClearException(self) {\
    __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
    (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
    }
#endif
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
#else
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
#endif
static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);

/* PatchModuleWithCoroutine.proto */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);

/* PatchGeneratorABC.proto */
static int __Pyx_patch_abc(void);

/* Generator.proto */
#define __Pyx_Generator_USED
#define __Pyx_Generator_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_GeneratorType)
#define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
    __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
static PyObject *__Pyx_Generator_Next(PyObject *self);
static int __pyx_Generator_init(PyObject *module);

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

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

/* #### Code section: module_declarations ### */
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*/
static SdifMatrixTypeT *__pyx_f_6pysdif_7_pysdif_20MatrixTypeDefinition_toSdifMatrixType(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_v_self); /* proto*/
static void __pyx_f_6pysdif_7_pysdif_8SdifFile_init_read(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto*/
static void __pyx_f_6pysdif_7_pysdif_8SdifFile_init_containers(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto*/
static void __pyx_f_6pysdif_7_pysdif_8SdifFile_init_write(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto*/
static int __pyx_f_6pysdif_7_pysdif_8SdifFile_curr_matrix_numerical_signature(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto*/
static int __pyx_f_6pysdif_7_pysdif_8SdifFile__frame_read_header(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto*/
static int __pyx_f_6pysdif_7_pysdif_8SdifFile__read_signature(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static CYTHON_INLINE size_t __pyx_f_6pysdif_7_pysdif_8SdifFile__read_matrix_header(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_6pysdif_7_pysdif_8SdifFile__matrix_read_data(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_6pysdif_7_pysdif_8SdifFile__finalize_matrix(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto*/
static CYTHON_INLINE void __pyx_f_6pysdif_7_pysdif_8SdifFile__next_frame(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto*/
static int __pyx_f_6pysdif_7_pysdif_8SdifFile__frame_skip_rest(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_6pysdif_7_pysdif_8SdifFile__finalize_frame(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto*/
static void __pyx_f_6pysdif_7_pysdif_8SdifFile_reinit(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto*/

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

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

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

/* Module declarations from "pysdif.sdifdefs" */

/* Module declarations from "__builtin__" */

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

/* Module declarations from "cpython" */

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

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

/* Module declarations from "numpy" */

/* Module declarations from "numpy" */

/* Module declarations from "pysdif._pysdif" */
static unsigned int __pyx_v_6pysdif_7_pysdif__SdifNVTStreamID;
static int __pyx_v_6pysdif_7_pysdif_SDIF_CLOSED;
static int __pyx_v_6pysdif_7_pysdif__g_sdif_initiated;
static PyObject *__pyx_v_6pysdif_7_pysdif_FILEMODE_STR2MODE = 0;
static PyObject *__pyx_v_6pysdif_7_pysdif_FILEMODE_MODE2STR = 0;
static PyObject *__pyx_v_6pysdif_7_pysdif__SDIF_DATATYPES = 0;
static PyObject *__pyx_v_6pysdif_7_pysdif__SDIF_TO_NUMPY_TYPENUM = 0;
static PyObject *__pyx_v_6pysdif_7_pysdif__framestatus2str = 0;
static PyObject *__pyx_v_6pysdif_7_pysdif__matrixstatus2str = 0;
static CYTHON_INLINE int __pyx_f_6pysdif_7_pysdif_dtype_sdif2numpy(int); /*proto*/
static CYTHON_INLINE int __pyx_f_6pysdif_7_pysdif_dtype_numpy2sdif(int); /*proto*/
static CYTHON_INLINE unsigned int __pyx_f_6pysdif_7_pysdif_str2sig(char *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_6pysdif_7_pysdif_sig2str(SdifSignature); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_6pysdif_7_pysdif__array_from_matrix_data_no_copy(SdifMatrixDataT *); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_6pysdif_7_pysdif__array_from_matrix_data_copy(SdifMatrixDataT *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_6pysdif_7_pysdif_bytes_from_sdifstring(SdifStringT *); /*proto*/
static PyObject *__pyx_f_6pysdif_7_pysdif_nvt_to_dict(SdifNameValueTableT *); /*proto*/
static PyObject *__pyx_f_6pysdif_7_pysdif_valuetables_to_dicts(SdifNameValuesLT *); /*proto*/
static PyObject *__pyx_f_6pysdif_7_pysdif_streamidtable_to_list(SdifStreamIDTableT *); /*proto*/
static PyObject *__pyx_f_6pysdif_7_pysdif_StreamID_fromSdifStreadIDT(SdifStreamIDT *); /*proto*/
static SdifMatrixTypeT *__pyx_f_6pysdif_7_pysdif_MatrixType_create(PyObject *, PyObject *); /*proto*/
static SdifFrameTypeT *__pyx_f_6pysdif_7_pysdif_FrameType_create(PyObject *, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_6pysdif_7_pysdif_asbytes(PyObject *); /*proto*/
static PyObject *__pyx_f_6pysdif_7_pysdif_MatrixTypesTable_to_list(SdifHashTableT *); /*proto*/
static struct __pyx_obj_6pysdif_7_pysdif_Component *__pyx_f_6pysdif_7_pysdif_Component_from_SdifComponent(SdifComponentT *); /*proto*/
static PyObject *__pyx_f_6pysdif_7_pysdif_FrameTypesTable_to_list(SdifHashTableT *); /*proto*/
static struct __pyx_obj_6pysdif_7_pysdif_FrameW *__pyx_f_6pysdif_7_pysdif_FrameW_new(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *, SdifSignature, SdifFloat8, struct __pyx_opt_args_6pysdif_7_pysdif_FrameW_new *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_6pysdif_7_pysdif___pyx_unpickle_MatrixTypeDefinition__set_state(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pysdif_7_pysdif___pyx_unpickle_Component__set_state(struct __pyx_obj_6pysdif_7_pysdif_Component *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pysdif_7_pysdif___pyx_unpickle_FrameTypeDefinition__set_state(struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pysdif_7_pysdif___pyx_unpickle_FrameW__set_state(struct __pyx_obj_6pysdif_7_pysdif_FrameW *, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__Pyx_carray_to_py_int(int *, Py_ssize_t); /*proto*/
static CYTHON_INLINE PyObject *__Pyx_carray_to_tuple_int(int *, Py_ssize_t); /*proto*/
static int __Pyx_carray_from_py_int(PyObject *, int *, Py_ssize_t); /*proto*/
static CYTHON_INLINE PyObject *__Pyx_carray_to_py_SdifSignature(SdifSignature *, Py_ssize_t); /*proto*/
static CYTHON_INLINE PyObject *__Pyx_carray_to_tuple_SdifSignature(SdifSignature *, Py_ssize_t); /*proto*/
static int __Pyx_carray_from_py_SdifSignature(PyObject *, SdifSignature *, Py_ssize_t); /*proto*/
/* #### Code section: typeinfo ### */
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "pysdif._pysdif"
extern int __pyx_module_is_main_pysdif___pysdif;
int __pyx_module_is_main_pysdif___pysdif = 0;

/* Implementation of "pysdif._pysdif" */
/* #### Code section: global_var ### */
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_AssertionError;
static PyObject *__pyx_builtin_NameError;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_StopIteration;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_print;
static PyObject *__pyx_builtin_IOError;
static PyObject *__pyx_builtin_EOFError;
static PyObject *__pyx_builtin_OverflowError;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_IndexError;
static PyObject *__pyx_builtin_ImportError;
/* #### Code section: string_decls ### */
static const char __pyx_k_d[] = "d";
static const char __pyx_k_f[] = "f";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_m[] = "m";
static const char __pyx_k_n[] = "n";
static const char __pyx_k_p[] = "p";
static const char __pyx_k_r[] = "r";
static const char __pyx_k_s[] = "s";
static const char __pyx_k_t[] = "t";
static const char __pyx_k_w[] = "w";
static const char __pyx_k__4[] = " ";
static const char __pyx_k__5[] = ", ";
static const char __pyx_k__8[] = ".";
static const char __pyx_k__9[] = "*";
static const char __pyx_k_ft[] = "ft";
static const char __pyx_k_gc[] = "gc";
static const char __pyx_k_mt[] = "mt";
static const char __pyx_k_np[] = "np";
static const char __pyx_k_os[] = "os";
static const char __pyx_k_p2[] = "p2";
static const char __pyx_k_pl[] = "pl";
static const char __pyx_k_rw[] = "rw";
static const char __pyx_k_wr[] = "wr";
static const char __pyx_k__10[] = "";
static const char __pyx_k__14[] = "\n";
static const char __pyx_k__18[] = ",";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_fsz[] = "fsz";
static const char __pyx_k_get[] = "get";
static const char __pyx_k_idx[] = "idx";
static const char __pyx_k_mtd[] = "mtd";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_num[] = "num";
static const char __pyx_k_nvt[] = "nvt";
static const char __pyx_k_out[] = "out";
static const char __pyx_k_sig[] = "sig";
static const char __pyx_k_INFO[] = "INFO";
static const char __pyx_k_RBEP[] = "RBEP";
static const char __pyx_k__172[] = "?";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_char[] = "char";
static const char __pyx_k_cols[] = "cols";
static const char __pyx_k_comp[] = "comp";
static const char __pyx_k_copy[] = "copy";
static const char __pyx_k_data[] = "data";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_exit[] = "__exit__";
static const char __pyx_k_file[] = "__file__";
static const char __pyx_k_info[] = "info";
static const char __pyx_k_int8[] = "int8";
static const char __pyx_k_join[] = "join";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_midx[] = "midx";
static const char __pyx_k_mode[] = "mode";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_next[] = "__next__";
static const char __pyx_k_path[] = "path";
static const char __pyx_k_rows[] = "rows";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_send[] = "send";
static const char __pyx_k_sigs[] = "sigs";
static const char __pyx_k_skip[] = "skip";
static const char __pyx_k_spec[] = "__spec__";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_time[] = "time";
static const char __pyx_k_warn[] = "warn";
static const char __pyx_k_Linux[] = "Linux";
static const char __pyx_k_ascii[] = "ascii";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_debug[] = "debug";
static const char __pyx_k_dtype[] = "dtype";
static const char __pyx_k_enter[] = "__enter__";
static const char __pyx_k_error[] = "error";
static const char __pyx_k_flags[] = "flags";
static const char __pyx_k_frame[] = "frame";
static const char __pyx_k_int16[] = "int16";
static const char __pyx_k_int32[] = "int32";
static const char __pyx_k_int64[] = "int64";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_numid[] = "numid";
static const char __pyx_k_numpy[] = "numpy";
static const char __pyx_k_paths[] = "paths";
static const char __pyx_k_print[] = "print";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_shape[] = "shape";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_state[] = "state";
static const char __pyx_k_strip[] = "strip";
static const char __pyx_k_super[] = "super";
static const char __pyx_k_throw[] = "throw";
static const char __pyx_k_uint8[] = "uint8";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_write[] = "write";
static const char __pyx_k_Darwin[] = "Darwin";
static const char __pyx_k_FrameR[] = "FrameR";
static const char __pyx_k_FrameW[] = "FrameW";
static const char __pyx_k_Matrix[] = "Matrix";
static const char __pyx_k_dict_2[] = "_dict";
static const char __pyx_k_enable[] = "enable";
static const char __pyx_k_encode[] = "encode";
static const char __pyx_k_exists[] = "exists";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_frame0[] = "frame0";
static const char __pyx_k_frame1[] = "frame1";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_logger[] = "logger";
static const char __pyx_k_matrix[] = "matrix";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_name_2[] = "__name__";
static const char __pyx_k_pickle[] = "pickle";
static const char __pyx_k_pysdif[] = "pysdif";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_rewind[] = "rewind";
static const char __pyx_k_source[] = "source";
static const char __pyx_k_status[] = "status";
static const char __pyx_k_system[] = "system";
static const char __pyx_k_uint16[] = "uint16";
static const char __pyx_k_uint32[] = "uint32";
static const char __pyx_k_uint64[] = "uint64";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_IOError[] = "IOError";
static const char __pyx_k_Invalid[] = "Invalid";
static const char __pyx_k_NoFrame[] = "NoFrame";
static const char __pyx_k_Offline[] = "Offline";
static const char __pyx_k_Windows[] = "Windows";
static const char __pyx_k_abspath[] = "abspath";
static const char __pyx_k_add_NVT[] = "add_NVT";
static const char __pyx_k_datadir[] = "datadir";
static const char __pyx_k_disable[] = "disable";
static const char __pyx_k_float32[] = "float32";
static const char __pyx_k_float64[] = "float64";
static const char __pyx_k_genexpr[] = "genexpr";
static const char __pyx_k_logging[] = "logging";
static const char __pyx_k_os_path[] = "os.path";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_replace[] = "replace";
static const char __pyx_k_sdifstr[] = "sdifstr";
static const char __pyx_k_treeway[] = "treeway";
static const char __pyx_k_warning[] = "warning";
static const char __pyx_k_DataRead[] = "DataRead";
static const char __pyx_k_EOFError[] = "EOFError";
static const char __pyx_k_KeyError[] = "KeyError";
static const char __pyx_k_NoMatrix[] = "NoMatrix";
static const char __pyx_k_SdifFile[] = "SdifFile";
static const char __pyx_k_StreamID[] = "StreamID";
static const char __pyx_k_colnames[] = "colnames";
static const char __pyx_k_filename[] = "filename";
static const char __pyx_k_frame_id[] = "frame_id";
static const char __pyx_k_get_NVTs[] = "get_NVTs";
static const char __pyx_k_get_data[] = "get_data";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_platform[] = "platform";
static const char __pyx_k_pyx_type[] = "__pyx_type";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_rewind_2[] = "_rewind";
static const char __pyx_k_setLevel[] = "setLevel";
static const char __pyx_k_set_name[] = "__set_name__";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_streamID[] = "streamID";
static const char __pyx_k_thisfile[] = "thisfile";
static const char __pyx_k_warnings[] = "warnings";
static const char __pyx_k_Component[] = "Component";
static const char __pyx_k_NameError[] = "NameError";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_bytesread[] = "bytesread";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_frame_sig[] = "frame_sig";
static const char __pyx_k_frametype[] = "frametype";
static const char __pyx_k_getLogger[] = "getLogger";
static const char __pyx_k_isenabled[] = "isenabled";
static const char __pyx_k_iteritems[] = "iteritems";
static const char __pyx_k_matrixsig[] = "matrixsig";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_new_frame[] = "new_frame";
static const char __pyx_k_print_NVT[] = "print_NVT";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_sdif_init[] = "sdif_init";
static const char __pyx_k_signature[] = "signature";
static const char __pyx_k_traceback[] = "traceback";
static const char __pyx_k_usr_share[] = "/usr/share";
static const char __pyx_k_HeaderRead[] = "HeaderRead";
static const char __pyx_k_IndexError[] = "IndexError";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_add_matrix[] = "add_matrix";
static const char __pyx_k_bytes_read[] = "bytes_read";
static const char __pyx_k_clone_NVTs[] = "clone_NVTs";
static const char __pyx_k_components[] = "components";
static const char __pyx_k_data_array[] = "data_array";
static const char __pyx_k_expanduser[] = "expanduser";
static const char __pyx_k_frame_size[] = "frame_size";
static const char __pyx_k_frame_time[] = "frame_time";
static const char __pyx_k_frametypes[] = "frametypes";
static const char __pyx_k_get_matrix[] = "get_matrix";
static const char __pyx_k_last_error[] = "last_error";
static const char __pyx_k_matrix_idx[] = "matrix_idx";
static const char __pyx_k_matrix_sig[] = "matrix_sig";
static const char __pyx_k_matrixdata[] = "matrixdata";
static const char __pyx_k_matrixrole[] = "matrixrole";
static const char __pyx_k_matrixtype[] = "matrixtype";
static const char __pyx_k_next_frame[] = "next_frame";
static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_AllDataRead[] = "AllDataRead";
static const char __pyx_k_DataSkipped[] = "DataSkipped";
static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_Matrix_skip[] = "Matrix.skip";
static const char __pyx_k_NothingRead[] = "NothingRead";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_local_share[] = "~/.local/share";
static const char __pyx_k_matrix_skip[] = "matrix_skip";
static const char __pyx_k_matrixtypes[] = "matrixtypes";
static const char __pyx_k_mro_entries[] = "__mro_entries__";
static const char __pyx_k_next_matrix[] = "next_matrix";
static const char __pyx_k_FrameW_write[] = "FrameW.write";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_SomeDataRead[] = "SomeDataRead";
static const char __pyx_k_add_streamID[] = "add_streamID";
static const char __pyx_k_c_contiguous[] = "c_contiguous";
static const char __pyx_k_clone_frames[] = "clone_frames";
static const char __pyx_k_column_names[] = "column_names";
static const char __pyx_k_get_num_NVTs[] = "get_num_NVTs";
static const char __pyx_k_initializing[] = "_initializing";
static const char __pyx_k_is_coroutine[] = "_is_coroutine";
static const char __pyx_k_num_matrices[] = "num_matrices";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_read_padding[] = "_read_padding";
static const char __pyx_k_sdif_cleanup[] = "sdif_cleanup";
static const char __pyx_k_stringsource[] = "<stringsource>";
static const char __pyx_k_use_setstate[] = "use_setstate";
static const char __pyx_k_FrameW___exit[] = "FrameW.__exit__";
static const char __pyx_k_OverflowError[] = "OverflowError";
static const char __pyx_k_SdifFile_NULL[] = "SdifFile(NULL)";
static const char __pyx_k_SignatureRead[] = "SignatureRead";
static const char __pyx_k_StopIteration[] = "StopIteration";
static const char __pyx_k_allframetypes[] = "allframetypes";
static const char __pyx_k_init_subclass[] = "__init_subclass__";
static const char __pyx_k_matrix_status[] = "matrix_status";
static const char __pyx_k_print_one_row[] = "print_one_row";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_signature2str[] = "signature2str";
static const char __pyx_k_str2signature[] = "str2signature";
static const char __pyx_k_AssertionError[] = "AssertionError";
static const char __pyx_k_FrameW___enter[] = "FrameW.__enter__";
static const char __pyx_k_SdifFile_close[] = "SdifFile.close";
static const char __pyx_k_SdifOrderError[] = "SdifOrderError";
static const char __pyx_k_SdifTypes_STYP[] = "SdifTypes.STYP";
static const char __pyx_k_add_frame_type[] = "add_frame_type";
static const char __pyx_k_allmatrixtypes[] = "allmatrixtypes";
static const char __pyx_k_curr_signature[] = "curr_signature";
static const char __pyx_k_exception_type[] = "exception_type";
static const char __pyx_k_finalize_frame[] = "_finalize_frame";
static const char __pyx_k_find_sdiftypes[] = "_find_sdiftypes";
static const char __pyx_k_frametypeslist[] = "frametypeslist";
static const char __pyx_k_get_stream_IDs[] = "get_stream_IDs";
static const char __pyx_k_pysdif__pysdif[] = "pysdif._pysdif";
static const char __pyx_k_read_sdiftypes[] = "read_sdiftypes";
static const char __pyx_k_read_signature[] = "_read_signature";
static const char __pyx_k_sdiftypes_data[] = "sdiftypes_data";
static const char __pyx_k_sdiftypes_path[] = "sdiftypes_path";
static const char __pyx_k_signaturesture[] = "signaturesture";
static const char __pyx_k_Matrix_get_data[] = "Matrix.get_data";
static const char __pyx_k_SdifFile___exit[] = "SdifFile.__exit__";
static const char __pyx_k_SdifFile___init[] = "SdifFile.__init__";
static const char __pyx_k_SdifFile_rewind[] = "SdifFile.rewind";
static const char __pyx_k_SdifFile_status[] = "SdifFile.status";
static const char __pyx_k_add_matrix_type[] = "add_matrix_type";
static const char __pyx_k_exception_value[] = "exception_value";
static const char __pyx_k_finalize_matrix[] = "finalize_matrix";
static const char __pyx_k_frame_signature[] = "frame_signature";
static const char __pyx_k_frame_skip_data[] = "frame_skip_data";
static const char __pyx_k_frame_skip_rest[] = "frame_skip_rest";
static const char __pyx_k_framestatus2str[] = "framestatus2str";
static const char __pyx_k_get_frame_types[] = "get_frame_types";
static const char __pyx_k_matrixtypeslist[] = "matrixtypeslist";
static const char __pyx_k_predefined_type[] = "predefined_type";
static const char __pyx_k_print_all_types[] = "print_all_types";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_usr_local_share[] = "/usr/local/share";
static const char __pyx_k_Could_not_open_s[] = "Could not open %s";
static const char __pyx_k_Platform_unknown[] = "Platform unknown";
static const char __pyx_k_SdifFile___enter[] = "SdifFile.__enter__";
static const char __pyx_k_SdifFile__rewind[] = "SdifFile._rewind";
static const char __pyx_k_SdifFile_add_NVT[] = "SdifFile.add_NVT";
static const char __pyx_k_SdifFile_dealloc[] = "SdifFile: dealloc";
static const char __pyx_k_curr_matrix_size[] = "curr_matrix_size";
static const char __pyx_k_frame_num_matrix[] = "frame_num_matrix";
static const char __pyx_k_get_matrix_types[] = "get_matrix_types";
static const char __pyx_k_matrix_read_data[] = "matrix_read_data";
static const char __pyx_k_matrix_skip_data[] = "matrix_skip_data";
static const char __pyx_k_matrixstatus2str[] = "matrixstatus2str";
static const char __pyx_k_no_current_frame[] = "no current frame";
static const char __pyx_k_FrameR_get_matrix[] = "FrameR.get_matrix";
static const char __pyx_k_FrameW_add_matrix[] = "FrameW.add_matrix";
static const char __pyx_k_No_current_matrix[] = "No current matrix";
static const char __pyx_k_SdifFile_frame_id[] = "SdifFile.frame_id";
static const char __pyx_k_SdifFile_get_NVTs[] = "SdifFile.get_NVTs";
static const char __pyx_k_ascontiguousarray[] = "ascontiguousarray";
static const char __pyx_k_clone_definitions[] = "clone_definitions";
static const char __pyx_k_frame_read_header[] = "frame_read_header";
static const char __pyx_k_SdifFile_new_frame[] = "SdifFile.new_frame";
static const char __pyx_k_SdifFile_print_NVT[] = "SdifFile.print_NVT";
static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_error_opening_file[] = "error opening file";
static const char __pyx_k_matrix_read_header[] = "matrix_read_header";
static const char __pyx_k_packaged_sdiftypes[] = "packaged_sdiftypes";
static const char __pyx_k_print_frame_header[] = "print_frame_header";
static const char __pyx_k_pysdif__pysdif_pyx[] = "pysdif/_pysdif.pyx";
static const char __pyx_k_FrameTypeDefinition[] = "FrameTypeDefinition";
static const char __pyx_k_Matrix_column_names[] = "Matrix.column_names";
static const char __pyx_k_No_current_matrix_2[] = "No current matrix!";
static const char __pyx_k_SdifFile_clone_NVTs[] = "SdifFile.clone_NVTs";
static const char __pyx_k_SdifFile_frame_time[] = "SdifFile.frame_time";
static const char __pyx_k_SdifFile_last_error[] = "SdifFile.last_error";
static const char __pyx_k_SdifFile_next_frame[] = "SdifFile.next_frame";
static const char __pyx_k_frametypes_populate[] = "_frametypes_populate";
static const char __pyx_k_print_all_stream_ID[] = "print_all_stream_ID";
static const char __pyx_k_print_matrix_header[] = "print_matrix_header";
static const char __pyx_k_pyx_unpickle_FrameW[] = "__pyx_unpickle_FrameW";
static const char __pyx_k_signature_not_found[] = "signature not found";
static const char __pyx_k_signatures_to_clone[] = "signatures_to_clone";
static const char __pyx_k_MatrixTypeDefinition[] = "MatrixTypeDefinition";
static const char __pyx_k_SDIF_PREDEFINEDTYPES[] = "SDIF_PREDEFINEDTYPES";
static const char __pyx_k_SdifFile_matrix_skip[] = "SdifFile.matrix_skip";
static const char __pyx_k_SdifFile_next_matrix[] = "SdifFile.next_matrix";
static const char __pyx_k_curr_frame_available[] = "curr_frame_available";
static const char __pyx_k_curr_matrix_datatype[] = "curr_matrix_datatype";
static const char __pyx_k_new_frame_one_matrix[] = "new_frame_one_matrix";
static const char __pyx_k_print_general_header[] = "print_general_header";
static const char __pyx_k_SdifFile_add_streamID[] = "SdifFile.add_streamID";
static const char __pyx_k_SdifFile_clone_frames[] = "SdifFile.clone_frames";
static const char __pyx_k_SdifFile_get_num_NVTs[] = "SdifFile.get_num_NVTs";
static const char __pyx_k_curr_matrix_available[] = "curr_matrix_available";
static const char __pyx_k_curr_matrix_signature[] = "curr_matrix_signature";
static const char __pyx_k_frame_types_to_string[] = "frame_types_to_string";
static const char __pyx_k_init___locals_genexpr[] = "__init__.<locals>.genexpr";
static const char __pyx_k_predefined_frametypes[] = "predefined_frametypes";
static const char __pyx_k_Error_finalizing_Frame[] = "Error finalizing Frame";
static const char __pyx_k_FrameR___reduce_cython[] = "FrameR.__reduce_cython__";
static const char __pyx_k_FrameW___reduce_cython[] = "FrameW.__reduce_cython__";
static const char __pyx_k_Matrix___reduce_cython[] = "Matrix.__reduce_cython__";
static const char __pyx_k_SdifFile__read_padding[] = "SdifFile._read_padding";
static const char __pyx_k_SdifFile_print_one_row[] = "SdifFile.print_one_row";
static const char __pyx_k_clone_type_definitions[] = "clone_type_definitions";
static const char __pyx_k_curr_frame_is_selected[] = "curr_frame_is_selected";
static const char __pyx_k_error_finishing_matrix[] = "error finishing matrix";
static const char __pyx_k_get_packaged_sdiftypes[] = "get_packaged_sdiftypes";
static const char __pyx_k_matrix_types_to_string[] = "matrix_types_to_string";
static const char __pyx_k_predefined_matrixtypes[] = "predefined_matrixtypes";
static const char __pyx_k_print_all_ascii_chunks[] = "print_all_ascii_chunks";
static const char __pyx_k_pyx_unpickle_Component[] = "__pyx_unpickle_Component";
static const char __pyx_k_write_all_ascii_chunks[] = "write_all_ascii_chunks";
static const char __pyx_k_Error_finalizing_matrix[] = "Error finalizing matrix";
static const char __pyx_k_SdifFile_add_frame_type[] = "SdifFile.add_frame_type";
static const char __pyx_k_SdifFile_curr_signature[] = "SdifFile.curr_signature";
static const char __pyx_k_SdifFile_get_stream_IDs[] = "SdifFile.get_stream_IDs";
static const char __pyx_k_curr_matrix_is_selected[] = "curr_matrix_is_selected";
static const char __pyx_k_FrameR___setstate_cython[] = "FrameR.__setstate_cython__";
static const char __pyx_k_FrameW___setstate_cython[] = "FrameW.__setstate_cython__";
static const char __pyx_k_Matrix___setstate_cython[] = "Matrix.__setstate_cython__";
static const char __pyx_k_SdifFile___reduce_cython[] = "SdifFile.__reduce_cython__";
static const char __pyx_k_SdifFile__read_signature[] = "SdifFile._read_signature";
static const char __pyx_k_SdifFile_add_matrix_type[] = "SdifFile.add_matrix_type";
static const char __pyx_k_SdifFile_frame_signature[] = "SdifFile.frame_signature";
static const char __pyx_k_SdifFile_frame_skip_data[] = "SdifFile.frame_skip_data";
static const char __pyx_k_SdifFile_frame_skip_rest[] = "SdifFile.frame_skip_rest";
static const char __pyx_k_SdifFile_get_frame_types[] = "SdifFile.get_frame_types";
static const char __pyx_k_SdifFile_print_all_types[] = "SdifFile.print_all_types";
static const char __pyx_k_StreamID___reduce_cython[] = "StreamID.__reduce_cython__";
static const char __pyx_k_add_predefined_frametype[] = "add_predefined_frametype";
static const char __pyx_k_Component___reduce_cython[] = "Component.__reduce_cython__";
static const char __pyx_k_SdifFile_curr_matrix_size[] = "SdifFile.curr_matrix_size";
static const char __pyx_k_SdifFile_frame_num_matrix[] = "SdifFile.frame_num_matrix";
static const char __pyx_k_SdifFile_get_matrix_types[] = "SdifFile.get_matrix_types";
static const char __pyx_k_SdifFile_matrix_read_data[] = "SdifFile.matrix_read_data";
static const char __pyx_k_SdifFile_matrix_skip_data[] = "SdifFile.matrix_skip_data";
static const char __pyx_k_frame_numerical_signature[] = "frame_numerical_signature";
static const char __pyx_k_Could_not_create_frametype[] = "Could not create frametype";
static const char __pyx_k_SdifFile___setstate_cython[] = "SdifFile.__setstate_cython__";
static const char __pyx_k_SdifFile_clone_definitions[] = "SdifFile.clone_definitions";
static const char __pyx_k_SdifFile_frame_read_header[] = "SdifFile.frame_read_header";
static const char __pyx_k_StreamID___setstate_cython[] = "StreamID.__setstate_cython__";
static const char __pyx_k_Component___setstate_cython[] = "Component.__setstate_cython__";
static const char __pyx_k_Could_not_create_matrixtype[] = "Could not create matrixtype";
static const char __pyx_k_SdifFile_matrix_read_header[] = "SdifFile.matrix_read_header";
static const char __pyx_k_SdifFile_print_frame_header[] = "SdifFile.print_frame_header";
static const char __pyx_k_The_header_was_already_read[] = "The header was already read";
static const char __pyx_k_clone_frames_locals_genexpr[] = "clone_frames.<locals>.genexpr";
static const char __pyx_k_mode_should_be_on_of_r_w_rw[] = "mode should be on of 'r', 'w', 'rw'";
static const char __pyx_k_Could_not_read_matrix_header[] = "Could not read matrix header. ";
static const char __pyx_k_SdifFile_name_name_mode_mode[] = "SdifFile(name={name}, mode={mode})";
static const char __pyx_k_SdifFile_print_all_stream_ID[] = "SdifFile.print_all_stream_ID";
static const char __pyx_k_SdifFile_print_matrix_header[] = "SdifFile.print_matrix_header";
static const char __pyx_k_matrix_skip_no_current_frame[] = "matrix_skip: no current frame";
static const char __pyx_k_1FTD_signature_s_components_s[] = "1FTD(signature='%s', components=%s)";
static const char __pyx_k_SdifFile_curr_frame_available[] = "SdifFile.curr_frame_available";
static const char __pyx_k_SdifFile_curr_matrix_datatype[] = "SdifFile.curr_matrix_datatype";
static const char __pyx_k_SdifFile_new_frame_one_matrix[] = "SdifFile.new_frame_one_matrix";
static const char __pyx_k_SdifFile_print_general_header[] = "SdifFile.print_general_header";
static const char __pyx_k_Sdif_initialized_using_path_s[] = "Sdif initialized using path: %s";
static const char __pyx_k_Frame_has_already_been_written[] = "Frame has already been written!";
static const char __pyx_k_Frame_header_has_not_been_read[] = "Frame header has not been read";
static const char __pyx_k_Matrix_header_was_already_read[] = "Matrix header was already read";
static const char __pyx_k_SdifFile_curr_matrix_available[] = "SdifFile.curr_matrix_available";
static const char __pyx_k_SdifFile_curr_matrix_signature[] = "SdifFile.curr_matrix_signature";
static const char __pyx_k_SdifFile_frame_types_to_string[] = "SdifFile.frame_types_to_string";
static const char __pyx_k_pyx_unpickle_FrameTypeDefiniti[] = "__pyx_unpickle_FrameTypeDefinition";
static const char __pyx_k_pyx_unpickle_MatrixTypeDefinit[] = "__pyx_unpickle_MatrixTypeDefinition";
static const char __pyx_k_1MTD_signature_s_column_names_s[] = "1MTD(signature=%s, column_names=%s)";
static const char __pyx_k_Attempted_to_read_matrix_header[] = "Attempted to read matrix header, but there are no more matrices in this frame";
static const char __pyx_k_Can_t_get_the_data_since_it_was[] = "Can't get the data, since it was already skipped";
static const char __pyx_k_Can_t_skip_the_matrix_status_is[] = "Can't skip the matrix, status is %s";
static const char __pyx_k_Expected_a_2D_array_got_shape_d[] = "Expected a 2D array, got shape %d dimensions";
static const char __pyx_k_GPL_This_file_is_part_of_pysdif[] = "\nGPL \n\nThis file is part of pysdif\n\npysdif is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nFoobar is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with Foobar.  If not, see <http://www.gnu.org/licenses/>.\n";
static const char __pyx_k_Index_Frequency_Amplitude_Phase[] = "Index, Frequency, Amplitude, Phase, Bandwidth, Offset";
static const char __pyx_k_MatrixTypeDefinition___setstate[] = "MatrixTypeDefinition.__setstate_cython__";
static const char __pyx_k_Matrix_data_can_only_be_skipped[] = "Matrix data can only be skipped after reading the matrix header";
static const char __pyx_k_Only_strings_or_bytestrings_are[] = "Only strings or bytestrings are allowed, but found %s of type %s";
static const char __pyx_k_SdifFile_clone_type_definitions[] = "SdifFile.clone_type_definitions";
static const char __pyx_k_SdifFile_curr_frame_is_selected[] = "SdifFile.curr_frame_is_selected";
static const char __pyx_k_SdifFile_matrix_types_to_string[] = "SdifFile.matrix_types_to_string";
static const char __pyx_k_SdifFile_print_all_ascii_chunks[] = "SdifFile.print_all_ascii_chunks";
static const char __pyx_k_SdifFile_write_all_ascii_chunks[] = "SdifFile.write_all_ascii_chunks";
static const char __pyx_k_The_header_of_the_current_frame[] = "The header of the current frame has not been read";
static const char __pyx_k_Two_many_matrices_for_one_frame[] = "Two many matrices for one frame";
static const char __pyx_k_finalize_frame_called_but_heade[] = "_finalize_frame called, but header was not even read";
static const char __pyx_k_finalize_frame_without_having_r[] = "_finalize_frame without having read everything";
static const char __pyx_k_find_sdiftypes_locals_get_packa[] = "_find_sdiftypes.<locals>.get_packaged_sdiftypes";
static const char __pyx_k_frame_skip_rest_Attempted_to_sk[] = "_frame_skip_rest: Attempted to skip, but everything was read already";
static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
static const char __pyx_k_path_not_found_cannot_open_sdif[] = "path not found, cannot open sdif file for reading";
static const char __pyx_k_A_Frame_can_only_be_iterated_onc[] = "A Frame can only be iterated once";
static const char __pyx_k_Attempted_to_read_past_end_of_fi[] = "Attempted to read past end of file";
static const char __pyx_k_Component_signature_s_name_s_num[] = "Component(signature=%s, name=%s, num=%d)";
static const char __pyx_k_Do_not_call_frame_write_when_usi[] = "Do not call frame.write() when using frame as a context manager";
static const char __pyx_k_Expected_a_2D_array_got_d_dimens[] = "Expected a 2D array, got %d dimensions, shape: %s, data: %s";
static const char __pyx_k_Failed_to_fetch_the_column_names[] = "Failed to fetch the column names for {sig}";
static const char __pyx_k_FrameR_signature_sig_time_t_matr[] = "FrameR(signature={sig}, time={t}, matrices={num}, idx={idx})";
static const char __pyx_k_FrameTypeDefinition___reduce_cyt[] = "FrameTypeDefinition.__reduce_cython__";
static const char __pyx_k_FrameTypeDefinition___setstate_c[] = "FrameTypeDefinition.__setstate_cython__";
static const char __pyx_k_FrameW_signature_s_time_f_stream[] = "FrameW(signature=%s, time=%f, streamID=%d, written=%s)";
static const char __pyx_k_Frame_with_d_matrices_not_writte[] = "Frame with %d matrices not written";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0x8e7a8c2, 0xec235b2, 0x3fbaffb) = (column_names, signature))";
static const char __pyx_k_MatrixTypeDefinition___reduce_cy[] = "MatrixTypeDefinition.__reduce_cython__";
static const char __pyx_k_Matrix_can_only_be_skipped_if_da[] = "Matrix can only be skipped if data has not been already read or skipped";
static const char __pyx_k_Matrix_sig_s_rows_d_cols_d_dtype[] = "Matrix(sig=%s, rows=%d, cols=%d, dtype=%s)";
static const char __pyx_k_No_matrices_were_added_Frame_not[] = "No matrices were added! Frame not written";
static const char __pyx_k_Path_s_does_not_exist_can_t_crea[] = "Path %s does not exist, can't create a file";
static const char __pyx_k_RBEP_ReassignedBandEnhancedParti[] = "RBEP ReassignedBandEnhancedPartials";
static const char __pyx_k_SdifFile_add_predefined_frametyp[] = "SdifFile.add_predefined_frametype";
static const char __pyx_k_SdifFile_curr_matrix_is_selected[] = "SdifFile.curr_matrix_is_selected";
static const char __pyx_k_SdifFile_frame_numerical_signatu[] = "SdifFile.frame_numerical_signature";
static const char __pyx_k_Sdif_initialized_without_SdifTyp[] = "Sdif initialized without SdifTypes.";
static const char __pyx_k_Some_data_of_the_matrix_has_been[] = "Some data of the matrix has been read (%s)";
static const char __pyx_k_Status_Frame_frame_MatrixIdx_mid[] = "Status: Frame: {frame}  | MatrixIdx: {midx} | Matrix: {matrix}";
static const char __pyx_k_StreamID_numid_d_source_s_treewa[] = "StreamID(numid=%d, source='%s', treeway='%s')";
static const char __pyx_k_The_frame_should_be_read_or_skip[] = "The frame should be read or skipped before a new header is read";
static const char __pyx_k_This_function_is_only_possible_f[] = "This function is only possible for SdifFiles opened in write mode";
static const char __pyx_k_This_matrix_type_sig_does_not_se[] = "This matrix type ({sig}) does not seem to be defined!";
static const char __pyx_k_Undefined_frametype_sig_You_must[] = "Undefined frametype: {sig}.\nYou must add the frametype definition and thecorresponding matrix definitions before reading";
static const char __pyx_k_close_can_t_close_SdifFile_it_is[] = "close: can't close SdifFile: it is NULL";
static const char __pyx_k_close_can_t_close_SdifFile_since[] = "close: can't close SdifFile, since it was already closed";
static const char __pyx_k_components_should_be_a_seq_of_Co[] = "components should be a seq. of Componentsor tuples(signature, name), but got: %s";
static const char __pyx_k_frame_read_header_finalizing_las[] = "frame_read_header: finalizing last frame";
static const char __pyx_k_frame_skip_data_calling_finalize[] = "frame_skip_data: calling finalize_frame";
static const char __pyx_k_matrix_empty_or_could_not_read_m[] = "matrix empty or could not read matrix data";
static const char __pyx_k_matrix_skip_data_no_current_fram[] = "matrix_skip_data: no current frame";
static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
static const char __pyx_k_s_should_be_either_a_str_or_byte[] = "s should be either a str or bytes, got {}";
static const char __pyx_k_tried_to_finalize_matrix_but_sta[] = "tried to finalize matrix, but status is %s";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_2[] = "Incompatible checksums (0x%x vs (0xdb4a2e1, 0xce7ce05, 0x13edf36) = (name, num, signature))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_3[] = "Incompatible checksums (0x%x vs (0x10e6e84, 0xf4f6592, 0x3698374) = (components, signature))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_4[] = "Incompatible checksums (0x%x vs (0x703a645, 0x8ed5f60, 0xa0d104a) = (_written, datatypes, frame_size, matrices, num_matrices, sdiffile, signature, signatures, streamID, time))";
/* #### Code section: decls ### */
static PyObject *__pyx_pf_6pysdif_7_pysdif_signature2str(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_sig); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_2str2signature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8StreamID_5numid___get__(struct __pyx_obj_6pysdif_7_pysdif_StreamID *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8StreamID_6source___get__(struct __pyx_obj_6pysdif_7_pysdif_StreamID *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8StreamID_7treeway___get__(struct __pyx_obj_6pysdif_7_pysdif_StreamID *__pyx_v_self); /* proto */
static int __pyx_pf_6pysdif_7_pysdif_8StreamID___cinit__(struct __pyx_obj_6pysdif_7_pysdif_StreamID *__pyx_v_self, int __pyx_v_numid, PyObject *__pyx_v_source, PyObject *__pyx_v_treeway); /* proto */
static void __pyx_pf_6pysdif_7_pysdif_8StreamID_2__dealloc__(struct __pyx_obj_6pysdif_7_pysdif_StreamID *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8StreamID_4__repr__(struct __pyx_obj_6pysdif_7_pysdif_StreamID *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8StreamID_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pysdif_7_pysdif_StreamID *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8StreamID_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pysdif_7_pysdif_StreamID *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition___init__(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_v_self, PyObject *__pyx_v_signature, PyObject *__pyx_v_column_names); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_2__repr__(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_9signature___get__(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_v_self); /* proto */
static int __pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_9signature_2__set__(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_9signature_4__del__(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_12column_names___get__(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_v_self); /* proto */
static int __pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_12column_names_2__set__(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_12column_names_4__del__(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_4__reduce_cython__(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_6__setstate_cython__(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pysdif_7_pysdif_9Component___init__(struct __pyx_obj_6pysdif_7_pysdif_Component *__pyx_v_self, PyObject *__pyx_v_signature, PyObject *__pyx_v_name, PyObject *__pyx_v_num); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_9Component_2__repr__(struct __pyx_obj_6pysdif_7_pysdif_Component *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_9Component_9signature___get__(struct __pyx_obj_6pysdif_7_pysdif_Component *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_9Component_4name___get__(struct __pyx_obj_6pysdif_7_pysdif_Component *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_9Component_3num___get__(struct __pyx_obj_6pysdif_7_pysdif_Component *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_9Component_4__reduce_cython__(struct __pyx_obj_6pysdif_7_pysdif_Component *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_9Component_6__setstate_cython__(struct __pyx_obj_6pysdif_7_pysdif_Component *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_19FrameTypeDefinition_8__init___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */
static int __pyx_pf_6pysdif_7_pysdif_19FrameTypeDefinition___init__(struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *__pyx_v_self, PyObject *__pyx_v_signature, PyObject *__pyx_v_components); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_19FrameTypeDefinition_2__repr__(struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_19FrameTypeDefinition_9signature___get__(struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_19FrameTypeDefinition_10components___get__(struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_19FrameTypeDefinition_4__reduce_cython__(struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_19FrameTypeDefinition_6__setstate_cython__(struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_4read_sdiftypes(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6_frametypes_populate(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8predefined_frametypes(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_10predefined_matrixtypes(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_15_find_sdiftypes_get_packaged_sdiftypes(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_12_find_sdiftypes(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_14sdif_init(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sdiftypes_path); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_16sdif_cleanup(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_18framestatus2str(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_status); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_20matrixstatus2str(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_status); /* proto */
static int __pyx_pf_6pysdif_7_pysdif_6Matrix___cinit__(struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self, struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_source); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_4rows___get__(struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_4cols___get__(struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_5dtype___get__(struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_9signature___get__(struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_19numerical_signature___get__(struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_2get_data(struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self, PyObject *__pyx_v_copy); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_4column_names(struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_6skip(struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_8__repr__(struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_6status___get__(struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pysdif_7_pysdif_6FrameR___cinit__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self, struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_source); /* proto */
static void __pyx_pf_6pysdif_7_pysdif_6FrameR_2__dealloc__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_4__repr__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_9signature___get__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_19numerical_signature___get__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_4size___get__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_12num_matrices___get__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_6pysdif_7_pysdif_6FrameR_6__len__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_2id___get__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_4time___get__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_10matrix_idx___get__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_8__iter__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_10__next__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_12get_matrix(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self, PyObject *__pyx_v_copy); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameW___repr__(struct __pyx_obj_6pysdif_7_pysdif_FrameW *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameW_2__enter__(struct __pyx_obj_6pysdif_7_pysdif_FrameW *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameW_4__exit__(struct __pyx_obj_6pysdif_7_pysdif_FrameW *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exception_type, CYTHON_UNUSED PyObject *__pyx_v_exception_value, CYTHON_UNUSED PyObject *__pyx_v_traceback); /* proto */
static void __pyx_pf_6pysdif_7_pysdif_6FrameW_6__del__(struct __pyx_obj_6pysdif_7_pysdif_FrameW *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameW_7written___get__(struct __pyx_obj_6pysdif_7_pysdif_FrameW *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameW_8add_matrix(struct __pyx_obj_6pysdif_7_pysdif_FrameW *__pyx_v_self, PyObject *__pyx_v_signature, PyArrayObject *__pyx_v_data_array); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameW_10write(struct __pyx_obj_6pysdif_7_pysdif_FrameW *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameW_12__reduce_cython__(struct __pyx_obj_6pysdif_7_pysdif_FrameW *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameW_14__setstate_cython__(struct __pyx_obj_6pysdif_7_pysdif_FrameW *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_6pysdif_7_pysdif_8SdifFile___cinit__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, CYTHON_UNUSED PyObject *__pyx_v_predefined_type); /* proto */
static int __pyx_pf_6pysdif_7_pysdif_8SdifFile_2__init__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, PyObject *__pyx_v_filename, CYTHON_UNUSED PyObject *__pyx_v_mode); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_4__repr__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static void __pyx_pf_6pysdif_7_pysdif_8SdifFile_6__dealloc__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_8close(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_4name___get__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_4mode___get__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_11is_seekable___get__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_19numerical_signature___get__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_9signature___get__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_9prev_time___get__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_9frame_pos___get__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_10curr_matrix_size(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_12curr_matrix_datatype(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_14curr_signature(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_16curr_matrix_signature(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_18frame_num_matrix(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_20frame_id(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_3pos___get__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static int __pyx_pf_6pysdif_7_pysdif_8SdifFile_3pos_2__set__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, long __pyx_v_pos); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_22frame_numerical_signature(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_24frame_signature(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_26frame_time(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_28last_error(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_30curr_frame_is_selected(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_32curr_matrix_is_selected(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_34get_num_NVTs(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_36frame_read_header(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_38frame_skip_data(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_40_read_signature(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_42matrix_read_header(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_44curr_frame_available(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_46curr_matrix_available(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_48matrix_skip_data(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_50matrix_read_data(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, PyObject *__pyx_v_copy); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_52matrix_skip(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_54status(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_56__iter__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_58__next__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_60next_frame(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_62__enter__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_64__exit__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_66frame_skip_rest(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_68next_matrix(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_70rewind(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_72_rewind(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_74_read_padding(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_76add_NVT(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, PyObject *__pyx_v_d); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_78add_matrix_type(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, PyObject *__pyx_v_signature, PyObject *__pyx_v_column_names); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_80add_frame_type(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, PyObject *__pyx_v_signature, PyObject *__pyx_v_components); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_82clone_type_definitions(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_source); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_84clone_NVTs(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_source); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_86clone_definitions(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_source); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_12clone_frames_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_88clone_frames(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_source, PyObject *__pyx_v_signatures_to_clone); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_90add_streamID(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, unsigned int __pyx_v_numid, char *__pyx_v_source, char *__pyx_v_treeway); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_92add_predefined_frametype(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, PyObject *__pyx_v_signature); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_94write_all_ascii_chunks(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_96new_frame(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, PyObject *__pyx_v_signature, SdifFloat8 __pyx_v_time, SdifUInt4 __pyx_v_streamID); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_98new_frame_one_matrix(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, PyObject *__pyx_v_frame_sig, SdifFloat8 __pyx_v_time, PyObject *__pyx_v_matrix_sig, PyArrayObject *__pyx_v_matrixdata, SdifUInt4 __pyx_v_streamID); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_100print_NVT(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_102print_general_header(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_104print_all_ascii_chunks(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_106print_all_types(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_108print_matrix_header(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_110print_one_row(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_112print_frame_header(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_114print_all_stream_ID(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_116frame_types_to_string(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_118get_frame_types(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_120matrix_types_to_string(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_122get_matrix_types(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_124get_NVTs(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_126get_stream_IDs(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_3eof___get__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_128__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_130__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_22__pyx_unpickle_MatrixTypeDefinition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_24__pyx_unpickle_Component(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_26__pyx_unpickle_FrameTypeDefinition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6pysdif_7_pysdif_28__pyx_unpickle_FrameW(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_6pysdif_7_pysdif_StreamID(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pysdif_7_pysdif_MatrixTypeDefinition(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pysdif_7_pysdif_Component(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pysdif_7_pysdif_FrameTypeDefinition(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pysdif_7_pysdif_FrameR(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pysdif_7_pysdif_SdifFile(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pysdif_7_pysdif_Matrix(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pysdif_7_pysdif_FrameW(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pysdif_7_pysdif___pyx_scope_struct__genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyBytes_Type_split = {0, 0, 0, 0, 0};
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get = {0, 0, 0, 0, 0};
/* #### Code section: late_includes ### */
/* #### Code section: module_state ### */
typedef struct {
  PyObject *__pyx_d;
  PyObject *__pyx_b;
  PyObject *__pyx_cython_runtime;
  PyObject *__pyx_empty_tuple;
  PyObject *__pyx_empty_bytes;
  PyObject *__pyx_empty_unicode;
  #ifdef __Pyx_CyFunction_USED
  PyTypeObject *__pyx_CyFunctionType;
  #endif
  #ifdef __Pyx_FusedFunction_USED
  PyTypeObject *__pyx_FusedFunctionType;
  #endif
  #ifdef __Pyx_Generator_USED
  PyTypeObject *__pyx_GeneratorType;
  #endif
  #ifdef __Pyx_IterableCoroutine_USED
  PyTypeObject *__pyx_IterableCoroutineType;
  #endif
  #ifdef __Pyx_Coroutine_USED
  PyTypeObject *__pyx_CoroutineAwaitType;
  #endif
  #ifdef __Pyx_Coroutine_USED
  PyTypeObject *__pyx_CoroutineType;
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  PyTypeObject *__pyx_ptype_7cpython_4type_type;
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  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;
  #if CYTHON_USE_MODULE_STATE
  PyObject *__pyx_type_6pysdif_7_pysdif_StreamID;
  PyObject *__pyx_type_6pysdif_7_pysdif_MatrixTypeDefinition;
  PyObject *__pyx_type_6pysdif_7_pysdif_Component;
  PyObject *__pyx_type_6pysdif_7_pysdif_FrameTypeDefinition;
  PyObject *__pyx_type_6pysdif_7_pysdif_FrameR;
  PyObject *__pyx_type_6pysdif_7_pysdif_SdifFile;
  PyObject *__pyx_type_6pysdif_7_pysdif_Matrix;
  PyObject *__pyx_type_6pysdif_7_pysdif_FrameW;
  PyObject *__pyx_type_6pysdif_7_pysdif___pyx_scope_struct__genexpr;
  PyObject *__pyx_type_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr;
  #endif
  PyTypeObject *__pyx_ptype_6pysdif_7_pysdif_StreamID;
  PyTypeObject *__pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition;
  PyTypeObject *__pyx_ptype_6pysdif_7_pysdif_Component;
  PyTypeObject *__pyx_ptype_6pysdif_7_pysdif_FrameTypeDefinition;
  PyTypeObject *__pyx_ptype_6pysdif_7_pysdif_FrameR;
  PyTypeObject *__pyx_ptype_6pysdif_7_pysdif_SdifFile;
  PyTypeObject *__pyx_ptype_6pysdif_7_pysdif_Matrix;
  PyTypeObject *__pyx_ptype_6pysdif_7_pysdif_FrameW;
  PyTypeObject *__pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct__genexpr;
  PyTypeObject *__pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr;
  PyObject *__pyx_kp_s_1FTD_signature_s_components_s;
  PyObject *__pyx_kp_s_1MTD_signature_s_column_names_s;
  PyObject *__pyx_kp_s_A_Frame_can_only_be_iterated_onc;
  PyObject *__pyx_n_s_AllDataRead;
  PyObject *__pyx_n_s_AssertionError;
  PyObject *__pyx_kp_s_Attempted_to_read_matrix_header;
  PyObject *__pyx_kp_s_Attempted_to_read_past_end_of_fi;
  PyObject *__pyx_kp_s_Can_t_get_the_data_since_it_was;
  PyObject *__pyx_kp_s_Can_t_skip_the_matrix_status_is;
  PyObject *__pyx_n_s_Component;
  PyObject *__pyx_n_s_Component___reduce_cython;
  PyObject *__pyx_n_s_Component___setstate_cython;
  PyObject *__pyx_kp_s_Component_signature_s_name_s_num;
  PyObject *__pyx_kp_s_Could_not_create_frametype;
  PyObject *__pyx_kp_s_Could_not_create_matrixtype;
  PyObject *__pyx_kp_s_Could_not_open_s;
  PyObject *__pyx_kp_s_Could_not_read_matrix_header;
  PyObject *__pyx_n_s_Darwin;
  PyObject *__pyx_n_s_DataRead;
  PyObject *__pyx_n_s_DataSkipped;
  PyObject *__pyx_kp_s_Do_not_call_frame_write_when_usi;
  PyObject *__pyx_n_s_EOFError;
  PyObject *__pyx_kp_s_Error_finalizing_Frame;
  PyObject *__pyx_kp_s_Error_finalizing_matrix;
  PyObject *__pyx_kp_s_Expected_a_2D_array_got_d_dimens;
  PyObject *__pyx_kp_s_Expected_a_2D_array_got_shape_d;
  PyObject *__pyx_kp_s_Failed_to_fetch_the_column_names;
  PyObject *__pyx_n_s_FrameR;
  PyObject *__pyx_n_s_FrameR___reduce_cython;
  PyObject *__pyx_n_s_FrameR___setstate_cython;
  PyObject *__pyx_n_s_FrameR_get_matrix;
  PyObject *__pyx_kp_s_FrameR_signature_sig_time_t_matr;
  PyObject *__pyx_n_s_FrameTypeDefinition;
  PyObject *__pyx_n_s_FrameTypeDefinition___reduce_cyt;
  PyObject *__pyx_n_s_FrameTypeDefinition___setstate_c;
  PyObject *__pyx_n_s_FrameW;
  PyObject *__pyx_n_s_FrameW___enter;
  PyObject *__pyx_n_s_FrameW___exit;
  PyObject *__pyx_n_s_FrameW___reduce_cython;
  PyObject *__pyx_n_s_FrameW___setstate_cython;
  PyObject *__pyx_n_s_FrameW_add_matrix;
  PyObject *__pyx_kp_s_FrameW_signature_s_time_f_stream;
  PyObject *__pyx_n_s_FrameW_write;
  PyObject *__pyx_kp_s_Frame_has_already_been_written;
  PyObject *__pyx_kp_s_Frame_header_has_not_been_read;
  PyObject *__pyx_kp_s_Frame_with_d_matrices_not_writte;
  PyObject *__pyx_n_s_HeaderRead;
  PyObject *__pyx_n_s_INFO;
  PyObject *__pyx_n_s_IOError;
  PyObject *__pyx_n_s_ImportError;
  PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
  PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2;
  PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3;
  PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4;
  PyObject *__pyx_n_s_IndexError;
  PyObject *__pyx_kp_b_Index_Frequency_Amplitude_Phase;
  PyObject *__pyx_n_s_Invalid;
  PyObject *__pyx_n_s_KeyError;
  PyObject *__pyx_n_s_Linux;
  PyObject *__pyx_n_s_Matrix;
  PyObject *__pyx_n_s_MatrixTypeDefinition;
  PyObject *__pyx_n_s_MatrixTypeDefinition___reduce_cy;
  PyObject *__pyx_n_s_MatrixTypeDefinition___setstate;
  PyObject *__pyx_n_s_Matrix___reduce_cython;
  PyObject *__pyx_n_s_Matrix___setstate_cython;
  PyObject *__pyx_kp_s_Matrix_can_only_be_skipped_if_da;
  PyObject *__pyx_n_s_Matrix_column_names;
  PyObject *__pyx_kp_s_Matrix_data_can_only_be_skipped;
  PyObject *__pyx_n_s_Matrix_get_data;
  PyObject *__pyx_kp_s_Matrix_header_was_already_read;
  PyObject *__pyx_kp_s_Matrix_sig_s_rows_d_cols_d_dtype;
  PyObject *__pyx_n_s_Matrix_skip;
  PyObject *__pyx_n_s_NameError;
  PyObject *__pyx_n_s_NoFrame;
  PyObject *__pyx_n_s_NoMatrix;
  PyObject *__pyx_kp_s_No_current_matrix;
  PyObject *__pyx_kp_s_No_current_matrix_2;
  PyObject *__pyx_kp_s_No_matrices_were_added_Frame_not;
  PyObject *__pyx_n_s_NothingRead;
  PyObject *__pyx_n_s_Offline;
  PyObject *__pyx_kp_s_Only_strings_or_bytestrings_are;
  PyObject *__pyx_n_s_OverflowError;
  PyObject *__pyx_kp_s_Path_s_does_not_exist_can_t_crea;
  PyObject *__pyx_n_s_PickleError;
  PyObject *__pyx_kp_s_Platform_unknown;
  PyObject *__pyx_n_b_RBEP;
  PyObject *__pyx_kp_b_RBEP_ReassignedBandEnhancedParti;
  PyObject *__pyx_n_s_RuntimeError;
  PyObject *__pyx_n_s_SDIF_PREDEFINEDTYPES;
  PyObject *__pyx_n_s_SdifFile;
  PyObject *__pyx_kp_s_SdifFile_NULL;
  PyObject *__pyx_n_s_SdifFile___enter;
  PyObject *__pyx_n_s_SdifFile___exit;
  PyObject *__pyx_kp_s_SdifFile___init;
  PyObject *__pyx_n_s_SdifFile___reduce_cython;
  PyObject *__pyx_n_s_SdifFile___setstate_cython;
  PyObject *__pyx_n_s_SdifFile__read_padding;
  PyObject *__pyx_n_s_SdifFile__read_signature;
  PyObject *__pyx_n_s_SdifFile__rewind;
  PyObject *__pyx_n_s_SdifFile_add_NVT;
  PyObject *__pyx_n_s_SdifFile_add_frame_type;
  PyObject *__pyx_n_s_SdifFile_add_matrix_type;
  PyObject *__pyx_n_s_SdifFile_add_predefined_frametyp;
  PyObject *__pyx_n_s_SdifFile_add_streamID;
  PyObject *__pyx_n_s_SdifFile_clone_NVTs;
  PyObject *__pyx_n_s_SdifFile_clone_definitions;
  PyObject *__pyx_n_s_SdifFile_clone_frames;
  PyObject *__pyx_n_s_SdifFile_clone_type_definitions;
  PyObject *__pyx_n_s_SdifFile_close;
  PyObject *__pyx_n_s_SdifFile_curr_frame_available;
  PyObject *__pyx_n_s_SdifFile_curr_frame_is_selected;
  PyObject *__pyx_n_s_SdifFile_curr_matrix_available;
  PyObject *__pyx_n_s_SdifFile_curr_matrix_datatype;
  PyObject *__pyx_n_s_SdifFile_curr_matrix_is_selected;
  PyObject *__pyx_n_s_SdifFile_curr_matrix_signature;
  PyObject *__pyx_n_s_SdifFile_curr_matrix_size;
  PyObject *__pyx_n_s_SdifFile_curr_signature;
  PyObject *__pyx_kp_s_SdifFile_dealloc;
  PyObject *__pyx_n_s_SdifFile_frame_id;
  PyObject *__pyx_n_s_SdifFile_frame_num_matrix;
  PyObject *__pyx_n_s_SdifFile_frame_numerical_signatu;
  PyObject *__pyx_n_s_SdifFile_frame_read_header;
  PyObject *__pyx_n_s_SdifFile_frame_signature;
  PyObject *__pyx_n_s_SdifFile_frame_skip_data;
  PyObject *__pyx_n_s_SdifFile_frame_skip_rest;
  PyObject *__pyx_n_s_SdifFile_frame_time;
  PyObject *__pyx_n_s_SdifFile_frame_types_to_string;
  PyObject *__pyx_n_s_SdifFile_get_NVTs;
  PyObject *__pyx_n_s_SdifFile_get_frame_types;
  PyObject *__pyx_n_s_SdifFile_get_matrix_types;
  PyObject *__pyx_n_s_SdifFile_get_num_NVTs;
  PyObject *__pyx_n_s_SdifFile_get_stream_IDs;
  PyObject *__pyx_n_s_SdifFile_last_error;
  PyObject *__pyx_n_s_SdifFile_matrix_read_data;
  PyObject *__pyx_n_s_SdifFile_matrix_read_header;
  PyObject *__pyx_n_s_SdifFile_matrix_skip;
  PyObject *__pyx_n_s_SdifFile_matrix_skip_data;
  PyObject *__pyx_n_s_SdifFile_matrix_types_to_string;
  PyObject *__pyx_kp_s_SdifFile_name_name_mode_mode;
  PyObject *__pyx_n_s_SdifFile_new_frame;
  PyObject *__pyx_n_s_SdifFile_new_frame_one_matrix;
  PyObject *__pyx_n_s_SdifFile_next_frame;
  PyObject *__pyx_n_s_SdifFile_next_matrix;
  PyObject *__pyx_n_s_SdifFile_print_NVT;
  PyObject *__pyx_n_s_SdifFile_print_all_ascii_chunks;
  PyObject *__pyx_n_s_SdifFile_print_all_stream_ID;
  PyObject *__pyx_n_s_SdifFile_print_all_types;
  PyObject *__pyx_n_s_SdifFile_print_frame_header;
  PyObject *__pyx_n_s_SdifFile_print_general_header;
  PyObject *__pyx_n_s_SdifFile_print_matrix_header;
  PyObject *__pyx_n_s_SdifFile_print_one_row;
  PyObject *__pyx_n_s_SdifFile_rewind;
  PyObject *__pyx_n_s_SdifFile_status;
  PyObject *__pyx_n_s_SdifFile_write_all_ascii_chunks;
  PyObject *__pyx_n_s_SdifOrderError;
  PyObject *__pyx_kp_s_SdifTypes_STYP;
  PyObject *__pyx_kp_s_Sdif_initialized_using_path_s;
  PyObject *__pyx_kp_s_Sdif_initialized_without_SdifTyp;
  PyObject *__pyx_n_s_SignatureRead;
  PyObject *__pyx_n_s_SomeDataRead;
  PyObject *__pyx_kp_s_Some_data_of_the_matrix_has_been;
  PyObject *__pyx_kp_s_Status_Frame_frame_MatrixIdx_mid;
  PyObject *__pyx_n_s_StopIteration;
  PyObject *__pyx_n_s_StreamID;
  PyObject *__pyx_n_s_StreamID___reduce_cython;
  PyObject *__pyx_n_s_StreamID___setstate_cython;
  PyObject *__pyx_kp_s_StreamID_numid_d_source_s_treewa;
  PyObject *__pyx_kp_s_The_frame_should_be_read_or_skip;
  PyObject *__pyx_kp_s_The_header_of_the_current_frame;
  PyObject *__pyx_kp_s_The_header_was_already_read;
  PyObject *__pyx_kp_s_This_function_is_only_possible_f;
  PyObject *__pyx_kp_s_This_matrix_type_sig_does_not_se;
  PyObject *__pyx_kp_s_Two_many_matrices_for_one_frame;
  PyObject *__pyx_n_s_TypeError;
  PyObject *__pyx_kp_s_Undefined_frametype_sig_You_must;
  PyObject *__pyx_n_s_ValueError;
  PyObject *__pyx_n_s_Windows;
  PyObject *__pyx_kp_s__10;
  PyObject *__pyx_kp_s__14;
  PyObject *__pyx_n_s__172;
  PyObject *__pyx_kp_b__18;
  PyObject *__pyx_kp_b__4;
  PyObject *__pyx_kp_b__5;
  PyObject *__pyx_kp_s__8;
  PyObject *__pyx_kp_u__8;
  PyObject *__pyx_n_s__9;
  PyObject *__pyx_n_s_abspath;
  PyObject *__pyx_n_s_add_NVT;
  PyObject *__pyx_n_s_add_frame_type;
  PyObject *__pyx_n_s_add_matrix;
  PyObject *__pyx_n_s_add_matrix_type;
  PyObject *__pyx_n_s_add_predefined_frametype;
  PyObject *__pyx_n_s_add_streamID;
  PyObject *__pyx_n_s_allframetypes;
  PyObject *__pyx_n_s_allmatrixtypes;
  PyObject *__pyx_n_s_args;
  PyObject *__pyx_n_s_ascii;
  PyObject *__pyx_n_s_ascontiguousarray;
  PyObject *__pyx_n_s_asyncio_coroutines;
  PyObject *__pyx_n_s_bytes_read;
  PyObject *__pyx_n_s_bytesread;
  PyObject *__pyx_n_s_c_contiguous;
  PyObject *__pyx_n_s_char;
  PyObject *__pyx_n_s_cline_in_traceback;
  PyObject *__pyx_n_s_clone_NVTs;
  PyObject *__pyx_n_s_clone_definitions;
  PyObject *__pyx_n_s_clone_frames;
  PyObject *__pyx_n_s_clone_frames_locals_genexpr;
  PyObject *__pyx_n_s_clone_type_definitions;
  PyObject *__pyx_n_s_close;
  PyObject *__pyx_kp_s_close_can_t_close_SdifFile_it_is;
  PyObject *__pyx_kp_s_close_can_t_close_SdifFile_since;
  PyObject *__pyx_n_s_colnames;
  PyObject *__pyx_n_s_cols;
  PyObject *__pyx_n_s_column_names;
  PyObject *__pyx_n_s_comp;
  PyObject *__pyx_n_s_components;
  PyObject *__pyx_kp_s_components_should_be_a_seq_of_Co;
  PyObject *__pyx_n_s_copy;
  PyObject *__pyx_n_s_curr_frame_available;
  PyObject *__pyx_n_s_curr_frame_is_selected;
  PyObject *__pyx_n_s_curr_matrix_available;
  PyObject *__pyx_n_s_curr_matrix_datatype;
  PyObject *__pyx_n_s_curr_matrix_is_selected;
  PyObject *__pyx_n_s_curr_matrix_signature;
  PyObject *__pyx_n_s_curr_matrix_size;
  PyObject *__pyx_n_s_curr_signature;
  PyObject *__pyx_n_s_d;
  PyObject *__pyx_n_s_data;
  PyObject *__pyx_n_s_data_array;
  PyObject *__pyx_n_s_datadir;
  PyObject *__pyx_n_s_debug;
  PyObject *__pyx_n_s_dict;
  PyObject *__pyx_n_s_dict_2;
  PyObject *__pyx_kp_u_disable;
  PyObject *__pyx_n_s_doc;
  PyObject *__pyx_n_s_dtype;
  PyObject *__pyx_kp_u_enable;
  PyObject *__pyx_n_s_encode;
  PyObject *__pyx_n_s_enter;
  PyObject *__pyx_n_s_enumerate;
  PyObject *__pyx_n_s_error;
  PyObject *__pyx_kp_s_error_finishing_matrix;
  PyObject *__pyx_kp_s_error_opening_file;
  PyObject *__pyx_n_s_exception_type;
  PyObject *__pyx_n_s_exception_value;
  PyObject *__pyx_n_s_exists;
  PyObject *__pyx_n_s_exit;
  PyObject *__pyx_n_s_expanduser;
  PyObject *__pyx_n_s_f;
  PyObject *__pyx_n_s_file;
  PyObject *__pyx_n_s_filename;
  PyObject *__pyx_n_s_finalize_frame;
  PyObject *__pyx_kp_s_finalize_frame_called_but_heade;
  PyObject *__pyx_kp_s_finalize_frame_without_having_r;
  PyObject *__pyx_n_s_finalize_matrix;
  PyObject *__pyx_n_s_find_sdiftypes;
  PyObject *__pyx_n_s_find_sdiftypes_locals_get_packa;
  PyObject *__pyx_n_s_flags;
  PyObject *__pyx_n_s_float32;
  PyObject *__pyx_n_s_float64;
  PyObject *__pyx_n_s_format;
  PyObject *__pyx_n_s_frame;
  PyObject *__pyx_n_s_frame0;
  PyObject *__pyx_n_s_frame1;
  PyObject *__pyx_n_s_frame_id;
  PyObject *__pyx_n_s_frame_num_matrix;
  PyObject *__pyx_n_s_frame_numerical_signature;
  PyObject *__pyx_n_s_frame_read_header;
  PyObject *__pyx_kp_s_frame_read_header_finalizing_las;
  PyObject *__pyx_n_s_frame_sig;
  PyObject *__pyx_n_s_frame_signature;
  PyObject *__pyx_n_s_frame_size;
  PyObject *__pyx_n_s_frame_skip_data;
  PyObject *__pyx_kp_s_frame_skip_data_calling_finalize;
  PyObject *__pyx_n_s_frame_skip_rest;
  PyObject *__pyx_kp_s_frame_skip_rest_Attempted_to_sk;
  PyObject *__pyx_n_s_frame_time;
  PyObject *__pyx_n_s_frame_types_to_string;
  PyObject *__pyx_n_s_framestatus2str;
  PyObject *__pyx_n_s_frametype;
  PyObject *__pyx_n_s_frametypes;
  PyObject *__pyx_n_s_frametypes_populate;
  PyObject *__pyx_n_s_frametypeslist;
  PyObject *__pyx_n_s_fsz;
  PyObject *__pyx_n_s_ft;
  PyObject *__pyx_kp_u_gc;
  PyObject *__pyx_n_s_genexpr;
  PyObject *__pyx_n_s_get;
  PyObject *__pyx_n_s_getLogger;
  PyObject *__pyx_n_s_get_NVTs;
  PyObject *__pyx_n_s_get_data;
  PyObject *__pyx_n_s_get_frame_types;
  PyObject *__pyx_n_s_get_matrix;
  PyObject *__pyx_n_s_get_matrix_types;
  PyObject *__pyx_n_s_get_num_NVTs;
  PyObject *__pyx_n_s_get_packaged_sdiftypes;
  PyObject *__pyx_n_s_get_stream_IDs;
  PyObject *__pyx_n_s_getstate;
  PyObject *__pyx_n_s_i;
  PyObject *__pyx_n_s_idx;
  PyObject *__pyx_n_s_import;
  PyObject *__pyx_n_s_info;
  PyObject *__pyx_n_s_init___locals_genexpr;
  PyObject *__pyx_n_s_init_subclass;
  PyObject *__pyx_n_s_initializing;
  PyObject *__pyx_n_s_int16;
  PyObject *__pyx_n_s_int32;
  PyObject *__pyx_n_s_int64;
  PyObject *__pyx_n_s_int8;
  PyObject *__pyx_n_s_is_coroutine;
  PyObject *__pyx_kp_u_isenabled;
  PyObject *__pyx_n_s_items;
  PyObject *__pyx_n_s_iteritems;
  PyObject *__pyx_n_s_join;
  PyObject *__pyx_n_s_last_error;
  PyObject *__pyx_kp_s_local_share;
  PyObject *__pyx_n_s_logger;
  PyObject *__pyx_n_s_logging;
  PyObject *__pyx_n_s_m;
  PyObject *__pyx_n_s_main;
  PyObject *__pyx_n_s_matrix;
  PyObject *__pyx_kp_s_matrix_empty_or_could_not_read_m;
  PyObject *__pyx_n_s_matrix_idx;
  PyObject *__pyx_n_s_matrix_read_data;
  PyObject *__pyx_n_s_matrix_read_header;
  PyObject *__pyx_n_s_matrix_sig;
  PyObject *__pyx_n_s_matrix_skip;
  PyObject *__pyx_n_s_matrix_skip_data;
  PyObject *__pyx_kp_s_matrix_skip_data_no_current_fram;
  PyObject *__pyx_kp_s_matrix_skip_no_current_frame;
  PyObject *__pyx_n_s_matrix_status;
  PyObject *__pyx_n_s_matrix_types_to_string;
  PyObject *__pyx_n_s_matrixdata;
  PyObject *__pyx_n_s_matrixrole;
  PyObject *__pyx_n_s_matrixsig;
  PyObject *__pyx_n_s_matrixstatus2str;
  PyObject *__pyx_n_s_matrixtype;
  PyObject *__pyx_n_s_matrixtypes;
  PyObject *__pyx_n_s_matrixtypeslist;
  PyObject *__pyx_n_s_metaclass;
  PyObject *__pyx_n_s_midx;
  PyObject *__pyx_n_s_mode;
  PyObject *__pyx_kp_s_mode_should_be_on_of_r_w_rw;
  PyObject *__pyx_n_s_module;
  PyObject *__pyx_n_s_mro_entries;
  PyObject *__pyx_n_s_mt;
  PyObject *__pyx_n_s_mtd;
  PyObject *__pyx_n_s_n;
  PyObject *__pyx_n_s_name;
  PyObject *__pyx_n_s_name_2;
  PyObject *__pyx_n_s_new;
  PyObject *__pyx_n_s_new_frame;
  PyObject *__pyx_n_s_new_frame_one_matrix;
  PyObject *__pyx_n_s_next;
  PyObject *__pyx_n_s_next_frame;
  PyObject *__pyx_n_s_next_matrix;
  PyObject *__pyx_kp_s_no_current_frame;
  PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
  PyObject *__pyx_n_s_np;
  PyObject *__pyx_n_s_num;
  PyObject *__pyx_n_s_num_matrices;
  PyObject *__pyx_n_s_numid;
  PyObject *__pyx_n_s_numpy;
  PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
  PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
  PyObject *__pyx_n_s_nvt;
  PyObject *__pyx_n_s_os;
  PyObject *__pyx_n_s_os_path;
  PyObject *__pyx_n_s_out;
  PyObject *__pyx_n_s_p;
  PyObject *__pyx_n_s_p2;
  PyObject *__pyx_n_s_packaged_sdiftypes;
  PyObject *__pyx_n_s_path;
  PyObject *__pyx_kp_s_path_not_found_cannot_open_sdif;
  PyObject *__pyx_n_s_paths;
  PyObject *__pyx_n_s_pickle;
  PyObject *__pyx_n_s_pl;
  PyObject *__pyx_n_s_platform;
  PyObject *__pyx_n_s_predefined_frametypes;
  PyObject *__pyx_n_s_predefined_matrixtypes;
  PyObject *__pyx_n_s_predefined_type;
  PyObject *__pyx_n_s_prepare;
  PyObject *__pyx_n_s_print;
  PyObject *__pyx_n_s_print_NVT;
  PyObject *__pyx_n_s_print_all_ascii_chunks;
  PyObject *__pyx_n_s_print_all_stream_ID;
  PyObject *__pyx_n_s_print_all_types;
  PyObject *__pyx_n_s_print_frame_header;
  PyObject *__pyx_n_s_print_general_header;
  PyObject *__pyx_n_s_print_matrix_header;
  PyObject *__pyx_n_s_print_one_row;
  PyObject *__pyx_n_s_pysdif;
  PyObject *__pyx_n_s_pysdif__pysdif;
  PyObject *__pyx_kp_s_pysdif__pysdif_pyx;
  PyObject *__pyx_n_s_pyx_PickleError;
  PyObject *__pyx_n_s_pyx_checksum;
  PyObject *__pyx_n_s_pyx_result;
  PyObject *__pyx_n_s_pyx_state;
  PyObject *__pyx_n_s_pyx_type;
  PyObject *__pyx_n_s_pyx_unpickle_Component;
  PyObject *__pyx_n_s_pyx_unpickle_FrameTypeDefiniti;
  PyObject *__pyx_n_s_pyx_unpickle_FrameW;
  PyObject *__pyx_n_s_pyx_unpickle_MatrixTypeDefinit;
  PyObject *__pyx_n_s_pyx_vtable;
  PyObject *__pyx_n_s_qualname;
  PyObject *__pyx_n_s_r;
  PyObject *__pyx_n_s_range;
  PyObject *__pyx_n_s_read_padding;
  PyObject *__pyx_n_s_read_sdiftypes;
  PyObject *__pyx_n_s_read_signature;
  PyObject *__pyx_n_s_reduce;
  PyObject *__pyx_n_s_reduce_cython;
  PyObject *__pyx_n_s_reduce_ex;
  PyObject *__pyx_n_s_replace;
  PyObject *__pyx_n_s_rewind;
  PyObject *__pyx_n_s_rewind_2;
  PyObject *__pyx_n_s_rows;
  PyObject *__pyx_n_s_rw;
  PyObject *__pyx_n_s_s;
  PyObject *__pyx_kp_s_s_should_be_either_a_str_or_byte;
  PyObject *__pyx_n_s_sdif_cleanup;
  PyObject *__pyx_n_s_sdif_init;
  PyObject *__pyx_n_s_sdifstr;
  PyObject *__pyx_n_s_sdiftypes_data;
  PyObject *__pyx_n_s_sdiftypes_path;
  PyObject *__pyx_n_s_self;
  PyObject *__pyx_n_s_send;
  PyObject *__pyx_n_s_setLevel;
  PyObject *__pyx_n_s_set_name;
  PyObject *__pyx_n_s_setstate;
  PyObject *__pyx_n_s_setstate_cython;
  PyObject *__pyx_n_s_shape;
  PyObject *__pyx_n_s_sig;
  PyObject *__pyx_n_s_signature;
  PyObject *__pyx_n_s_signature2str;
  PyObject *__pyx_kp_s_signature_not_found;
  PyObject *__pyx_n_s_signatures_to_clone;
  PyObject *__pyx_n_s_signaturesture;
  PyObject *__pyx_n_s_sigs;
  PyObject *__pyx_n_s_skip;
  PyObject *__pyx_n_s_source;
  PyObject *__pyx_n_s_spec;
  PyObject *__pyx_n_s_split;
  PyObject *__pyx_n_s_state;
  PyObject *__pyx_n_s_status;
  PyObject *__pyx_n_s_str2signature;
  PyObject *__pyx_n_s_streamID;
  PyObject *__pyx_kp_s_stringsource;
  PyObject *__pyx_n_s_strip;
  PyObject *__pyx_n_s_super;
  PyObject *__pyx_n_s_system;
  PyObject *__pyx_n_s_t;
  PyObject *__pyx_n_s_test;
  PyObject *__pyx_n_s_thisfile;
  PyObject *__pyx_n_s_throw;
  PyObject *__pyx_n_s_time;
  PyObject *__pyx_n_s_traceback;
  PyObject *__pyx_n_s_treeway;
  PyObject *__pyx_kp_s_tried_to_finalize_matrix_but_sta;
  PyObject *__pyx_n_s_uint16;
  PyObject *__pyx_n_s_uint32;
  PyObject *__pyx_n_s_uint64;
  PyObject *__pyx_n_s_uint8;
  PyObject *__pyx_n_s_update;
  PyObject *__pyx_n_s_use_setstate;
  PyObject *__pyx_kp_s_usr_local_share;
  PyObject *__pyx_kp_s_usr_share;
  PyObject *__pyx_n_s_value;
  PyObject *__pyx_n_s_w;
  PyObject *__pyx_n_s_warn;
  PyObject *__pyx_n_s_warning;
  PyObject *__pyx_n_s_warnings;
  PyObject *__pyx_n_s_wr;
  PyObject *__pyx_n_s_write;
  PyObject *__pyx_n_s_write_all_ascii_chunks;
  PyObject *__pyx_int_0;
  PyObject *__pyx_int_4;
  PyObject *__pyx_int_8;
  PyObject *__pyx_int_257;
  PyObject *__pyx_int_258;
  PyObject *__pyx_int_260;
  PyObject *__pyx_int_264;
  PyObject *__pyx_int_513;
  PyObject *__pyx_int_514;
  PyObject *__pyx_int_516;
  PyObject *__pyx_int_520;
  PyObject *__pyx_int_769;
  PyObject *__pyx_int_17723012;
  PyObject *__pyx_int_20897590;
  PyObject *__pyx_int_57246580;
  PyObject *__pyx_int_66826235;
  PyObject *__pyx_int_117679685;
  PyObject *__pyx_int_149399746;
  PyObject *__pyx_int_149774176;
  PyObject *__pyx_int_168628298;
  PyObject *__pyx_int_216518149;
  PyObject *__pyx_int_229941985;
  PyObject *__pyx_int_247608754;
  PyObject *__pyx_int_256861586;
  PyObject *__pyx_int_neg_1;
  PyObject *__pyx_tuple_;
  PyObject *__pyx_tuple__2;
  PyObject *__pyx_tuple__3;
  PyObject *__pyx_tuple__6;
  PyObject *__pyx_tuple__11;
  PyObject *__pyx_tuple__12;
  PyObject *__pyx_tuple__13;
  PyObject *__pyx_tuple__15;
  PyObject *__pyx_tuple__16;
  PyObject *__pyx_tuple__17;
  PyObject *__pyx_tuple__19;
  PyObject *__pyx_tuple__20;
  PyObject *__pyx_tuple__21;
  PyObject *__pyx_tuple__22;
  PyObject *__pyx_tuple__23;
  PyObject *__pyx_tuple__24;
  PyObject *__pyx_tuple__25;
  PyObject *__pyx_tuple__26;
  PyObject *__pyx_tuple__27;
  PyObject *__pyx_tuple__28;
  PyObject *__pyx_tuple__29;
  PyObject *__pyx_tuple__30;
  PyObject *__pyx_tuple__32;
  PyObject *__pyx_tuple__34;
  PyObject *__pyx_tuple__36;
  PyObject *__pyx_tuple__38;
  PyObject *__pyx_tuple__45;
  PyObject *__pyx_tuple__47;
  PyObject *__pyx_tuple__51;
  PyObject *__pyx_tuple__53;
  PyObject *__pyx_tuple__55;
  PyObject *__pyx_tuple__57;
  PyObject *__pyx_tuple__58;
  PyObject *__pyx_tuple__60;
  PyObject *__pyx_tuple__62;
  PyObject *__pyx_tuple__64;
  PyObject *__pyx_tuple__65;
  PyObject *__pyx_tuple__70;
  PyObject *__pyx_tuple__75;
  PyObject *__pyx_tuple__77;
  PyObject *__pyx_tuple__79;
  PyObject *__pyx_tuple__84;
  PyObject *__pyx_tuple__88;
  PyObject *__pyx_tuple__95;
  PyObject *__pyx_codeobj__7;
  PyObject *__pyx_tuple__100;
  PyObject *__pyx_tuple__102;
  PyObject *__pyx_tuple__105;
  PyObject *__pyx_tuple__110;
  PyObject *__pyx_tuple__112;
  PyObject *__pyx_tuple__113;
  PyObject *__pyx_tuple__120;
  PyObject *__pyx_tuple__125;
  PyObject *__pyx_tuple__127;
  PyObject *__pyx_tuple__129;
  PyObject *__pyx_tuple__131;
  PyObject *__pyx_tuple__133;
  PyObject *__pyx_tuple__135;
  PyObject *__pyx_tuple__137;
  PyObject *__pyx_tuple__139;
  PyObject *__pyx_tuple__141;
  PyObject *__pyx_tuple__144;
  PyObject *__pyx_tuple__146;
  PyObject *__pyx_tuple__147;
  PyObject *__pyx_tuple__150;
  PyObject *__pyx_tuple__158;
  PyObject *__pyx_tuple__167;
  PyObject *__pyx_codeobj__31;
  PyObject *__pyx_codeobj__33;
  PyObject *__pyx_codeobj__35;
  PyObject *__pyx_codeobj__37;
  PyObject *__pyx_codeobj__39;
  PyObject *__pyx_codeobj__40;
  PyObject *__pyx_codeobj__41;
  PyObject *__pyx_codeobj__42;
  PyObject *__pyx_codeobj__43;
  PyObject *__pyx_codeobj__44;
  PyObject *__pyx_codeobj__46;
  PyObject *__pyx_codeobj__48;
  PyObject *__pyx_codeobj__49;
  PyObject *__pyx_codeobj__50;
  PyObject *__pyx_codeobj__52;
  PyObject *__pyx_codeobj__54;
  PyObject *__pyx_codeobj__56;
  PyObject *__pyx_codeobj__59;
  PyObject *__pyx_codeobj__61;
  PyObject *__pyx_codeobj__63;
  PyObject *__pyx_codeobj__66;
  PyObject *__pyx_codeobj__67;
  PyObject *__pyx_codeobj__68;
  PyObject *__pyx_codeobj__69;
  PyObject *__pyx_codeobj__71;
  PyObject *__pyx_codeobj__72;
  PyObject *__pyx_codeobj__73;
  PyObject *__pyx_codeobj__74;
  PyObject *__pyx_codeobj__76;
  PyObject *__pyx_codeobj__78;
  PyObject *__pyx_codeobj__80;
  PyObject *__pyx_codeobj__81;
  PyObject *__pyx_codeobj__82;
  PyObject *__pyx_codeobj__83;
  PyObject *__pyx_codeobj__85;
  PyObject *__pyx_codeobj__86;
  PyObject *__pyx_codeobj__87;
  PyObject *__pyx_codeobj__89;
  PyObject *__pyx_codeobj__90;
  PyObject *__pyx_codeobj__91;
  PyObject *__pyx_codeobj__92;
  PyObject *__pyx_codeobj__93;
  PyObject *__pyx_codeobj__94;
  PyObject *__pyx_codeobj__96;
  PyObject *__pyx_codeobj__97;
  PyObject *__pyx_codeobj__98;
  PyObject *__pyx_codeobj__99;
  PyObject *__pyx_codeobj__101;
  PyObject *__pyx_codeobj__103;
  PyObject *__pyx_codeobj__104;
  PyObject *__pyx_codeobj__106;
  PyObject *__pyx_codeobj__107;
  PyObject *__pyx_codeobj__108;
  PyObject *__pyx_codeobj__109;
  PyObject *__pyx_codeobj__111;
  PyObject *__pyx_codeobj__114;
  PyObject *__pyx_codeobj__115;
  PyObject *__pyx_codeobj__116;
  PyObject *__pyx_codeobj__117;
  PyObject *__pyx_codeobj__118;
  PyObject *__pyx_codeobj__119;
  PyObject *__pyx_codeobj__121;
  PyObject *__pyx_codeobj__122;
  PyObject *__pyx_codeobj__123;
  PyObject *__pyx_codeobj__124;
  PyObject *__pyx_codeobj__126;
  PyObject *__pyx_codeobj__128;
  PyObject *__pyx_codeobj__130;
  PyObject *__pyx_codeobj__132;
  PyObject *__pyx_codeobj__134;
  PyObject *__pyx_codeobj__136;
  PyObject *__pyx_codeobj__138;
  PyObject *__pyx_codeobj__140;
  PyObject *__pyx_codeobj__142;
  PyObject *__pyx_codeobj__143;
  PyObject *__pyx_codeobj__145;
  PyObject *__pyx_codeobj__148;
  PyObject *__pyx_codeobj__149;
  PyObject *__pyx_codeobj__151;
  PyObject *__pyx_codeobj__152;
  PyObject *__pyx_codeobj__153;
  PyObject *__pyx_codeobj__154;
  PyObject *__pyx_codeobj__155;
  PyObject *__pyx_codeobj__156;
  PyObject *__pyx_codeobj__157;
  PyObject *__pyx_codeobj__159;
  PyObject *__pyx_codeobj__160;
  PyObject *__pyx_codeobj__161;
  PyObject *__pyx_codeobj__162;
  PyObject *__pyx_codeobj__163;
  PyObject *__pyx_codeobj__164;
  PyObject *__pyx_codeobj__165;
  PyObject *__pyx_codeobj__166;
  PyObject *__pyx_codeobj__168;
  PyObject *__pyx_codeobj__169;
  PyObject *__pyx_codeobj__170;
  PyObject *__pyx_codeobj__171;
} __pyx_mstate;

#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(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o))

#define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef)))

#define __pyx_m (PyState_FindModule(&__pyx_moduledef))
#else
static __pyx_mstate __pyx_mstate_global_static =
#ifdef __cplusplus
    {};
#else
    {0};
#endif
static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static;
#endif
/* #### Code section: module_state_clear ### */
#if CYTHON_USE_MODULE_STATE
static int __pyx_m_clear(PyObject *m) {
  __pyx_mstate *clear_module_state = __pyx_mstate(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);
  #ifdef __Pyx_CyFunction_USED
  Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
  #endif
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
  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_6pysdif_7_pysdif_StreamID);
  Py_CLEAR(clear_module_state->__pyx_type_6pysdif_7_pysdif_StreamID);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition);
  Py_CLEAR(clear_module_state->__pyx_type_6pysdif_7_pysdif_MatrixTypeDefinition);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pysdif_7_pysdif_Component);
  Py_CLEAR(clear_module_state->__pyx_type_6pysdif_7_pysdif_Component);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pysdif_7_pysdif_FrameTypeDefinition);
  Py_CLEAR(clear_module_state->__pyx_type_6pysdif_7_pysdif_FrameTypeDefinition);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pysdif_7_pysdif_FrameR);
  Py_CLEAR(clear_module_state->__pyx_type_6pysdif_7_pysdif_FrameR);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pysdif_7_pysdif_SdifFile);
  Py_CLEAR(clear_module_state->__pyx_type_6pysdif_7_pysdif_SdifFile);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pysdif_7_pysdif_Matrix);
  Py_CLEAR(clear_module_state->__pyx_type_6pysdif_7_pysdif_Matrix);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pysdif_7_pysdif_FrameW);
  Py_CLEAR(clear_module_state->__pyx_type_6pysdif_7_pysdif_FrameW);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct__genexpr);
  Py_CLEAR(clear_module_state->__pyx_type_6pysdif_7_pysdif___pyx_scope_struct__genexpr);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr);
  Py_CLEAR(clear_module_state->__pyx_type_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr);
  Py_CLEAR(clear_module_state->__pyx_kp_s_1FTD_signature_s_components_s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_1MTD_signature_s_column_names_s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_A_Frame_can_only_be_iterated_onc);
  Py_CLEAR(clear_module_state->__pyx_n_s_AllDataRead);
  Py_CLEAR(clear_module_state->__pyx_n_s_AssertionError);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Attempted_to_read_matrix_header);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Attempted_to_read_past_end_of_fi);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Can_t_get_the_data_since_it_was);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Can_t_skip_the_matrix_status_is);
  Py_CLEAR(clear_module_state->__pyx_n_s_Component);
  Py_CLEAR(clear_module_state->__pyx_n_s_Component___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Component___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Component_signature_s_name_s_num);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Could_not_create_frametype);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Could_not_create_matrixtype);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Could_not_open_s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Could_not_read_matrix_header);
  Py_CLEAR(clear_module_state->__pyx_n_s_Darwin);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataRead);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataSkipped);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Do_not_call_frame_write_when_usi);
  Py_CLEAR(clear_module_state->__pyx_n_s_EOFError);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Error_finalizing_Frame);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Error_finalizing_matrix);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Expected_a_2D_array_got_d_dimens);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Expected_a_2D_array_got_shape_d);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Failed_to_fetch_the_column_names);
  Py_CLEAR(clear_module_state->__pyx_n_s_FrameR);
  Py_CLEAR(clear_module_state->__pyx_n_s_FrameR___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_FrameR___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_FrameR_get_matrix);
  Py_CLEAR(clear_module_state->__pyx_kp_s_FrameR_signature_sig_time_t_matr);
  Py_CLEAR(clear_module_state->__pyx_n_s_FrameTypeDefinition);
  Py_CLEAR(clear_module_state->__pyx_n_s_FrameTypeDefinition___reduce_cyt);
  Py_CLEAR(clear_module_state->__pyx_n_s_FrameTypeDefinition___setstate_c);
  Py_CLEAR(clear_module_state->__pyx_n_s_FrameW);
  Py_CLEAR(clear_module_state->__pyx_n_s_FrameW___enter);
  Py_CLEAR(clear_module_state->__pyx_n_s_FrameW___exit);
  Py_CLEAR(clear_module_state->__pyx_n_s_FrameW___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_FrameW___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_FrameW_add_matrix);
  Py_CLEAR(clear_module_state->__pyx_kp_s_FrameW_signature_s_time_f_stream);
  Py_CLEAR(clear_module_state->__pyx_n_s_FrameW_write);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Frame_has_already_been_written);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Frame_header_has_not_been_read);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Frame_with_d_matrices_not_writte);
  Py_CLEAR(clear_module_state->__pyx_n_s_HeaderRead);
  Py_CLEAR(clear_module_state->__pyx_n_s_INFO);
  Py_CLEAR(clear_module_state->__pyx_n_s_IOError);
  Py_CLEAR(clear_module_state->__pyx_n_s_ImportError);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4);
  Py_CLEAR(clear_module_state->__pyx_n_s_IndexError);
  Py_CLEAR(clear_module_state->__pyx_kp_b_Index_Frequency_Amplitude_Phase);
  Py_CLEAR(clear_module_state->__pyx_n_s_Invalid);
  Py_CLEAR(clear_module_state->__pyx_n_s_KeyError);
  Py_CLEAR(clear_module_state->__pyx_n_s_Linux);
  Py_CLEAR(clear_module_state->__pyx_n_s_Matrix);
  Py_CLEAR(clear_module_state->__pyx_n_s_MatrixTypeDefinition);
  Py_CLEAR(clear_module_state->__pyx_n_s_MatrixTypeDefinition___reduce_cy);
  Py_CLEAR(clear_module_state->__pyx_n_s_MatrixTypeDefinition___setstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_Matrix___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Matrix___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Matrix_can_only_be_skipped_if_da);
  Py_CLEAR(clear_module_state->__pyx_n_s_Matrix_column_names);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Matrix_data_can_only_be_skipped);
  Py_CLEAR(clear_module_state->__pyx_n_s_Matrix_get_data);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Matrix_header_was_already_read);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Matrix_sig_s_rows_d_cols_d_dtype);
  Py_CLEAR(clear_module_state->__pyx_n_s_Matrix_skip);
  Py_CLEAR(clear_module_state->__pyx_n_s_NameError);
  Py_CLEAR(clear_module_state->__pyx_n_s_NoFrame);
  Py_CLEAR(clear_module_state->__pyx_n_s_NoMatrix);
  Py_CLEAR(clear_module_state->__pyx_kp_s_No_current_matrix);
  Py_CLEAR(clear_module_state->__pyx_kp_s_No_current_matrix_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_No_matrices_were_added_Frame_not);
  Py_CLEAR(clear_module_state->__pyx_n_s_NothingRead);
  Py_CLEAR(clear_module_state->__pyx_n_s_Offline);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Only_strings_or_bytestrings_are);
  Py_CLEAR(clear_module_state->__pyx_n_s_OverflowError);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Path_s_does_not_exist_can_t_crea);
  Py_CLEAR(clear_module_state->__pyx_n_s_PickleError);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Platform_unknown);
  Py_CLEAR(clear_module_state->__pyx_n_b_RBEP);
  Py_CLEAR(clear_module_state->__pyx_kp_b_RBEP_ReassignedBandEnhancedParti);
  Py_CLEAR(clear_module_state->__pyx_n_s_RuntimeError);
  Py_CLEAR(clear_module_state->__pyx_n_s_SDIF_PREDEFINEDTYPES);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile);
  Py_CLEAR(clear_module_state->__pyx_kp_s_SdifFile_NULL);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile___enter);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile___exit);
  Py_CLEAR(clear_module_state->__pyx_kp_s_SdifFile___init);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile__read_padding);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile__read_signature);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile__rewind);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_add_NVT);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_add_frame_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_add_matrix_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_add_predefined_frametyp);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_add_streamID);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_clone_NVTs);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_clone_definitions);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_clone_frames);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_clone_type_definitions);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_close);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_curr_frame_available);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_curr_frame_is_selected);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_curr_matrix_available);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_curr_matrix_datatype);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_curr_matrix_is_selected);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_curr_matrix_signature);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_curr_matrix_size);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_curr_signature);
  Py_CLEAR(clear_module_state->__pyx_kp_s_SdifFile_dealloc);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_frame_id);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_frame_num_matrix);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_frame_numerical_signatu);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_frame_read_header);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_frame_signature);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_frame_skip_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_frame_skip_rest);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_frame_time);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_frame_types_to_string);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_get_NVTs);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_get_frame_types);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_get_matrix_types);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_get_num_NVTs);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_get_stream_IDs);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_last_error);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_matrix_read_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_matrix_read_header);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_matrix_skip);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_matrix_skip_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_matrix_types_to_string);
  Py_CLEAR(clear_module_state->__pyx_kp_s_SdifFile_name_name_mode_mode);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_new_frame);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_new_frame_one_matrix);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_next_frame);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_next_matrix);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_print_NVT);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_print_all_ascii_chunks);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_print_all_stream_ID);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_print_all_types);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_print_frame_header);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_print_general_header);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_print_matrix_header);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_print_one_row);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_rewind);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_status);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifFile_write_all_ascii_chunks);
  Py_CLEAR(clear_module_state->__pyx_n_s_SdifOrderError);
  Py_CLEAR(clear_module_state->__pyx_kp_s_SdifTypes_STYP);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Sdif_initialized_using_path_s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Sdif_initialized_without_SdifTyp);
  Py_CLEAR(clear_module_state->__pyx_n_s_SignatureRead);
  Py_CLEAR(clear_module_state->__pyx_n_s_SomeDataRead);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Some_data_of_the_matrix_has_been);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Status_Frame_frame_MatrixIdx_mid);
  Py_CLEAR(clear_module_state->__pyx_n_s_StopIteration);
  Py_CLEAR(clear_module_state->__pyx_n_s_StreamID);
  Py_CLEAR(clear_module_state->__pyx_n_s_StreamID___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_StreamID___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_kp_s_StreamID_numid_d_source_s_treewa);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_frame_should_be_read_or_skip);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_header_of_the_current_frame);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_header_was_already_read);
  Py_CLEAR(clear_module_state->__pyx_kp_s_This_function_is_only_possible_f);
  Py_CLEAR(clear_module_state->__pyx_kp_s_This_matrix_type_sig_does_not_se);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Two_many_matrices_for_one_frame);
  Py_CLEAR(clear_module_state->__pyx_n_s_TypeError);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Undefined_frametype_sig_You_must);
  Py_CLEAR(clear_module_state->__pyx_n_s_ValueError);
  Py_CLEAR(clear_module_state->__pyx_n_s_Windows);
  Py_CLEAR(clear_module_state->__pyx_kp_s__10);
  Py_CLEAR(clear_module_state->__pyx_kp_s__14);
  Py_CLEAR(clear_module_state->__pyx_n_s__172);
  Py_CLEAR(clear_module_state->__pyx_kp_b__18);
  Py_CLEAR(clear_module_state->__pyx_kp_b__4);
  Py_CLEAR(clear_module_state->__pyx_kp_b__5);
  Py_CLEAR(clear_module_state->__pyx_kp_s__8);
  Py_CLEAR(clear_module_state->__pyx_kp_u__8);
  Py_CLEAR(clear_module_state->__pyx_n_s__9);
  Py_CLEAR(clear_module_state->__pyx_n_s_abspath);
  Py_CLEAR(clear_module_state->__pyx_n_s_add_NVT);
  Py_CLEAR(clear_module_state->__pyx_n_s_add_frame_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_add_matrix);
  Py_CLEAR(clear_module_state->__pyx_n_s_add_matrix_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_add_predefined_frametype);
  Py_CLEAR(clear_module_state->__pyx_n_s_add_streamID);
  Py_CLEAR(clear_module_state->__pyx_n_s_allframetypes);
  Py_CLEAR(clear_module_state->__pyx_n_s_allmatrixtypes);
  Py_CLEAR(clear_module_state->__pyx_n_s_args);
  Py_CLEAR(clear_module_state->__pyx_n_s_ascii);
  Py_CLEAR(clear_module_state->__pyx_n_s_ascontiguousarray);
  Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
  Py_CLEAR(clear_module_state->__pyx_n_s_bytes_read);
  Py_CLEAR(clear_module_state->__pyx_n_s_bytesread);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_contiguous);
  Py_CLEAR(clear_module_state->__pyx_n_s_char);
  Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
  Py_CLEAR(clear_module_state->__pyx_n_s_clone_NVTs);
  Py_CLEAR(clear_module_state->__pyx_n_s_clone_definitions);
  Py_CLEAR(clear_module_state->__pyx_n_s_clone_frames);
  Py_CLEAR(clear_module_state->__pyx_n_s_clone_frames_locals_genexpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_clone_type_definitions);
  Py_CLEAR(clear_module_state->__pyx_n_s_close);
  Py_CLEAR(clear_module_state->__pyx_kp_s_close_can_t_close_SdifFile_it_is);
  Py_CLEAR(clear_module_state->__pyx_kp_s_close_can_t_close_SdifFile_since);
  Py_CLEAR(clear_module_state->__pyx_n_s_colnames);
  Py_CLEAR(clear_module_state->__pyx_n_s_cols);
  Py_CLEAR(clear_module_state->__pyx_n_s_column_names);
  Py_CLEAR(clear_module_state->__pyx_n_s_comp);
  Py_CLEAR(clear_module_state->__pyx_n_s_components);
  Py_CLEAR(clear_module_state->__pyx_kp_s_components_should_be_a_seq_of_Co);
  Py_CLEAR(clear_module_state->__pyx_n_s_copy);
  Py_CLEAR(clear_module_state->__pyx_n_s_curr_frame_available);
  Py_CLEAR(clear_module_state->__pyx_n_s_curr_frame_is_selected);
  Py_CLEAR(clear_module_state->__pyx_n_s_curr_matrix_available);
  Py_CLEAR(clear_module_state->__pyx_n_s_curr_matrix_datatype);
  Py_CLEAR(clear_module_state->__pyx_n_s_curr_matrix_is_selected);
  Py_CLEAR(clear_module_state->__pyx_n_s_curr_matrix_signature);
  Py_CLEAR(clear_module_state->__pyx_n_s_curr_matrix_size);
  Py_CLEAR(clear_module_state->__pyx_n_s_curr_signature);
  Py_CLEAR(clear_module_state->__pyx_n_s_d);
  Py_CLEAR(clear_module_state->__pyx_n_s_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_data_array);
  Py_CLEAR(clear_module_state->__pyx_n_s_datadir);
  Py_CLEAR(clear_module_state->__pyx_n_s_debug);
  Py_CLEAR(clear_module_state->__pyx_n_s_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_dict_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_disable);
  Py_CLEAR(clear_module_state->__pyx_n_s_doc);
  Py_CLEAR(clear_module_state->__pyx_n_s_dtype);
  Py_CLEAR(clear_module_state->__pyx_kp_u_enable);
  Py_CLEAR(clear_module_state->__pyx_n_s_encode);
  Py_CLEAR(clear_module_state->__pyx_n_s_enter);
  Py_CLEAR(clear_module_state->__pyx_n_s_enumerate);
  Py_CLEAR(clear_module_state->__pyx_n_s_error);
  Py_CLEAR(clear_module_state->__pyx_kp_s_error_finishing_matrix);
  Py_CLEAR(clear_module_state->__pyx_kp_s_error_opening_file);
  Py_CLEAR(clear_module_state->__pyx_n_s_exception_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_exception_value);
  Py_CLEAR(clear_module_state->__pyx_n_s_exists);
  Py_CLEAR(clear_module_state->__pyx_n_s_exit);
  Py_CLEAR(clear_module_state->__pyx_n_s_expanduser);
  Py_CLEAR(clear_module_state->__pyx_n_s_f);
  Py_CLEAR(clear_module_state->__pyx_n_s_file);
  Py_CLEAR(clear_module_state->__pyx_n_s_filename);
  Py_CLEAR(clear_module_state->__pyx_n_s_finalize_frame);
  Py_CLEAR(clear_module_state->__pyx_kp_s_finalize_frame_called_but_heade);
  Py_CLEAR(clear_module_state->__pyx_kp_s_finalize_frame_without_having_r);
  Py_CLEAR(clear_module_state->__pyx_n_s_finalize_matrix);
  Py_CLEAR(clear_module_state->__pyx_n_s_find_sdiftypes);
  Py_CLEAR(clear_module_state->__pyx_n_s_find_sdiftypes_locals_get_packa);
  Py_CLEAR(clear_module_state->__pyx_n_s_flags);
  Py_CLEAR(clear_module_state->__pyx_n_s_float32);
  Py_CLEAR(clear_module_state->__pyx_n_s_float64);
  Py_CLEAR(clear_module_state->__pyx_n_s_format);
  Py_CLEAR(clear_module_state->__pyx_n_s_frame);
  Py_CLEAR(clear_module_state->__pyx_n_s_frame0);
  Py_CLEAR(clear_module_state->__pyx_n_s_frame1);
  Py_CLEAR(clear_module_state->__pyx_n_s_frame_id);
  Py_CLEAR(clear_module_state->__pyx_n_s_frame_num_matrix);
  Py_CLEAR(clear_module_state->__pyx_n_s_frame_numerical_signature);
  Py_CLEAR(clear_module_state->__pyx_n_s_frame_read_header);
  Py_CLEAR(clear_module_state->__pyx_kp_s_frame_read_header_finalizing_las);
  Py_CLEAR(clear_module_state->__pyx_n_s_frame_sig);
  Py_CLEAR(clear_module_state->__pyx_n_s_frame_signature);
  Py_CLEAR(clear_module_state->__pyx_n_s_frame_size);
  Py_CLEAR(clear_module_state->__pyx_n_s_frame_skip_data);
  Py_CLEAR(clear_module_state->__pyx_kp_s_frame_skip_data_calling_finalize);
  Py_CLEAR(clear_module_state->__pyx_n_s_frame_skip_rest);
  Py_CLEAR(clear_module_state->__pyx_kp_s_frame_skip_rest_Attempted_to_sk);
  Py_CLEAR(clear_module_state->__pyx_n_s_frame_time);
  Py_CLEAR(clear_module_state->__pyx_n_s_frame_types_to_string);
  Py_CLEAR(clear_module_state->__pyx_n_s_framestatus2str);
  Py_CLEAR(clear_module_state->__pyx_n_s_frametype);
  Py_CLEAR(clear_module_state->__pyx_n_s_frametypes);
  Py_CLEAR(clear_module_state->__pyx_n_s_frametypes_populate);
  Py_CLEAR(clear_module_state->__pyx_n_s_frametypeslist);
  Py_CLEAR(clear_module_state->__pyx_n_s_fsz);
  Py_CLEAR(clear_module_state->__pyx_n_s_ft);
  Py_CLEAR(clear_module_state->__pyx_kp_u_gc);
  Py_CLEAR(clear_module_state->__pyx_n_s_genexpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_get);
  Py_CLEAR(clear_module_state->__pyx_n_s_getLogger);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_NVTs);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_frame_types);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_matrix);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_matrix_types);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_num_NVTs);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_packaged_sdiftypes);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_stream_IDs);
  Py_CLEAR(clear_module_state->__pyx_n_s_getstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_i);
  Py_CLEAR(clear_module_state->__pyx_n_s_idx);
  Py_CLEAR(clear_module_state->__pyx_n_s_import);
  Py_CLEAR(clear_module_state->__pyx_n_s_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_init___locals_genexpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_init_subclass);
  Py_CLEAR(clear_module_state->__pyx_n_s_initializing);
  Py_CLEAR(clear_module_state->__pyx_n_s_int16);
  Py_CLEAR(clear_module_state->__pyx_n_s_int32);
  Py_CLEAR(clear_module_state->__pyx_n_s_int64);
  Py_CLEAR(clear_module_state->__pyx_n_s_int8);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine);
  Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled);
  Py_CLEAR(clear_module_state->__pyx_n_s_items);
  Py_CLEAR(clear_module_state->__pyx_n_s_iteritems);
  Py_CLEAR(clear_module_state->__pyx_n_s_join);
  Py_CLEAR(clear_module_state->__pyx_n_s_last_error);
  Py_CLEAR(clear_module_state->__pyx_kp_s_local_share);
  Py_CLEAR(clear_module_state->__pyx_n_s_logger);
  Py_CLEAR(clear_module_state->__pyx_n_s_logging);
  Py_CLEAR(clear_module_state->__pyx_n_s_m);
  Py_CLEAR(clear_module_state->__pyx_n_s_main);
  Py_CLEAR(clear_module_state->__pyx_n_s_matrix);
  Py_CLEAR(clear_module_state->__pyx_kp_s_matrix_empty_or_could_not_read_m);
  Py_CLEAR(clear_module_state->__pyx_n_s_matrix_idx);
  Py_CLEAR(clear_module_state->__pyx_n_s_matrix_read_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_matrix_read_header);
  Py_CLEAR(clear_module_state->__pyx_n_s_matrix_sig);
  Py_CLEAR(clear_module_state->__pyx_n_s_matrix_skip);
  Py_CLEAR(clear_module_state->__pyx_n_s_matrix_skip_data);
  Py_CLEAR(clear_module_state->__pyx_kp_s_matrix_skip_data_no_current_fram);
  Py_CLEAR(clear_module_state->__pyx_kp_s_matrix_skip_no_current_frame);
  Py_CLEAR(clear_module_state->__pyx_n_s_matrix_status);
  Py_CLEAR(clear_module_state->__pyx_n_s_matrix_types_to_string);
  Py_CLEAR(clear_module_state->__pyx_n_s_matrixdata);
  Py_CLEAR(clear_module_state->__pyx_n_s_matrixrole);
  Py_CLEAR(clear_module_state->__pyx_n_s_matrixsig);
  Py_CLEAR(clear_module_state->__pyx_n_s_matrixstatus2str);
  Py_CLEAR(clear_module_state->__pyx_n_s_matrixtype);
  Py_CLEAR(clear_module_state->__pyx_n_s_matrixtypes);
  Py_CLEAR(clear_module_state->__pyx_n_s_matrixtypeslist);
  Py_CLEAR(clear_module_state->__pyx_n_s_metaclass);
  Py_CLEAR(clear_module_state->__pyx_n_s_midx);
  Py_CLEAR(clear_module_state->__pyx_n_s_mode);
  Py_CLEAR(clear_module_state->__pyx_kp_s_mode_should_be_on_of_r_w_rw);
  Py_CLEAR(clear_module_state->__pyx_n_s_module);
  Py_CLEAR(clear_module_state->__pyx_n_s_mro_entries);
  Py_CLEAR(clear_module_state->__pyx_n_s_mt);
  Py_CLEAR(clear_module_state->__pyx_n_s_mtd);
  Py_CLEAR(clear_module_state->__pyx_n_s_n);
  Py_CLEAR(clear_module_state->__pyx_n_s_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_name_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_new);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_frame);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_frame_one_matrix);
  Py_CLEAR(clear_module_state->__pyx_n_s_next);
  Py_CLEAR(clear_module_state->__pyx_n_s_next_frame);
  Py_CLEAR(clear_module_state->__pyx_n_s_next_matrix);
  Py_CLEAR(clear_module_state->__pyx_kp_s_no_current_frame);
  Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
  Py_CLEAR(clear_module_state->__pyx_n_s_np);
  Py_CLEAR(clear_module_state->__pyx_n_s_num);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_matrices);
  Py_CLEAR(clear_module_state->__pyx_n_s_numid);
  Py_CLEAR(clear_module_state->__pyx_n_s_numpy);
  Py_CLEAR(clear_module_state->__pyx_kp_s_numpy_core_multiarray_failed_to);
  Py_CLEAR(clear_module_state->__pyx_kp_s_numpy_core_umath_failed_to_impor);
  Py_CLEAR(clear_module_state->__pyx_n_s_nvt);
  Py_CLEAR(clear_module_state->__pyx_n_s_os);
  Py_CLEAR(clear_module_state->__pyx_n_s_os_path);
  Py_CLEAR(clear_module_state->__pyx_n_s_out);
  Py_CLEAR(clear_module_state->__pyx_n_s_p);
  Py_CLEAR(clear_module_state->__pyx_n_s_p2);
  Py_CLEAR(clear_module_state->__pyx_n_s_packaged_sdiftypes);
  Py_CLEAR(clear_module_state->__pyx_n_s_path);
  Py_CLEAR(clear_module_state->__pyx_kp_s_path_not_found_cannot_open_sdif);
  Py_CLEAR(clear_module_state->__pyx_n_s_paths);
  Py_CLEAR(clear_module_state->__pyx_n_s_pickle);
  Py_CLEAR(clear_module_state->__pyx_n_s_pl);
  Py_CLEAR(clear_module_state->__pyx_n_s_platform);
  Py_CLEAR(clear_module_state->__pyx_n_s_predefined_frametypes);
  Py_CLEAR(clear_module_state->__pyx_n_s_predefined_matrixtypes);
  Py_CLEAR(clear_module_state->__pyx_n_s_predefined_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_prepare);
  Py_CLEAR(clear_module_state->__pyx_n_s_print);
  Py_CLEAR(clear_module_state->__pyx_n_s_print_NVT);
  Py_CLEAR(clear_module_state->__pyx_n_s_print_all_ascii_chunks);
  Py_CLEAR(clear_module_state->__pyx_n_s_print_all_stream_ID);
  Py_CLEAR(clear_module_state->__pyx_n_s_print_all_types);
  Py_CLEAR(clear_module_state->__pyx_n_s_print_frame_header);
  Py_CLEAR(clear_module_state->__pyx_n_s_print_general_header);
  Py_CLEAR(clear_module_state->__pyx_n_s_print_matrix_header);
  Py_CLEAR(clear_module_state->__pyx_n_s_print_one_row);
  Py_CLEAR(clear_module_state->__pyx_n_s_pysdif);
  Py_CLEAR(clear_module_state->__pyx_n_s_pysdif__pysdif);
  Py_CLEAR(clear_module_state->__pyx_kp_s_pysdif__pysdif_pyx);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_PickleError);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_checksum);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_result);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Component);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_FrameTypeDefiniti);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_FrameW);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_MatrixTypeDefinit);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable);
  Py_CLEAR(clear_module_state->__pyx_n_s_qualname);
  Py_CLEAR(clear_module_state->__pyx_n_s_r);
  Py_CLEAR(clear_module_state->__pyx_n_s_range);
  Py_CLEAR(clear_module_state->__pyx_n_s_read_padding);
  Py_CLEAR(clear_module_state->__pyx_n_s_read_sdiftypes);
  Py_CLEAR(clear_module_state->__pyx_n_s_read_signature);
  Py_CLEAR(clear_module_state->__pyx_n_s_reduce);
  Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex);
  Py_CLEAR(clear_module_state->__pyx_n_s_replace);
  Py_CLEAR(clear_module_state->__pyx_n_s_rewind);
  Py_CLEAR(clear_module_state->__pyx_n_s_rewind_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_rows);
  Py_CLEAR(clear_module_state->__pyx_n_s_rw);
  Py_CLEAR(clear_module_state->__pyx_n_s_s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_s_should_be_either_a_str_or_byte);
  Py_CLEAR(clear_module_state->__pyx_n_s_sdif_cleanup);
  Py_CLEAR(clear_module_state->__pyx_n_s_sdif_init);
  Py_CLEAR(clear_module_state->__pyx_n_s_sdifstr);
  Py_CLEAR(clear_module_state->__pyx_n_s_sdiftypes_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_sdiftypes_path);
  Py_CLEAR(clear_module_state->__pyx_n_s_self);
  Py_CLEAR(clear_module_state->__pyx_n_s_send);
  Py_CLEAR(clear_module_state->__pyx_n_s_setLevel);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_setstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_shape);
  Py_CLEAR(clear_module_state->__pyx_n_s_sig);
  Py_CLEAR(clear_module_state->__pyx_n_s_signature);
  Py_CLEAR(clear_module_state->__pyx_n_s_signature2str);
  Py_CLEAR(clear_module_state->__pyx_kp_s_signature_not_found);
  Py_CLEAR(clear_module_state->__pyx_n_s_signatures_to_clone);
  Py_CLEAR(clear_module_state->__pyx_n_s_signaturesture);
  Py_CLEAR(clear_module_state->__pyx_n_s_sigs);
  Py_CLEAR(clear_module_state->__pyx_n_s_skip);
  Py_CLEAR(clear_module_state->__pyx_n_s_source);
  Py_CLEAR(clear_module_state->__pyx_n_s_spec);
  Py_CLEAR(clear_module_state->__pyx_n_s_split);
  Py_CLEAR(clear_module_state->__pyx_n_s_state);
  Py_CLEAR(clear_module_state->__pyx_n_s_status);
  Py_CLEAR(clear_module_state->__pyx_n_s_str2signature);
  Py_CLEAR(clear_module_state->__pyx_n_s_streamID);
  Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource);
  Py_CLEAR(clear_module_state->__pyx_n_s_strip);
  Py_CLEAR(clear_module_state->__pyx_n_s_super);
  Py_CLEAR(clear_module_state->__pyx_n_s_system);
  Py_CLEAR(clear_module_state->__pyx_n_s_t);
  Py_CLEAR(clear_module_state->__pyx_n_s_test);
  Py_CLEAR(clear_module_state->__pyx_n_s_thisfile);
  Py_CLEAR(clear_module_state->__pyx_n_s_throw);
  Py_CLEAR(clear_module_state->__pyx_n_s_time);
  Py_CLEAR(clear_module_state->__pyx_n_s_traceback);
  Py_CLEAR(clear_module_state->__pyx_n_s_treeway);
  Py_CLEAR(clear_module_state->__pyx_kp_s_tried_to_finalize_matrix_but_sta);
  Py_CLEAR(clear_module_state->__pyx_n_s_uint16);
  Py_CLEAR(clear_module_state->__pyx_n_s_uint32);
  Py_CLEAR(clear_module_state->__pyx_n_s_uint64);
  Py_CLEAR(clear_module_state->__pyx_n_s_uint8);
  Py_CLEAR(clear_module_state->__pyx_n_s_update);
  Py_CLEAR(clear_module_state->__pyx_n_s_use_setstate);
  Py_CLEAR(clear_module_state->__pyx_kp_s_usr_local_share);
  Py_CLEAR(clear_module_state->__pyx_kp_s_usr_share);
  Py_CLEAR(clear_module_state->__pyx_n_s_value);
  Py_CLEAR(clear_module_state->__pyx_n_s_w);
  Py_CLEAR(clear_module_state->__pyx_n_s_warn);
  Py_CLEAR(clear_module_state->__pyx_n_s_warning);
  Py_CLEAR(clear_module_state->__pyx_n_s_warnings);
  Py_CLEAR(clear_module_state->__pyx_n_s_wr);
  Py_CLEAR(clear_module_state->__pyx_n_s_write);
  Py_CLEAR(clear_module_state->__pyx_n_s_write_all_ascii_chunks);
  Py_CLEAR(clear_module_state->__pyx_int_0);
  Py_CLEAR(clear_module_state->__pyx_int_4);
  Py_CLEAR(clear_module_state->__pyx_int_8);
  Py_CLEAR(clear_module_state->__pyx_int_257);
  Py_CLEAR(clear_module_state->__pyx_int_258);
  Py_CLEAR(clear_module_state->__pyx_int_260);
  Py_CLEAR(clear_module_state->__pyx_int_264);
  Py_CLEAR(clear_module_state->__pyx_int_513);
  Py_CLEAR(clear_module_state->__pyx_int_514);
  Py_CLEAR(clear_module_state->__pyx_int_516);
  Py_CLEAR(clear_module_state->__pyx_int_520);
  Py_CLEAR(clear_module_state->__pyx_int_769);
  Py_CLEAR(clear_module_state->__pyx_int_17723012);
  Py_CLEAR(clear_module_state->__pyx_int_20897590);
  Py_CLEAR(clear_module_state->__pyx_int_57246580);
  Py_CLEAR(clear_module_state->__pyx_int_66826235);
  Py_CLEAR(clear_module_state->__pyx_int_117679685);
  Py_CLEAR(clear_module_state->__pyx_int_149399746);
  Py_CLEAR(clear_module_state->__pyx_int_149774176);
  Py_CLEAR(clear_module_state->__pyx_int_168628298);
  Py_CLEAR(clear_module_state->__pyx_int_216518149);
  Py_CLEAR(clear_module_state->__pyx_int_229941985);
  Py_CLEAR(clear_module_state->__pyx_int_247608754);
  Py_CLEAR(clear_module_state->__pyx_int_256861586);
  Py_CLEAR(clear_module_state->__pyx_int_neg_1);
  Py_CLEAR(clear_module_state->__pyx_tuple_);
  Py_CLEAR(clear_module_state->__pyx_tuple__2);
  Py_CLEAR(clear_module_state->__pyx_tuple__3);
  Py_CLEAR(clear_module_state->__pyx_tuple__6);
  Py_CLEAR(clear_module_state->__pyx_tuple__11);
  Py_CLEAR(clear_module_state->__pyx_tuple__12);
  Py_CLEAR(clear_module_state->__pyx_tuple__13);
  Py_CLEAR(clear_module_state->__pyx_tuple__15);
  Py_CLEAR(clear_module_state->__pyx_tuple__16);
  Py_CLEAR(clear_module_state->__pyx_tuple__17);
  Py_CLEAR(clear_module_state->__pyx_tuple__19);
  Py_CLEAR(clear_module_state->__pyx_tuple__20);
  Py_CLEAR(clear_module_state->__pyx_tuple__21);
  Py_CLEAR(clear_module_state->__pyx_tuple__22);
  Py_CLEAR(clear_module_state->__pyx_tuple__23);
  Py_CLEAR(clear_module_state->__pyx_tuple__24);
  Py_CLEAR(clear_module_state->__pyx_tuple__25);
  Py_CLEAR(clear_module_state->__pyx_tuple__26);
  Py_CLEAR(clear_module_state->__pyx_tuple__27);
  Py_CLEAR(clear_module_state->__pyx_tuple__28);
  Py_CLEAR(clear_module_state->__pyx_tuple__29);
  Py_CLEAR(clear_module_state->__pyx_tuple__30);
  Py_CLEAR(clear_module_state->__pyx_tuple__32);
  Py_CLEAR(clear_module_state->__pyx_tuple__34);
  Py_CLEAR(clear_module_state->__pyx_tuple__36);
  Py_CLEAR(clear_module_state->__pyx_tuple__38);
  Py_CLEAR(clear_module_state->__pyx_tuple__45);
  Py_CLEAR(clear_module_state->__pyx_tuple__47);
  Py_CLEAR(clear_module_state->__pyx_tuple__51);
  Py_CLEAR(clear_module_state->__pyx_tuple__53);
  Py_CLEAR(clear_module_state->__pyx_tuple__55);
  Py_CLEAR(clear_module_state->__pyx_tuple__57);
  Py_CLEAR(clear_module_state->__pyx_tuple__58);
  Py_CLEAR(clear_module_state->__pyx_tuple__60);
  Py_CLEAR(clear_module_state->__pyx_tuple__62);
  Py_CLEAR(clear_module_state->__pyx_tuple__64);
  Py_CLEAR(clear_module_state->__pyx_tuple__65);
  Py_CLEAR(clear_module_state->__pyx_tuple__70);
  Py_CLEAR(clear_module_state->__pyx_tuple__75);
  Py_CLEAR(clear_module_state->__pyx_tuple__77);
  Py_CLEAR(clear_module_state->__pyx_tuple__79);
  Py_CLEAR(clear_module_state->__pyx_tuple__84);
  Py_CLEAR(clear_module_state->__pyx_tuple__88);
  Py_CLEAR(clear_module_state->__pyx_tuple__95);
  Py_CLEAR(clear_module_state->__pyx_codeobj__7);
  Py_CLEAR(clear_module_state->__pyx_tuple__100);
  Py_CLEAR(clear_module_state->__pyx_tuple__102);
  Py_CLEAR(clear_module_state->__pyx_tuple__105);
  Py_CLEAR(clear_module_state->__pyx_tuple__110);
  Py_CLEAR(clear_module_state->__pyx_tuple__112);
  Py_CLEAR(clear_module_state->__pyx_tuple__113);
  Py_CLEAR(clear_module_state->__pyx_tuple__120);
  Py_CLEAR(clear_module_state->__pyx_tuple__125);
  Py_CLEAR(clear_module_state->__pyx_tuple__127);
  Py_CLEAR(clear_module_state->__pyx_tuple__129);
  Py_CLEAR(clear_module_state->__pyx_tuple__131);
  Py_CLEAR(clear_module_state->__pyx_tuple__133);
  Py_CLEAR(clear_module_state->__pyx_tuple__135);
  Py_CLEAR(clear_module_state->__pyx_tuple__137);
  Py_CLEAR(clear_module_state->__pyx_tuple__139);
  Py_CLEAR(clear_module_state->__pyx_tuple__141);
  Py_CLEAR(clear_module_state->__pyx_tuple__144);
  Py_CLEAR(clear_module_state->__pyx_tuple__146);
  Py_CLEAR(clear_module_state->__pyx_tuple__147);
  Py_CLEAR(clear_module_state->__pyx_tuple__150);
  Py_CLEAR(clear_module_state->__pyx_tuple__158);
  Py_CLEAR(clear_module_state->__pyx_tuple__167);
  Py_CLEAR(clear_module_state->__pyx_codeobj__31);
  Py_CLEAR(clear_module_state->__pyx_codeobj__33);
  Py_CLEAR(clear_module_state->__pyx_codeobj__35);
  Py_CLEAR(clear_module_state->__pyx_codeobj__37);
  Py_CLEAR(clear_module_state->__pyx_codeobj__39);
  Py_CLEAR(clear_module_state->__pyx_codeobj__40);
  Py_CLEAR(clear_module_state->__pyx_codeobj__41);
  Py_CLEAR(clear_module_state->__pyx_codeobj__42);
  Py_CLEAR(clear_module_state->__pyx_codeobj__43);
  Py_CLEAR(clear_module_state->__pyx_codeobj__44);
  Py_CLEAR(clear_module_state->__pyx_codeobj__46);
  Py_CLEAR(clear_module_state->__pyx_codeobj__48);
  Py_CLEAR(clear_module_state->__pyx_codeobj__49);
  Py_CLEAR(clear_module_state->__pyx_codeobj__50);
  Py_CLEAR(clear_module_state->__pyx_codeobj__52);
  Py_CLEAR(clear_module_state->__pyx_codeobj__54);
  Py_CLEAR(clear_module_state->__pyx_codeobj__56);
  Py_CLEAR(clear_module_state->__pyx_codeobj__59);
  Py_CLEAR(clear_module_state->__pyx_codeobj__61);
  Py_CLEAR(clear_module_state->__pyx_codeobj__63);
  Py_CLEAR(clear_module_state->__pyx_codeobj__66);
  Py_CLEAR(clear_module_state->__pyx_codeobj__67);
  Py_CLEAR(clear_module_state->__pyx_codeobj__68);
  Py_CLEAR(clear_module_state->__pyx_codeobj__69);
  Py_CLEAR(clear_module_state->__pyx_codeobj__71);
  Py_CLEAR(clear_module_state->__pyx_codeobj__72);
  Py_CLEAR(clear_module_state->__pyx_codeobj__73);
  Py_CLEAR(clear_module_state->__pyx_codeobj__74);
  Py_CLEAR(clear_module_state->__pyx_codeobj__76);
  Py_CLEAR(clear_module_state->__pyx_codeobj__78);
  Py_CLEAR(clear_module_state->__pyx_codeobj__80);
  Py_CLEAR(clear_module_state->__pyx_codeobj__81);
  Py_CLEAR(clear_module_state->__pyx_codeobj__82);
  Py_CLEAR(clear_module_state->__pyx_codeobj__83);
  Py_CLEAR(clear_module_state->__pyx_codeobj__85);
  Py_CLEAR(clear_module_state->__pyx_codeobj__86);
  Py_CLEAR(clear_module_state->__pyx_codeobj__87);
  Py_CLEAR(clear_module_state->__pyx_codeobj__89);
  Py_CLEAR(clear_module_state->__pyx_codeobj__90);
  Py_CLEAR(clear_module_state->__pyx_codeobj__91);
  Py_CLEAR(clear_module_state->__pyx_codeobj__92);
  Py_CLEAR(clear_module_state->__pyx_codeobj__93);
  Py_CLEAR(clear_module_state->__pyx_codeobj__94);
  Py_CLEAR(clear_module_state->__pyx_codeobj__96);
  Py_CLEAR(clear_module_state->__pyx_codeobj__97);
  Py_CLEAR(clear_module_state->__pyx_codeobj__98);
  Py_CLEAR(clear_module_state->__pyx_codeobj__99);
  Py_CLEAR(clear_module_state->__pyx_codeobj__101);
  Py_CLEAR(clear_module_state->__pyx_codeobj__103);
  Py_CLEAR(clear_module_state->__pyx_codeobj__104);
  Py_CLEAR(clear_module_state->__pyx_codeobj__106);
  Py_CLEAR(clear_module_state->__pyx_codeobj__107);
  Py_CLEAR(clear_module_state->__pyx_codeobj__108);
  Py_CLEAR(clear_module_state->__pyx_codeobj__109);
  Py_CLEAR(clear_module_state->__pyx_codeobj__111);
  Py_CLEAR(clear_module_state->__pyx_codeobj__114);
  Py_CLEAR(clear_module_state->__pyx_codeobj__115);
  Py_CLEAR(clear_module_state->__pyx_codeobj__116);
  Py_CLEAR(clear_module_state->__pyx_codeobj__117);
  Py_CLEAR(clear_module_state->__pyx_codeobj__118);
  Py_CLEAR(clear_module_state->__pyx_codeobj__119);
  Py_CLEAR(clear_module_state->__pyx_codeobj__121);
  Py_CLEAR(clear_module_state->__pyx_codeobj__122);
  Py_CLEAR(clear_module_state->__pyx_codeobj__123);
  Py_CLEAR(clear_module_state->__pyx_codeobj__124);
  Py_CLEAR(clear_module_state->__pyx_codeobj__126);
  Py_CLEAR(clear_module_state->__pyx_codeobj__128);
  Py_CLEAR(clear_module_state->__pyx_codeobj__130);
  Py_CLEAR(clear_module_state->__pyx_codeobj__132);
  Py_CLEAR(clear_module_state->__pyx_codeobj__134);
  Py_CLEAR(clear_module_state->__pyx_codeobj__136);
  Py_CLEAR(clear_module_state->__pyx_codeobj__138);
  Py_CLEAR(clear_module_state->__pyx_codeobj__140);
  Py_CLEAR(clear_module_state->__pyx_codeobj__142);
  Py_CLEAR(clear_module_state->__pyx_codeobj__143);
  Py_CLEAR(clear_module_state->__pyx_codeobj__145);
  Py_CLEAR(clear_module_state->__pyx_codeobj__148);
  Py_CLEAR(clear_module_state->__pyx_codeobj__149);
  Py_CLEAR(clear_module_state->__pyx_codeobj__151);
  Py_CLEAR(clear_module_state->__pyx_codeobj__152);
  Py_CLEAR(clear_module_state->__pyx_codeobj__153);
  Py_CLEAR(clear_module_state->__pyx_codeobj__154);
  Py_CLEAR(clear_module_state->__pyx_codeobj__155);
  Py_CLEAR(clear_module_state->__pyx_codeobj__156);
  Py_CLEAR(clear_module_state->__pyx_codeobj__157);
  Py_CLEAR(clear_module_state->__pyx_codeobj__159);
  Py_CLEAR(clear_module_state->__pyx_codeobj__160);
  Py_CLEAR(clear_module_state->__pyx_codeobj__161);
  Py_CLEAR(clear_module_state->__pyx_codeobj__162);
  Py_CLEAR(clear_module_state->__pyx_codeobj__163);
  Py_CLEAR(clear_module_state->__pyx_codeobj__164);
  Py_CLEAR(clear_module_state->__pyx_codeobj__165);
  Py_CLEAR(clear_module_state->__pyx_codeobj__166);
  Py_CLEAR(clear_module_state->__pyx_codeobj__168);
  Py_CLEAR(clear_module_state->__pyx_codeobj__169);
  Py_CLEAR(clear_module_state->__pyx_codeobj__170);
  Py_CLEAR(clear_module_state->__pyx_codeobj__171);
  return 0;
}
#endif
/* #### Code section: module_state_traverse ### */
#if CYTHON_USE_MODULE_STATE
static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
  __pyx_mstate *traverse_module_state = __pyx_mstate(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);
  Py_VISIT(traverse_module_state->__pyx_empty_tuple);
  Py_VISIT(traverse_module_state->__pyx_empty_bytes);
  Py_VISIT(traverse_module_state->__pyx_empty_unicode);
  #ifdef __Pyx_CyFunction_USED
  Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
  #endif
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
  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_6pysdif_7_pysdif_StreamID);
  Py_VISIT(traverse_module_state->__pyx_type_6pysdif_7_pysdif_StreamID);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition);
  Py_VISIT(traverse_module_state->__pyx_type_6pysdif_7_pysdif_MatrixTypeDefinition);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pysdif_7_pysdif_Component);
  Py_VISIT(traverse_module_state->__pyx_type_6pysdif_7_pysdif_Component);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pysdif_7_pysdif_FrameTypeDefinition);
  Py_VISIT(traverse_module_state->__pyx_type_6pysdif_7_pysdif_FrameTypeDefinition);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pysdif_7_pysdif_FrameR);
  Py_VISIT(traverse_module_state->__pyx_type_6pysdif_7_pysdif_FrameR);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pysdif_7_pysdif_SdifFile);
  Py_VISIT(traverse_module_state->__pyx_type_6pysdif_7_pysdif_SdifFile);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pysdif_7_pysdif_Matrix);
  Py_VISIT(traverse_module_state->__pyx_type_6pysdif_7_pysdif_Matrix);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pysdif_7_pysdif_FrameW);
  Py_VISIT(traverse_module_state->__pyx_type_6pysdif_7_pysdif_FrameW);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct__genexpr);
  Py_VISIT(traverse_module_state->__pyx_type_6pysdif_7_pysdif___pyx_scope_struct__genexpr);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr);
  Py_VISIT(traverse_module_state->__pyx_type_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr);
  Py_VISIT(traverse_module_state->__pyx_kp_s_1FTD_signature_s_components_s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_1MTD_signature_s_column_names_s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_A_Frame_can_only_be_iterated_onc);
  Py_VISIT(traverse_module_state->__pyx_n_s_AllDataRead);
  Py_VISIT(traverse_module_state->__pyx_n_s_AssertionError);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Attempted_to_read_matrix_header);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Attempted_to_read_past_end_of_fi);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Can_t_get_the_data_since_it_was);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Can_t_skip_the_matrix_status_is);
  Py_VISIT(traverse_module_state->__pyx_n_s_Component);
  Py_VISIT(traverse_module_state->__pyx_n_s_Component___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Component___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Component_signature_s_name_s_num);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Could_not_create_frametype);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Could_not_create_matrixtype);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Could_not_open_s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Could_not_read_matrix_header);
  Py_VISIT(traverse_module_state->__pyx_n_s_Darwin);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataRead);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataSkipped);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Do_not_call_frame_write_when_usi);
  Py_VISIT(traverse_module_state->__pyx_n_s_EOFError);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Error_finalizing_Frame);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Error_finalizing_matrix);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Expected_a_2D_array_got_d_dimens);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Expected_a_2D_array_got_shape_d);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Failed_to_fetch_the_column_names);
  Py_VISIT(traverse_module_state->__pyx_n_s_FrameR);
  Py_VISIT(traverse_module_state->__pyx_n_s_FrameR___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_FrameR___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_FrameR_get_matrix);
  Py_VISIT(traverse_module_state->__pyx_kp_s_FrameR_signature_sig_time_t_matr);
  Py_VISIT(traverse_module_state->__pyx_n_s_FrameTypeDefinition);
  Py_VISIT(traverse_module_state->__pyx_n_s_FrameTypeDefinition___reduce_cyt);
  Py_VISIT(traverse_module_state->__pyx_n_s_FrameTypeDefinition___setstate_c);
  Py_VISIT(traverse_module_state->__pyx_n_s_FrameW);
  Py_VISIT(traverse_module_state->__pyx_n_s_FrameW___enter);
  Py_VISIT(traverse_module_state->__pyx_n_s_FrameW___exit);
  Py_VISIT(traverse_module_state->__pyx_n_s_FrameW___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_FrameW___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_FrameW_add_matrix);
  Py_VISIT(traverse_module_state->__pyx_kp_s_FrameW_signature_s_time_f_stream);
  Py_VISIT(traverse_module_state->__pyx_n_s_FrameW_write);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Frame_has_already_been_written);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Frame_header_has_not_been_read);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Frame_with_d_matrices_not_writte);
  Py_VISIT(traverse_module_state->__pyx_n_s_HeaderRead);
  Py_VISIT(traverse_module_state->__pyx_n_s_INFO);
  Py_VISIT(traverse_module_state->__pyx_n_s_IOError);
  Py_VISIT(traverse_module_state->__pyx_n_s_ImportError);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4);
  Py_VISIT(traverse_module_state->__pyx_n_s_IndexError);
  Py_VISIT(traverse_module_state->__pyx_kp_b_Index_Frequency_Amplitude_Phase);
  Py_VISIT(traverse_module_state->__pyx_n_s_Invalid);
  Py_VISIT(traverse_module_state->__pyx_n_s_KeyError);
  Py_VISIT(traverse_module_state->__pyx_n_s_Linux);
  Py_VISIT(traverse_module_state->__pyx_n_s_Matrix);
  Py_VISIT(traverse_module_state->__pyx_n_s_MatrixTypeDefinition);
  Py_VISIT(traverse_module_state->__pyx_n_s_MatrixTypeDefinition___reduce_cy);
  Py_VISIT(traverse_module_state->__pyx_n_s_MatrixTypeDefinition___setstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_Matrix___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Matrix___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Matrix_can_only_be_skipped_if_da);
  Py_VISIT(traverse_module_state->__pyx_n_s_Matrix_column_names);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Matrix_data_can_only_be_skipped);
  Py_VISIT(traverse_module_state->__pyx_n_s_Matrix_get_data);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Matrix_header_was_already_read);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Matrix_sig_s_rows_d_cols_d_dtype);
  Py_VISIT(traverse_module_state->__pyx_n_s_Matrix_skip);
  Py_VISIT(traverse_module_state->__pyx_n_s_NameError);
  Py_VISIT(traverse_module_state->__pyx_n_s_NoFrame);
  Py_VISIT(traverse_module_state->__pyx_n_s_NoMatrix);
  Py_VISIT(traverse_module_state->__pyx_kp_s_No_current_matrix);
  Py_VISIT(traverse_module_state->__pyx_kp_s_No_current_matrix_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_No_matrices_were_added_Frame_not);
  Py_VISIT(traverse_module_state->__pyx_n_s_NothingRead);
  Py_VISIT(traverse_module_state->__pyx_n_s_Offline);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Only_strings_or_bytestrings_are);
  Py_VISIT(traverse_module_state->__pyx_n_s_OverflowError);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Path_s_does_not_exist_can_t_crea);
  Py_VISIT(traverse_module_state->__pyx_n_s_PickleError);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Platform_unknown);
  Py_VISIT(traverse_module_state->__pyx_n_b_RBEP);
  Py_VISIT(traverse_module_state->__pyx_kp_b_RBEP_ReassignedBandEnhancedParti);
  Py_VISIT(traverse_module_state->__pyx_n_s_RuntimeError);
  Py_VISIT(traverse_module_state->__pyx_n_s_SDIF_PREDEFINEDTYPES);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile);
  Py_VISIT(traverse_module_state->__pyx_kp_s_SdifFile_NULL);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile___enter);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile___exit);
  Py_VISIT(traverse_module_state->__pyx_kp_s_SdifFile___init);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile__read_padding);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile__read_signature);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile__rewind);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_add_NVT);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_add_frame_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_add_matrix_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_add_predefined_frametyp);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_add_streamID);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_clone_NVTs);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_clone_definitions);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_clone_frames);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_clone_type_definitions);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_close);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_curr_frame_available);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_curr_frame_is_selected);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_curr_matrix_available);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_curr_matrix_datatype);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_curr_matrix_is_selected);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_curr_matrix_signature);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_curr_matrix_size);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_curr_signature);
  Py_VISIT(traverse_module_state->__pyx_kp_s_SdifFile_dealloc);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_frame_id);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_frame_num_matrix);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_frame_numerical_signatu);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_frame_read_header);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_frame_signature);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_frame_skip_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_frame_skip_rest);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_frame_time);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_frame_types_to_string);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_get_NVTs);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_get_frame_types);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_get_matrix_types);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_get_num_NVTs);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_get_stream_IDs);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_last_error);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_matrix_read_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_matrix_read_header);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_matrix_skip);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_matrix_skip_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_matrix_types_to_string);
  Py_VISIT(traverse_module_state->__pyx_kp_s_SdifFile_name_name_mode_mode);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_new_frame);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_new_frame_one_matrix);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_next_frame);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_next_matrix);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_print_NVT);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_print_all_ascii_chunks);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_print_all_stream_ID);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_print_all_types);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_print_frame_header);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_print_general_header);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_print_matrix_header);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_print_one_row);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_rewind);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_status);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifFile_write_all_ascii_chunks);
  Py_VISIT(traverse_module_state->__pyx_n_s_SdifOrderError);
  Py_VISIT(traverse_module_state->__pyx_kp_s_SdifTypes_STYP);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Sdif_initialized_using_path_s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Sdif_initialized_without_SdifTyp);
  Py_VISIT(traverse_module_state->__pyx_n_s_SignatureRead);
  Py_VISIT(traverse_module_state->__pyx_n_s_SomeDataRead);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Some_data_of_the_matrix_has_been);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Status_Frame_frame_MatrixIdx_mid);
  Py_VISIT(traverse_module_state->__pyx_n_s_StopIteration);
  Py_VISIT(traverse_module_state->__pyx_n_s_StreamID);
  Py_VISIT(traverse_module_state->__pyx_n_s_StreamID___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_StreamID___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_kp_s_StreamID_numid_d_source_s_treewa);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_frame_should_be_read_or_skip);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_header_of_the_current_frame);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_header_was_already_read);
  Py_VISIT(traverse_module_state->__pyx_kp_s_This_function_is_only_possible_f);
  Py_VISIT(traverse_module_state->__pyx_kp_s_This_matrix_type_sig_does_not_se);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Two_many_matrices_for_one_frame);
  Py_VISIT(traverse_module_state->__pyx_n_s_TypeError);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Undefined_frametype_sig_You_must);
  Py_VISIT(traverse_module_state->__pyx_n_s_ValueError);
  Py_VISIT(traverse_module_state->__pyx_n_s_Windows);
  Py_VISIT(traverse_module_state->__pyx_kp_s__10);
  Py_VISIT(traverse_module_state->__pyx_kp_s__14);
  Py_VISIT(traverse_module_state->__pyx_n_s__172);
  Py_VISIT(traverse_module_state->__pyx_kp_b__18);
  Py_VISIT(traverse_module_state->__pyx_kp_b__4);
  Py_VISIT(traverse_module_state->__pyx_kp_b__5);
  Py_VISIT(traverse_module_state->__pyx_kp_s__8);
  Py_VISIT(traverse_module_state->__pyx_kp_u__8);
  Py_VISIT(traverse_module_state->__pyx_n_s__9);
  Py_VISIT(traverse_module_state->__pyx_n_s_abspath);
  Py_VISIT(traverse_module_state->__pyx_n_s_add_NVT);
  Py_VISIT(traverse_module_state->__pyx_n_s_add_frame_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_add_matrix);
  Py_VISIT(traverse_module_state->__pyx_n_s_add_matrix_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_add_predefined_frametype);
  Py_VISIT(traverse_module_state->__pyx_n_s_add_streamID);
  Py_VISIT(traverse_module_state->__pyx_n_s_allframetypes);
  Py_VISIT(traverse_module_state->__pyx_n_s_allmatrixtypes);
  Py_VISIT(traverse_module_state->__pyx_n_s_args);
  Py_VISIT(traverse_module_state->__pyx_n_s_ascii);
  Py_VISIT(traverse_module_state->__pyx_n_s_ascontiguousarray);
  Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
  Py_VISIT(traverse_module_state->__pyx_n_s_bytes_read);
  Py_VISIT(traverse_module_state->__pyx_n_s_bytesread);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_contiguous);
  Py_VISIT(traverse_module_state->__pyx_n_s_char);
  Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
  Py_VISIT(traverse_module_state->__pyx_n_s_clone_NVTs);
  Py_VISIT(traverse_module_state->__pyx_n_s_clone_definitions);
  Py_VISIT(traverse_module_state->__pyx_n_s_clone_frames);
  Py_VISIT(traverse_module_state->__pyx_n_s_clone_frames_locals_genexpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_clone_type_definitions);
  Py_VISIT(traverse_module_state->__pyx_n_s_close);
  Py_VISIT(traverse_module_state->__pyx_kp_s_close_can_t_close_SdifFile_it_is);
  Py_VISIT(traverse_module_state->__pyx_kp_s_close_can_t_close_SdifFile_since);
  Py_VISIT(traverse_module_state->__pyx_n_s_colnames);
  Py_VISIT(traverse_module_state->__pyx_n_s_cols);
  Py_VISIT(traverse_module_state->__pyx_n_s_column_names);
  Py_VISIT(traverse_module_state->__pyx_n_s_comp);
  Py_VISIT(traverse_module_state->__pyx_n_s_components);
  Py_VISIT(traverse_module_state->__pyx_kp_s_components_should_be_a_seq_of_Co);
  Py_VISIT(traverse_module_state->__pyx_n_s_copy);
  Py_VISIT(traverse_module_state->__pyx_n_s_curr_frame_available);
  Py_VISIT(traverse_module_state->__pyx_n_s_curr_frame_is_selected);
  Py_VISIT(traverse_module_state->__pyx_n_s_curr_matrix_available);
  Py_VISIT(traverse_module_state->__pyx_n_s_curr_matrix_datatype);
  Py_VISIT(traverse_module_state->__pyx_n_s_curr_matrix_is_selected);
  Py_VISIT(traverse_module_state->__pyx_n_s_curr_matrix_signature);
  Py_VISIT(traverse_module_state->__pyx_n_s_curr_matrix_size);
  Py_VISIT(traverse_module_state->__pyx_n_s_curr_signature);
  Py_VISIT(traverse_module_state->__pyx_n_s_d);
  Py_VISIT(traverse_module_state->__pyx_n_s_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_data_array);
  Py_VISIT(traverse_module_state->__pyx_n_s_datadir);
  Py_VISIT(traverse_module_state->__pyx_n_s_debug);
  Py_VISIT(traverse_module_state->__pyx_n_s_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_dict_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_disable);
  Py_VISIT(traverse_module_state->__pyx_n_s_doc);
  Py_VISIT(traverse_module_state->__pyx_n_s_dtype);
  Py_VISIT(traverse_module_state->__pyx_kp_u_enable);
  Py_VISIT(traverse_module_state->__pyx_n_s_encode);
  Py_VISIT(traverse_module_state->__pyx_n_s_enter);
  Py_VISIT(traverse_module_state->__pyx_n_s_enumerate);
  Py_VISIT(traverse_module_state->__pyx_n_s_error);
  Py_VISIT(traverse_module_state->__pyx_kp_s_error_finishing_matrix);
  Py_VISIT(traverse_module_state->__pyx_kp_s_error_opening_file);
  Py_VISIT(traverse_module_state->__pyx_n_s_exception_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_exception_value);
  Py_VISIT(traverse_module_state->__pyx_n_s_exists);
  Py_VISIT(traverse_module_state->__pyx_n_s_exit);
  Py_VISIT(traverse_module_state->__pyx_n_s_expanduser);
  Py_VISIT(traverse_module_state->__pyx_n_s_f);
  Py_VISIT(traverse_module_state->__pyx_n_s_file);
  Py_VISIT(traverse_module_state->__pyx_n_s_filename);
  Py_VISIT(traverse_module_state->__pyx_n_s_finalize_frame);
  Py_VISIT(traverse_module_state->__pyx_kp_s_finalize_frame_called_but_heade);
  Py_VISIT(traverse_module_state->__pyx_kp_s_finalize_frame_without_having_r);
  Py_VISIT(traverse_module_state->__pyx_n_s_finalize_matrix);
  Py_VISIT(traverse_module_state->__pyx_n_s_find_sdiftypes);
  Py_VISIT(traverse_module_state->__pyx_n_s_find_sdiftypes_locals_get_packa);
  Py_VISIT(traverse_module_state->__pyx_n_s_flags);
  Py_VISIT(traverse_module_state->__pyx_n_s_float32);
  Py_VISIT(traverse_module_state->__pyx_n_s_float64);
  Py_VISIT(traverse_module_state->__pyx_n_s_format);
  Py_VISIT(traverse_module_state->__pyx_n_s_frame);
  Py_VISIT(traverse_module_state->__pyx_n_s_frame0);
  Py_VISIT(traverse_module_state->__pyx_n_s_frame1);
  Py_VISIT(traverse_module_state->__pyx_n_s_frame_id);
  Py_VISIT(traverse_module_state->__pyx_n_s_frame_num_matrix);
  Py_VISIT(traverse_module_state->__pyx_n_s_frame_numerical_signature);
  Py_VISIT(traverse_module_state->__pyx_n_s_frame_read_header);
  Py_VISIT(traverse_module_state->__pyx_kp_s_frame_read_header_finalizing_las);
  Py_VISIT(traverse_module_state->__pyx_n_s_frame_sig);
  Py_VISIT(traverse_module_state->__pyx_n_s_frame_signature);
  Py_VISIT(traverse_module_state->__pyx_n_s_frame_size);
  Py_VISIT(traverse_module_state->__pyx_n_s_frame_skip_data);
  Py_VISIT(traverse_module_state->__pyx_kp_s_frame_skip_data_calling_finalize);
  Py_VISIT(traverse_module_state->__pyx_n_s_frame_skip_rest);
  Py_VISIT(traverse_module_state->__pyx_kp_s_frame_skip_rest_Attempted_to_sk);
  Py_VISIT(traverse_module_state->__pyx_n_s_frame_time);
  Py_VISIT(traverse_module_state->__pyx_n_s_frame_types_to_string);
  Py_VISIT(traverse_module_state->__pyx_n_s_framestatus2str);
  Py_VISIT(traverse_module_state->__pyx_n_s_frametype);
  Py_VISIT(traverse_module_state->__pyx_n_s_frametypes);
  Py_VISIT(traverse_module_state->__pyx_n_s_frametypes_populate);
  Py_VISIT(traverse_module_state->__pyx_n_s_frametypeslist);
  Py_VISIT(traverse_module_state->__pyx_n_s_fsz);
  Py_VISIT(traverse_module_state->__pyx_n_s_ft);
  Py_VISIT(traverse_module_state->__pyx_kp_u_gc);
  Py_VISIT(traverse_module_state->__pyx_n_s_genexpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_get);
  Py_VISIT(traverse_module_state->__pyx_n_s_getLogger);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_NVTs);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_frame_types);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_matrix);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_matrix_types);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_num_NVTs);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_packaged_sdiftypes);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_stream_IDs);
  Py_VISIT(traverse_module_state->__pyx_n_s_getstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_i);
  Py_VISIT(traverse_module_state->__pyx_n_s_idx);
  Py_VISIT(traverse_module_state->__pyx_n_s_import);
  Py_VISIT(traverse_module_state->__pyx_n_s_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_init___locals_genexpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_init_subclass);
  Py_VISIT(traverse_module_state->__pyx_n_s_initializing);
  Py_VISIT(traverse_module_state->__pyx_n_s_int16);
  Py_VISIT(traverse_module_state->__pyx_n_s_int32);
  Py_VISIT(traverse_module_state->__pyx_n_s_int64);
  Py_VISIT(traverse_module_state->__pyx_n_s_int8);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine);
  Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled);
  Py_VISIT(traverse_module_state->__pyx_n_s_items);
  Py_VISIT(traverse_module_state->__pyx_n_s_iteritems);
  Py_VISIT(traverse_module_state->__pyx_n_s_join);
  Py_VISIT(traverse_module_state->__pyx_n_s_last_error);
  Py_VISIT(traverse_module_state->__pyx_kp_s_local_share);
  Py_VISIT(traverse_module_state->__pyx_n_s_logger);
  Py_VISIT(traverse_module_state->__pyx_n_s_logging);
  Py_VISIT(traverse_module_state->__pyx_n_s_m);
  Py_VISIT(traverse_module_state->__pyx_n_s_main);
  Py_VISIT(traverse_module_state->__pyx_n_s_matrix);
  Py_VISIT(traverse_module_state->__pyx_kp_s_matrix_empty_or_could_not_read_m);
  Py_VISIT(traverse_module_state->__pyx_n_s_matrix_idx);
  Py_VISIT(traverse_module_state->__pyx_n_s_matrix_read_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_matrix_read_header);
  Py_VISIT(traverse_module_state->__pyx_n_s_matrix_sig);
  Py_VISIT(traverse_module_state->__pyx_n_s_matrix_skip);
  Py_VISIT(traverse_module_state->__pyx_n_s_matrix_skip_data);
  Py_VISIT(traverse_module_state->__pyx_kp_s_matrix_skip_data_no_current_fram);
  Py_VISIT(traverse_module_state->__pyx_kp_s_matrix_skip_no_current_frame);
  Py_VISIT(traverse_module_state->__pyx_n_s_matrix_status);
  Py_VISIT(traverse_module_state->__pyx_n_s_matrix_types_to_string);
  Py_VISIT(traverse_module_state->__pyx_n_s_matrixdata);
  Py_VISIT(traverse_module_state->__pyx_n_s_matrixrole);
  Py_VISIT(traverse_module_state->__pyx_n_s_matrixsig);
  Py_VISIT(traverse_module_state->__pyx_n_s_matrixstatus2str);
  Py_VISIT(traverse_module_state->__pyx_n_s_matrixtype);
  Py_VISIT(traverse_module_state->__pyx_n_s_matrixtypes);
  Py_VISIT(traverse_module_state->__pyx_n_s_matrixtypeslist);
  Py_VISIT(traverse_module_state->__pyx_n_s_metaclass);
  Py_VISIT(traverse_module_state->__pyx_n_s_midx);
  Py_VISIT(traverse_module_state->__pyx_n_s_mode);
  Py_VISIT(traverse_module_state->__pyx_kp_s_mode_should_be_on_of_r_w_rw);
  Py_VISIT(traverse_module_state->__pyx_n_s_module);
  Py_VISIT(traverse_module_state->__pyx_n_s_mro_entries);
  Py_VISIT(traverse_module_state->__pyx_n_s_mt);
  Py_VISIT(traverse_module_state->__pyx_n_s_mtd);
  Py_VISIT(traverse_module_state->__pyx_n_s_n);
  Py_VISIT(traverse_module_state->__pyx_n_s_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_name_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_new);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_frame);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_frame_one_matrix);
  Py_VISIT(traverse_module_state->__pyx_n_s_next);
  Py_VISIT(traverse_module_state->__pyx_n_s_next_frame);
  Py_VISIT(traverse_module_state->__pyx_n_s_next_matrix);
  Py_VISIT(traverse_module_state->__pyx_kp_s_no_current_frame);
  Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
  Py_VISIT(traverse_module_state->__pyx_n_s_np);
  Py_VISIT(traverse_module_state->__pyx_n_s_num);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_matrices);
  Py_VISIT(traverse_module_state->__pyx_n_s_numid);
  Py_VISIT(traverse_module_state->__pyx_n_s_numpy);
  Py_VISIT(traverse_module_state->__pyx_kp_s_numpy_core_multiarray_failed_to);
  Py_VISIT(traverse_module_state->__pyx_kp_s_numpy_core_umath_failed_to_impor);
  Py_VISIT(traverse_module_state->__pyx_n_s_nvt);
  Py_VISIT(traverse_module_state->__pyx_n_s_os);
  Py_VISIT(traverse_module_state->__pyx_n_s_os_path);
  Py_VISIT(traverse_module_state->__pyx_n_s_out);
  Py_VISIT(traverse_module_state->__pyx_n_s_p);
  Py_VISIT(traverse_module_state->__pyx_n_s_p2);
  Py_VISIT(traverse_module_state->__pyx_n_s_packaged_sdiftypes);
  Py_VISIT(traverse_module_state->__pyx_n_s_path);
  Py_VISIT(traverse_module_state->__pyx_kp_s_path_not_found_cannot_open_sdif);
  Py_VISIT(traverse_module_state->__pyx_n_s_paths);
  Py_VISIT(traverse_module_state->__pyx_n_s_pickle);
  Py_VISIT(traverse_module_state->__pyx_n_s_pl);
  Py_VISIT(traverse_module_state->__pyx_n_s_platform);
  Py_VISIT(traverse_module_state->__pyx_n_s_predefined_frametypes);
  Py_VISIT(traverse_module_state->__pyx_n_s_predefined_matrixtypes);
  Py_VISIT(traverse_module_state->__pyx_n_s_predefined_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_prepare);
  Py_VISIT(traverse_module_state->__pyx_n_s_print);
  Py_VISIT(traverse_module_state->__pyx_n_s_print_NVT);
  Py_VISIT(traverse_module_state->__pyx_n_s_print_all_ascii_chunks);
  Py_VISIT(traverse_module_state->__pyx_n_s_print_all_stream_ID);
  Py_VISIT(traverse_module_state->__pyx_n_s_print_all_types);
  Py_VISIT(traverse_module_state->__pyx_n_s_print_frame_header);
  Py_VISIT(traverse_module_state->__pyx_n_s_print_general_header);
  Py_VISIT(traverse_module_state->__pyx_n_s_print_matrix_header);
  Py_VISIT(traverse_module_state->__pyx_n_s_print_one_row);
  Py_VISIT(traverse_module_state->__pyx_n_s_pysdif);
  Py_VISIT(traverse_module_state->__pyx_n_s_pysdif__pysdif);
  Py_VISIT(traverse_module_state->__pyx_kp_s_pysdif__pysdif_pyx);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_PickleError);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_checksum);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_result);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Component);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_FrameTypeDefiniti);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_FrameW);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_MatrixTypeDefinit);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable);
  Py_VISIT(traverse_module_state->__pyx_n_s_qualname);
  Py_VISIT(traverse_module_state->__pyx_n_s_r);
  Py_VISIT(traverse_module_state->__pyx_n_s_range);
  Py_VISIT(traverse_module_state->__pyx_n_s_read_padding);
  Py_VISIT(traverse_module_state->__pyx_n_s_read_sdiftypes);
  Py_VISIT(traverse_module_state->__pyx_n_s_read_signature);
  Py_VISIT(traverse_module_state->__pyx_n_s_reduce);
  Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex);
  Py_VISIT(traverse_module_state->__pyx_n_s_replace);
  Py_VISIT(traverse_module_state->__pyx_n_s_rewind);
  Py_VISIT(traverse_module_state->__pyx_n_s_rewind_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_rows);
  Py_VISIT(traverse_module_state->__pyx_n_s_rw);
  Py_VISIT(traverse_module_state->__pyx_n_s_s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_s_should_be_either_a_str_or_byte);
  Py_VISIT(traverse_module_state->__pyx_n_s_sdif_cleanup);
  Py_VISIT(traverse_module_state->__pyx_n_s_sdif_init);
  Py_VISIT(traverse_module_state->__pyx_n_s_sdifstr);
  Py_VISIT(traverse_module_state->__pyx_n_s_sdiftypes_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_sdiftypes_path);
  Py_VISIT(traverse_module_state->__pyx_n_s_self);
  Py_VISIT(traverse_module_state->__pyx_n_s_send);
  Py_VISIT(traverse_module_state->__pyx_n_s_setLevel);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_setstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_shape);
  Py_VISIT(traverse_module_state->__pyx_n_s_sig);
  Py_VISIT(traverse_module_state->__pyx_n_s_signature);
  Py_VISIT(traverse_module_state->__pyx_n_s_signature2str);
  Py_VISIT(traverse_module_state->__pyx_kp_s_signature_not_found);
  Py_VISIT(traverse_module_state->__pyx_n_s_signatures_to_clone);
  Py_VISIT(traverse_module_state->__pyx_n_s_signaturesture);
  Py_VISIT(traverse_module_state->__pyx_n_s_sigs);
  Py_VISIT(traverse_module_state->__pyx_n_s_skip);
  Py_VISIT(traverse_module_state->__pyx_n_s_source);
  Py_VISIT(traverse_module_state->__pyx_n_s_spec);
  Py_VISIT(traverse_module_state->__pyx_n_s_split);
  Py_VISIT(traverse_module_state->__pyx_n_s_state);
  Py_VISIT(traverse_module_state->__pyx_n_s_status);
  Py_VISIT(traverse_module_state->__pyx_n_s_str2signature);
  Py_VISIT(traverse_module_state->__pyx_n_s_streamID);
  Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource);
  Py_VISIT(traverse_module_state->__pyx_n_s_strip);
  Py_VISIT(traverse_module_state->__pyx_n_s_super);
  Py_VISIT(traverse_module_state->__pyx_n_s_system);
  Py_VISIT(traverse_module_state->__pyx_n_s_t);
  Py_VISIT(traverse_module_state->__pyx_n_s_test);
  Py_VISIT(traverse_module_state->__pyx_n_s_thisfile);
  Py_VISIT(traverse_module_state->__pyx_n_s_throw);
  Py_VISIT(traverse_module_state->__pyx_n_s_time);
  Py_VISIT(traverse_module_state->__pyx_n_s_traceback);
  Py_VISIT(traverse_module_state->__pyx_n_s_treeway);
  Py_VISIT(traverse_module_state->__pyx_kp_s_tried_to_finalize_matrix_but_sta);
  Py_VISIT(traverse_module_state->__pyx_n_s_uint16);
  Py_VISIT(traverse_module_state->__pyx_n_s_uint32);
  Py_VISIT(traverse_module_state->__pyx_n_s_uint64);
  Py_VISIT(traverse_module_state->__pyx_n_s_uint8);
  Py_VISIT(traverse_module_state->__pyx_n_s_update);
  Py_VISIT(traverse_module_state->__pyx_n_s_use_setstate);
  Py_VISIT(traverse_module_state->__pyx_kp_s_usr_local_share);
  Py_VISIT(traverse_module_state->__pyx_kp_s_usr_share);
  Py_VISIT(traverse_module_state->__pyx_n_s_value);
  Py_VISIT(traverse_module_state->__pyx_n_s_w);
  Py_VISIT(traverse_module_state->__pyx_n_s_warn);
  Py_VISIT(traverse_module_state->__pyx_n_s_warning);
  Py_VISIT(traverse_module_state->__pyx_n_s_warnings);
  Py_VISIT(traverse_module_state->__pyx_n_s_wr);
  Py_VISIT(traverse_module_state->__pyx_n_s_write);
  Py_VISIT(traverse_module_state->__pyx_n_s_write_all_ascii_chunks);
  Py_VISIT(traverse_module_state->__pyx_int_0);
  Py_VISIT(traverse_module_state->__pyx_int_4);
  Py_VISIT(traverse_module_state->__pyx_int_8);
  Py_VISIT(traverse_module_state->__pyx_int_257);
  Py_VISIT(traverse_module_state->__pyx_int_258);
  Py_VISIT(traverse_module_state->__pyx_int_260);
  Py_VISIT(traverse_module_state->__pyx_int_264);
  Py_VISIT(traverse_module_state->__pyx_int_513);
  Py_VISIT(traverse_module_state->__pyx_int_514);
  Py_VISIT(traverse_module_state->__pyx_int_516);
  Py_VISIT(traverse_module_state->__pyx_int_520);
  Py_VISIT(traverse_module_state->__pyx_int_769);
  Py_VISIT(traverse_module_state->__pyx_int_17723012);
  Py_VISIT(traverse_module_state->__pyx_int_20897590);
  Py_VISIT(traverse_module_state->__pyx_int_57246580);
  Py_VISIT(traverse_module_state->__pyx_int_66826235);
  Py_VISIT(traverse_module_state->__pyx_int_117679685);
  Py_VISIT(traverse_module_state->__pyx_int_149399746);
  Py_VISIT(traverse_module_state->__pyx_int_149774176);
  Py_VISIT(traverse_module_state->__pyx_int_168628298);
  Py_VISIT(traverse_module_state->__pyx_int_216518149);
  Py_VISIT(traverse_module_state->__pyx_int_229941985);
  Py_VISIT(traverse_module_state->__pyx_int_247608754);
  Py_VISIT(traverse_module_state->__pyx_int_256861586);
  Py_VISIT(traverse_module_state->__pyx_int_neg_1);
  Py_VISIT(traverse_module_state->__pyx_tuple_);
  Py_VISIT(traverse_module_state->__pyx_tuple__2);
  Py_VISIT(traverse_module_state->__pyx_tuple__3);
  Py_VISIT(traverse_module_state->__pyx_tuple__6);
  Py_VISIT(traverse_module_state->__pyx_tuple__11);
  Py_VISIT(traverse_module_state->__pyx_tuple__12);
  Py_VISIT(traverse_module_state->__pyx_tuple__13);
  Py_VISIT(traverse_module_state->__pyx_tuple__15);
  Py_VISIT(traverse_module_state->__pyx_tuple__16);
  Py_VISIT(traverse_module_state->__pyx_tuple__17);
  Py_VISIT(traverse_module_state->__pyx_tuple__19);
  Py_VISIT(traverse_module_state->__pyx_tuple__20);
  Py_VISIT(traverse_module_state->__pyx_tuple__21);
  Py_VISIT(traverse_module_state->__pyx_tuple__22);
  Py_VISIT(traverse_module_state->__pyx_tuple__23);
  Py_VISIT(traverse_module_state->__pyx_tuple__24);
  Py_VISIT(traverse_module_state->__pyx_tuple__25);
  Py_VISIT(traverse_module_state->__pyx_tuple__26);
  Py_VISIT(traverse_module_state->__pyx_tuple__27);
  Py_VISIT(traverse_module_state->__pyx_tuple__28);
  Py_VISIT(traverse_module_state->__pyx_tuple__29);
  Py_VISIT(traverse_module_state->__pyx_tuple__30);
  Py_VISIT(traverse_module_state->__pyx_tuple__32);
  Py_VISIT(traverse_module_state->__pyx_tuple__34);
  Py_VISIT(traverse_module_state->__pyx_tuple__36);
  Py_VISIT(traverse_module_state->__pyx_tuple__38);
  Py_VISIT(traverse_module_state->__pyx_tuple__45);
  Py_VISIT(traverse_module_state->__pyx_tuple__47);
  Py_VISIT(traverse_module_state->__pyx_tuple__51);
  Py_VISIT(traverse_module_state->__pyx_tuple__53);
  Py_VISIT(traverse_module_state->__pyx_tuple__55);
  Py_VISIT(traverse_module_state->__pyx_tuple__57);
  Py_VISIT(traverse_module_state->__pyx_tuple__58);
  Py_VISIT(traverse_module_state->__pyx_tuple__60);
  Py_VISIT(traverse_module_state->__pyx_tuple__62);
  Py_VISIT(traverse_module_state->__pyx_tuple__64);
  Py_VISIT(traverse_module_state->__pyx_tuple__65);
  Py_VISIT(traverse_module_state->__pyx_tuple__70);
  Py_VISIT(traverse_module_state->__pyx_tuple__75);
  Py_VISIT(traverse_module_state->__pyx_tuple__77);
  Py_VISIT(traverse_module_state->__pyx_tuple__79);
  Py_VISIT(traverse_module_state->__pyx_tuple__84);
  Py_VISIT(traverse_module_state->__pyx_tuple__88);
  Py_VISIT(traverse_module_state->__pyx_tuple__95);
  Py_VISIT(traverse_module_state->__pyx_codeobj__7);
  Py_VISIT(traverse_module_state->__pyx_tuple__100);
  Py_VISIT(traverse_module_state->__pyx_tuple__102);
  Py_VISIT(traverse_module_state->__pyx_tuple__105);
  Py_VISIT(traverse_module_state->__pyx_tuple__110);
  Py_VISIT(traverse_module_state->__pyx_tuple__112);
  Py_VISIT(traverse_module_state->__pyx_tuple__113);
  Py_VISIT(traverse_module_state->__pyx_tuple__120);
  Py_VISIT(traverse_module_state->__pyx_tuple__125);
  Py_VISIT(traverse_module_state->__pyx_tuple__127);
  Py_VISIT(traverse_module_state->__pyx_tuple__129);
  Py_VISIT(traverse_module_state->__pyx_tuple__131);
  Py_VISIT(traverse_module_state->__pyx_tuple__133);
  Py_VISIT(traverse_module_state->__pyx_tuple__135);
  Py_VISIT(traverse_module_state->__pyx_tuple__137);
  Py_VISIT(traverse_module_state->__pyx_tuple__139);
  Py_VISIT(traverse_module_state->__pyx_tuple__141);
  Py_VISIT(traverse_module_state->__pyx_tuple__144);
  Py_VISIT(traverse_module_state->__pyx_tuple__146);
  Py_VISIT(traverse_module_state->__pyx_tuple__147);
  Py_VISIT(traverse_module_state->__pyx_tuple__150);
  Py_VISIT(traverse_module_state->__pyx_tuple__158);
  Py_VISIT(traverse_module_state->__pyx_tuple__167);
  Py_VISIT(traverse_module_state->__pyx_codeobj__31);
  Py_VISIT(traverse_module_state->__pyx_codeobj__33);
  Py_VISIT(traverse_module_state->__pyx_codeobj__35);
  Py_VISIT(traverse_module_state->__pyx_codeobj__37);
  Py_VISIT(traverse_module_state->__pyx_codeobj__39);
  Py_VISIT(traverse_module_state->__pyx_codeobj__40);
  Py_VISIT(traverse_module_state->__pyx_codeobj__41);
  Py_VISIT(traverse_module_state->__pyx_codeobj__42);
  Py_VISIT(traverse_module_state->__pyx_codeobj__43);
  Py_VISIT(traverse_module_state->__pyx_codeobj__44);
  Py_VISIT(traverse_module_state->__pyx_codeobj__46);
  Py_VISIT(traverse_module_state->__pyx_codeobj__48);
  Py_VISIT(traverse_module_state->__pyx_codeobj__49);
  Py_VISIT(traverse_module_state->__pyx_codeobj__50);
  Py_VISIT(traverse_module_state->__pyx_codeobj__52);
  Py_VISIT(traverse_module_state->__pyx_codeobj__54);
  Py_VISIT(traverse_module_state->__pyx_codeobj__56);
  Py_VISIT(traverse_module_state->__pyx_codeobj__59);
  Py_VISIT(traverse_module_state->__pyx_codeobj__61);
  Py_VISIT(traverse_module_state->__pyx_codeobj__63);
  Py_VISIT(traverse_module_state->__pyx_codeobj__66);
  Py_VISIT(traverse_module_state->__pyx_codeobj__67);
  Py_VISIT(traverse_module_state->__pyx_codeobj__68);
  Py_VISIT(traverse_module_state->__pyx_codeobj__69);
  Py_VISIT(traverse_module_state->__pyx_codeobj__71);
  Py_VISIT(traverse_module_state->__pyx_codeobj__72);
  Py_VISIT(traverse_module_state->__pyx_codeobj__73);
  Py_VISIT(traverse_module_state->__pyx_codeobj__74);
  Py_VISIT(traverse_module_state->__pyx_codeobj__76);
  Py_VISIT(traverse_module_state->__pyx_codeobj__78);
  Py_VISIT(traverse_module_state->__pyx_codeobj__80);
  Py_VISIT(traverse_module_state->__pyx_codeobj__81);
  Py_VISIT(traverse_module_state->__pyx_codeobj__82);
  Py_VISIT(traverse_module_state->__pyx_codeobj__83);
  Py_VISIT(traverse_module_state->__pyx_codeobj__85);
  Py_VISIT(traverse_module_state->__pyx_codeobj__86);
  Py_VISIT(traverse_module_state->__pyx_codeobj__87);
  Py_VISIT(traverse_module_state->__pyx_codeobj__89);
  Py_VISIT(traverse_module_state->__pyx_codeobj__90);
  Py_VISIT(traverse_module_state->__pyx_codeobj__91);
  Py_VISIT(traverse_module_state->__pyx_codeobj__92);
  Py_VISIT(traverse_module_state->__pyx_codeobj__93);
  Py_VISIT(traverse_module_state->__pyx_codeobj__94);
  Py_VISIT(traverse_module_state->__pyx_codeobj__96);
  Py_VISIT(traverse_module_state->__pyx_codeobj__97);
  Py_VISIT(traverse_module_state->__pyx_codeobj__98);
  Py_VISIT(traverse_module_state->__pyx_codeobj__99);
  Py_VISIT(traverse_module_state->__pyx_codeobj__101);
  Py_VISIT(traverse_module_state->__pyx_codeobj__103);
  Py_VISIT(traverse_module_state->__pyx_codeobj__104);
  Py_VISIT(traverse_module_state->__pyx_codeobj__106);
  Py_VISIT(traverse_module_state->__pyx_codeobj__107);
  Py_VISIT(traverse_module_state->__pyx_codeobj__108);
  Py_VISIT(traverse_module_state->__pyx_codeobj__109);
  Py_VISIT(traverse_module_state->__pyx_codeobj__111);
  Py_VISIT(traverse_module_state->__pyx_codeobj__114);
  Py_VISIT(traverse_module_state->__pyx_codeobj__115);
  Py_VISIT(traverse_module_state->__pyx_codeobj__116);
  Py_VISIT(traverse_module_state->__pyx_codeobj__117);
  Py_VISIT(traverse_module_state->__pyx_codeobj__118);
  Py_VISIT(traverse_module_state->__pyx_codeobj__119);
  Py_VISIT(traverse_module_state->__pyx_codeobj__121);
  Py_VISIT(traverse_module_state->__pyx_codeobj__122);
  Py_VISIT(traverse_module_state->__pyx_codeobj__123);
  Py_VISIT(traverse_module_state->__pyx_codeobj__124);
  Py_VISIT(traverse_module_state->__pyx_codeobj__126);
  Py_VISIT(traverse_module_state->__pyx_codeobj__128);
  Py_VISIT(traverse_module_state->__pyx_codeobj__130);
  Py_VISIT(traverse_module_state->__pyx_codeobj__132);
  Py_VISIT(traverse_module_state->__pyx_codeobj__134);
  Py_VISIT(traverse_module_state->__pyx_codeobj__136);
  Py_VISIT(traverse_module_state->__pyx_codeobj__138);
  Py_VISIT(traverse_module_state->__pyx_codeobj__140);
  Py_VISIT(traverse_module_state->__pyx_codeobj__142);
  Py_VISIT(traverse_module_state->__pyx_codeobj__143);
  Py_VISIT(traverse_module_state->__pyx_codeobj__145);
  Py_VISIT(traverse_module_state->__pyx_codeobj__148);
  Py_VISIT(traverse_module_state->__pyx_codeobj__149);
  Py_VISIT(traverse_module_state->__pyx_codeobj__151);
  Py_VISIT(traverse_module_state->__pyx_codeobj__152);
  Py_VISIT(traverse_module_state->__pyx_codeobj__153);
  Py_VISIT(traverse_module_state->__pyx_codeobj__154);
  Py_VISIT(traverse_module_state->__pyx_codeobj__155);
  Py_VISIT(traverse_module_state->__pyx_codeobj__156);
  Py_VISIT(traverse_module_state->__pyx_codeobj__157);
  Py_VISIT(traverse_module_state->__pyx_codeobj__159);
  Py_VISIT(traverse_module_state->__pyx_codeobj__160);
  Py_VISIT(traverse_module_state->__pyx_codeobj__161);
  Py_VISIT(traverse_module_state->__pyx_codeobj__162);
  Py_VISIT(traverse_module_state->__pyx_codeobj__163);
  Py_VISIT(traverse_module_state->__pyx_codeobj__164);
  Py_VISIT(traverse_module_state->__pyx_codeobj__165);
  Py_VISIT(traverse_module_state->__pyx_codeobj__166);
  Py_VISIT(traverse_module_state->__pyx_codeobj__168);
  Py_VISIT(traverse_module_state->__pyx_codeobj__169);
  Py_VISIT(traverse_module_state->__pyx_codeobj__170);
  Py_VISIT(traverse_module_state->__pyx_codeobj__171);
  return 0;
}
#endif
/* #### Code section: module_state_defines ### */
#define __pyx_d __pyx_mstate_global->__pyx_d
#define __pyx_b __pyx_mstate_global->__pyx_b
#define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime
#define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple
#define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes
#define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode
#ifdef __Pyx_CyFunction_USED
#define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType
#endif
#ifdef __Pyx_FusedFunction_USED
#define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType
#endif
#ifdef __Pyx_Generator_USED
#define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType
#endif
#ifdef __Pyx_IterableCoroutine_USED
#define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType
#endif
#ifdef __Pyx_Coroutine_USED
#define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType
#endif
#ifdef __Pyx_Coroutine_USED
#define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#define __pyx_ptype_7cpython_4type_type __pyx_mstate_global->__pyx_ptype_7cpython_4type_type
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#define __pyx_ptype_5numpy_dtype __pyx_mstate_global->__pyx_ptype_5numpy_dtype
#define __pyx_ptype_5numpy_flatiter __pyx_mstate_global->__pyx_ptype_5numpy_flatiter
#define __pyx_ptype_5numpy_broadcast __pyx_mstate_global->__pyx_ptype_5numpy_broadcast
#define __pyx_ptype_5numpy_ndarray __pyx_mstate_global->__pyx_ptype_5numpy_ndarray
#define __pyx_ptype_5numpy_generic __pyx_mstate_global->__pyx_ptype_5numpy_generic
#define __pyx_ptype_5numpy_number __pyx_mstate_global->__pyx_ptype_5numpy_number
#define __pyx_ptype_5numpy_integer __pyx_mstate_global->__pyx_ptype_5numpy_integer
#define __pyx_ptype_5numpy_signedinteger __pyx_mstate_global->__pyx_ptype_5numpy_signedinteger
#define __pyx_ptype_5numpy_unsignedinteger __pyx_mstate_global->__pyx_ptype_5numpy_unsignedinteger
#define __pyx_ptype_5numpy_inexact __pyx_mstate_global->__pyx_ptype_5numpy_inexact
#define __pyx_ptype_5numpy_floating __pyx_mstate_global->__pyx_ptype_5numpy_floating
#define __pyx_ptype_5numpy_complexfloating __pyx_mstate_global->__pyx_ptype_5numpy_complexfloating
#define __pyx_ptype_5numpy_flexible __pyx_mstate_global->__pyx_ptype_5numpy_flexible
#define __pyx_ptype_5numpy_character __pyx_mstate_global->__pyx_ptype_5numpy_character
#define __pyx_ptype_5numpy_ufunc __pyx_mstate_global->__pyx_ptype_5numpy_ufunc
#if CYTHON_USE_MODULE_STATE
#define __pyx_type_6pysdif_7_pysdif_StreamID __pyx_mstate_global->__pyx_type_6pysdif_7_pysdif_StreamID
#define __pyx_type_6pysdif_7_pysdif_MatrixTypeDefinition __pyx_mstate_global->__pyx_type_6pysdif_7_pysdif_MatrixTypeDefinition
#define __pyx_type_6pysdif_7_pysdif_Component __pyx_mstate_global->__pyx_type_6pysdif_7_pysdif_Component
#define __pyx_type_6pysdif_7_pysdif_FrameTypeDefinition __pyx_mstate_global->__pyx_type_6pysdif_7_pysdif_FrameTypeDefinition
#define __pyx_type_6pysdif_7_pysdif_FrameR __pyx_mstate_global->__pyx_type_6pysdif_7_pysdif_FrameR
#define __pyx_type_6pysdif_7_pysdif_SdifFile __pyx_mstate_global->__pyx_type_6pysdif_7_pysdif_SdifFile
#define __pyx_type_6pysdif_7_pysdif_Matrix __pyx_mstate_global->__pyx_type_6pysdif_7_pysdif_Matrix
#define __pyx_type_6pysdif_7_pysdif_FrameW __pyx_mstate_global->__pyx_type_6pysdif_7_pysdif_FrameW
#define __pyx_type_6pysdif_7_pysdif___pyx_scope_struct__genexpr __pyx_mstate_global->__pyx_type_6pysdif_7_pysdif___pyx_scope_struct__genexpr
#define __pyx_type_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr __pyx_mstate_global->__pyx_type_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr
#endif
#define __pyx_ptype_6pysdif_7_pysdif_StreamID __pyx_mstate_global->__pyx_ptype_6pysdif_7_pysdif_StreamID
#define __pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition __pyx_mstate_global->__pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition
#define __pyx_ptype_6pysdif_7_pysdif_Component __pyx_mstate_global->__pyx_ptype_6pysdif_7_pysdif_Component
#define __pyx_ptype_6pysdif_7_pysdif_FrameTypeDefinition __pyx_mstate_global->__pyx_ptype_6pysdif_7_pysdif_FrameTypeDefinition
#define __pyx_ptype_6pysdif_7_pysdif_FrameR __pyx_mstate_global->__pyx_ptype_6pysdif_7_pysdif_FrameR
#define __pyx_ptype_6pysdif_7_pysdif_SdifFile __pyx_mstate_global->__pyx_ptype_6pysdif_7_pysdif_SdifFile
#define __pyx_ptype_6pysdif_7_pysdif_Matrix __pyx_mstate_global->__pyx_ptype_6pysdif_7_pysdif_Matrix
#define __pyx_ptype_6pysdif_7_pysdif_FrameW __pyx_mstate_global->__pyx_ptype_6pysdif_7_pysdif_FrameW
#define __pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct__genexpr __pyx_mstate_global->__pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct__genexpr
#define __pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr __pyx_mstate_global->__pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr
#define __pyx_kp_s_1FTD_signature_s_components_s __pyx_mstate_global->__pyx_kp_s_1FTD_signature_s_components_s
#define __pyx_kp_s_1MTD_signature_s_column_names_s __pyx_mstate_global->__pyx_kp_s_1MTD_signature_s_column_names_s
#define __pyx_kp_s_A_Frame_can_only_be_iterated_onc __pyx_mstate_global->__pyx_kp_s_A_Frame_can_only_be_iterated_onc
#define __pyx_n_s_AllDataRead __pyx_mstate_global->__pyx_n_s_AllDataRead
#define __pyx_n_s_AssertionError __pyx_mstate_global->__pyx_n_s_AssertionError
#define __pyx_kp_s_Attempted_to_read_matrix_header __pyx_mstate_global->__pyx_kp_s_Attempted_to_read_matrix_header
#define __pyx_kp_s_Attempted_to_read_past_end_of_fi __pyx_mstate_global->__pyx_kp_s_Attempted_to_read_past_end_of_fi
#define __pyx_kp_s_Can_t_get_the_data_since_it_was __pyx_mstate_global->__pyx_kp_s_Can_t_get_the_data_since_it_was
#define __pyx_kp_s_Can_t_skip_the_matrix_status_is __pyx_mstate_global->__pyx_kp_s_Can_t_skip_the_matrix_status_is
#define __pyx_n_s_Component __pyx_mstate_global->__pyx_n_s_Component
#define __pyx_n_s_Component___reduce_cython __pyx_mstate_global->__pyx_n_s_Component___reduce_cython
#define __pyx_n_s_Component___setstate_cython __pyx_mstate_global->__pyx_n_s_Component___setstate_cython
#define __pyx_kp_s_Component_signature_s_name_s_num __pyx_mstate_global->__pyx_kp_s_Component_signature_s_name_s_num
#define __pyx_kp_s_Could_not_create_frametype __pyx_mstate_global->__pyx_kp_s_Could_not_create_frametype
#define __pyx_kp_s_Could_not_create_matrixtype __pyx_mstate_global->__pyx_kp_s_Could_not_create_matrixtype
#define __pyx_kp_s_Could_not_open_s __pyx_mstate_global->__pyx_kp_s_Could_not_open_s
#define __pyx_kp_s_Could_not_read_matrix_header __pyx_mstate_global->__pyx_kp_s_Could_not_read_matrix_header
#define __pyx_n_s_Darwin __pyx_mstate_global->__pyx_n_s_Darwin
#define __pyx_n_s_DataRead __pyx_mstate_global->__pyx_n_s_DataRead
#define __pyx_n_s_DataSkipped __pyx_mstate_global->__pyx_n_s_DataSkipped
#define __pyx_kp_s_Do_not_call_frame_write_when_usi __pyx_mstate_global->__pyx_kp_s_Do_not_call_frame_write_when_usi
#define __pyx_n_s_EOFError __pyx_mstate_global->__pyx_n_s_EOFError
#define __pyx_kp_s_Error_finalizing_Frame __pyx_mstate_global->__pyx_kp_s_Error_finalizing_Frame
#define __pyx_kp_s_Error_finalizing_matrix __pyx_mstate_global->__pyx_kp_s_Error_finalizing_matrix
#define __pyx_kp_s_Expected_a_2D_array_got_d_dimens __pyx_mstate_global->__pyx_kp_s_Expected_a_2D_array_got_d_dimens
#define __pyx_kp_s_Expected_a_2D_array_got_shape_d __pyx_mstate_global->__pyx_kp_s_Expected_a_2D_array_got_shape_d
#define __pyx_kp_s_Failed_to_fetch_the_column_names __pyx_mstate_global->__pyx_kp_s_Failed_to_fetch_the_column_names
#define __pyx_n_s_FrameR __pyx_mstate_global->__pyx_n_s_FrameR
#define __pyx_n_s_FrameR___reduce_cython __pyx_mstate_global->__pyx_n_s_FrameR___reduce_cython
#define __pyx_n_s_FrameR___setstate_cython __pyx_mstate_global->__pyx_n_s_FrameR___setstate_cython
#define __pyx_n_s_FrameR_get_matrix __pyx_mstate_global->__pyx_n_s_FrameR_get_matrix
#define __pyx_kp_s_FrameR_signature_sig_time_t_matr __pyx_mstate_global->__pyx_kp_s_FrameR_signature_sig_time_t_matr
#define __pyx_n_s_FrameTypeDefinition __pyx_mstate_global->__pyx_n_s_FrameTypeDefinition
#define __pyx_n_s_FrameTypeDefinition___reduce_cyt __pyx_mstate_global->__pyx_n_s_FrameTypeDefinition___reduce_cyt
#define __pyx_n_s_FrameTypeDefinition___setstate_c __pyx_mstate_global->__pyx_n_s_FrameTypeDefinition___setstate_c
#define __pyx_n_s_FrameW __pyx_mstate_global->__pyx_n_s_FrameW
#define __pyx_n_s_FrameW___enter __pyx_mstate_global->__pyx_n_s_FrameW___enter
#define __pyx_n_s_FrameW___exit __pyx_mstate_global->__pyx_n_s_FrameW___exit
#define __pyx_n_s_FrameW___reduce_cython __pyx_mstate_global->__pyx_n_s_FrameW___reduce_cython
#define __pyx_n_s_FrameW___setstate_cython __pyx_mstate_global->__pyx_n_s_FrameW___setstate_cython
#define __pyx_n_s_FrameW_add_matrix __pyx_mstate_global->__pyx_n_s_FrameW_add_matrix
#define __pyx_kp_s_FrameW_signature_s_time_f_stream __pyx_mstate_global->__pyx_kp_s_FrameW_signature_s_time_f_stream
#define __pyx_n_s_FrameW_write __pyx_mstate_global->__pyx_n_s_FrameW_write
#define __pyx_kp_s_Frame_has_already_been_written __pyx_mstate_global->__pyx_kp_s_Frame_has_already_been_written
#define __pyx_kp_s_Frame_header_has_not_been_read __pyx_mstate_global->__pyx_kp_s_Frame_header_has_not_been_read
#define __pyx_kp_s_Frame_with_d_matrices_not_writte __pyx_mstate_global->__pyx_kp_s_Frame_with_d_matrices_not_writte
#define __pyx_n_s_HeaderRead __pyx_mstate_global->__pyx_n_s_HeaderRead
#define __pyx_n_s_INFO __pyx_mstate_global->__pyx_n_s_INFO
#define __pyx_n_s_IOError __pyx_mstate_global->__pyx_n_s_IOError
#define __pyx_n_s_ImportError __pyx_mstate_global->__pyx_n_s_ImportError
#define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0
#define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2
#define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3
#define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4
#define __pyx_n_s_IndexError __pyx_mstate_global->__pyx_n_s_IndexError
#define __pyx_kp_b_Index_Frequency_Amplitude_Phase __pyx_mstate_global->__pyx_kp_b_Index_Frequency_Amplitude_Phase
#define __pyx_n_s_Invalid __pyx_mstate_global->__pyx_n_s_Invalid
#define __pyx_n_s_KeyError __pyx_mstate_global->__pyx_n_s_KeyError
#define __pyx_n_s_Linux __pyx_mstate_global->__pyx_n_s_Linux
#define __pyx_n_s_Matrix __pyx_mstate_global->__pyx_n_s_Matrix
#define __pyx_n_s_MatrixTypeDefinition __pyx_mstate_global->__pyx_n_s_MatrixTypeDefinition
#define __pyx_n_s_MatrixTypeDefinition___reduce_cy __pyx_mstate_global->__pyx_n_s_MatrixTypeDefinition___reduce_cy
#define __pyx_n_s_MatrixTypeDefinition___setstate __pyx_mstate_global->__pyx_n_s_MatrixTypeDefinition___setstate
#define __pyx_n_s_Matrix___reduce_cython __pyx_mstate_global->__pyx_n_s_Matrix___reduce_cython
#define __pyx_n_s_Matrix___setstate_cython __pyx_mstate_global->__pyx_n_s_Matrix___setstate_cython
#define __pyx_kp_s_Matrix_can_only_be_skipped_if_da __pyx_mstate_global->__pyx_kp_s_Matrix_can_only_be_skipped_if_da
#define __pyx_n_s_Matrix_column_names __pyx_mstate_global->__pyx_n_s_Matrix_column_names
#define __pyx_kp_s_Matrix_data_can_only_be_skipped __pyx_mstate_global->__pyx_kp_s_Matrix_data_can_only_be_skipped
#define __pyx_n_s_Matrix_get_data __pyx_mstate_global->__pyx_n_s_Matrix_get_data
#define __pyx_kp_s_Matrix_header_was_already_read __pyx_mstate_global->__pyx_kp_s_Matrix_header_was_already_read
#define __pyx_kp_s_Matrix_sig_s_rows_d_cols_d_dtype __pyx_mstate_global->__pyx_kp_s_Matrix_sig_s_rows_d_cols_d_dtype
#define __pyx_n_s_Matrix_skip __pyx_mstate_global->__pyx_n_s_Matrix_skip
#define __pyx_n_s_NameError __pyx_mstate_global->__pyx_n_s_NameError
#define __pyx_n_s_NoFrame __pyx_mstate_global->__pyx_n_s_NoFrame
#define __pyx_n_s_NoMatrix __pyx_mstate_global->__pyx_n_s_NoMatrix
#define __pyx_kp_s_No_current_matrix __pyx_mstate_global->__pyx_kp_s_No_current_matrix
#define __pyx_kp_s_No_current_matrix_2 __pyx_mstate_global->__pyx_kp_s_No_current_matrix_2
#define __pyx_kp_s_No_matrices_were_added_Frame_not __pyx_mstate_global->__pyx_kp_s_No_matrices_were_added_Frame_not
#define __pyx_n_s_NothingRead __pyx_mstate_global->__pyx_n_s_NothingRead
#define __pyx_n_s_Offline __pyx_mstate_global->__pyx_n_s_Offline
#define __pyx_kp_s_Only_strings_or_bytestrings_are __pyx_mstate_global->__pyx_kp_s_Only_strings_or_bytestrings_are
#define __pyx_n_s_OverflowError __pyx_mstate_global->__pyx_n_s_OverflowError
#define __pyx_kp_s_Path_s_does_not_exist_can_t_crea __pyx_mstate_global->__pyx_kp_s_Path_s_does_not_exist_can_t_crea
#define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError
#define __pyx_kp_s_Platform_unknown __pyx_mstate_global->__pyx_kp_s_Platform_unknown
#define __pyx_n_b_RBEP __pyx_mstate_global->__pyx_n_b_RBEP
#define __pyx_kp_b_RBEP_ReassignedBandEnhancedParti __pyx_mstate_global->__pyx_kp_b_RBEP_ReassignedBandEnhancedParti
#define __pyx_n_s_RuntimeError __pyx_mstate_global->__pyx_n_s_RuntimeError
#define __pyx_n_s_SDIF_PREDEFINEDTYPES __pyx_mstate_global->__pyx_n_s_SDIF_PREDEFINEDTYPES
#define __pyx_n_s_SdifFile __pyx_mstate_global->__pyx_n_s_SdifFile
#define __pyx_kp_s_SdifFile_NULL __pyx_mstate_global->__pyx_kp_s_SdifFile_NULL
#define __pyx_n_s_SdifFile___enter __pyx_mstate_global->__pyx_n_s_SdifFile___enter
#define __pyx_n_s_SdifFile___exit __pyx_mstate_global->__pyx_n_s_SdifFile___exit
#define __pyx_kp_s_SdifFile___init __pyx_mstate_global->__pyx_kp_s_SdifFile___init
#define __pyx_n_s_SdifFile___reduce_cython __pyx_mstate_global->__pyx_n_s_SdifFile___reduce_cython
#define __pyx_n_s_SdifFile___setstate_cython __pyx_mstate_global->__pyx_n_s_SdifFile___setstate_cython
#define __pyx_n_s_SdifFile__read_padding __pyx_mstate_global->__pyx_n_s_SdifFile__read_padding
#define __pyx_n_s_SdifFile__read_signature __pyx_mstate_global->__pyx_n_s_SdifFile__read_signature
#define __pyx_n_s_SdifFile__rewind __pyx_mstate_global->__pyx_n_s_SdifFile__rewind
#define __pyx_n_s_SdifFile_add_NVT __pyx_mstate_global->__pyx_n_s_SdifFile_add_NVT
#define __pyx_n_s_SdifFile_add_frame_type __pyx_mstate_global->__pyx_n_s_SdifFile_add_frame_type
#define __pyx_n_s_SdifFile_add_matrix_type __pyx_mstate_global->__pyx_n_s_SdifFile_add_matrix_type
#define __pyx_n_s_SdifFile_add_predefined_frametyp __pyx_mstate_global->__pyx_n_s_SdifFile_add_predefined_frametyp
#define __pyx_n_s_SdifFile_add_streamID __pyx_mstate_global->__pyx_n_s_SdifFile_add_streamID
#define __pyx_n_s_SdifFile_clone_NVTs __pyx_mstate_global->__pyx_n_s_SdifFile_clone_NVTs
#define __pyx_n_s_SdifFile_clone_definitions __pyx_mstate_global->__pyx_n_s_SdifFile_clone_definitions
#define __pyx_n_s_SdifFile_clone_frames __pyx_mstate_global->__pyx_n_s_SdifFile_clone_frames
#define __pyx_n_s_SdifFile_clone_type_definitions __pyx_mstate_global->__pyx_n_s_SdifFile_clone_type_definitions
#define __pyx_n_s_SdifFile_close __pyx_mstate_global->__pyx_n_s_SdifFile_close
#define __pyx_n_s_SdifFile_curr_frame_available __pyx_mstate_global->__pyx_n_s_SdifFile_curr_frame_available
#define __pyx_n_s_SdifFile_curr_frame_is_selected __pyx_mstate_global->__pyx_n_s_SdifFile_curr_frame_is_selected
#define __pyx_n_s_SdifFile_curr_matrix_available __pyx_mstate_global->__pyx_n_s_SdifFile_curr_matrix_available
#define __pyx_n_s_SdifFile_curr_matrix_datatype __pyx_mstate_global->__pyx_n_s_SdifFile_curr_matrix_datatype
#define __pyx_n_s_SdifFile_curr_matrix_is_selected __pyx_mstate_global->__pyx_n_s_SdifFile_curr_matrix_is_selected
#define __pyx_n_s_SdifFile_curr_matrix_signature __pyx_mstate_global->__pyx_n_s_SdifFile_curr_matrix_signature
#define __pyx_n_s_SdifFile_curr_matrix_size __pyx_mstate_global->__pyx_n_s_SdifFile_curr_matrix_size
#define __pyx_n_s_SdifFile_curr_signature __pyx_mstate_global->__pyx_n_s_SdifFile_curr_signature
#define __pyx_kp_s_SdifFile_dealloc __pyx_mstate_global->__pyx_kp_s_SdifFile_dealloc
#define __pyx_n_s_SdifFile_frame_id __pyx_mstate_global->__pyx_n_s_SdifFile_frame_id
#define __pyx_n_s_SdifFile_frame_num_matrix __pyx_mstate_global->__pyx_n_s_SdifFile_frame_num_matrix
#define __pyx_n_s_SdifFile_frame_numerical_signatu __pyx_mstate_global->__pyx_n_s_SdifFile_frame_numerical_signatu
#define __pyx_n_s_SdifFile_frame_read_header __pyx_mstate_global->__pyx_n_s_SdifFile_frame_read_header
#define __pyx_n_s_SdifFile_frame_signature __pyx_mstate_global->__pyx_n_s_SdifFile_frame_signature
#define __pyx_n_s_SdifFile_frame_skip_data __pyx_mstate_global->__pyx_n_s_SdifFile_frame_skip_data
#define __pyx_n_s_SdifFile_frame_skip_rest __pyx_mstate_global->__pyx_n_s_SdifFile_frame_skip_rest
#define __pyx_n_s_SdifFile_frame_time __pyx_mstate_global->__pyx_n_s_SdifFile_frame_time
#define __pyx_n_s_SdifFile_frame_types_to_string __pyx_mstate_global->__pyx_n_s_SdifFile_frame_types_to_string
#define __pyx_n_s_SdifFile_get_NVTs __pyx_mstate_global->__pyx_n_s_SdifFile_get_NVTs
#define __pyx_n_s_SdifFile_get_frame_types __pyx_mstate_global->__pyx_n_s_SdifFile_get_frame_types
#define __pyx_n_s_SdifFile_get_matrix_types __pyx_mstate_global->__pyx_n_s_SdifFile_get_matrix_types
#define __pyx_n_s_SdifFile_get_num_NVTs __pyx_mstate_global->__pyx_n_s_SdifFile_get_num_NVTs
#define __pyx_n_s_SdifFile_get_stream_IDs __pyx_mstate_global->__pyx_n_s_SdifFile_get_stream_IDs
#define __pyx_n_s_SdifFile_last_error __pyx_mstate_global->__pyx_n_s_SdifFile_last_error
#define __pyx_n_s_SdifFile_matrix_read_data __pyx_mstate_global->__pyx_n_s_SdifFile_matrix_read_data
#define __pyx_n_s_SdifFile_matrix_read_header __pyx_mstate_global->__pyx_n_s_SdifFile_matrix_read_header
#define __pyx_n_s_SdifFile_matrix_skip __pyx_mstate_global->__pyx_n_s_SdifFile_matrix_skip
#define __pyx_n_s_SdifFile_matrix_skip_data __pyx_mstate_global->__pyx_n_s_SdifFile_matrix_skip_data
#define __pyx_n_s_SdifFile_matrix_types_to_string __pyx_mstate_global->__pyx_n_s_SdifFile_matrix_types_to_string
#define __pyx_kp_s_SdifFile_name_name_mode_mode __pyx_mstate_global->__pyx_kp_s_SdifFile_name_name_mode_mode
#define __pyx_n_s_SdifFile_new_frame __pyx_mstate_global->__pyx_n_s_SdifFile_new_frame
#define __pyx_n_s_SdifFile_new_frame_one_matrix __pyx_mstate_global->__pyx_n_s_SdifFile_new_frame_one_matrix
#define __pyx_n_s_SdifFile_next_frame __pyx_mstate_global->__pyx_n_s_SdifFile_next_frame
#define __pyx_n_s_SdifFile_next_matrix __pyx_mstate_global->__pyx_n_s_SdifFile_next_matrix
#define __pyx_n_s_SdifFile_print_NVT __pyx_mstate_global->__pyx_n_s_SdifFile_print_NVT
#define __pyx_n_s_SdifFile_print_all_ascii_chunks __pyx_mstate_global->__pyx_n_s_SdifFile_print_all_ascii_chunks
#define __pyx_n_s_SdifFile_print_all_stream_ID __pyx_mstate_global->__pyx_n_s_SdifFile_print_all_stream_ID
#define __pyx_n_s_SdifFile_print_all_types __pyx_mstate_global->__pyx_n_s_SdifFile_print_all_types
#define __pyx_n_s_SdifFile_print_frame_header __pyx_mstate_global->__pyx_n_s_SdifFile_print_frame_header
#define __pyx_n_s_SdifFile_print_general_header __pyx_mstate_global->__pyx_n_s_SdifFile_print_general_header
#define __pyx_n_s_SdifFile_print_matrix_header __pyx_mstate_global->__pyx_n_s_SdifFile_print_matrix_header
#define __pyx_n_s_SdifFile_print_one_row __pyx_mstate_global->__pyx_n_s_SdifFile_print_one_row
#define __pyx_n_s_SdifFile_rewind __pyx_mstate_global->__pyx_n_s_SdifFile_rewind
#define __pyx_n_s_SdifFile_status __pyx_mstate_global->__pyx_n_s_SdifFile_status
#define __pyx_n_s_SdifFile_write_all_ascii_chunks __pyx_mstate_global->__pyx_n_s_SdifFile_write_all_ascii_chunks
#define __pyx_n_s_SdifOrderError __pyx_mstate_global->__pyx_n_s_SdifOrderError
#define __pyx_kp_s_SdifTypes_STYP __pyx_mstate_global->__pyx_kp_s_SdifTypes_STYP
#define __pyx_kp_s_Sdif_initialized_using_path_s __pyx_mstate_global->__pyx_kp_s_Sdif_initialized_using_path_s
#define __pyx_kp_s_Sdif_initialized_without_SdifTyp __pyx_mstate_global->__pyx_kp_s_Sdif_initialized_without_SdifTyp
#define __pyx_n_s_SignatureRead __pyx_mstate_global->__pyx_n_s_SignatureRead
#define __pyx_n_s_SomeDataRead __pyx_mstate_global->__pyx_n_s_SomeDataRead
#define __pyx_kp_s_Some_data_of_the_matrix_has_been __pyx_mstate_global->__pyx_kp_s_Some_data_of_the_matrix_has_been
#define __pyx_kp_s_Status_Frame_frame_MatrixIdx_mid __pyx_mstate_global->__pyx_kp_s_Status_Frame_frame_MatrixIdx_mid
#define __pyx_n_s_StopIteration __pyx_mstate_global->__pyx_n_s_StopIteration
#define __pyx_n_s_StreamID __pyx_mstate_global->__pyx_n_s_StreamID
#define __pyx_n_s_StreamID___reduce_cython __pyx_mstate_global->__pyx_n_s_StreamID___reduce_cython
#define __pyx_n_s_StreamID___setstate_cython __pyx_mstate_global->__pyx_n_s_StreamID___setstate_cython
#define __pyx_kp_s_StreamID_numid_d_source_s_treewa __pyx_mstate_global->__pyx_kp_s_StreamID_numid_d_source_s_treewa
#define __pyx_kp_s_The_frame_should_be_read_or_skip __pyx_mstate_global->__pyx_kp_s_The_frame_should_be_read_or_skip
#define __pyx_kp_s_The_header_of_the_current_frame __pyx_mstate_global->__pyx_kp_s_The_header_of_the_current_frame
#define __pyx_kp_s_The_header_was_already_read __pyx_mstate_global->__pyx_kp_s_The_header_was_already_read
#define __pyx_kp_s_This_function_is_only_possible_f __pyx_mstate_global->__pyx_kp_s_This_function_is_only_possible_f
#define __pyx_kp_s_This_matrix_type_sig_does_not_se __pyx_mstate_global->__pyx_kp_s_This_matrix_type_sig_does_not_se
#define __pyx_kp_s_Two_many_matrices_for_one_frame __pyx_mstate_global->__pyx_kp_s_Two_many_matrices_for_one_frame
#define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError
#define __pyx_kp_s_Undefined_frametype_sig_You_must __pyx_mstate_global->__pyx_kp_s_Undefined_frametype_sig_You_must
#define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError
#define __pyx_n_s_Windows __pyx_mstate_global->__pyx_n_s_Windows
#define __pyx_kp_s__10 __pyx_mstate_global->__pyx_kp_s__10
#define __pyx_kp_s__14 __pyx_mstate_global->__pyx_kp_s__14
#define __pyx_n_s__172 __pyx_mstate_global->__pyx_n_s__172
#define __pyx_kp_b__18 __pyx_mstate_global->__pyx_kp_b__18
#define __pyx_kp_b__4 __pyx_mstate_global->__pyx_kp_b__4
#define __pyx_kp_b__5 __pyx_mstate_global->__pyx_kp_b__5
#define __pyx_kp_s__8 __pyx_mstate_global->__pyx_kp_s__8
#define __pyx_kp_u__8 __pyx_mstate_global->__pyx_kp_u__8
#define __pyx_n_s__9 __pyx_mstate_global->__pyx_n_s__9
#define __pyx_n_s_abspath __pyx_mstate_global->__pyx_n_s_abspath
#define __pyx_n_s_add_NVT __pyx_mstate_global->__pyx_n_s_add_NVT
#define __pyx_n_s_add_frame_type __pyx_mstate_global->__pyx_n_s_add_frame_type
#define __pyx_n_s_add_matrix __pyx_mstate_global->__pyx_n_s_add_matrix
#define __pyx_n_s_add_matrix_type __pyx_mstate_global->__pyx_n_s_add_matrix_type
#define __pyx_n_s_add_predefined_frametype __pyx_mstate_global->__pyx_n_s_add_predefined_frametype
#define __pyx_n_s_add_streamID __pyx_mstate_global->__pyx_n_s_add_streamID
#define __pyx_n_s_allframetypes __pyx_mstate_global->__pyx_n_s_allframetypes
#define __pyx_n_s_allmatrixtypes __pyx_mstate_global->__pyx_n_s_allmatrixtypes
#define __pyx_n_s_args __pyx_mstate_global->__pyx_n_s_args
#define __pyx_n_s_ascii __pyx_mstate_global->__pyx_n_s_ascii
#define __pyx_n_s_ascontiguousarray __pyx_mstate_global->__pyx_n_s_ascontiguousarray
#define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines
#define __pyx_n_s_bytes_read __pyx_mstate_global->__pyx_n_s_bytes_read
#define __pyx_n_s_bytesread __pyx_mstate_global->__pyx_n_s_bytesread
#define __pyx_n_s_c_contiguous __pyx_mstate_global->__pyx_n_s_c_contiguous
#define __pyx_n_s_char __pyx_mstate_global->__pyx_n_s_char
#define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
#define __pyx_n_s_clone_NVTs __pyx_mstate_global->__pyx_n_s_clone_NVTs
#define __pyx_n_s_clone_definitions __pyx_mstate_global->__pyx_n_s_clone_definitions
#define __pyx_n_s_clone_frames __pyx_mstate_global->__pyx_n_s_clone_frames
#define __pyx_n_s_clone_frames_locals_genexpr __pyx_mstate_global->__pyx_n_s_clone_frames_locals_genexpr
#define __pyx_n_s_clone_type_definitions __pyx_mstate_global->__pyx_n_s_clone_type_definitions
#define __pyx_n_s_close __pyx_mstate_global->__pyx_n_s_close
#define __pyx_kp_s_close_can_t_close_SdifFile_it_is __pyx_mstate_global->__pyx_kp_s_close_can_t_close_SdifFile_it_is
#define __pyx_kp_s_close_can_t_close_SdifFile_since __pyx_mstate_global->__pyx_kp_s_close_can_t_close_SdifFile_since
#define __pyx_n_s_colnames __pyx_mstate_global->__pyx_n_s_colnames
#define __pyx_n_s_cols __pyx_mstate_global->__pyx_n_s_cols
#define __pyx_n_s_column_names __pyx_mstate_global->__pyx_n_s_column_names
#define __pyx_n_s_comp __pyx_mstate_global->__pyx_n_s_comp
#define __pyx_n_s_components __pyx_mstate_global->__pyx_n_s_components
#define __pyx_kp_s_components_should_be_a_seq_of_Co __pyx_mstate_global->__pyx_kp_s_components_should_be_a_seq_of_Co
#define __pyx_n_s_copy __pyx_mstate_global->__pyx_n_s_copy
#define __pyx_n_s_curr_frame_available __pyx_mstate_global->__pyx_n_s_curr_frame_available
#define __pyx_n_s_curr_frame_is_selected __pyx_mstate_global->__pyx_n_s_curr_frame_is_selected
#define __pyx_n_s_curr_matrix_available __pyx_mstate_global->__pyx_n_s_curr_matrix_available
#define __pyx_n_s_curr_matrix_datatype __pyx_mstate_global->__pyx_n_s_curr_matrix_datatype
#define __pyx_n_s_curr_matrix_is_selected __pyx_mstate_global->__pyx_n_s_curr_matrix_is_selected
#define __pyx_n_s_curr_matrix_signature __pyx_mstate_global->__pyx_n_s_curr_matrix_signature
#define __pyx_n_s_curr_matrix_size __pyx_mstate_global->__pyx_n_s_curr_matrix_size
#define __pyx_n_s_curr_signature __pyx_mstate_global->__pyx_n_s_curr_signature
#define __pyx_n_s_d __pyx_mstate_global->__pyx_n_s_d
#define __pyx_n_s_data __pyx_mstate_global->__pyx_n_s_data
#define __pyx_n_s_data_array __pyx_mstate_global->__pyx_n_s_data_array
#define __pyx_n_s_datadir __pyx_mstate_global->__pyx_n_s_datadir
#define __pyx_n_s_debug __pyx_mstate_global->__pyx_n_s_debug
#define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict
#define __pyx_n_s_dict_2 __pyx_mstate_global->__pyx_n_s_dict_2
#define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable
#define __pyx_n_s_doc __pyx_mstate_global->__pyx_n_s_doc
#define __pyx_n_s_dtype __pyx_mstate_global->__pyx_n_s_dtype
#define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable
#define __pyx_n_s_encode __pyx_mstate_global->__pyx_n_s_encode
#define __pyx_n_s_enter __pyx_mstate_global->__pyx_n_s_enter
#define __pyx_n_s_enumerate __pyx_mstate_global->__pyx_n_s_enumerate
#define __pyx_n_s_error __pyx_mstate_global->__pyx_n_s_error
#define __pyx_kp_s_error_finishing_matrix __pyx_mstate_global->__pyx_kp_s_error_finishing_matrix
#define __pyx_kp_s_error_opening_file __pyx_mstate_global->__pyx_kp_s_error_opening_file
#define __pyx_n_s_exception_type __pyx_mstate_global->__pyx_n_s_exception_type
#define __pyx_n_s_exception_value __pyx_mstate_global->__pyx_n_s_exception_value
#define __pyx_n_s_exists __pyx_mstate_global->__pyx_n_s_exists
#define __pyx_n_s_exit __pyx_mstate_global->__pyx_n_s_exit
#define __pyx_n_s_expanduser __pyx_mstate_global->__pyx_n_s_expanduser
#define __pyx_n_s_f __pyx_mstate_global->__pyx_n_s_f
#define __pyx_n_s_file __pyx_mstate_global->__pyx_n_s_file
#define __pyx_n_s_filename __pyx_mstate_global->__pyx_n_s_filename
#define __pyx_n_s_finalize_frame __pyx_mstate_global->__pyx_n_s_finalize_frame
#define __pyx_kp_s_finalize_frame_called_but_heade __pyx_mstate_global->__pyx_kp_s_finalize_frame_called_but_heade
#define __pyx_kp_s_finalize_frame_without_having_r __pyx_mstate_global->__pyx_kp_s_finalize_frame_without_having_r
#define __pyx_n_s_finalize_matrix __pyx_mstate_global->__pyx_n_s_finalize_matrix
#define __pyx_n_s_find_sdiftypes __pyx_mstate_global->__pyx_n_s_find_sdiftypes
#define __pyx_n_s_find_sdiftypes_locals_get_packa __pyx_mstate_global->__pyx_n_s_find_sdiftypes_locals_get_packa
#define __pyx_n_s_flags __pyx_mstate_global->__pyx_n_s_flags
#define __pyx_n_s_float32 __pyx_mstate_global->__pyx_n_s_float32
#define __pyx_n_s_float64 __pyx_mstate_global->__pyx_n_s_float64
#define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format
#define __pyx_n_s_frame __pyx_mstate_global->__pyx_n_s_frame
#define __pyx_n_s_frame0 __pyx_mstate_global->__pyx_n_s_frame0
#define __pyx_n_s_frame1 __pyx_mstate_global->__pyx_n_s_frame1
#define __pyx_n_s_frame_id __pyx_mstate_global->__pyx_n_s_frame_id
#define __pyx_n_s_frame_num_matrix __pyx_mstate_global->__pyx_n_s_frame_num_matrix
#define __pyx_n_s_frame_numerical_signature __pyx_mstate_global->__pyx_n_s_frame_numerical_signature
#define __pyx_n_s_frame_read_header __pyx_mstate_global->__pyx_n_s_frame_read_header
#define __pyx_kp_s_frame_read_header_finalizing_las __pyx_mstate_global->__pyx_kp_s_frame_read_header_finalizing_las
#define __pyx_n_s_frame_sig __pyx_mstate_global->__pyx_n_s_frame_sig
#define __pyx_n_s_frame_signature __pyx_mstate_global->__pyx_n_s_frame_signature
#define __pyx_n_s_frame_size __pyx_mstate_global->__pyx_n_s_frame_size
#define __pyx_n_s_frame_skip_data __pyx_mstate_global->__pyx_n_s_frame_skip_data
#define __pyx_kp_s_frame_skip_data_calling_finalize __pyx_mstate_global->__pyx_kp_s_frame_skip_data_calling_finalize
#define __pyx_n_s_frame_skip_rest __pyx_mstate_global->__pyx_n_s_frame_skip_rest
#define __pyx_kp_s_frame_skip_rest_Attempted_to_sk __pyx_mstate_global->__pyx_kp_s_frame_skip_rest_Attempted_to_sk
#define __pyx_n_s_frame_time __pyx_mstate_global->__pyx_n_s_frame_time
#define __pyx_n_s_frame_types_to_string __pyx_mstate_global->__pyx_n_s_frame_types_to_string
#define __pyx_n_s_framestatus2str __pyx_mstate_global->__pyx_n_s_framestatus2str
#define __pyx_n_s_frametype __pyx_mstate_global->__pyx_n_s_frametype
#define __pyx_n_s_frametypes __pyx_mstate_global->__pyx_n_s_frametypes
#define __pyx_n_s_frametypes_populate __pyx_mstate_global->__pyx_n_s_frametypes_populate
#define __pyx_n_s_frametypeslist __pyx_mstate_global->__pyx_n_s_frametypeslist
#define __pyx_n_s_fsz __pyx_mstate_global->__pyx_n_s_fsz
#define __pyx_n_s_ft __pyx_mstate_global->__pyx_n_s_ft
#define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc
#define __pyx_n_s_genexpr __pyx_mstate_global->__pyx_n_s_genexpr
#define __pyx_n_s_get __pyx_mstate_global->__pyx_n_s_get
#define __pyx_n_s_getLogger __pyx_mstate_global->__pyx_n_s_getLogger
#define __pyx_n_s_get_NVTs __pyx_mstate_global->__pyx_n_s_get_NVTs
#define __pyx_n_s_get_data __pyx_mstate_global->__pyx_n_s_get_data
#define __pyx_n_s_get_frame_types __pyx_mstate_global->__pyx_n_s_get_frame_types
#define __pyx_n_s_get_matrix __pyx_mstate_global->__pyx_n_s_get_matrix
#define __pyx_n_s_get_matrix_types __pyx_mstate_global->__pyx_n_s_get_matrix_types
#define __pyx_n_s_get_num_NVTs __pyx_mstate_global->__pyx_n_s_get_num_NVTs
#define __pyx_n_s_get_packaged_sdiftypes __pyx_mstate_global->__pyx_n_s_get_packaged_sdiftypes
#define __pyx_n_s_get_stream_IDs __pyx_mstate_global->__pyx_n_s_get_stream_IDs
#define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate
#define __pyx_n_s_i __pyx_mstate_global->__pyx_n_s_i
#define __pyx_n_s_idx __pyx_mstate_global->__pyx_n_s_idx
#define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import
#define __pyx_n_s_info __pyx_mstate_global->__pyx_n_s_info
#define __pyx_n_s_init___locals_genexpr __pyx_mstate_global->__pyx_n_s_init___locals_genexpr
#define __pyx_n_s_init_subclass __pyx_mstate_global->__pyx_n_s_init_subclass
#define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing
#define __pyx_n_s_int16 __pyx_mstate_global->__pyx_n_s_int16
#define __pyx_n_s_int32 __pyx_mstate_global->__pyx_n_s_int32
#define __pyx_n_s_int64 __pyx_mstate_global->__pyx_n_s_int64
#define __pyx_n_s_int8 __pyx_mstate_global->__pyx_n_s_int8
#define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine
#define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled
#define __pyx_n_s_items __pyx_mstate_global->__pyx_n_s_items
#define __pyx_n_s_iteritems __pyx_mstate_global->__pyx_n_s_iteritems
#define __pyx_n_s_join __pyx_mstate_global->__pyx_n_s_join
#define __pyx_n_s_last_error __pyx_mstate_global->__pyx_n_s_last_error
#define __pyx_kp_s_local_share __pyx_mstate_global->__pyx_kp_s_local_share
#define __pyx_n_s_logger __pyx_mstate_global->__pyx_n_s_logger
#define __pyx_n_s_logging __pyx_mstate_global->__pyx_n_s_logging
#define __pyx_n_s_m __pyx_mstate_global->__pyx_n_s_m
#define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
#define __pyx_n_s_matrix __pyx_mstate_global->__pyx_n_s_matrix
#define __pyx_kp_s_matrix_empty_or_could_not_read_m __pyx_mstate_global->__pyx_kp_s_matrix_empty_or_could_not_read_m
#define __pyx_n_s_matrix_idx __pyx_mstate_global->__pyx_n_s_matrix_idx
#define __pyx_n_s_matrix_read_data __pyx_mstate_global->__pyx_n_s_matrix_read_data
#define __pyx_n_s_matrix_read_header __pyx_mstate_global->__pyx_n_s_matrix_read_header
#define __pyx_n_s_matrix_sig __pyx_mstate_global->__pyx_n_s_matrix_sig
#define __pyx_n_s_matrix_skip __pyx_mstate_global->__pyx_n_s_matrix_skip
#define __pyx_n_s_matrix_skip_data __pyx_mstate_global->__pyx_n_s_matrix_skip_data
#define __pyx_kp_s_matrix_skip_data_no_current_fram __pyx_mstate_global->__pyx_kp_s_matrix_skip_data_no_current_fram
#define __pyx_kp_s_matrix_skip_no_current_frame __pyx_mstate_global->__pyx_kp_s_matrix_skip_no_current_frame
#define __pyx_n_s_matrix_status __pyx_mstate_global->__pyx_n_s_matrix_status
#define __pyx_n_s_matrix_types_to_string __pyx_mstate_global->__pyx_n_s_matrix_types_to_string
#define __pyx_n_s_matrixdata __pyx_mstate_global->__pyx_n_s_matrixdata
#define __pyx_n_s_matrixrole __pyx_mstate_global->__pyx_n_s_matrixrole
#define __pyx_n_s_matrixsig __pyx_mstate_global->__pyx_n_s_matrixsig
#define __pyx_n_s_matrixstatus2str __pyx_mstate_global->__pyx_n_s_matrixstatus2str
#define __pyx_n_s_matrixtype __pyx_mstate_global->__pyx_n_s_matrixtype
#define __pyx_n_s_matrixtypes __pyx_mstate_global->__pyx_n_s_matrixtypes
#define __pyx_n_s_matrixtypeslist __pyx_mstate_global->__pyx_n_s_matrixtypeslist
#define __pyx_n_s_metaclass __pyx_mstate_global->__pyx_n_s_metaclass
#define __pyx_n_s_midx __pyx_mstate_global->__pyx_n_s_midx
#define __pyx_n_s_mode __pyx_mstate_global->__pyx_n_s_mode
#define __pyx_kp_s_mode_should_be_on_of_r_w_rw __pyx_mstate_global->__pyx_kp_s_mode_should_be_on_of_r_w_rw
#define __pyx_n_s_module __pyx_mstate_global->__pyx_n_s_module
#define __pyx_n_s_mro_entries __pyx_mstate_global->__pyx_n_s_mro_entries
#define __pyx_n_s_mt __pyx_mstate_global->__pyx_n_s_mt
#define __pyx_n_s_mtd __pyx_mstate_global->__pyx_n_s_mtd
#define __pyx_n_s_n __pyx_mstate_global->__pyx_n_s_n
#define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
#define __pyx_n_s_name_2 __pyx_mstate_global->__pyx_n_s_name_2
#define __pyx_n_s_new __pyx_mstate_global->__pyx_n_s_new
#define __pyx_n_s_new_frame __pyx_mstate_global->__pyx_n_s_new_frame
#define __pyx_n_s_new_frame_one_matrix __pyx_mstate_global->__pyx_n_s_new_frame_one_matrix
#define __pyx_n_s_next __pyx_mstate_global->__pyx_n_s_next
#define __pyx_n_s_next_frame __pyx_mstate_global->__pyx_n_s_next_frame
#define __pyx_n_s_next_matrix __pyx_mstate_global->__pyx_n_s_next_matrix
#define __pyx_kp_s_no_current_frame __pyx_mstate_global->__pyx_kp_s_no_current_frame
#define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non
#define __pyx_n_s_np __pyx_mstate_global->__pyx_n_s_np
#define __pyx_n_s_num __pyx_mstate_global->__pyx_n_s_num
#define __pyx_n_s_num_matrices __pyx_mstate_global->__pyx_n_s_num_matrices
#define __pyx_n_s_numid __pyx_mstate_global->__pyx_n_s_numid
#define __pyx_n_s_numpy __pyx_mstate_global->__pyx_n_s_numpy
#define __pyx_kp_s_numpy_core_multiarray_failed_to __pyx_mstate_global->__pyx_kp_s_numpy_core_multiarray_failed_to
#define __pyx_kp_s_numpy_core_umath_failed_to_impor __pyx_mstate_global->__pyx_kp_s_numpy_core_umath_failed_to_impor
#define __pyx_n_s_nvt __pyx_mstate_global->__pyx_n_s_nvt
#define __pyx_n_s_os __pyx_mstate_global->__pyx_n_s_os
#define __pyx_n_s_os_path __pyx_mstate_global->__pyx_n_s_os_path
#define __pyx_n_s_out __pyx_mstate_global->__pyx_n_s_out
#define __pyx_n_s_p __pyx_mstate_global->__pyx_n_s_p
#define __pyx_n_s_p2 __pyx_mstate_global->__pyx_n_s_p2
#define __pyx_n_s_packaged_sdiftypes __pyx_mstate_global->__pyx_n_s_packaged_sdiftypes
#define __pyx_n_s_path __pyx_mstate_global->__pyx_n_s_path
#define __pyx_kp_s_path_not_found_cannot_open_sdif __pyx_mstate_global->__pyx_kp_s_path_not_found_cannot_open_sdif
#define __pyx_n_s_paths __pyx_mstate_global->__pyx_n_s_paths
#define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle
#define __pyx_n_s_pl __pyx_mstate_global->__pyx_n_s_pl
#define __pyx_n_s_platform __pyx_mstate_global->__pyx_n_s_platform
#define __pyx_n_s_predefined_frametypes __pyx_mstate_global->__pyx_n_s_predefined_frametypes
#define __pyx_n_s_predefined_matrixtypes __pyx_mstate_global->__pyx_n_s_predefined_matrixtypes
#define __pyx_n_s_predefined_type __pyx_mstate_global->__pyx_n_s_predefined_type
#define __pyx_n_s_prepare __pyx_mstate_global->__pyx_n_s_prepare
#define __pyx_n_s_print __pyx_mstate_global->__pyx_n_s_print
#define __pyx_n_s_print_NVT __pyx_mstate_global->__pyx_n_s_print_NVT
#define __pyx_n_s_print_all_ascii_chunks __pyx_mstate_global->__pyx_n_s_print_all_ascii_chunks
#define __pyx_n_s_print_all_stream_ID __pyx_mstate_global->__pyx_n_s_print_all_stream_ID
#define __pyx_n_s_print_all_types __pyx_mstate_global->__pyx_n_s_print_all_types
#define __pyx_n_s_print_frame_header __pyx_mstate_global->__pyx_n_s_print_frame_header
#define __pyx_n_s_print_general_header __pyx_mstate_global->__pyx_n_s_print_general_header
#define __pyx_n_s_print_matrix_header __pyx_mstate_global->__pyx_n_s_print_matrix_header
#define __pyx_n_s_print_one_row __pyx_mstate_global->__pyx_n_s_print_one_row
#define __pyx_n_s_pysdif __pyx_mstate_global->__pyx_n_s_pysdif
#define __pyx_n_s_pysdif__pysdif __pyx_mstate_global->__pyx_n_s_pysdif__pysdif
#define __pyx_kp_s_pysdif__pysdif_pyx __pyx_mstate_global->__pyx_kp_s_pysdif__pysdif_pyx
#define __pyx_n_s_pyx_PickleError __pyx_mstate_global->__pyx_n_s_pyx_PickleError
#define __pyx_n_s_pyx_checksum __pyx_mstate_global->__pyx_n_s_pyx_checksum
#define __pyx_n_s_pyx_result __pyx_mstate_global->__pyx_n_s_pyx_result
#define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state
#define __pyx_n_s_pyx_type __pyx_mstate_global->__pyx_n_s_pyx_type
#define __pyx_n_s_pyx_unpickle_Component __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Component
#define __pyx_n_s_pyx_unpickle_FrameTypeDefiniti __pyx_mstate_global->__pyx_n_s_pyx_unpickle_FrameTypeDefiniti
#define __pyx_n_s_pyx_unpickle_FrameW __pyx_mstate_global->__pyx_n_s_pyx_unpickle_FrameW
#define __pyx_n_s_pyx_unpickle_MatrixTypeDefinit __pyx_mstate_global->__pyx_n_s_pyx_unpickle_MatrixTypeDefinit
#define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable
#define __pyx_n_s_qualname __pyx_mstate_global->__pyx_n_s_qualname
#define __pyx_n_s_r __pyx_mstate_global->__pyx_n_s_r
#define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range
#define __pyx_n_s_read_padding __pyx_mstate_global->__pyx_n_s_read_padding
#define __pyx_n_s_read_sdiftypes __pyx_mstate_global->__pyx_n_s_read_sdiftypes
#define __pyx_n_s_read_signature __pyx_mstate_global->__pyx_n_s_read_signature
#define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce
#define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython
#define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex
#define __pyx_n_s_replace __pyx_mstate_global->__pyx_n_s_replace
#define __pyx_n_s_rewind __pyx_mstate_global->__pyx_n_s_rewind
#define __pyx_n_s_rewind_2 __pyx_mstate_global->__pyx_n_s_rewind_2
#define __pyx_n_s_rows __pyx_mstate_global->__pyx_n_s_rows
#define __pyx_n_s_rw __pyx_mstate_global->__pyx_n_s_rw
#define __pyx_n_s_s __pyx_mstate_global->__pyx_n_s_s
#define __pyx_kp_s_s_should_be_either_a_str_or_byte __pyx_mstate_global->__pyx_kp_s_s_should_be_either_a_str_or_byte
#define __pyx_n_s_sdif_cleanup __pyx_mstate_global->__pyx_n_s_sdif_cleanup
#define __pyx_n_s_sdif_init __pyx_mstate_global->__pyx_n_s_sdif_init
#define __pyx_n_s_sdifstr __pyx_mstate_global->__pyx_n_s_sdifstr
#define __pyx_n_s_sdiftypes_data __pyx_mstate_global->__pyx_n_s_sdiftypes_data
#define __pyx_n_s_sdiftypes_path __pyx_mstate_global->__pyx_n_s_sdiftypes_path
#define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self
#define __pyx_n_s_send __pyx_mstate_global->__pyx_n_s_send
#define __pyx_n_s_setLevel __pyx_mstate_global->__pyx_n_s_setLevel
#define __pyx_n_s_set_name __pyx_mstate_global->__pyx_n_s_set_name
#define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate
#define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython
#define __pyx_n_s_shape __pyx_mstate_global->__pyx_n_s_shape
#define __pyx_n_s_sig __pyx_mstate_global->__pyx_n_s_sig
#define __pyx_n_s_signature __pyx_mstate_global->__pyx_n_s_signature
#define __pyx_n_s_signature2str __pyx_mstate_global->__pyx_n_s_signature2str
#define __pyx_kp_s_signature_not_found __pyx_mstate_global->__pyx_kp_s_signature_not_found
#define __pyx_n_s_signatures_to_clone __pyx_mstate_global->__pyx_n_s_signatures_to_clone
#define __pyx_n_s_signaturesture __pyx_mstate_global->__pyx_n_s_signaturesture
#define __pyx_n_s_sigs __pyx_mstate_global->__pyx_n_s_sigs
#define __pyx_n_s_skip __pyx_mstate_global->__pyx_n_s_skip
#define __pyx_n_s_source __pyx_mstate_global->__pyx_n_s_source
#define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec
#define __pyx_n_s_split __pyx_mstate_global->__pyx_n_s_split
#define __pyx_n_s_state __pyx_mstate_global->__pyx_n_s_state
#define __pyx_n_s_status __pyx_mstate_global->__pyx_n_s_status
#define __pyx_n_s_str2signature __pyx_mstate_global->__pyx_n_s_str2signature
#define __pyx_n_s_streamID __pyx_mstate_global->__pyx_n_s_streamID
#define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource
#define __pyx_n_s_strip __pyx_mstate_global->__pyx_n_s_strip
#define __pyx_n_s_super __pyx_mstate_global->__pyx_n_s_super
#define __pyx_n_s_system __pyx_mstate_global->__pyx_n_s_system
#define __pyx_n_s_t __pyx_mstate_global->__pyx_n_s_t
#define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
#define __pyx_n_s_thisfile __pyx_mstate_global->__pyx_n_s_thisfile
#define __pyx_n_s_throw __pyx_mstate_global->__pyx_n_s_throw
#define __pyx_n_s_time __pyx_mstate_global->__pyx_n_s_time
#define __pyx_n_s_traceback __pyx_mstate_global->__pyx_n_s_traceback
#define __pyx_n_s_treeway __pyx_mstate_global->__pyx_n_s_treeway
#define __pyx_kp_s_tried_to_finalize_matrix_but_sta __pyx_mstate_global->__pyx_kp_s_tried_to_finalize_matrix_but_sta
#define __pyx_n_s_uint16 __pyx_mstate_global->__pyx_n_s_uint16
#define __pyx_n_s_uint32 __pyx_mstate_global->__pyx_n_s_uint32
#define __pyx_n_s_uint64 __pyx_mstate_global->__pyx_n_s_uint64
#define __pyx_n_s_uint8 __pyx_mstate_global->__pyx_n_s_uint8
#define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update
#define __pyx_n_s_use_setstate __pyx_mstate_global->__pyx_n_s_use_setstate
#define __pyx_kp_s_usr_local_share __pyx_mstate_global->__pyx_kp_s_usr_local_share
#define __pyx_kp_s_usr_share __pyx_mstate_global->__pyx_kp_s_usr_share
#define __pyx_n_s_value __pyx_mstate_global->__pyx_n_s_value
#define __pyx_n_s_w __pyx_mstate_global->__pyx_n_s_w
#define __pyx_n_s_warn __pyx_mstate_global->__pyx_n_s_warn
#define __pyx_n_s_warning __pyx_mstate_global->__pyx_n_s_warning
#define __pyx_n_s_warnings __pyx_mstate_global->__pyx_n_s_warnings
#define __pyx_n_s_wr __pyx_mstate_global->__pyx_n_s_wr
#define __pyx_n_s_write __pyx_mstate_global->__pyx_n_s_write
#define __pyx_n_s_write_all_ascii_chunks __pyx_mstate_global->__pyx_n_s_write_all_ascii_chunks
#define __pyx_int_0 __pyx_mstate_global->__pyx_int_0
#define __pyx_int_4 __pyx_mstate_global->__pyx_int_4
#define __pyx_int_8 __pyx_mstate_global->__pyx_int_8
#define __pyx_int_257 __pyx_mstate_global->__pyx_int_257
#define __pyx_int_258 __pyx_mstate_global->__pyx_int_258
#define __pyx_int_260 __pyx_mstate_global->__pyx_int_260
#define __pyx_int_264 __pyx_mstate_global->__pyx_int_264
#define __pyx_int_513 __pyx_mstate_global->__pyx_int_513
#define __pyx_int_514 __pyx_mstate_global->__pyx_int_514
#define __pyx_int_516 __pyx_mstate_global->__pyx_int_516
#define __pyx_int_520 __pyx_mstate_global->__pyx_int_520
#define __pyx_int_769 __pyx_mstate_global->__pyx_int_769
#define __pyx_int_17723012 __pyx_mstate_global->__pyx_int_17723012
#define __pyx_int_20897590 __pyx_mstate_global->__pyx_int_20897590
#define __pyx_int_57246580 __pyx_mstate_global->__pyx_int_57246580
#define __pyx_int_66826235 __pyx_mstate_global->__pyx_int_66826235
#define __pyx_int_117679685 __pyx_mstate_global->__pyx_int_117679685
#define __pyx_int_149399746 __pyx_mstate_global->__pyx_int_149399746
#define __pyx_int_149774176 __pyx_mstate_global->__pyx_int_149774176
#define __pyx_int_168628298 __pyx_mstate_global->__pyx_int_168628298
#define __pyx_int_216518149 __pyx_mstate_global->__pyx_int_216518149
#define __pyx_int_229941985 __pyx_mstate_global->__pyx_int_229941985
#define __pyx_int_247608754 __pyx_mstate_global->__pyx_int_247608754
#define __pyx_int_256861586 __pyx_mstate_global->__pyx_int_256861586
#define __pyx_int_neg_1 __pyx_mstate_global->__pyx_int_neg_1
#define __pyx_tuple_ __pyx_mstate_global->__pyx_tuple_
#define __pyx_tuple__2 __pyx_mstate_global->__pyx_tuple__2
#define __pyx_tuple__3 __pyx_mstate_global->__pyx_tuple__3
#define __pyx_tuple__6 __pyx_mstate_global->__pyx_tuple__6
#define __pyx_tuple__11 __pyx_mstate_global->__pyx_tuple__11
#define __pyx_tuple__12 __pyx_mstate_global->__pyx_tuple__12
#define __pyx_tuple__13 __pyx_mstate_global->__pyx_tuple__13
#define __pyx_tuple__15 __pyx_mstate_global->__pyx_tuple__15
#define __pyx_tuple__16 __pyx_mstate_global->__pyx_tuple__16
#define __pyx_tuple__17 __pyx_mstate_global->__pyx_tuple__17
#define __pyx_tuple__19 __pyx_mstate_global->__pyx_tuple__19
#define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20
#define __pyx_tuple__21 __pyx_mstate_global->__pyx_tuple__21
#define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22
#define __pyx_tuple__23 __pyx_mstate_global->__pyx_tuple__23
#define __pyx_tuple__24 __pyx_mstate_global->__pyx_tuple__24
#define __pyx_tuple__25 __pyx_mstate_global->__pyx_tuple__25
#define __pyx_tuple__26 __pyx_mstate_global->__pyx_tuple__26
#define __pyx_tuple__27 __pyx_mstate_global->__pyx_tuple__27
#define __pyx_tuple__28 __pyx_mstate_global->__pyx_tuple__28
#define __pyx_tuple__29 __pyx_mstate_global->__pyx_tuple__29
#define __pyx_tuple__30 __pyx_mstate_global->__pyx_tuple__30
#define __pyx_tuple__32 __pyx_mstate_global->__pyx_tuple__32
#define __pyx_tuple__34 __pyx_mstate_global->__pyx_tuple__34
#define __pyx_tuple__36 __pyx_mstate_global->__pyx_tuple__36
#define __pyx_tuple__38 __pyx_mstate_global->__pyx_tuple__38
#define __pyx_tuple__45 __pyx_mstate_global->__pyx_tuple__45
#define __pyx_tuple__47 __pyx_mstate_global->__pyx_tuple__47
#define __pyx_tuple__51 __pyx_mstate_global->__pyx_tuple__51
#define __pyx_tuple__53 __pyx_mstate_global->__pyx_tuple__53
#define __pyx_tuple__55 __pyx_mstate_global->__pyx_tuple__55
#define __pyx_tuple__57 __pyx_mstate_global->__pyx_tuple__57
#define __pyx_tuple__58 __pyx_mstate_global->__pyx_tuple__58
#define __pyx_tuple__60 __pyx_mstate_global->__pyx_tuple__60
#define __pyx_tuple__62 __pyx_mstate_global->__pyx_tuple__62
#define __pyx_tuple__64 __pyx_mstate_global->__pyx_tuple__64
#define __pyx_tuple__65 __pyx_mstate_global->__pyx_tuple__65
#define __pyx_tuple__70 __pyx_mstate_global->__pyx_tuple__70
#define __pyx_tuple__75 __pyx_mstate_global->__pyx_tuple__75
#define __pyx_tuple__77 __pyx_mstate_global->__pyx_tuple__77
#define __pyx_tuple__79 __pyx_mstate_global->__pyx_tuple__79
#define __pyx_tuple__84 __pyx_mstate_global->__pyx_tuple__84
#define __pyx_tuple__88 __pyx_mstate_global->__pyx_tuple__88
#define __pyx_tuple__95 __pyx_mstate_global->__pyx_tuple__95
#define __pyx_codeobj__7 __pyx_mstate_global->__pyx_codeobj__7
#define __pyx_tuple__100 __pyx_mstate_global->__pyx_tuple__100
#define __pyx_tuple__102 __pyx_mstate_global->__pyx_tuple__102
#define __pyx_tuple__105 __pyx_mstate_global->__pyx_tuple__105
#define __pyx_tuple__110 __pyx_mstate_global->__pyx_tuple__110
#define __pyx_tuple__112 __pyx_mstate_global->__pyx_tuple__112
#define __pyx_tuple__113 __pyx_mstate_global->__pyx_tuple__113
#define __pyx_tuple__120 __pyx_mstate_global->__pyx_tuple__120
#define __pyx_tuple__125 __pyx_mstate_global->__pyx_tuple__125
#define __pyx_tuple__127 __pyx_mstate_global->__pyx_tuple__127
#define __pyx_tuple__129 __pyx_mstate_global->__pyx_tuple__129
#define __pyx_tuple__131 __pyx_mstate_global->__pyx_tuple__131
#define __pyx_tuple__133 __pyx_mstate_global->__pyx_tuple__133
#define __pyx_tuple__135 __pyx_mstate_global->__pyx_tuple__135
#define __pyx_tuple__137 __pyx_mstate_global->__pyx_tuple__137
#define __pyx_tuple__139 __pyx_mstate_global->__pyx_tuple__139
#define __pyx_tuple__141 __pyx_mstate_global->__pyx_tuple__141
#define __pyx_tuple__144 __pyx_mstate_global->__pyx_tuple__144
#define __pyx_tuple__146 __pyx_mstate_global->__pyx_tuple__146
#define __pyx_tuple__147 __pyx_mstate_global->__pyx_tuple__147
#define __pyx_tuple__150 __pyx_mstate_global->__pyx_tuple__150
#define __pyx_tuple__158 __pyx_mstate_global->__pyx_tuple__158
#define __pyx_tuple__167 __pyx_mstate_global->__pyx_tuple__167
#define __pyx_codeobj__31 __pyx_mstate_global->__pyx_codeobj__31
#define __pyx_codeobj__33 __pyx_mstate_global->__pyx_codeobj__33
#define __pyx_codeobj__35 __pyx_mstate_global->__pyx_codeobj__35
#define __pyx_codeobj__37 __pyx_mstate_global->__pyx_codeobj__37
#define __pyx_codeobj__39 __pyx_mstate_global->__pyx_codeobj__39
#define __pyx_codeobj__40 __pyx_mstate_global->__pyx_codeobj__40
#define __pyx_codeobj__41 __pyx_mstate_global->__pyx_codeobj__41
#define __pyx_codeobj__42 __pyx_mstate_global->__pyx_codeobj__42
#define __pyx_codeobj__43 __pyx_mstate_global->__pyx_codeobj__43
#define __pyx_codeobj__44 __pyx_mstate_global->__pyx_codeobj__44
#define __pyx_codeobj__46 __pyx_mstate_global->__pyx_codeobj__46
#define __pyx_codeobj__48 __pyx_mstate_global->__pyx_codeobj__48
#define __pyx_codeobj__49 __pyx_mstate_global->__pyx_codeobj__49
#define __pyx_codeobj__50 __pyx_mstate_global->__pyx_codeobj__50
#define __pyx_codeobj__52 __pyx_mstate_global->__pyx_codeobj__52
#define __pyx_codeobj__54 __pyx_mstate_global->__pyx_codeobj__54
#define __pyx_codeobj__56 __pyx_mstate_global->__pyx_codeobj__56
#define __pyx_codeobj__59 __pyx_mstate_global->__pyx_codeobj__59
#define __pyx_codeobj__61 __pyx_mstate_global->__pyx_codeobj__61
#define __pyx_codeobj__63 __pyx_mstate_global->__pyx_codeobj__63
#define __pyx_codeobj__66 __pyx_mstate_global->__pyx_codeobj__66
#define __pyx_codeobj__67 __pyx_mstate_global->__pyx_codeobj__67
#define __pyx_codeobj__68 __pyx_mstate_global->__pyx_codeobj__68
#define __pyx_codeobj__69 __pyx_mstate_global->__pyx_codeobj__69
#define __pyx_codeobj__71 __pyx_mstate_global->__pyx_codeobj__71
#define __pyx_codeobj__72 __pyx_mstate_global->__pyx_codeobj__72
#define __pyx_codeobj__73 __pyx_mstate_global->__pyx_codeobj__73
#define __pyx_codeobj__74 __pyx_mstate_global->__pyx_codeobj__74
#define __pyx_codeobj__76 __pyx_mstate_global->__pyx_codeobj__76
#define __pyx_codeobj__78 __pyx_mstate_global->__pyx_codeobj__78
#define __pyx_codeobj__80 __pyx_mstate_global->__pyx_codeobj__80
#define __pyx_codeobj__81 __pyx_mstate_global->__pyx_codeobj__81
#define __pyx_codeobj__82 __pyx_mstate_global->__pyx_codeobj__82
#define __pyx_codeobj__83 __pyx_mstate_global->__pyx_codeobj__83
#define __pyx_codeobj__85 __pyx_mstate_global->__pyx_codeobj__85
#define __pyx_codeobj__86 __pyx_mstate_global->__pyx_codeobj__86
#define __pyx_codeobj__87 __pyx_mstate_global->__pyx_codeobj__87
#define __pyx_codeobj__89 __pyx_mstate_global->__pyx_codeobj__89
#define __pyx_codeobj__90 __pyx_mstate_global->__pyx_codeobj__90
#define __pyx_codeobj__91 __pyx_mstate_global->__pyx_codeobj__91
#define __pyx_codeobj__92 __pyx_mstate_global->__pyx_codeobj__92
#define __pyx_codeobj__93 __pyx_mstate_global->__pyx_codeobj__93
#define __pyx_codeobj__94 __pyx_mstate_global->__pyx_codeobj__94
#define __pyx_codeobj__96 __pyx_mstate_global->__pyx_codeobj__96
#define __pyx_codeobj__97 __pyx_mstate_global->__pyx_codeobj__97
#define __pyx_codeobj__98 __pyx_mstate_global->__pyx_codeobj__98
#define __pyx_codeobj__99 __pyx_mstate_global->__pyx_codeobj__99
#define __pyx_codeobj__101 __pyx_mstate_global->__pyx_codeobj__101
#define __pyx_codeobj__103 __pyx_mstate_global->__pyx_codeobj__103
#define __pyx_codeobj__104 __pyx_mstate_global->__pyx_codeobj__104
#define __pyx_codeobj__106 __pyx_mstate_global->__pyx_codeobj__106
#define __pyx_codeobj__107 __pyx_mstate_global->__pyx_codeobj__107
#define __pyx_codeobj__108 __pyx_mstate_global->__pyx_codeobj__108
#define __pyx_codeobj__109 __pyx_mstate_global->__pyx_codeobj__109
#define __pyx_codeobj__111 __pyx_mstate_global->__pyx_codeobj__111
#define __pyx_codeobj__114 __pyx_mstate_global->__pyx_codeobj__114
#define __pyx_codeobj__115 __pyx_mstate_global->__pyx_codeobj__115
#define __pyx_codeobj__116 __pyx_mstate_global->__pyx_codeobj__116
#define __pyx_codeobj__117 __pyx_mstate_global->__pyx_codeobj__117
#define __pyx_codeobj__118 __pyx_mstate_global->__pyx_codeobj__118
#define __pyx_codeobj__119 __pyx_mstate_global->__pyx_codeobj__119
#define __pyx_codeobj__121 __pyx_mstate_global->__pyx_codeobj__121
#define __pyx_codeobj__122 __pyx_mstate_global->__pyx_codeobj__122
#define __pyx_codeobj__123 __pyx_mstate_global->__pyx_codeobj__123
#define __pyx_codeobj__124 __pyx_mstate_global->__pyx_codeobj__124
#define __pyx_codeobj__126 __pyx_mstate_global->__pyx_codeobj__126
#define __pyx_codeobj__128 __pyx_mstate_global->__pyx_codeobj__128
#define __pyx_codeobj__130 __pyx_mstate_global->__pyx_codeobj__130
#define __pyx_codeobj__132 __pyx_mstate_global->__pyx_codeobj__132
#define __pyx_codeobj__134 __pyx_mstate_global->__pyx_codeobj__134
#define __pyx_codeobj__136 __pyx_mstate_global->__pyx_codeobj__136
#define __pyx_codeobj__138 __pyx_mstate_global->__pyx_codeobj__138
#define __pyx_codeobj__140 __pyx_mstate_global->__pyx_codeobj__140
#define __pyx_codeobj__142 __pyx_mstate_global->__pyx_codeobj__142
#define __pyx_codeobj__143 __pyx_mstate_global->__pyx_codeobj__143
#define __pyx_codeobj__145 __pyx_mstate_global->__pyx_codeobj__145
#define __pyx_codeobj__148 __pyx_mstate_global->__pyx_codeobj__148
#define __pyx_codeobj__149 __pyx_mstate_global->__pyx_codeobj__149
#define __pyx_codeobj__151 __pyx_mstate_global->__pyx_codeobj__151
#define __pyx_codeobj__152 __pyx_mstate_global->__pyx_codeobj__152
#define __pyx_codeobj__153 __pyx_mstate_global->__pyx_codeobj__153
#define __pyx_codeobj__154 __pyx_mstate_global->__pyx_codeobj__154
#define __pyx_codeobj__155 __pyx_mstate_global->__pyx_codeobj__155
#define __pyx_codeobj__156 __pyx_mstate_global->__pyx_codeobj__156
#define __pyx_codeobj__157 __pyx_mstate_global->__pyx_codeobj__157
#define __pyx_codeobj__159 __pyx_mstate_global->__pyx_codeobj__159
#define __pyx_codeobj__160 __pyx_mstate_global->__pyx_codeobj__160
#define __pyx_codeobj__161 __pyx_mstate_global->__pyx_codeobj__161
#define __pyx_codeobj__162 __pyx_mstate_global->__pyx_codeobj__162
#define __pyx_codeobj__163 __pyx_mstate_global->__pyx_codeobj__163
#define __pyx_codeobj__164 __pyx_mstate_global->__pyx_codeobj__164
#define __pyx_codeobj__165 __pyx_mstate_global->__pyx_codeobj__165
#define __pyx_codeobj__166 __pyx_mstate_global->__pyx_codeobj__166
#define __pyx_codeobj__168 __pyx_mstate_global->__pyx_codeobj__168
#define __pyx_codeobj__169 __pyx_mstate_global->__pyx_codeobj__169
#define __pyx_codeobj__170 __pyx_mstate_global->__pyx_codeobj__170
#define __pyx_codeobj__171 __pyx_mstate_global->__pyx_codeobj__171
/* #### Code section: module_code ### */

/* "carray.to_py":114
 * 
 * @cname("__Pyx_carray_to_py_int")
 * cdef inline list __Pyx_carray_to_py_int(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

static CYTHON_INLINE PyObject *__Pyx_carray_to_py_int(int *__pyx_v_v, Py_ssize_t __pyx_v_length) {
  size_t __pyx_v_i;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_carray_to_py_int", 1);

  /* "carray.to_py":117
 *     cdef size_t i
 *     cdef object value
 *     l = PyList_New(length)             # <<<<<<<<<<<<<<
 *     for i in range(<size_t>length):
 *         value = v[i]
 */
  __pyx_t_1 = PyList_New(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_l = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "carray.to_py":118
 *     cdef object value
 *     l = PyList_New(length)
 *     for i in range(<size_t>length):             # <<<<<<<<<<<<<<
 *         value = v[i]
 *         Py_INCREF(value)
 */
  __pyx_t_2 = ((size_t)__pyx_v_length);
  __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;

    /* "carray.to_py":119
 *     l = PyList_New(length)
 *     for i in range(<size_t>length):
 *         value = v[i]             # <<<<<<<<<<<<<<
 *         Py_INCREF(value)
 *         PyList_SET_ITEM(l, i, value)
 */
    __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "carray.to_py":120
 *     for i in range(<size_t>length):
 *         value = v[i]
 *         Py_INCREF(value)             # <<<<<<<<<<<<<<
 *         PyList_SET_ITEM(l, i, value)
 *     return l
 */
    Py_INCREF(__pyx_v_value);

    /* "carray.to_py":121
 *         value = v[i]
 *         Py_INCREF(value)
 *         PyList_SET_ITEM(l, i, value)             # <<<<<<<<<<<<<<
 *     return l
 * 
 */
    PyList_SET_ITEM(__pyx_v_l, __pyx_v_i, __pyx_v_value);
  }

  /* "carray.to_py":122
 *         Py_INCREF(value)
 *         PyList_SET_ITEM(l, i, value)
 *     return l             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_l);
  __pyx_r = __pyx_v_l;
  goto __pyx_L0;

  /* "carray.to_py":114
 * 
 * @cname("__Pyx_carray_to_py_int")
 * cdef inline list __Pyx_carray_to_py_int(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("carray.to_py.__Pyx_carray_to_py_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "carray.to_py":126
 * 
 * @cname("__Pyx_carray_to_tuple_int")
 * cdef inline tuple __Pyx_carray_to_tuple_int(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

static CYTHON_INLINE PyObject *__Pyx_carray_to_tuple_int(int *__pyx_v_v, Py_ssize_t __pyx_v_length) {
  size_t __pyx_v_i;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_carray_to_tuple_int", 1);

  /* "carray.to_py":129
 *     cdef size_t i
 *     cdef object value
 *     t = PyTuple_New(length)             # <<<<<<<<<<<<<<
 *     for i in range(<size_t>length):
 *         value = v[i]
 */
  __pyx_t_1 = PyTuple_New(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_t = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "carray.to_py":130
 *     cdef object value
 *     t = PyTuple_New(length)
 *     for i in range(<size_t>length):             # <<<<<<<<<<<<<<
 *         value = v[i]
 *         Py_INCREF(value)
 */
  __pyx_t_2 = ((size_t)__pyx_v_length);
  __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;

    /* "carray.to_py":131
 *     t = PyTuple_New(length)
 *     for i in range(<size_t>length):
 *         value = v[i]             # <<<<<<<<<<<<<<
 *         Py_INCREF(value)
 *         PyTuple_SET_ITEM(t, i, value)
 */
    __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "carray.to_py":132
 *     for i in range(<size_t>length):
 *         value = v[i]
 *         Py_INCREF(value)             # <<<<<<<<<<<<<<
 *         PyTuple_SET_ITEM(t, i, value)
 *     return t
 */
    Py_INCREF(__pyx_v_value);

    /* "carray.to_py":133
 *         value = v[i]
 *         Py_INCREF(value)
 *         PyTuple_SET_ITEM(t, i, value)             # <<<<<<<<<<<<<<
 *     return t
 */
    PyTuple_SET_ITEM(__pyx_v_t, __pyx_v_i, __pyx_v_value);
  }

  /* "carray.to_py":134
 *         Py_INCREF(value)
 *         PyTuple_SET_ITEM(t, i, value)
 *     return t             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_t);
  __pyx_r = __pyx_v_t;
  goto __pyx_L0;

  /* "carray.to_py":126
 * 
 * @cname("__Pyx_carray_to_tuple_int")
 * cdef inline tuple __Pyx_carray_to_tuple_int(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("carray.to_py.__Pyx_carray_to_tuple_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "carray.from_py":79
 * 
 * @cname("__Pyx_carray_from_py_int")
 * cdef int __Pyx_carray_from_py_int(object o, base_type *v, Py_ssize_t length) except -1:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = length
 *     try:
 */

static int __Pyx_carray_from_py_int(PyObject *__pyx_v_o, int *__pyx_v_v, Py_ssize_t __pyx_v_length) {
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_item = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  char const *__pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_carray_from_py_int", 1);

  /* "carray.from_py":80
 * @cname("__Pyx_carray_from_py_int")
 * cdef int __Pyx_carray_from_py_int(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length             # <<<<<<<<<<<<<<
 *     try:
 *         i = len(o)
 */
  __pyx_v_i = __pyx_v_length;

  /* "carray.from_py":81
 * cdef int __Pyx_carray_from_py_int(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */
  {
    __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:*/ {

      /* "carray.from_py":82
 *     cdef Py_ssize_t i = length
 *     try:
 *         i = len(o)             # <<<<<<<<<<<<<<
 *     except (TypeError, OverflowError):
 *         pass
 */
      __pyx_t_4 = PyObject_Length(__pyx_v_o); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 82, __pyx_L3_error)
      __pyx_v_i = __pyx_t_4;

      /* "carray.from_py":81
 * cdef int __Pyx_carray_from_py_int(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */
    }
    __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:;

    /* "carray.from_py":83
 *     try:
 *         i = len(o)
 *     except (TypeError, OverflowError):             # <<<<<<<<<<<<<<
 *         pass
 *     if i == length:
 */
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_TypeError, __pyx_builtin_OverflowError);
    if (__pyx_t_5) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "carray.from_py":81
 * cdef int __Pyx_carray_from_py_int(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "carray.from_py":85
 *     except (TypeError, OverflowError):
 *         pass
 *     if i == length:             # <<<<<<<<<<<<<<
 *         for i, item in enumerate(o):
 *             if i >= length:
 */
  __pyx_t_6 = (__pyx_v_i == __pyx_v_length);
  if (__pyx_t_6) {

    /* "carray.from_py":86
 *         pass
 *     if i == length:
 *         for i, item in enumerate(o):             # <<<<<<<<<<<<<<
 *             if i >= length:
 *                 break
 */
    __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
      __pyx_t_7 = __pyx_v_o; __Pyx_INCREF(__pyx_t_7);
      __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 86, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 86, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 86, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_10 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(1, 86, __pyx_L1_error)
          #else
          __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 86, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 86, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(1, 86, __pyx_L1_error)
          #else
          __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 86, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          #endif
        }
      } else {
        __pyx_t_10 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_10)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 86, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_10);
      }
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_10);
      __pyx_t_10 = 0;
      __pyx_v_i = __pyx_t_4;
      __pyx_t_4 = (__pyx_t_4 + 1);

      /* "carray.from_py":87
 *     if i == length:
 *         for i, item in enumerate(o):
 *             if i >= length:             # <<<<<<<<<<<<<<
 *                 break
 *             v[i] = item
 */
      __pyx_t_6 = (__pyx_v_i >= __pyx_v_length);
      if (__pyx_t_6) {

        /* "carray.from_py":88
 *         for i, item in enumerate(o):
 *             if i >= length:
 *                 break             # <<<<<<<<<<<<<<
 *             v[i] = item
 *         else:
 */
        goto __pyx_L11_break;

        /* "carray.from_py":87
 *     if i == length:
 *         for i, item in enumerate(o):
 *             if i >= length:             # <<<<<<<<<<<<<<
 *                 break
 *             v[i] = item
 */
      }

      /* "carray.from_py":89
 *             if i >= length:
 *                 break
 *             v[i] = item             # <<<<<<<<<<<<<<
 *         else:
 *             i += 1  # convert index to length
 */
      __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_item); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 89, __pyx_L1_error)
      (__pyx_v_v[__pyx_v_i]) = __pyx_t_5;

      /* "carray.from_py":86
 *         pass
 *     if i == length:
 *         for i, item in enumerate(o):             # <<<<<<<<<<<<<<
 *             if i >= length:
 *                 break
 */
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L13_for_else;
    __pyx_L11_break:;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L14_for_end;
    /*else*/ {
      __pyx_L13_for_else:;

      /* "carray.from_py":91
 *             v[i] = item
 *         else:
 *             i += 1  # convert index to length             # <<<<<<<<<<<<<<
 *             if i == length:
 *                 return 0
 */
      __pyx_v_i = (__pyx_v_i + 1);

      /* "carray.from_py":92
 *         else:
 *             i += 1  # convert index to length
 *             if i == length:             # <<<<<<<<<<<<<<
 *                 return 0
 * 
 */
      __pyx_t_6 = (__pyx_v_i == __pyx_v_length);
      if (__pyx_t_6) {

        /* "carray.from_py":93
 *             i += 1  # convert index to length
 *             if i == length:
 *                 return 0             # <<<<<<<<<<<<<<
 * 
 *     PyErr_Format(
 */
        __pyx_r = 0;
        goto __pyx_L0;

        /* "carray.from_py":92
 *         else:
 *             i += 1  # convert index to length
 *             if i == length:             # <<<<<<<<<<<<<<
 *                 return 0
 * 
 */
      }
    }
    __pyx_L14_for_end:;

    /* "carray.from_py":85
 *     except (TypeError, OverflowError):
 *         pass
 *     if i == length:             # <<<<<<<<<<<<<<
 *         for i, item in enumerate(o):
 *             if i >= length:
 */
  }

  /* "carray.from_py":98
 *         IndexError,
 *         ("too many values found during array assignment, expected %zd"
 *          if i >= length else             # <<<<<<<<<<<<<<
 *          "not enough values found during array assignment, expected %zd, got %zd"),
 *         length, i)
 */
  __pyx_t_6 = (__pyx_v_i >= __pyx_v_length);
  if (__pyx_t_6) {
    __pyx_t_11 = ((char const *)"too many values found during array assignment, expected %zd");
  } else {
    __pyx_t_11 = ((char const *)"not enough values found during array assignment, expected %zd, got %zd");
  }

  /* "carray.from_py":95
 *                 return 0
 * 
 *     PyErr_Format(             # <<<<<<<<<<<<<<
 *         IndexError,
 *         ("too many values found during array assignment, expected %zd"
 */
  __pyx_t_7 = PyErr_Format(__pyx_builtin_IndexError, __pyx_t_11, __pyx_v_length, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "carray.from_py":79
 * 
 * @cname("__Pyx_carray_from_py_int")
 * cdef int __Pyx_carray_from_py_int(object o, base_type *v, Py_ssize_t length) except -1:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = length
 *     try:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("carray.from_py.__Pyx_carray_from_py_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "carray.to_py":114
 * 
 * @cname("__Pyx_carray_to_py_SdifSignature")
 * cdef inline list __Pyx_carray_to_py_SdifSignature(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

static CYTHON_INLINE PyObject *__Pyx_carray_to_py_SdifSignature(SdifSignature *__pyx_v_v, Py_ssize_t __pyx_v_length) {
  size_t __pyx_v_i;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_carray_to_py_SdifSignature", 1);

  /* "carray.to_py":117
 *     cdef size_t i
 *     cdef object value
 *     l = PyList_New(length)             # <<<<<<<<<<<<<<
 *     for i in range(<size_t>length):
 *         value = v[i]
 */
  __pyx_t_1 = PyList_New(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_l = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "carray.to_py":118
 *     cdef object value
 *     l = PyList_New(length)
 *     for i in range(<size_t>length):             # <<<<<<<<<<<<<<
 *         value = v[i]
 *         Py_INCREF(value)
 */
  __pyx_t_2 = ((size_t)__pyx_v_length);
  __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;

    /* "carray.to_py":119
 *     l = PyList_New(length)
 *     for i in range(<size_t>length):
 *         value = v[i]             # <<<<<<<<<<<<<<
 *         Py_INCREF(value)
 *         PyList_SET_ITEM(l, i, value)
 */
    __pyx_t_1 = __Pyx_PyInt_From_SdifUInt4((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "carray.to_py":120
 *     for i in range(<size_t>length):
 *         value = v[i]
 *         Py_INCREF(value)             # <<<<<<<<<<<<<<
 *         PyList_SET_ITEM(l, i, value)
 *     return l
 */
    Py_INCREF(__pyx_v_value);

    /* "carray.to_py":121
 *         value = v[i]
 *         Py_INCREF(value)
 *         PyList_SET_ITEM(l, i, value)             # <<<<<<<<<<<<<<
 *     return l
 * 
 */
    PyList_SET_ITEM(__pyx_v_l, __pyx_v_i, __pyx_v_value);
  }

  /* "carray.to_py":122
 *         Py_INCREF(value)
 *         PyList_SET_ITEM(l, i, value)
 *     return l             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_l);
  __pyx_r = __pyx_v_l;
  goto __pyx_L0;

  /* "carray.to_py":114
 * 
 * @cname("__Pyx_carray_to_py_SdifSignature")
 * cdef inline list __Pyx_carray_to_py_SdifSignature(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("carray.to_py.__Pyx_carray_to_py_SdifSignature", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "carray.to_py":126
 * 
 * @cname("__Pyx_carray_to_tuple_SdifSignature")
 * cdef inline tuple __Pyx_carray_to_tuple_SdifSignature(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

static CYTHON_INLINE PyObject *__Pyx_carray_to_tuple_SdifSignature(SdifSignature *__pyx_v_v, Py_ssize_t __pyx_v_length) {
  size_t __pyx_v_i;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_carray_to_tuple_SdifSignature", 1);

  /* "carray.to_py":129
 *     cdef size_t i
 *     cdef object value
 *     t = PyTuple_New(length)             # <<<<<<<<<<<<<<
 *     for i in range(<size_t>length):
 *         value = v[i]
 */
  __pyx_t_1 = PyTuple_New(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_t = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "carray.to_py":130
 *     cdef object value
 *     t = PyTuple_New(length)
 *     for i in range(<size_t>length):             # <<<<<<<<<<<<<<
 *         value = v[i]
 *         Py_INCREF(value)
 */
  __pyx_t_2 = ((size_t)__pyx_v_length);
  __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;

    /* "carray.to_py":131
 *     t = PyTuple_New(length)
 *     for i in range(<size_t>length):
 *         value = v[i]             # <<<<<<<<<<<<<<
 *         Py_INCREF(value)
 *         PyTuple_SET_ITEM(t, i, value)
 */
    __pyx_t_1 = __Pyx_PyInt_From_SdifUInt4((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "carray.to_py":132
 *     for i in range(<size_t>length):
 *         value = v[i]
 *         Py_INCREF(value)             # <<<<<<<<<<<<<<
 *         PyTuple_SET_ITEM(t, i, value)
 *     return t
 */
    Py_INCREF(__pyx_v_value);

    /* "carray.to_py":133
 *         value = v[i]
 *         Py_INCREF(value)
 *         PyTuple_SET_ITEM(t, i, value)             # <<<<<<<<<<<<<<
 *     return t
 */
    PyTuple_SET_ITEM(__pyx_v_t, __pyx_v_i, __pyx_v_value);
  }

  /* "carray.to_py":134
 *         Py_INCREF(value)
 *         PyTuple_SET_ITEM(t, i, value)
 *     return t             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_t);
  __pyx_r = __pyx_v_t;
  goto __pyx_L0;

  /* "carray.to_py":126
 * 
 * @cname("__Pyx_carray_to_tuple_SdifSignature")
 * cdef inline tuple __Pyx_carray_to_tuple_SdifSignature(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("carray.to_py.__Pyx_carray_to_tuple_SdifSignature", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "carray.from_py":79
 * 
 * @cname("__Pyx_carray_from_py_SdifSignature")
 * cdef int __Pyx_carray_from_py_SdifSignature(object o, base_type *v, Py_ssize_t length) except -1:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = length
 *     try:
 */

static int __Pyx_carray_from_py_SdifSignature(PyObject *__pyx_v_o, SdifSignature *__pyx_v_v, Py_ssize_t __pyx_v_length) {
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_item = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  SdifSignature __pyx_t_11;
  char const *__pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_carray_from_py_SdifSignature", 1);

  /* "carray.from_py":80
 * @cname("__Pyx_carray_from_py_SdifSignature")
 * cdef int __Pyx_carray_from_py_SdifSignature(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length             # <<<<<<<<<<<<<<
 *     try:
 *         i = len(o)
 */
  __pyx_v_i = __pyx_v_length;

  /* "carray.from_py":81
 * cdef int __Pyx_carray_from_py_SdifSignature(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */
  {
    __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:*/ {

      /* "carray.from_py":82
 *     cdef Py_ssize_t i = length
 *     try:
 *         i = len(o)             # <<<<<<<<<<<<<<
 *     except (TypeError, OverflowError):
 *         pass
 */
      __pyx_t_4 = PyObject_Length(__pyx_v_o); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 82, __pyx_L3_error)
      __pyx_v_i = __pyx_t_4;

      /* "carray.from_py":81
 * cdef int __Pyx_carray_from_py_SdifSignature(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */
    }
    __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:;

    /* "carray.from_py":83
 *     try:
 *         i = len(o)
 *     except (TypeError, OverflowError):             # <<<<<<<<<<<<<<
 *         pass
 *     if i == length:
 */
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_TypeError, __pyx_builtin_OverflowError);
    if (__pyx_t_5) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "carray.from_py":81
 * cdef int __Pyx_carray_from_py_SdifSignature(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "carray.from_py":85
 *     except (TypeError, OverflowError):
 *         pass
 *     if i == length:             # <<<<<<<<<<<<<<
 *         for i, item in enumerate(o):
 *             if i >= length:
 */
  __pyx_t_6 = (__pyx_v_i == __pyx_v_length);
  if (__pyx_t_6) {

    /* "carray.from_py":86
 *         pass
 *     if i == length:
 *         for i, item in enumerate(o):             # <<<<<<<<<<<<<<
 *             if i >= length:
 *                 break
 */
    __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
      __pyx_t_7 = __pyx_v_o; __Pyx_INCREF(__pyx_t_7);
      __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 86, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 86, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 86, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_10 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(1, 86, __pyx_L1_error)
          #else
          __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 86, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 86, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(1, 86, __pyx_L1_error)
          #else
          __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 86, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          #endif
        }
      } else {
        __pyx_t_10 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_10)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 86, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_10);
      }
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_10);
      __pyx_t_10 = 0;
      __pyx_v_i = __pyx_t_4;
      __pyx_t_4 = (__pyx_t_4 + 1);

      /* "carray.from_py":87
 *     if i == length:
 *         for i, item in enumerate(o):
 *             if i >= length:             # <<<<<<<<<<<<<<
 *                 break
 *             v[i] = item
 */
      __pyx_t_6 = (__pyx_v_i >= __pyx_v_length);
      if (__pyx_t_6) {

        /* "carray.from_py":88
 *         for i, item in enumerate(o):
 *             if i >= length:
 *                 break             # <<<<<<<<<<<<<<
 *             v[i] = item
 *         else:
 */
        goto __pyx_L11_break;

        /* "carray.from_py":87
 *     if i == length:
 *         for i, item in enumerate(o):
 *             if i >= length:             # <<<<<<<<<<<<<<
 *                 break
 *             v[i] = item
 */
      }

      /* "carray.from_py":89
 *             if i >= length:
 *                 break
 *             v[i] = item             # <<<<<<<<<<<<<<
 *         else:
 *             i += 1  # convert index to length
 */
      __pyx_t_11 = __Pyx_PyInt_As_SdifUInt4(__pyx_v_item); if (unlikely((__pyx_t_11 == ((SdifSignature)-1)) && PyErr_Occurred())) __PYX_ERR(1, 89, __pyx_L1_error)
      (__pyx_v_v[__pyx_v_i]) = __pyx_t_11;

      /* "carray.from_py":86
 *         pass
 *     if i == length:
 *         for i, item in enumerate(o):             # <<<<<<<<<<<<<<
 *             if i >= length:
 *                 break
 */
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L13_for_else;
    __pyx_L11_break:;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L14_for_end;
    /*else*/ {
      __pyx_L13_for_else:;

      /* "carray.from_py":91
 *             v[i] = item
 *         else:
 *             i += 1  # convert index to length             # <<<<<<<<<<<<<<
 *             if i == length:
 *                 return 0
 */
      __pyx_v_i = (__pyx_v_i + 1);

      /* "carray.from_py":92
 *         else:
 *             i += 1  # convert index to length
 *             if i == length:             # <<<<<<<<<<<<<<
 *                 return 0
 * 
 */
      __pyx_t_6 = (__pyx_v_i == __pyx_v_length);
      if (__pyx_t_6) {

        /* "carray.from_py":93
 *             i += 1  # convert index to length
 *             if i == length:
 *                 return 0             # <<<<<<<<<<<<<<
 * 
 *     PyErr_Format(
 */
        __pyx_r = 0;
        goto __pyx_L0;

        /* "carray.from_py":92
 *         else:
 *             i += 1  # convert index to length
 *             if i == length:             # <<<<<<<<<<<<<<
 *                 return 0
 * 
 */
      }
    }
    __pyx_L14_for_end:;

    /* "carray.from_py":85
 *     except (TypeError, OverflowError):
 *         pass
 *     if i == length:             # <<<<<<<<<<<<<<
 *         for i, item in enumerate(o):
 *             if i >= length:
 */
  }

  /* "carray.from_py":98
 *         IndexError,
 *         ("too many values found during array assignment, expected %zd"
 *          if i >= length else             # <<<<<<<<<<<<<<
 *          "not enough values found during array assignment, expected %zd, got %zd"),
 *         length, i)
 */
  __pyx_t_6 = (__pyx_v_i >= __pyx_v_length);
  if (__pyx_t_6) {
    __pyx_t_12 = ((char const *)"too many values found during array assignment, expected %zd");
  } else {
    __pyx_t_12 = ((char const *)"not enough values found during array assignment, expected %zd, got %zd");
  }

  /* "carray.from_py":95
 *                 return 0
 * 
 *     PyErr_Format(             # <<<<<<<<<<<<<<
 *         IndexError,
 *         ("too many values found during array assignment, expected %zd"
 */
  __pyx_t_7 = PyErr_Format(__pyx_builtin_IndexError, __pyx_t_12, __pyx_v_length, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "carray.from_py":79
 * 
 * @cname("__Pyx_carray_from_py_SdifSignature")
 * cdef int __Pyx_carray_from_py_SdifSignature(object o, base_type *v, Py_ssize_t length) except -1:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = length
 *     try:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("carray.from_py.__Pyx_carray_from_py_SdifSignature", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":245
 * 
 *         @property
 *         cdef inline PyObject* base(self) 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;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":248
 *             """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;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":245
 * 
 *         @property
 *         cdef inline PyObject* base(self) nogil:             # <<<<<<<<<<<<<<
 *             """Returns a borrowed reference to the object owning the data/memory.
 *             """
 */

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

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":251
 * 
 *         @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", 1);

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":254
 *             """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;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":251
 * 
 *         @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;
}

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":257
 * 
 *         @property
 *         cdef inline int ndim(self) 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;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":260
 *             """Returns the number of dimensions in the array.
 *             """
 *             return PyArray_NDIM(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = PyArray_NDIM(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":257
 * 
 *         @property
 *         cdef inline int ndim(self) nogil:             # <<<<<<<<<<<<<<
 *             """Returns the number of dimensions in the array.
 *             """
 */

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

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":263
 * 
 *         @property
 *         cdef inline npy_intp *shape(self) nogil:             # <<<<<<<<<<<<<<
 *             """Returns a pointer to the dimensions/shape of the array.
 *             The number of elements matches the number of dimensions of the array (ndim).
 */

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

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":268
 *             Can return NULL for 0-dimensional arrays.
 *             """
 *             return PyArray_DIMS(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = PyArray_DIMS(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":263
 * 
 *         @property
 *         cdef inline npy_intp *shape(self) nogil:             # <<<<<<<<<<<<<<
 *             """Returns a pointer to the dimensions/shape of the array.
 *             The number of elements matches the number of dimensions of the array (ndim).
 */

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

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":271
 * 
 *         @property
 *         cdef inline npy_intp *strides(self) nogil:             # <<<<<<<<<<<<<<
 *             """Returns a pointer to the strides of the array.
 *             The number of elements matches the number of dimensions of the array (ndim).
 */

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

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":275
 *             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;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":271
 * 
 *         @property
 *         cdef inline npy_intp *strides(self) nogil:             # <<<<<<<<<<<<<<
 *             """Returns a pointer to the strides of the array.
 *             The number of elements matches the number of dimensions of the array (ndim).
 */

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

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":278
 * 
 *         @property
 *         cdef inline npy_intp size(self) 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;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":281
 *             """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;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":278
 * 
 *         @property
 *         cdef inline npy_intp size(self) nogil:             # <<<<<<<<<<<<<<
 *             """Returns the total size (in number of elements) of the array.
 *             """
 */

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

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":284
 * 
 *         @property
 *         cdef inline char* data(self) nogil:             # <<<<<<<<<<<<<<
 *             """The pointer to the data buffer as a char*.
 *             This is provided for legacy reasons to avoid direct struct field access.
 */

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

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":290
 *             of `PyArray_DATA()` instead, which returns a 'void*'.
 *             """
 *             return PyArray_BYTES(self)             # <<<<<<<<<<<<<<
 * 
 *     ctypedef unsigned char      npy_bool
 */
  __pyx_r = PyArray_BYTES(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":284
 * 
 *         @property
 *         cdef inline char* data(self) nogil:             # <<<<<<<<<<<<<<
 *             """The pointer to the data buffer as a char*.
 *             This is provided for legacy reasons to avoid direct struct field access.
 */

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

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":773
 * ctypedef npy_cdouble     complex_t
 * 
 * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 1);

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":774
 * 
 * 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(2, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":773
 * ctypedef npy_cdouble     complex_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;
}

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":776
 *     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", 1);

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":777
 * 
 * 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(2, 777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":776
 *     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;
}

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":779
 *     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", 1);

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":780
 * 
 * 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(2, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":779
 *     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;
}

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":782
 *     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", 1);

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":783
 * 
 * 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(2, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":782
 *     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;
}

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":785
 *     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", 1);

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":786
 * 
 * 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(2, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":785
 *     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;
}

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":788
 *     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;
  __Pyx_RefNannySetupContext("PyDataType_SHAPE", 1);

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":789
 * 
 * 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) {

    /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":790
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape             # <<<<<<<<<<<<<<
 *     else:
 *         return ()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
    __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
    goto __pyx_L0;

    /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":789
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
 *         return <tuple>d.subarray.shape
 *     else:
 */
  }

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":792
 *         return <tuple>d.subarray.shape
 *     else:
 *         return ()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_empty_tuple);
    __pyx_r = __pyx_empty_tuple;
    goto __pyx_L0;
  }

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":788
 *     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;
}

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":967
 *     int _import_umath() except -1
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *     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;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":968
 * 
 * cdef inline void set_array_base(ndarray arr, object base):
 *     Py_INCREF(base) # important to do this before stealing the reference below!             # <<<<<<<<<<<<<<
 *     PyArray_SetBaseObject(arr, base)
 * 
 */
  Py_INCREF(__pyx_v_base);

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":969
 * cdef inline void set_array_base(ndarray arr, object base):
 *     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(2, 969, __pyx_L1_error)

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":967
 *     int _import_umath() except -1
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *     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:;
}

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":971
 *     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", 1);

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":972
 * 
 * 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);

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":973
 * 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) {

    /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":974
 *     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;

    /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":973
 * cdef inline object get_array_base(ndarray arr):
 *     base = PyArray_BASE(arr)
 *     if base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     return <object>base
 */
  }

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":975
 *     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;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":971
 *     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;
}

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":979
 * # 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("import_array", 1);

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":980
 * # 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:*/ {

      /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":981
 * 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(2, 981, __pyx_L3_error)

      /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":980
 * # 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:;

    /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":982
 *     try:
 *         __pyx_import_array()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 */
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    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(2, 982, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":983
 *         __pyx_import_array()
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_umath() except -1:
 */
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 983, __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(2, 983, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;

    /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":980
 * # 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:;
  }

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":979
 * # 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_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":985
 *         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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("import_umath", 1);

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":986
 * 
 * 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:*/ {

      /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":987
 * 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(2, 987, __pyx_L3_error)

      /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":986
 * 
 * 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:;

    /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":988
 *     try:
 *         _import_umath()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 */
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    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(2, 988, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":989
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_ufunc() except -1:
 */
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 989, __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(2, 989, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;

    /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":986
 * 
 * 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:;
  }

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":985
 *         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_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":991
 *         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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("import_ufunc", 1);

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":992
 * 
 * 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:*/ {

      /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":993
 * 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(2, 993, __pyx_L3_error)

      /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":992
 * 
 * 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:;

    /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":994
 *     try:
 *         _import_umath()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 */
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    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(2, 994, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":995
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 995, __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(2, 995, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;

    /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":992
 * 
 * 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:;
  }

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":991
 *         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_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":998
 * 
 * 
 * cdef inline bint is_timedelta64_object(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.timedelta64)`
 */

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

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1010
 *     bool
 *     """
 *     return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
  goto __pyx_L0;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":998
 * 
 * 
 * cdef inline bint is_timedelta64_object(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.timedelta64)`
 */

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

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1013
 * 
 * 
 * cdef inline bint is_datetime64_object(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.datetime64)`
 */

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

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1025
 *     bool
 *     """
 *     return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
  goto __pyx_L0;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1013
 * 
 * 
 * cdef inline bint is_datetime64_object(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.datetime64)`
 */

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

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1028
 * 
 * 
 * cdef inline npy_datetime get_datetime64_value(object obj) 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;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1035
 *     also needed.  That can be found using `get_datetime64_unit`.
 *     """
 *     return (<PyDatetimeScalarObject*>obj).obval             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
  goto __pyx_L0;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1028
 * 
 * 
 * cdef inline npy_datetime get_datetime64_value(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy datetime64 object
 */

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

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1038
 * 
 * 
 * cdef inline npy_timedelta get_timedelta64_value(object obj) 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;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1042
 *     returns the int64 value underlying scalar numpy timedelta64 object
 *     """
 *     return (<PyTimedeltaScalarObject*>obj).obval             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
  goto __pyx_L0;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1038
 * 
 * 
 * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy timedelta64 object
 */

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

/* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1045
 * 
 * 
 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) 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;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1049
 *     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;

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1045
 * 
 * 
 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the unit part of the dtype for a numpy datetime64 object.
 */

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

/* "pysdif/_pysdif.pyx":108
 *     }
 * 
 * cdef inline int dtype_sdif2numpy(int typenum):             # <<<<<<<<<<<<<<
 *     if   typenum == 0x0004: typenum = c_numpy.NPY_FLOAT
 *     elif typenum == 0x0301: typenum = c_numpy.NPY_BYTE
 */

static CYTHON_INLINE int __pyx_f_6pysdif_7_pysdif_dtype_sdif2numpy(int __pyx_v_typenum) {
  int __pyx_r;

  /* "pysdif/_pysdif.pyx":109
 * 
 * cdef inline int dtype_sdif2numpy(int typenum):
 *     if   typenum == 0x0004: typenum = c_numpy.NPY_FLOAT             # <<<<<<<<<<<<<<
 *     elif typenum == 0x0301: typenum = c_numpy.NPY_BYTE
 *     elif typenum == 0x0008: typenum = c_numpy.NPY_DOUBLE
 */
  switch (__pyx_v_typenum) {
    case 0x0004:
    __pyx_v_typenum = NPY_FLOAT;
    break;
    case 0x0301:

    /* "pysdif/_pysdif.pyx":110
 * cdef inline int dtype_sdif2numpy(int typenum):
 *     if   typenum == 0x0004: typenum = c_numpy.NPY_FLOAT
 *     elif typenum == 0x0301: typenum = c_numpy.NPY_BYTE             # <<<<<<<<<<<<<<
 *     elif typenum == 0x0008: typenum = c_numpy.NPY_DOUBLE
 *     elif typenum == 0x0104: typenum = c_numpy.NPY_INT
 */
    __pyx_v_typenum = NPY_BYTE;
    break;
    case 0x0008:

    /* "pysdif/_pysdif.pyx":111
 *     if   typenum == 0x0004: typenum = c_numpy.NPY_FLOAT
 *     elif typenum == 0x0301: typenum = c_numpy.NPY_BYTE
 *     elif typenum == 0x0008: typenum = c_numpy.NPY_DOUBLE             # <<<<<<<<<<<<<<
 *     elif typenum == 0x0104: typenum = c_numpy.NPY_INT
 *     elif typenum == 0x0101: typenum = c_numpy.NPY_BYTE
 */
    __pyx_v_typenum = NPY_DOUBLE;
    break;
    case 0x0104:

    /* "pysdif/_pysdif.pyx":112
 *     elif typenum == 0x0301: typenum = c_numpy.NPY_BYTE
 *     elif typenum == 0x0008: typenum = c_numpy.NPY_DOUBLE
 *     elif typenum == 0x0104: typenum = c_numpy.NPY_INT             # <<<<<<<<<<<<<<
 *     elif typenum == 0x0101: typenum = c_numpy.NPY_BYTE
 *     elif typenum == 0x0102: typenum = c_numpy.NPY_SHORT
 */
    __pyx_v_typenum = NPY_INT;
    break;
    case 0x0101:

    /* "pysdif/_pysdif.pyx":113
 *     elif typenum == 0x0008: typenum = c_numpy.NPY_DOUBLE
 *     elif typenum == 0x0104: typenum = c_numpy.NPY_INT
 *     elif typenum == 0x0101: typenum = c_numpy.NPY_BYTE             # <<<<<<<<<<<<<<
 *     elif typenum == 0x0102: typenum = c_numpy.NPY_SHORT
 *     elif typenum == 0x0108: typenum = c_numpy.NPY_LONG
 */
    __pyx_v_typenum = NPY_BYTE;
    break;
    case 0x0102:

    /* "pysdif/_pysdif.pyx":114
 *     elif typenum == 0x0104: typenum = c_numpy.NPY_INT
 *     elif typenum == 0x0101: typenum = c_numpy.NPY_BYTE
 *     elif typenum == 0x0102: typenum = c_numpy.NPY_SHORT             # <<<<<<<<<<<<<<
 *     elif typenum == 0x0108: typenum = c_numpy.NPY_LONG
 *     elif typenum == 0x0201: typenum = c_numpy.NPY_UBYTE
 */
    __pyx_v_typenum = NPY_SHORT;
    break;
    case 0x0108:

    /* "pysdif/_pysdif.pyx":115
 *     elif typenum == 0x0101: typenum = c_numpy.NPY_BYTE
 *     elif typenum == 0x0102: typenum = c_numpy.NPY_SHORT
 *     elif typenum == 0x0108: typenum = c_numpy.NPY_LONG             # <<<<<<<<<<<<<<
 *     elif typenum == 0x0201: typenum = c_numpy.NPY_UBYTE
 *     elif typenum == 0x0202: typenum = c_numpy.NPY_USHORT
 */
    __pyx_v_typenum = NPY_LONG;
    break;
    case 0x0201:

    /* "pysdif/_pysdif.pyx":116
 *     elif typenum == 0x0102: typenum = c_numpy.NPY_SHORT
 *     elif typenum == 0x0108: typenum = c_numpy.NPY_LONG
 *     elif typenum == 0x0201: typenum = c_numpy.NPY_UBYTE             # <<<<<<<<<<<<<<
 *     elif typenum == 0x0202: typenum = c_numpy.NPY_USHORT
 *     elif typenum == 0x0204: typenum = c_numpy.NPY_UINT
 */
    __pyx_v_typenum = NPY_UBYTE;
    break;
    case 0x0202:

    /* "pysdif/_pysdif.pyx":117
 *     elif typenum == 0x0108: typenum = c_numpy.NPY_LONG
 *     elif typenum == 0x0201: typenum = c_numpy.NPY_UBYTE
 *     elif typenum == 0x0202: typenum = c_numpy.NPY_USHORT             # <<<<<<<<<<<<<<
 *     elif typenum == 0x0204: typenum = c_numpy.NPY_UINT
 *     elif typenum == 0x0208: typenum = c_numpy.NPY_ULONG
 */
    __pyx_v_typenum = NPY_USHORT;
    break;
    case 0x0204:

    /* "pysdif/_pysdif.pyx":118
 *     elif typenum == 0x0201: typenum = c_numpy.NPY_UBYTE
 *     elif typenum == 0x0202: typenum = c_numpy.NPY_USHORT
 *     elif typenum == 0x0204: typenum = c_numpy.NPY_UINT             # <<<<<<<<<<<<<<
 *     elif typenum == 0x0208: typenum = c_numpy.NPY_ULONG
 *     return typenum
 */
    __pyx_v_typenum = NPY_UINT;
    break;
    case 0x0208:

    /* "pysdif/_pysdif.pyx":119
 *     elif typenum == 0x0202: typenum = c_numpy.NPY_USHORT
 *     elif typenum == 0x0204: typenum = c_numpy.NPY_UINT
 *     elif typenum == 0x0208: typenum = c_numpy.NPY_ULONG             # <<<<<<<<<<<<<<
 *     return typenum
 * 
 */
    __pyx_v_typenum = NPY_ULONG;
    break;
    default: break;
  }

  /* "pysdif/_pysdif.pyx":120
 *     elif typenum == 0x0204: typenum = c_numpy.NPY_UINT
 *     elif typenum == 0x0208: typenum = c_numpy.NPY_ULONG
 *     return typenum             # <<<<<<<<<<<<<<
 * 
 * cdef inline int dtype_numpy2sdif(int dtype):
 */
  __pyx_r = __pyx_v_typenum;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":108
 *     }
 * 
 * cdef inline int dtype_sdif2numpy(int typenum):             # <<<<<<<<<<<<<<
 *     if   typenum == 0x0004: typenum = c_numpy.NPY_FLOAT
 *     elif typenum == 0x0301: typenum = c_numpy.NPY_BYTE
 */

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

/* "pysdif/_pysdif.pyx":122
 *     return typenum
 * 
 * cdef inline int dtype_numpy2sdif(int dtype):             # <<<<<<<<<<<<<<
 *     if   dtype == c_numpy.NPY_FLOAT : dtype = 0x0004
 *     elif dtype == c_numpy.NPY_BYTE  : dtype = 0x0301
 */

static CYTHON_INLINE int __pyx_f_6pysdif_7_pysdif_dtype_numpy2sdif(int __pyx_v_dtype) {
  int __pyx_r;
  int __pyx_t_1;

  /* "pysdif/_pysdif.pyx":123
 * 
 * cdef inline int dtype_numpy2sdif(int dtype):
 *     if   dtype == c_numpy.NPY_FLOAT : dtype = 0x0004             # <<<<<<<<<<<<<<
 *     elif dtype == c_numpy.NPY_BYTE  : dtype = 0x0301
 *     elif dtype == c_numpy.NPY_DOUBLE: dtype = 0x0008
 */
  __pyx_t_1 = (__pyx_v_dtype == NPY_FLOAT);
  if (__pyx_t_1) {
    __pyx_v_dtype = 0x0004;
    goto __pyx_L3;
  }

  /* "pysdif/_pysdif.pyx":124
 * cdef inline int dtype_numpy2sdif(int dtype):
 *     if   dtype == c_numpy.NPY_FLOAT : dtype = 0x0004
 *     elif dtype == c_numpy.NPY_BYTE  : dtype = 0x0301             # <<<<<<<<<<<<<<
 *     elif dtype == c_numpy.NPY_DOUBLE: dtype = 0x0008
 *     elif dtype == c_numpy.NPY_INT   : dtype = 0x0104
 */
  __pyx_t_1 = (__pyx_v_dtype == NPY_BYTE);
  if (__pyx_t_1) {
    __pyx_v_dtype = 0x0301;
    goto __pyx_L3;
  }

  /* "pysdif/_pysdif.pyx":125
 *     if   dtype == c_numpy.NPY_FLOAT : dtype = 0x0004
 *     elif dtype == c_numpy.NPY_BYTE  : dtype = 0x0301
 *     elif dtype == c_numpy.NPY_DOUBLE: dtype = 0x0008             # <<<<<<<<<<<<<<
 *     elif dtype == c_numpy.NPY_INT   : dtype = 0x0104
 *     elif dtype == c_numpy.NPY_BYTE  : dtype = 0x0101
 */
  __pyx_t_1 = (__pyx_v_dtype == NPY_DOUBLE);
  if (__pyx_t_1) {
    __pyx_v_dtype = 0x0008;
    goto __pyx_L3;
  }

  /* "pysdif/_pysdif.pyx":126
 *     elif dtype == c_numpy.NPY_BYTE  : dtype = 0x0301
 *     elif dtype == c_numpy.NPY_DOUBLE: dtype = 0x0008
 *     elif dtype == c_numpy.NPY_INT   : dtype = 0x0104             # <<<<<<<<<<<<<<
 *     elif dtype == c_numpy.NPY_BYTE  : dtype = 0x0101
 *     elif dtype == c_numpy.NPY_SHORT : dtype = 0x0102
 */
  __pyx_t_1 = (__pyx_v_dtype == NPY_INT);
  if (__pyx_t_1) {
    __pyx_v_dtype = 0x0104;
    goto __pyx_L3;
  }

  /* "pysdif/_pysdif.pyx":127
 *     elif dtype == c_numpy.NPY_DOUBLE: dtype = 0x0008
 *     elif dtype == c_numpy.NPY_INT   : dtype = 0x0104
 *     elif dtype == c_numpy.NPY_BYTE  : dtype = 0x0101             # <<<<<<<<<<<<<<
 *     elif dtype == c_numpy.NPY_SHORT : dtype = 0x0102
 *     elif dtype == c_numpy.NPY_LONG  : dtype = 0x0108
 */
  __pyx_t_1 = (__pyx_v_dtype == NPY_BYTE);
  if (__pyx_t_1) {
    __pyx_v_dtype = 0x0101;
    goto __pyx_L3;
  }

  /* "pysdif/_pysdif.pyx":128
 *     elif dtype == c_numpy.NPY_INT   : dtype = 0x0104
 *     elif dtype == c_numpy.NPY_BYTE  : dtype = 0x0101
 *     elif dtype == c_numpy.NPY_SHORT : dtype = 0x0102             # <<<<<<<<<<<<<<
 *     elif dtype == c_numpy.NPY_LONG  : dtype = 0x0108
 *     elif dtype == c_numpy.NPY_UBYTE : dtype = 0x0201
 */
  __pyx_t_1 = (__pyx_v_dtype == NPY_SHORT);
  if (__pyx_t_1) {
    __pyx_v_dtype = 0x0102;
    goto __pyx_L3;
  }

  /* "pysdif/_pysdif.pyx":129
 *     elif dtype == c_numpy.NPY_BYTE  : dtype = 0x0101
 *     elif dtype == c_numpy.NPY_SHORT : dtype = 0x0102
 *     elif dtype == c_numpy.NPY_LONG  : dtype = 0x0108             # <<<<<<<<<<<<<<
 *     elif dtype == c_numpy.NPY_UBYTE : dtype = 0x0201
 *     elif dtype == c_numpy.NPY_USHORT: dtype = 0x0202
 */
  __pyx_t_1 = (__pyx_v_dtype == NPY_LONG);
  if (__pyx_t_1) {
    __pyx_v_dtype = 0x0108;
    goto __pyx_L3;
  }

  /* "pysdif/_pysdif.pyx":130
 *     elif dtype == c_numpy.NPY_SHORT : dtype = 0x0102
 *     elif dtype == c_numpy.NPY_LONG  : dtype = 0x0108
 *     elif dtype == c_numpy.NPY_UBYTE : dtype = 0x0201             # <<<<<<<<<<<<<<
 *     elif dtype == c_numpy.NPY_USHORT: dtype = 0x0202
 *     elif dtype == c_numpy.NPY_UINT  : dtype = 0x0204
 */
  __pyx_t_1 = (__pyx_v_dtype == NPY_UBYTE);
  if (__pyx_t_1) {
    __pyx_v_dtype = 0x0201;
    goto __pyx_L3;
  }

  /* "pysdif/_pysdif.pyx":131
 *     elif dtype == c_numpy.NPY_LONG  : dtype = 0x0108
 *     elif dtype == c_numpy.NPY_UBYTE : dtype = 0x0201
 *     elif dtype == c_numpy.NPY_USHORT: dtype = 0x0202             # <<<<<<<<<<<<<<
 *     elif dtype == c_numpy.NPY_UINT  : dtype = 0x0204
 *     elif dtype == c_numpy.NPY_ULONG : dtype = 0x0208
 */
  __pyx_t_1 = (__pyx_v_dtype == NPY_USHORT);
  if (__pyx_t_1) {
    __pyx_v_dtype = 0x0202;
    goto __pyx_L3;
  }

  /* "pysdif/_pysdif.pyx":132
 *     elif dtype == c_numpy.NPY_UBYTE : dtype = 0x0201
 *     elif dtype == c_numpy.NPY_USHORT: dtype = 0x0202
 *     elif dtype == c_numpy.NPY_UINT  : dtype = 0x0204             # <<<<<<<<<<<<<<
 *     elif dtype == c_numpy.NPY_ULONG : dtype = 0x0208
 *     return dtype
 */
  __pyx_t_1 = (__pyx_v_dtype == NPY_UINT);
  if (__pyx_t_1) {
    __pyx_v_dtype = 0x0204;
    goto __pyx_L3;
  }

  /* "pysdif/_pysdif.pyx":133
 *     elif dtype == c_numpy.NPY_USHORT: dtype = 0x0202
 *     elif dtype == c_numpy.NPY_UINT  : dtype = 0x0204
 *     elif dtype == c_numpy.NPY_ULONG : dtype = 0x0208             # <<<<<<<<<<<<<<
 *     return dtype
 * 
 */
  __pyx_t_1 = (__pyx_v_dtype == NPY_ULONG);
  if (__pyx_t_1) {
    __pyx_v_dtype = 0x0208;
  }
  __pyx_L3:;

  /* "pysdif/_pysdif.pyx":134
 *     elif dtype == c_numpy.NPY_UINT  : dtype = 0x0204
 *     elif dtype == c_numpy.NPY_ULONG : dtype = 0x0208
 *     return dtype             # <<<<<<<<<<<<<<
 * 
 * cdef inline unsigned int str2sig (char *sig):
 */
  __pyx_r = __pyx_v_dtype;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":122
 *     return typenum
 * 
 * cdef inline int dtype_numpy2sdif(int dtype):             # <<<<<<<<<<<<<<
 *     if   dtype == c_numpy.NPY_FLOAT : dtype = 0x0004
 *     elif dtype == c_numpy.NPY_BYTE  : dtype = 0x0301
 */

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

/* "pysdif/_pysdif.pyx":136
 *     return dtype
 * 
 * cdef inline unsigned int str2sig (char *sig):             # <<<<<<<<<<<<<<
 *    return ((((<unsigned int>(sig[0])) & 0xff) << 24) |
 *        (((<unsigned int>(sig[1])) & 0xff) << 16) |
 */

static CYTHON_INLINE unsigned int __pyx_f_6pysdif_7_pysdif_str2sig(char *__pyx_v_sig) {
  unsigned int __pyx_r;

  /* "pysdif/_pysdif.pyx":139
 *    return ((((<unsigned int>(sig[0])) & 0xff) << 24) |
 *        (((<unsigned int>(sig[1])) & 0xff) << 16) |
 *        (((<unsigned int>(sig[2])) & 0xff) << 8) |             # <<<<<<<<<<<<<<
 *        ((<unsigned int>(sig[3])) & 0xff))
 * 
 */
  __pyx_r = (((((((unsigned int)(__pyx_v_sig[0])) & 0xff) << 24) | ((((unsigned int)(__pyx_v_sig[1])) & 0xff) << 16)) | ((((unsigned int)(__pyx_v_sig[2])) & 0xff) << 8)) | (((unsigned int)(__pyx_v_sig[3])) & 0xff));
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":136
 *     return dtype
 * 
 * cdef inline unsigned int str2sig (char *sig):             # <<<<<<<<<<<<<<
 *    return ((((<unsigned int>(sig[0])) & 0xff) << 24) |
 *        (((<unsigned int>(sig[1])) & 0xff) << 16) |
 */

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

/* "pysdif/_pysdif.pyx":145
 * #    return PyString_FromStringAndSize(SdifSignatureToString(signature), 4)
 * 
 * cdef inline bytes sig2str(SdifSignature signature):             # <<<<<<<<<<<<<<
 *     cdef char* c_str = SdifSignatureToString(signature)
 *     cdef bytes out = c_str[:4]
 */

static CYTHON_INLINE PyObject *__pyx_f_6pysdif_7_pysdif_sig2str(SdifSignature __pyx_v_signature) {
  char *__pyx_v_c_str;
  PyObject *__pyx_v_out = 0;
  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("sig2str", 1);

  /* "pysdif/_pysdif.pyx":146
 * 
 * cdef inline bytes sig2str(SdifSignature signature):
 *     cdef char* c_str = SdifSignatureToString(signature)             # <<<<<<<<<<<<<<
 *     cdef bytes out = c_str[:4]
 *     return out
 */
  __pyx_v_c_str = SdifSignatureToString(__pyx_v_signature);

  /* "pysdif/_pysdif.pyx":147
 * cdef inline bytes sig2str(SdifSignature signature):
 *     cdef char* c_str = SdifSignatureToString(signature)
 *     cdef bytes out = c_str[:4]             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_c_str + 0, 4 - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":148
 *     cdef char* c_str = SdifSignatureToString(signature)
 *     cdef bytes out = c_str[:4]
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":145
 * #    return PyString_FromStringAndSize(SdifSignatureToString(signature), 4)
 * 
 * cdef inline bytes sig2str(SdifSignature signature):             # <<<<<<<<<<<<<<
 *     cdef char* c_str = SdifSignatureToString(signature)
 *     cdef bytes out = c_str[:4]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.sig2str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":151
 * 
 * 
 * def signature2str(int sig):             # <<<<<<<<<<<<<<
 *     """
 *     Converts a numeric signature into a string signature
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_1signature2str(PyObject *__pyx_self, 
#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_6pysdif_7_pysdif_signature2str, "signature2str(int sig)\n\n    Converts a numeric signature into a string signature\n\n    Args:\n        sig (int): Numeric signature\n\n    Returns:\n        (str) The string signature corresponding to the numeric signature\n    ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_1signature2str = {"signature2str", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_1signature2str, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_signature2str};
static PyObject *__pyx_pw_6pysdif_7_pysdif_1signature2str(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_sig;
  #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("signature2str (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_sig,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 151, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "signature2str") < 0)) __PYX_ERR(0, 151, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_sig = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_sig == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 151, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("signature2str", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 151, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.signature2str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_signature2str(__pyx_self, __pyx_v_sig);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_signature2str(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_sig) {
  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("signature2str", 1);

  /* "pysdif/_pysdif.pyx":161
 *         (str) The string signature corresponding to the numeric signature
 *     """
 *     return sig2str(sig)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_sig2str(__pyx_v_sig); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":151
 * 
 * 
 * def signature2str(int sig):             # <<<<<<<<<<<<<<
 *     """
 *     Converts a numeric signature into a string signature
 */

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

/* "pysdif/_pysdif.pyx":164
 * 
 * 
 * def str2signature(s):             # <<<<<<<<<<<<<<
 *     """
 *     Converts a 4-byte string signature into a numeric signature
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_3str2signature(PyObject *__pyx_self, 
#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_6pysdif_7_pysdif_2str2signature, "str2signature(s)\n\n    Converts a 4-byte string signature into a numeric signature\n\n    Args:\n        s (str): a string of 4 characters \n\n    Returns:\n        (int) The numeric signature corresponding to the string signature\n    ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_3str2signature = {"str2signature", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_3str2signature, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_2str2signature};
static PyObject *__pyx_pw_6pysdif_7_pysdif_3str2signature(PyObject *__pyx_self, 
#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_s = 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("str2signature (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_s,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_s)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 164, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "str2signature") < 0)) __PYX_ERR(0, 164, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_s = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("str2signature", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 164, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.str2signature", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_2str2signature(__pyx_self, __pyx_v_s);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_2str2signature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  unsigned int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("str2signature", 1);

  /* "pysdif/_pysdif.pyx":174
 *         (int) The numeric signature corresponding to the string signature
 *     """
 *     return str2sig(asbytes(s))             # <<<<<<<<<<<<<<
 * 
 * cdef inline ndarray _array_from_matrix_data_no_copy(SdifMatrixDataT *matrix):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 174, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L1_error)
  __pyx_t_3 = __pyx_f_6pysdif_7_pysdif_str2sig(__pyx_t_2); if (unlikely(__pyx_t_3 == ((unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":164
 * 
 * 
 * def str2signature(s):             # <<<<<<<<<<<<<<
 *     """
 *     Converts a 4-byte string signature into a numeric signature
 */

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

/* "pysdif/_pysdif.pyx":176
 *     return str2sig(asbytes(s))
 * 
 * cdef inline ndarray _array_from_matrix_data_no_copy(SdifMatrixDataT *matrix):             # <<<<<<<<<<<<<<
 *     cdef SdifMatrixHeaderT *header = matrix.Header
 *     cdef npy_intp dims[2]
 */

static CYTHON_INLINE PyArrayObject *__pyx_f_6pysdif_7_pysdif__array_from_matrix_data_no_copy(SdifMatrixDataT *__pyx_v_matrix) {
  SdifMatrixHeaderT *__pyx_v_header;
  npy_intp __pyx_v_dims[2];
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SdifMatrixHeaderT *__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("_array_from_matrix_data_no_copy", 1);

  /* "pysdif/_pysdif.pyx":177
 * 
 * cdef inline ndarray _array_from_matrix_data_no_copy(SdifMatrixDataT *matrix):
 *     cdef SdifMatrixHeaderT *header = matrix.Header             # <<<<<<<<<<<<<<
 *     cdef npy_intp dims[2]
 *     dims[0] = <npy_intp>header.NbRow
 */
  __pyx_t_1 = __pyx_v_matrix->Header;
  __pyx_v_header = __pyx_t_1;

  /* "pysdif/_pysdif.pyx":179
 *     cdef SdifMatrixHeaderT *header = matrix.Header
 *     cdef npy_intp dims[2]
 *     dims[0] = <npy_intp>header.NbRow             # <<<<<<<<<<<<<<
 *     dims[1] = <npy_intp>header.NbCol
 *     return PyArray_SimpleNewFromData(2, dims, dtype_sdif2numpy(header.DataType), matrix.Data.Void)
 */
  (__pyx_v_dims[0]) = ((npy_intp)__pyx_v_header->NbRow);

  /* "pysdif/_pysdif.pyx":180
 *     cdef npy_intp dims[2]
 *     dims[0] = <npy_intp>header.NbRow
 *     dims[1] = <npy_intp>header.NbCol             # <<<<<<<<<<<<<<
 *     return PyArray_SimpleNewFromData(2, dims, dtype_sdif2numpy(header.DataType), matrix.Data.Void)
 * 
 */
  (__pyx_v_dims[1]) = ((npy_intp)__pyx_v_header->NbCol);

  /* "pysdif/_pysdif.pyx":181
 *     dims[0] = <npy_intp>header.NbRow
 *     dims[1] = <npy_intp>header.NbCol
 *     return PyArray_SimpleNewFromData(2, dims, dtype_sdif2numpy(header.DataType), matrix.Data.Void)             # <<<<<<<<<<<<<<
 * 
 * cdef inline ndarray _array_from_matrix_data_copy(SdifMatrixDataT *matrix):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2 = __pyx_f_6pysdif_7_pysdif_dtype_sdif2numpy(__pyx_v_header->DataType); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L1_error)
  __pyx_t_3 = PyArray_SimpleNewFromData(2, __pyx_v_dims, __pyx_t_2, __pyx_v_matrix->Data.Void); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 181, __pyx_L1_error)
  __pyx_r = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":176
 *     return str2sig(asbytes(s))
 * 
 * cdef inline ndarray _array_from_matrix_data_no_copy(SdifMatrixDataT *matrix):             # <<<<<<<<<<<<<<
 *     cdef SdifMatrixHeaderT *header = matrix.Header
 *     cdef npy_intp dims[2]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysdif._pysdif._array_from_matrix_data_no_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":183
 *     return PyArray_SimpleNewFromData(2, dims, dtype_sdif2numpy(header.DataType), matrix.Data.Void)
 * 
 * cdef inline ndarray _array_from_matrix_data_copy(SdifMatrixDataT *matrix):             # <<<<<<<<<<<<<<
 *     cdef ndarray out
 *     cdef SdifMatrixHeaderT *header = matrix.Header
 */

static CYTHON_INLINE PyArrayObject *__pyx_f_6pysdif_7_pysdif__array_from_matrix_data_copy(SdifMatrixDataT *__pyx_v_matrix) {
  PyArrayObject *__pyx_v_out = 0;
  SdifMatrixHeaderT *__pyx_v_header;
  npy_intp __pyx_v_dims[2];
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SdifMatrixHeaderT *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_array_from_matrix_data_copy", 1);

  /* "pysdif/_pysdif.pyx":185
 * cdef inline ndarray _array_from_matrix_data_copy(SdifMatrixDataT *matrix):
 *     cdef ndarray out
 *     cdef SdifMatrixHeaderT *header = matrix.Header             # <<<<<<<<<<<<<<
 *     cdef npy_intp dims[2]
 *     dims[0] = <npy_intp>header.NbRow
 */
  __pyx_t_1 = __pyx_v_matrix->Header;
  __pyx_v_header = __pyx_t_1;

  /* "pysdif/_pysdif.pyx":187
 *     cdef SdifMatrixHeaderT *header = matrix.Header
 *     cdef npy_intp dims[2]
 *     dims[0] = <npy_intp>header.NbRow             # <<<<<<<<<<<<<<
 *     dims[1] = <npy_intp>header.NbCol
 *     out = PyArray_SimpleNew(2, dims, dtype_sdif2numpy(header.DataType))
 */
  (__pyx_v_dims[0]) = ((npy_intp)__pyx_v_header->NbRow);

  /* "pysdif/_pysdif.pyx":188
 *     cdef npy_intp dims[2]
 *     dims[0] = <npy_intp>header.NbRow
 *     dims[1] = <npy_intp>header.NbCol             # <<<<<<<<<<<<<<
 *     out = PyArray_SimpleNew(2, dims, dtype_sdif2numpy(header.DataType))
 *     memcpy(<void *>out.data, matrix.Data.Void, c_numpy.PyArray_ITEMSIZE(out) * dims[0] * dims[1])
 */
  (__pyx_v_dims[1]) = ((npy_intp)__pyx_v_header->NbCol);

  /* "pysdif/_pysdif.pyx":189
 *     dims[0] = <npy_intp>header.NbRow
 *     dims[1] = <npy_intp>header.NbCol
 *     out = PyArray_SimpleNew(2, dims, dtype_sdif2numpy(header.DataType))             # <<<<<<<<<<<<<<
 *     memcpy(<void *>out.data, matrix.Data.Void, c_numpy.PyArray_ITEMSIZE(out) * dims[0] * dims[1])
 *     return out
 */
  __pyx_t_2 = __pyx_f_6pysdif_7_pysdif_dtype_sdif2numpy(__pyx_v_header->DataType); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 189, __pyx_L1_error)
  __pyx_t_3 = PyArray_SimpleNew(2, __pyx_v_dims, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 189, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pysdif/_pysdif.pyx":190
 *     dims[1] = <npy_intp>header.NbCol
 *     out = PyArray_SimpleNew(2, dims, dtype_sdif2numpy(header.DataType))
 *     memcpy(<void *>out.data, matrix.Data.Void, c_numpy.PyArray_ITEMSIZE(out) * dims[0] * dims[1])             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
  __pyx_t_4 = __pyx_f_5numpy_7ndarray_4data_data(__pyx_v_out); if (unlikely(__pyx_t_4 == ((char *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 190, __pyx_L1_error)
  (void)(memcpy(((void *)__pyx_t_4), __pyx_v_matrix->Data.Void, ((PyArray_ITEMSIZE(__pyx_v_out) * (__pyx_v_dims[0])) * (__pyx_v_dims[1]))));

  /* "pysdif/_pysdif.pyx":191
 *     out = PyArray_SimpleNew(2, dims, dtype_sdif2numpy(header.DataType))
 *     memcpy(<void *>out.data, matrix.Data.Void, c_numpy.PyArray_ITEMSIZE(out) * dims[0] * dims[1])
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":183
 *     return PyArray_SimpleNewFromData(2, dims, dtype_sdif2numpy(header.DataType), matrix.Data.Void)
 * 
 * cdef inline ndarray _array_from_matrix_data_copy(SdifMatrixDataT *matrix):             # <<<<<<<<<<<<<<
 *     cdef ndarray out
 *     cdef SdifMatrixHeaderT *header = matrix.Header
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysdif._pysdif._array_from_matrix_data_copy", __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;
}

/* "pysdif/_pysdif.pyx":194
 * 
 * 
 * cdef inline bytes bytes_from_sdifstring(SdifStringT *s):             # <<<<<<<<<<<<<<
 *     cdef bytes out = s.str[:s.SizeW]
 *     return out
 */

static CYTHON_INLINE PyObject *__pyx_f_6pysdif_7_pysdif_bytes_from_sdifstring(SdifStringT *__pyx_v_s) {
  PyObject *__pyx_v_out = 0;
  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("bytes_from_sdifstring", 1);

  /* "pysdif/_pysdif.pyx":195
 * 
 * cdef inline bytes bytes_from_sdifstring(SdifStringT *s):
 *     cdef bytes out = s.str[:s.SizeW]             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_s->str + 0, __pyx_v_s->SizeW - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":196
 * cdef inline bytes bytes_from_sdifstring(SdifStringT *s):
 *     cdef bytes out = s.str[:s.SizeW]
 *     return out             # <<<<<<<<<<<<<<
 * 
 * # cdef inline PyString_from_SdifString(SdifStringT *s):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":194
 * 
 * 
 * cdef inline bytes bytes_from_sdifstring(SdifStringT *s):             # <<<<<<<<<<<<<<
 *     cdef bytes out = s.str[:s.SizeW]
 *     return out
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.bytes_from_sdifstring", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":202
 * #     return PyString_FromStringAndSize(s.str, s.SizeW)
 * 
 * cdef SdifStringT *SdifString_from_PyString(s):             # <<<<<<<<<<<<<<
 *     cdef bytes s_bytes = asbytes(s)
 *     cdef char *c = s
 */

static SdifStringT *__pyx_f_6pysdif_7_pysdif_SdifString_from_PyString(PyObject *__pyx_v_s) {
  CYTHON_UNUSED PyObject *__pyx_v_s_bytes = 0;
  char *__pyx_v_c;
  SdifStringT *__pyx_v_sdifstr;
  SdifStringT *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("SdifString_from_PyString", 1);

  /* "pysdif/_pysdif.pyx":203
 * 
 * cdef SdifStringT *SdifString_from_PyString(s):
 *     cdef bytes s_bytes = asbytes(s)             # <<<<<<<<<<<<<<
 *     cdef char *c = s
 *     cdef SdifStringT *sdifstr = SdifStringNew()
 */
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_s_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":204
 * cdef SdifStringT *SdifString_from_PyString(s):
 *     cdef bytes s_bytes = asbytes(s)
 *     cdef char *c = s             # <<<<<<<<<<<<<<
 *     cdef SdifStringT *sdifstr = SdifStringNew()
 *     SdifStringAppend(sdifstr, c)
 */
  __pyx_t_2 = __Pyx_PyObject_AsWritableString(__pyx_v_s); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 204, __pyx_L1_error)
  __pyx_v_c = __pyx_t_2;

  /* "pysdif/_pysdif.pyx":205
 *     cdef bytes s_bytes = asbytes(s)
 *     cdef char *c = s
 *     cdef SdifStringT *sdifstr = SdifStringNew()             # <<<<<<<<<<<<<<
 *     SdifStringAppend(sdifstr, c)
 *     return sdifstr
 */
  __pyx_v_sdifstr = SdifStringNew();

  /* "pysdif/_pysdif.pyx":206
 *     cdef char *c = s
 *     cdef SdifStringT *sdifstr = SdifStringNew()
 *     SdifStringAppend(sdifstr, c)             # <<<<<<<<<<<<<<
 *     return sdifstr
 * 
 */
  (void)(SdifStringAppend(__pyx_v_sdifstr, __pyx_v_c));

  /* "pysdif/_pysdif.pyx":207
 *     cdef SdifStringT *sdifstr = SdifStringNew()
 *     SdifStringAppend(sdifstr, c)
 *     return sdifstr             # <<<<<<<<<<<<<<
 * 
 * cdef dict nvt_to_dict( SdifNameValueTableT *nvt ):
 */
  __pyx_r = __pyx_v_sdifstr;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":202
 * #     return PyString_FromStringAndSize(s.str, s.SizeW)
 * 
 * cdef SdifStringT *SdifString_from_PyString(s):             # <<<<<<<<<<<<<<
 *     cdef bytes s_bytes = asbytes(s)
 *     cdef char *c = s
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.SdifString_from_PyString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s_bytes);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":209
 *     return sdifstr
 * 
 * cdef dict nvt_to_dict( SdifNameValueTableT *nvt ):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     cdef SdifUInt4      iNV
 */

static PyObject *__pyx_f_6pysdif_7_pysdif_nvt_to_dict(SdifNameValueTableT *__pyx_v_nvt) {
  int __pyx_v_i;
  SdifHashNT *__pyx_v_pNV;
  SdifHashTableT *__pyx_v_HTable;
  SdifNameValueT *__pyx_v_namevalue;
  PyObject *__pyx_v_table = NULL;
  char *__pyx_v_name;
  char *__pyx_v_value;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SdifHashTableT *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  unsigned int __pyx_t_3;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  char *__pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  SdifHashNT *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("nvt_to_dict", 1);

  /* "pysdif/_pysdif.pyx":216
 *     cdef SdifNameValueT *namevalue
 * 
 *     HTable = nvt.NVHT             # <<<<<<<<<<<<<<
 *     table = {}
 *     for i in range(HTable.HashSize):
 */
  __pyx_t_1 = __pyx_v_nvt->NVHT;
  __pyx_v_HTable = __pyx_t_1;

  /* "pysdif/_pysdif.pyx":217
 * 
 *     HTable = nvt.NVHT
 *     table = {}             # <<<<<<<<<<<<<<
 *     for i in range(HTable.HashSize):
 *         pNV = HTable.Table[i]
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_table = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":218
 *     HTable = nvt.NVHT
 *     table = {}
 *     for i in range(HTable.HashSize):             # <<<<<<<<<<<<<<
 *         pNV = HTable.Table[i]
 *         while pNV:
 */
  __pyx_t_3 = __pyx_v_HTable->HashSize;
  __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;

    /* "pysdif/_pysdif.pyx":219
 *     table = {}
 *     for i in range(HTable.HashSize):
 *         pNV = HTable.Table[i]             # <<<<<<<<<<<<<<
 *         while pNV:
 *             namevalue = <SdifNameValueT *>(pNV.Data)
 */
    __pyx_v_pNV = (__pyx_v_HTable->Table[__pyx_v_i]);

    /* "pysdif/_pysdif.pyx":220
 *     for i in range(HTable.HashSize):
 *         pNV = HTable.Table[i]
 *         while pNV:             # <<<<<<<<<<<<<<
 *             namevalue = <SdifNameValueT *>(pNV.Data)
 *             name = namevalue.Name
 */
    while (1) {
      __pyx_t_6 = (__pyx_v_pNV != 0);
      if (!__pyx_t_6) break;

      /* "pysdif/_pysdif.pyx":221
 *         pNV = HTable.Table[i]
 *         while pNV:
 *             namevalue = <SdifNameValueT *>(pNV.Data)             # <<<<<<<<<<<<<<
 *             name = namevalue.Name
 *             value = namevalue.Value
 */
      __pyx_v_namevalue = ((SdifNameValueT *)__pyx_v_pNV->Data);

      /* "pysdif/_pysdif.pyx":222
 *         while pNV:
 *             namevalue = <SdifNameValueT *>(pNV.Data)
 *             name = namevalue.Name             # <<<<<<<<<<<<<<
 *             value = namevalue.Value
 *             table[name] = value
 */
      __pyx_t_7 = __pyx_v_namevalue->Name;
      __pyx_v_name = __pyx_t_7;

      /* "pysdif/_pysdif.pyx":223
 *             namevalue = <SdifNameValueT *>(pNV.Data)
 *             name = namevalue.Name
 *             value = namevalue.Value             # <<<<<<<<<<<<<<
 *             table[name] = value
 *             pNV = pNV.Next
 */
      __pyx_t_7 = __pyx_v_namevalue->Value;
      __pyx_v_value = __pyx_t_7;

      /* "pysdif/_pysdif.pyx":224
 *             name = namevalue.Name
 *             value = namevalue.Value
 *             table[name] = value             # <<<<<<<<<<<<<<
 *             pNV = pNV.Next
 *     return table
 */
      __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 224, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (unlikely((PyDict_SetItem(__pyx_v_table, __pyx_t_8, __pyx_t_2) < 0))) __PYX_ERR(0, 224, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pysdif/_pysdif.pyx":225
 *             value = namevalue.Value
 *             table[name] = value
 *             pNV = pNV.Next             # <<<<<<<<<<<<<<
 *     return table
 * 
 */
      __pyx_t_9 = __pyx_v_pNV->Next;
      __pyx_v_pNV = __pyx_t_9;
    }
  }

  /* "pysdif/_pysdif.pyx":226
 *             table[name] = value
 *             pNV = pNV.Next
 *     return table             # <<<<<<<<<<<<<<
 * 
 * cdef valuetables_to_dicts (SdifNameValuesLT *namevalues):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_table);
  __pyx_r = __pyx_v_table;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":209
 *     return sdifstr
 * 
 * cdef dict nvt_to_dict( SdifNameValueTableT *nvt ):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     cdef SdifUInt4      iNV
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pysdif._pysdif.nvt_to_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_table);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":228
 *     return table
 * 
 * cdef valuetables_to_dicts (SdifNameValuesLT *namevalues):             # <<<<<<<<<<<<<<
 *     """ create a list of dicts where each dict represents a value table """
 *     SdifListInitLoop(namevalues.NVTList)
 */

static PyObject *__pyx_f_6pysdif_7_pysdif_valuetables_to_dicts(SdifNameValuesLT *__pyx_v_namevalues) {
  PyObject *__pyx_v_tables = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("valuetables_to_dicts", 1);

  /* "pysdif/_pysdif.pyx":230
 * cdef valuetables_to_dicts (SdifNameValuesLT *namevalues):
 *     """ create a list of dicts where each dict represents a value table """
 *     SdifListInitLoop(namevalues.NVTList)             # <<<<<<<<<<<<<<
 *     tables = []
 *     while SdifListIsNext(namevalues.NVTList):
 */
  (void)(SdifListInitLoop(__pyx_v_namevalues->NVTList));

  /* "pysdif/_pysdif.pyx":231
 *     """ create a list of dicts where each dict represents a value table """
 *     SdifListInitLoop(namevalues.NVTList)
 *     tables = []             # <<<<<<<<<<<<<<
 *     while SdifListIsNext(namevalues.NVTList):
 *         namevalues.CurrNVT = <SdifNameValueTableT *>(SdifListGetNext(namevalues.NVTList))
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_tables = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":232
 *     SdifListInitLoop(namevalues.NVTList)
 *     tables = []
 *     while SdifListIsNext(namevalues.NVTList):             # <<<<<<<<<<<<<<
 *         namevalues.CurrNVT = <SdifNameValueTableT *>(SdifListGetNext(namevalues.NVTList))
 *         tables.append(nvt_to_dict(namevalues.CurrNVT))
 */
  while (1) {
    __pyx_t_2 = (SdifListIsNext(__pyx_v_namevalues->NVTList) != 0);
    if (!__pyx_t_2) break;

    /* "pysdif/_pysdif.pyx":233
 *     tables = []
 *     while SdifListIsNext(namevalues.NVTList):
 *         namevalues.CurrNVT = <SdifNameValueTableT *>(SdifListGetNext(namevalues.NVTList))             # <<<<<<<<<<<<<<
 *         tables.append(nvt_to_dict(namevalues.CurrNVT))
 *     return tables
 */
    __pyx_v_namevalues->CurrNVT = ((SdifNameValueTableT *)SdifListGetNext(__pyx_v_namevalues->NVTList));

    /* "pysdif/_pysdif.pyx":234
 *     while SdifListIsNext(namevalues.NVTList):
 *         namevalues.CurrNVT = <SdifNameValueTableT *>(SdifListGetNext(namevalues.NVTList))
 *         tables.append(nvt_to_dict(namevalues.CurrNVT))             # <<<<<<<<<<<<<<
 *     return tables
 * 
 */
    __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_nvt_to_dict(__pyx_v_namevalues->CurrNVT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_tables, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 234, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "pysdif/_pysdif.pyx":235
 *         namevalues.CurrNVT = <SdifNameValueTableT *>(SdifListGetNext(namevalues.NVTList))
 *         tables.append(nvt_to_dict(namevalues.CurrNVT))
 *     return tables             # <<<<<<<<<<<<<<
 * 
 * cdef streamidtable_to_list(SdifStreamIDTableT *table):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_tables);
  __pyx_r = __pyx_v_tables;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":228
 *     return table
 * 
 * cdef valuetables_to_dicts (SdifNameValuesLT *namevalues):             # <<<<<<<<<<<<<<
 *     """ create a list of dicts where each dict represents a value table """
 *     SdifListInitLoop(namevalues.NVTList)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.valuetables_to_dicts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tables);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":237
 *     return tables
 * 
 * cdef streamidtable_to_list(SdifStreamIDTableT *table):             # <<<<<<<<<<<<<<
 *     cdef unsigned int i
 *     cdef SdifHashNT *pID
 */

static PyObject *__pyx_f_6pysdif_7_pysdif_streamidtable_to_list(SdifStreamIDTableT *__pyx_v_table) {
  unsigned int __pyx_v_i;
  SdifHashNT *__pyx_v_pID;
  SdifStreamIDT *__pyx_v_streamid;
  PyObject *__pyx_v_streams = NULL;
  PyObject *__pyx_v_streamid_w = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  unsigned int __pyx_t_2;
  unsigned int __pyx_t_3;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  SdifHashNT *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("streamidtable_to_list", 1);

  /* "pysdif/_pysdif.pyx":241
 *     cdef SdifHashNT *pID
 *     cdef SdifStreamIDT *streamid
 *     streams = []             # <<<<<<<<<<<<<<
 *     for i in range(table.SIDHT.HashSize):
 *         pID = table.SIDHT.Table[i]
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_streams = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":242
 *     cdef SdifStreamIDT *streamid
 *     streams = []
 *     for i in range(table.SIDHT.HashSize):             # <<<<<<<<<<<<<<
 *         pID = table.SIDHT.Table[i]
 *         while pID:
 */
  __pyx_t_2 = __pyx_v_table->SIDHT->HashSize;
  __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;

    /* "pysdif/_pysdif.pyx":243
 *     streams = []
 *     for i in range(table.SIDHT.HashSize):
 *         pID = table.SIDHT.Table[i]             # <<<<<<<<<<<<<<
 *         while pID:
 *             streamid = <SdifStreamIDT *>(pID.Data)
 */
    __pyx_v_pID = (__pyx_v_table->SIDHT->Table[__pyx_v_i]);

    /* "pysdif/_pysdif.pyx":244
 *     for i in range(table.SIDHT.HashSize):
 *         pID = table.SIDHT.Table[i]
 *         while pID:             # <<<<<<<<<<<<<<
 *             streamid = <SdifStreamIDT *>(pID.Data)
 *             streamid_w = StreamID_fromSdifStreadIDT(streamid)
 */
    while (1) {
      __pyx_t_5 = (__pyx_v_pID != 0);
      if (!__pyx_t_5) break;

      /* "pysdif/_pysdif.pyx":245
 *         pID = table.SIDHT.Table[i]
 *         while pID:
 *             streamid = <SdifStreamIDT *>(pID.Data)             # <<<<<<<<<<<<<<
 *             streamid_w = StreamID_fromSdifStreadIDT(streamid)
 *             streams.append(streamid_w)
 */
      __pyx_v_streamid = ((SdifStreamIDT *)__pyx_v_pID->Data);

      /* "pysdif/_pysdif.pyx":246
 *         while pID:
 *             streamid = <SdifStreamIDT *>(pID.Data)
 *             streamid_w = StreamID_fromSdifStreadIDT(streamid)             # <<<<<<<<<<<<<<
 *             streams.append(streamid_w)
 *             pID = pID.Next
 */
      __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_StreamID_fromSdifStreadIDT(__pyx_v_streamid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_streamid_w, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pysdif/_pysdif.pyx":247
 *             streamid = <SdifStreamIDT *>(pID.Data)
 *             streamid_w = StreamID_fromSdifStreadIDT(streamid)
 *             streams.append(streamid_w)             # <<<<<<<<<<<<<<
 *             pID = pID.Next
 *     return streams
 */
      __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_streams, __pyx_v_streamid_w); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 247, __pyx_L1_error)

      /* "pysdif/_pysdif.pyx":248
 *             streamid_w = StreamID_fromSdifStreadIDT(streamid)
 *             streams.append(streamid_w)
 *             pID = pID.Next             # <<<<<<<<<<<<<<
 *     return streams
 * 
 */
      __pyx_t_7 = __pyx_v_pID->Next;
      __pyx_v_pID = __pyx_t_7;
    }
  }

  /* "pysdif/_pysdif.pyx":249
 *             streams.append(streamid_w)
 *             pID = pID.Next
 *     return streams             # <<<<<<<<<<<<<<
 * 
 * cdef class StreamID:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_streams);
  __pyx_r = __pyx_v_streams;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":237
 *     return tables
 * 
 * cdef streamidtable_to_list(SdifStreamIDTableT *table):             # <<<<<<<<<<<<<<
 *     cdef unsigned int i
 *     cdef SdifHashNT *pID
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.streamidtable_to_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_streams);
  __Pyx_XDECREF(__pyx_v_streamid_w);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":256
 * 
 *     property numid:
 *         def __get__(self): return self.this.NumID             # <<<<<<<<<<<<<<
 * 
 *     property source:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8StreamID_5numid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_8StreamID_5numid_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8StreamID_5numid___get__(((struct __pyx_obj_6pysdif_7_pysdif_StreamID *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8StreamID_5numid___get__(struct __pyx_obj_6pysdif_7_pysdif_StreamID *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_SdifUInt4(__pyx_v_self->this->NumID); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.StreamID.numid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":259
 * 
 *     property source:
 *         def __get__(self): return self.this.Source             # <<<<<<<<<<<<<<
 * 
 *     property treeway:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8StreamID_6source_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_8StreamID_6source_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8StreamID_6source___get__(((struct __pyx_obj_6pysdif_7_pysdif_StreamID *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8StreamID_6source___get__(struct __pyx_obj_6pysdif_7_pysdif_StreamID *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->this->Source); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.StreamID.source.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":262
 * 
 *     property treeway:
 *         def __get__(self): return self.this.TreeWay             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self, int numid, source, treeway):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8StreamID_7treeway_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_8StreamID_7treeway_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8StreamID_7treeway___get__(((struct __pyx_obj_6pysdif_7_pysdif_StreamID *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8StreamID_7treeway___get__(struct __pyx_obj_6pysdif_7_pysdif_StreamID *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->this->TreeWay); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.StreamID.treeway.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":264
 *         def __get__(self): return self.this.TreeWay
 * 
 *     def __cinit__(self, int numid, source, treeway):             # <<<<<<<<<<<<<<
 *         if numid == -1:
 *             # we are a wrapper of an existing SdifStreamID
 */

/* Python wrapper */
static int __pyx_pw_6pysdif_7_pysdif_8StreamID_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pysdif_7_pysdif_8StreamID_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_numid;
  PyObject *__pyx_v_source = 0;
  PyObject *__pyx_v_treeway = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  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;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_numid,&__pyx_n_s_source,&__pyx_n_s_treeway,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_numid)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 264, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_source)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 264, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 1); __PYX_ERR(0, 264, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_treeway)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 264, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 2); __PYX_ERR(0, 264, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 264, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
      values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
      values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
    }
    __pyx_v_numid = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_numid == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 264, __pyx_L3_error)
    __pyx_v_source = values[1];
    __pyx_v_treeway = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 264, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.StreamID.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8StreamID___cinit__(((struct __pyx_obj_6pysdif_7_pysdif_StreamID *)__pyx_v_self), __pyx_v_numid, __pyx_v_source, __pyx_v_treeway);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pysdif_7_pysdif_8StreamID___cinit__(struct __pyx_obj_6pysdif_7_pysdif_StreamID *__pyx_v_self, int __pyx_v_numid, PyObject *__pyx_v_source, PyObject *__pyx_v_treeway) {
  int __pyx_r;
  int __pyx_t_1;
  char *__pyx_t_2;
  char *__pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pysdif/_pysdif.pyx":265
 * 
 *     def __cinit__(self, int numid, source, treeway):
 *         if numid == -1:             # <<<<<<<<<<<<<<
 *             # we are a wrapper of an existing SdifStreamID
 *             self.own_this = 0
 */
  __pyx_t_1 = (__pyx_v_numid == -1L);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":267
 *         if numid == -1:
 *             # we are a wrapper of an existing SdifStreamID
 *             self.own_this = 0             # <<<<<<<<<<<<<<
 *         else:
 *             self.this = SdifCreateStreamID(<SdifUInt4>numid, source, treeway)
 */
    __pyx_v_self->own_this = 0;

    /* "pysdif/_pysdif.pyx":265
 * 
 *     def __cinit__(self, int numid, source, treeway):
 *         if numid == -1:             # <<<<<<<<<<<<<<
 *             # we are a wrapper of an existing SdifStreamID
 *             self.own_this = 0
 */
    goto __pyx_L3;
  }

  /* "pysdif/_pysdif.pyx":269
 *             self.own_this = 0
 *         else:
 *             self.this = SdifCreateStreamID(<SdifUInt4>numid, source, treeway)             # <<<<<<<<<<<<<<
 *             self.own_this = 1
 * 
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_AsWritableString(__pyx_v_source); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 269, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_AsWritableString(__pyx_v_treeway); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 269, __pyx_L1_error)
    __pyx_v_self->this = SdifCreateStreamID(((SdifUInt4)__pyx_v_numid), __pyx_t_2, __pyx_t_3);

    /* "pysdif/_pysdif.pyx":270
 *         else:
 *             self.this = SdifCreateStreamID(<SdifUInt4>numid, source, treeway)
 *             self.own_this = 1             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
    __pyx_v_self->own_this = 1;
  }
  __pyx_L3:;

  /* "pysdif/_pysdif.pyx":264
 *         def __get__(self): return self.this.TreeWay
 * 
 *     def __cinit__(self, int numid, source, treeway):             # <<<<<<<<<<<<<<
 *         if numid == -1:
 *             # we are a wrapper of an existing SdifStreamID
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysdif._pysdif.StreamID.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":272
 *             self.own_this = 1
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.own_this:
 *             SdifKillStreamID(self.this)
 */

/* Python wrapper */
static void __pyx_pw_6pysdif_7_pysdif_8StreamID_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_6pysdif_7_pysdif_8StreamID_3__dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_6pysdif_7_pysdif_8StreamID_2__dealloc__(((struct __pyx_obj_6pysdif_7_pysdif_StreamID *)__pyx_v_self));

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

static void __pyx_pf_6pysdif_7_pysdif_8StreamID_2__dealloc__(struct __pyx_obj_6pysdif_7_pysdif_StreamID *__pyx_v_self) {
  int __pyx_t_1;

  /* "pysdif/_pysdif.pyx":273
 * 
 *     def __dealloc__(self):
 *         if self.own_this:             # <<<<<<<<<<<<<<
 *             SdifKillStreamID(self.this)
 * 
 */
  __pyx_t_1 = (__pyx_v_self->own_this != 0);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":274
 *     def __dealloc__(self):
 *         if self.own_this:
 *             SdifKillStreamID(self.this)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
    SdifKillStreamID(__pyx_v_self->this);

    /* "pysdif/_pysdif.pyx":273
 * 
 *     def __dealloc__(self):
 *         if self.own_this:             # <<<<<<<<<<<<<<
 *             SdifKillStreamID(self.this)
 * 
 */
  }

  /* "pysdif/_pysdif.pyx":272
 *             self.own_this = 1
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.own_this:
 *             SdifKillStreamID(self.this)
 */

  /* function exit code */
}

/* "pysdif/_pysdif.pyx":276
 *             SdifKillStreamID(self.this)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "StreamID(numid=%d, source='%s', treeway='%s')" % (
 *             self.numid,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8StreamID_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_8StreamID_5__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8StreamID_4__repr__(((struct __pyx_obj_6pysdif_7_pysdif_StreamID *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8StreamID_4__repr__(struct __pyx_obj_6pysdif_7_pysdif_StreamID *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "pysdif/_pysdif.pyx":277
 * 
 *     def __repr__(self):
 *         return "StreamID(numid=%d, source='%s', treeway='%s')" % (             # <<<<<<<<<<<<<<
 *             self.numid,
 *             self.source,
 */
  __Pyx_XDECREF(__pyx_r);

  /* "pysdif/_pysdif.pyx":278
 *     def __repr__(self):
 *         return "StreamID(numid=%d, source='%s', treeway='%s')" % (
 *             self.numid,             # <<<<<<<<<<<<<<
 *             self.source,
 *             self.treeway)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_numid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pysdif/_pysdif.pyx":279
 *         return "StreamID(numid=%d, source='%s', treeway='%s')" % (
 *             self.numid,
 *             self.source,             # <<<<<<<<<<<<<<
 *             self.treeway)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_source); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "pysdif/_pysdif.pyx":280
 *             self.numid,
 *             self.source,
 *             self.treeway)             # <<<<<<<<<<<<<<
 * 
 * cdef StreamID_fromSdifStreadIDT(SdifStreamIDT *this):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_treeway); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "pysdif/_pysdif.pyx":278
 *     def __repr__(self):
 *         return "StreamID(numid=%d, source='%s', treeway='%s')" % (
 *             self.numid,             # <<<<<<<<<<<<<<
 *             self.source,
 *             self.treeway)
 */
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;

  /* "pysdif/_pysdif.pyx":277
 * 
 *     def __repr__(self):
 *         return "StreamID(numid=%d, source='%s', treeway='%s')" % (             # <<<<<<<<<<<<<<
 *             self.numid,
 *             self.source,
 */
  __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_StreamID_numid_d_source_s_treewa, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":276
 *             SdifKillStreamID(self.this)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "StreamID(numid=%d, source='%s', treeway='%s')" % (
 *             self.numid,
 */

  /* 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("pysdif._pysdif.StreamID.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8StreamID_7__reduce_cython__(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8StreamID_6__reduce_cython__, "StreamID.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8StreamID_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8StreamID_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8StreamID_6__reduce_cython__};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8StreamID_7__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8StreamID_6__reduce_cython__(((struct __pyx_obj_6pysdif_7_pysdif_StreamID *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8StreamID_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pysdif_7_pysdif_StreamID *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 1);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysdif._pysdif.StreamID.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8StreamID_9__setstate_cython__(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8StreamID_8__setstate_cython__, "StreamID.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8StreamID_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8StreamID_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8StreamID_8__setstate_cython__};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8StreamID_9__setstate_cython__(PyObject *__pyx_v_self, 
#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___pyx_state = 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("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.StreamID.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8StreamID_8__setstate_cython__(((struct __pyx_obj_6pysdif_7_pysdif_StreamID *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_8StreamID_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pysdif_7_pysdif_StreamID *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 1);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysdif._pysdif.StreamID.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":282
 *             self.treeway)
 * 
 * cdef StreamID_fromSdifStreadIDT(SdifStreamIDT *this):             # <<<<<<<<<<<<<<
 *     cdef StreamID out = StreamID(-1, None, None)  # create a wrapper
 *     out.this = this
 */

static PyObject *__pyx_f_6pysdif_7_pysdif_StreamID_fromSdifStreadIDT(SdifStreamIDT *__pyx_v_this) {
  struct __pyx_obj_6pysdif_7_pysdif_StreamID *__pyx_v_out = 0;
  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("StreamID_fromSdifStreadIDT", 1);

  /* "pysdif/_pysdif.pyx":283
 * 
 * cdef StreamID_fromSdifStreadIDT(SdifStreamIDT *this):
 *     cdef StreamID out = StreamID(-1, None, None)  # create a wrapper             # <<<<<<<<<<<<<<
 *     out.this = this
 *     out.own_this = 0
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pysdif_7_pysdif_StreamID), __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((struct __pyx_obj_6pysdif_7_pysdif_StreamID *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":284
 * cdef StreamID_fromSdifStreadIDT(SdifStreamIDT *this):
 *     cdef StreamID out = StreamID(-1, None, None)  # create a wrapper
 *     out.this = this             # <<<<<<<<<<<<<<
 *     out.own_this = 0
 *     return out
 */
  __pyx_v_out->this = __pyx_v_this;

  /* "pysdif/_pysdif.pyx":285
 *     cdef StreamID out = StreamID(-1, None, None)  # create a wrapper
 *     out.this = this
 *     out.own_this = 0             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
  __pyx_v_out->own_this = 0;

  /* "pysdif/_pysdif.pyx":286
 *     out.this = this
 *     out.own_this = 0
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef SdifMatrixTypeT *MatrixType_create(signature, column_names):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = ((PyObject *)__pyx_v_out);
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":282
 *             self.treeway)
 * 
 * cdef StreamID_fromSdifStreadIDT(SdifStreamIDT *this):             # <<<<<<<<<<<<<<
 *     cdef StreamID out = StreamID(-1, None, None)  # create a wrapper
 *     out.this = this
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.StreamID_fromSdifStreadIDT", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":288
 *     return out
 * 
 * cdef SdifMatrixTypeT *MatrixType_create(signature, column_names):             # <<<<<<<<<<<<<<
 *     cdef SdifSignature sig = str2sig(asbytes(signature))
 *     cdef SdifMatrixTypeT *mt = SdifCreateMatrixType(sig, NULL)
 */

static SdifMatrixTypeT *__pyx_f_6pysdif_7_pysdif_MatrixType_create(PyObject *__pyx_v_signature, PyObject *__pyx_v_column_names) {
  SdifSignature __pyx_v_sig;
  SdifMatrixTypeT *__pyx_v_mt;
  PyObject *__pyx_v_column_name = NULL;
  SdifMatrixTypeT *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  unsigned int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  const char* __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("MatrixType_create", 1);

  /* "pysdif/_pysdif.pyx":289
 * 
 * cdef SdifMatrixTypeT *MatrixType_create(signature, column_names):
 *     cdef SdifSignature sig = str2sig(asbytes(signature))             # <<<<<<<<<<<<<<
 *     cdef SdifMatrixTypeT *mt = SdifCreateMatrixType(sig, NULL)
 *     for column_name in column_names:
 */
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_signature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 289, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 289, __pyx_L1_error)
  __pyx_t_3 = __pyx_f_6pysdif_7_pysdif_str2sig(__pyx_t_2); if (unlikely(__pyx_t_3 == ((unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_sig = __pyx_t_3;

  /* "pysdif/_pysdif.pyx":290
 * cdef SdifMatrixTypeT *MatrixType_create(signature, column_names):
 *     cdef SdifSignature sig = str2sig(asbytes(signature))
 *     cdef SdifMatrixTypeT *mt = SdifCreateMatrixType(sig, NULL)             # <<<<<<<<<<<<<<
 *     for column_name in column_names:
 *         SdifMatrixTypeInsertTailColumnDef(mt, asbytes(column_name))
 */
  __pyx_v_mt = SdifCreateMatrixType(__pyx_v_sig, NULL);

  /* "pysdif/_pysdif.pyx":291
 *     cdef SdifSignature sig = str2sig(asbytes(signature))
 *     cdef SdifMatrixTypeT *mt = SdifCreateMatrixType(sig, NULL)
 *     for column_name in column_names:             # <<<<<<<<<<<<<<
 *         SdifMatrixTypeInsertTailColumnDef(mt, asbytes(column_name))
 *     return mt
 */
  if (likely(PyList_CheckExact(__pyx_v_column_names)) || PyTuple_CheckExact(__pyx_v_column_names)) {
    __pyx_t_1 = __pyx_v_column_names; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_column_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 291, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 291, __pyx_L1_error)
          #endif
          if (__pyx_t_4 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 291, __pyx_L1_error)
        #else
        __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 291, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 291, __pyx_L1_error)
          #endif
          if (__pyx_t_4 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 291, __pyx_L1_error)
        #else
        __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 291, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_1);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 291, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_column_name, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "pysdif/_pysdif.pyx":292
 *     cdef SdifMatrixTypeT *mt = SdifCreateMatrixType(sig, NULL)
 *     for column_name in column_names:
 *         SdifMatrixTypeInsertTailColumnDef(mt, asbytes(column_name))             # <<<<<<<<<<<<<<
 *     return mt
 * 
 */
    __pyx_t_6 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_column_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(__pyx_t_6 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
      __PYX_ERR(0, 292, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_t_6); if (unlikely((__pyx_t_7 == ((const char*)NULL)) && PyErr_Occurred())) __PYX_ERR(0, 292, __pyx_L1_error)
    (void)(SdifMatrixTypeInsertTailColumnDef(__pyx_v_mt, __pyx_t_7));
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pysdif/_pysdif.pyx":291
 *     cdef SdifSignature sig = str2sig(asbytes(signature))
 *     cdef SdifMatrixTypeT *mt = SdifCreateMatrixType(sig, NULL)
 *     for column_name in column_names:             # <<<<<<<<<<<<<<
 *         SdifMatrixTypeInsertTailColumnDef(mt, asbytes(column_name))
 *     return mt
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":293
 *     for column_name in column_names:
 *         SdifMatrixTypeInsertTailColumnDef(mt, asbytes(column_name))
 *     return mt             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_mt;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":288
 *     return out
 * 
 * cdef SdifMatrixTypeT *MatrixType_create(signature, column_names):             # <<<<<<<<<<<<<<
 *     cdef SdifSignature sig = str2sig(asbytes(signature))
 *     cdef SdifMatrixTypeT *mt = SdifCreateMatrixType(sig, NULL)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pysdif._pysdif.MatrixType_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_column_name);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":296
 * 
 * 
 * cdef SdifFrameTypeT *FrameType_create(signature, list components):             # <<<<<<<<<<<<<<
 *     """
 *     Create a SdifFrameType with a given signature
 */

static SdifFrameTypeT *__pyx_f_6pysdif_7_pysdif_FrameType_create(PyObject *__pyx_v_signature, PyObject *__pyx_v_components) {
  SdifSignature __pyx_v_sig;
  SdifFrameTypeT *__pyx_v_ft;
  PyObject *__pyx_v_component = NULL;
  PyObject *__pyx_v_component_b = NULL;
  PyObject *__pyx_v_component_sig = NULL;
  PyObject *__pyx_v_component_name = NULL;
  SdifFrameTypeT *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  unsigned int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("FrameType_create", 1);

  /* "pysdif/_pysdif.pyx":306
 *         + strings "{SIGN} {ROLE}", like "1TRC SinusoidalTracks"
 *     """
 *     cdef SdifSignature sig = str2sig(asbytes(signature))             # <<<<<<<<<<<<<<
 *     cdef SdifFrameTypeT *ft = SdifCreateFrameType(sig, NULL)
 *     for component in components:
 */
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_signature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 306, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 306, __pyx_L1_error)
  __pyx_t_3 = __pyx_f_6pysdif_7_pysdif_str2sig(__pyx_t_2); if (unlikely(__pyx_t_3 == ((unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 306, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_sig = __pyx_t_3;

  /* "pysdif/_pysdif.pyx":307
 *     """
 *     cdef SdifSignature sig = str2sig(asbytes(signature))
 *     cdef SdifFrameTypeT *ft = SdifCreateFrameType(sig, NULL)             # <<<<<<<<<<<<<<
 *     for component in components:
 *         if isinstance(component, Component):
 */
  __pyx_v_ft = SdifCreateFrameType(__pyx_v_sig, NULL);

  /* "pysdif/_pysdif.pyx":308
 *     cdef SdifSignature sig = str2sig(asbytes(signature))
 *     cdef SdifFrameTypeT *ft = SdifCreateFrameType(sig, NULL)
 *     for component in components:             # <<<<<<<<<<<<<<
 *         if isinstance(component, Component):
 *             SdifFrameTypePutComponent(ft, str2sig(component.signature), component.name)
 */
  if (unlikely(__pyx_v_components == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 308, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_components; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_4 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_MACROS
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 308, __pyx_L1_error)
      #endif
      if (__pyx_t_4 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 308, __pyx_L1_error)
    #else
    __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_component, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "pysdif/_pysdif.pyx":309
 *     cdef SdifFrameTypeT *ft = SdifCreateFrameType(sig, NULL)
 *     for component in components:
 *         if isinstance(component, Component):             # <<<<<<<<<<<<<<
 *             SdifFrameTypePutComponent(ft, str2sig(component.signature), component.name)
 *         elif isinstance(component, tuple):
 */
    __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_component, __pyx_ptype_6pysdif_7_pysdif_Component); 
    if (__pyx_t_6) {

      /* "pysdif/_pysdif.pyx":310
 *     for component in components:
 *         if isinstance(component, Component):
 *             SdifFrameTypePutComponent(ft, str2sig(component.signature), component.name)             # <<<<<<<<<<<<<<
 *         elif isinstance(component, tuple):
 *             SdifFrameTypePutComponent(ft, str2sig(asbytes(component[0])), asbytes(component[1]))
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_component, __pyx_n_s_signature); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = __Pyx_PyObject_AsWritableString(__pyx_t_5); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 310, __pyx_L1_error)
      __pyx_t_3 = __pyx_f_6pysdif_7_pysdif_str2sig(__pyx_t_2); if (unlikely(__pyx_t_3 == ((unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 310, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_component, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = __Pyx_PyObject_AsWritableString(__pyx_t_5); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 310, __pyx_L1_error)
      (void)(SdifFrameTypePutComponent(__pyx_v_ft, __pyx_t_3, __pyx_t_2));
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pysdif/_pysdif.pyx":309
 *     cdef SdifFrameTypeT *ft = SdifCreateFrameType(sig, NULL)
 *     for component in components:
 *         if isinstance(component, Component):             # <<<<<<<<<<<<<<
 *             SdifFrameTypePutComponent(ft, str2sig(component.signature), component.name)
 *         elif isinstance(component, tuple):
 */
      goto __pyx_L5;
    }

    /* "pysdif/_pysdif.pyx":311
 *         if isinstance(component, Component):
 *             SdifFrameTypePutComponent(ft, str2sig(component.signature), component.name)
 *         elif isinstance(component, tuple):             # <<<<<<<<<<<<<<
 *             SdifFrameTypePutComponent(ft, str2sig(asbytes(component[0])), asbytes(component[1]))
 *         elif isinstance(component, (str, bytes)):
 */
    __pyx_t_6 = PyTuple_Check(__pyx_v_component); 
    if (__pyx_t_6) {

      /* "pysdif/_pysdif.pyx":312
 *             SdifFrameTypePutComponent(ft, str2sig(component.signature), component.name)
 *         elif isinstance(component, tuple):
 *             SdifFrameTypePutComponent(ft, str2sig(asbytes(component[0])), asbytes(component[1]))             # <<<<<<<<<<<<<<
 *         elif isinstance(component, (str, bytes)):
 *             component_b = asbytes(component)
 */
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_component, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 312, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 312, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(__pyx_t_7 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
        __PYX_ERR(0, 312, __pyx_L1_error)
      }
      __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_t_7); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 312, __pyx_L1_error)
      __pyx_t_3 = __pyx_f_6pysdif_7_pysdif_str2sig(__pyx_t_2); if (unlikely(__pyx_t_3 == ((unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 312, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_component, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 312, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 312, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__pyx_t_5 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
        __PYX_ERR(0, 312, __pyx_L1_error)
      }
      __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_t_5); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 312, __pyx_L1_error)
      (void)(SdifFrameTypePutComponent(__pyx_v_ft, __pyx_t_3, __pyx_t_2));
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pysdif/_pysdif.pyx":311
 *         if isinstance(component, Component):
 *             SdifFrameTypePutComponent(ft, str2sig(component.signature), component.name)
 *         elif isinstance(component, tuple):             # <<<<<<<<<<<<<<
 *             SdifFrameTypePutComponent(ft, str2sig(asbytes(component[0])), asbytes(component[1]))
 *         elif isinstance(component, (str, bytes)):
 */
      goto __pyx_L5;
    }

    /* "pysdif/_pysdif.pyx":313
 *         elif isinstance(component, tuple):
 *             SdifFrameTypePutComponent(ft, str2sig(asbytes(component[0])), asbytes(component[1]))
 *         elif isinstance(component, (str, bytes)):             # <<<<<<<<<<<<<<
 *             component_b = asbytes(component)
 *             component_sig, component_name = component_b.split()
 */
    __pyx_t_8 = PyString_Check(__pyx_v_component); 
    if (!__pyx_t_8) {
    } else {
      __pyx_t_6 = __pyx_t_8;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_8 = PyBytes_Check(__pyx_v_component); 
    __pyx_t_6 = __pyx_t_8;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_6) {

      /* "pysdif/_pysdif.pyx":314
 *             SdifFrameTypePutComponent(ft, str2sig(asbytes(component[0])), asbytes(component[1]))
 *         elif isinstance(component, (str, bytes)):
 *             component_b = asbytes(component)             # <<<<<<<<<<<<<<
 *             component_sig, component_name = component_b.split()
 *             SdifFrameTypePutComponent(ft, str2sig(component_sig), component_name)
 */
      __pyx_t_5 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_component); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 314, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_XDECREF_SET(__pyx_v_component_b, ((PyObject*)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "pysdif/_pysdif.pyx":315
 *         elif isinstance(component, (str, bytes)):
 *             component_b = asbytes(component)
 *             component_sig, component_name = component_b.split()             # <<<<<<<<<<<<<<
 *             SdifFrameTypePutComponent(ft, str2sig(component_sig), component_name)
 *         else:
 */
      __pyx_t_5 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyBytes_Type_split, __pyx_v_component_b); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 315, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
        PyObject* sequence = __pyx_t_5;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 315, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        #else
        __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 315, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 315, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 315, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_10);
        index = 0; __pyx_t_7 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_9);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 315, __pyx_L1_error)
        __pyx_t_11 = NULL;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L9_unpacking_done;
        __pyx_L8_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_11 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 315, __pyx_L1_error)
        __pyx_L9_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_component_sig, __pyx_t_7);
      __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_component_name, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "pysdif/_pysdif.pyx":316
 *             component_b = asbytes(component)
 *             component_sig, component_name = component_b.split()
 *             SdifFrameTypePutComponent(ft, str2sig(component_sig), component_name)             # <<<<<<<<<<<<<<
 *         else:
 *             logger.error("components should be a seq. of Components"
 */
      __pyx_t_2 = __Pyx_PyObject_AsWritableString(__pyx_v_component_sig); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 316, __pyx_L1_error)
      __pyx_t_3 = __pyx_f_6pysdif_7_pysdif_str2sig(__pyx_t_2); if (unlikely(__pyx_t_3 == ((unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 316, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyObject_AsWritableString(__pyx_v_component_name); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 316, __pyx_L1_error)
      (void)(SdifFrameTypePutComponent(__pyx_v_ft, __pyx_t_3, __pyx_t_2));

      /* "pysdif/_pysdif.pyx":313
 *         elif isinstance(component, tuple):
 *             SdifFrameTypePutComponent(ft, str2sig(asbytes(component[0])), asbytes(component[1]))
 *         elif isinstance(component, (str, bytes)):             # <<<<<<<<<<<<<<
 *             component_b = asbytes(component)
 *             component_sig, component_name = component_b.split()
 */
      goto __pyx_L5;
    }

    /* "pysdif/_pysdif.pyx":318
 *             SdifFrameTypePutComponent(ft, str2sig(component_sig), component_name)
 *         else:
 *             logger.error("components should be a seq. of Components"             # <<<<<<<<<<<<<<
 *                          "or tuples(signature, name), but got: %s" % components)
 *             return NULL
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_logger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 318, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 318, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "pysdif/_pysdif.pyx":319
 *         else:
 *             logger.error("components should be a seq. of Components"
 *                          "or tuples(signature, name), but got: %s" % components)             # <<<<<<<<<<<<<<
 *             return NULL
 *     return ft
 */
      __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_components_should_be_a_seq_of_Co, __pyx_v_components); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 319, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_9};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 318, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pysdif/_pysdif.pyx":320
 *             logger.error("components should be a seq. of Components"
 *                          "or tuples(signature, name), but got: %s" % components)
 *             return NULL             # <<<<<<<<<<<<<<
 *     return ft
 * 
 */
      __pyx_r = NULL;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __pyx_L5:;

    /* "pysdif/_pysdif.pyx":308
 *     cdef SdifSignature sig = str2sig(asbytes(signature))
 *     cdef SdifFrameTypeT *ft = SdifCreateFrameType(sig, NULL)
 *     for component in components:             # <<<<<<<<<<<<<<
 *         if isinstance(component, Component):
 *             SdifFrameTypePutComponent(ft, str2sig(component.signature), component.name)
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":321
 *                          "or tuples(signature, name), but got: %s" % components)
 *             return NULL
 *     return ft             # <<<<<<<<<<<<<<
 * 
 * cdef inline bytes asbytes(s):
 */
  __pyx_r = __pyx_v_ft;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":296
 * 
 * 
 * cdef SdifFrameTypeT *FrameType_create(signature, list components):             # <<<<<<<<<<<<<<
 *     """
 *     Create a SdifFrameType with a given signature
 */

  /* 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_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pysdif._pysdif.FrameType_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_component);
  __Pyx_XDECREF(__pyx_v_component_b);
  __Pyx_XDECREF(__pyx_v_component_sig);
  __Pyx_XDECREF(__pyx_v_component_name);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":323
 *     return ft
 * 
 * cdef inline bytes asbytes(s):             # <<<<<<<<<<<<<<
 *     if isinstance(s, bytes):
 *         return s
 */

static CYTHON_INLINE PyObject *__pyx_f_6pysdif_7_pysdif_asbytes(PyObject *__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("asbytes", 1);

  /* "pysdif/_pysdif.pyx":324
 * 
 * cdef inline bytes asbytes(s):
 *     if isinstance(s, bytes):             # <<<<<<<<<<<<<<
 *         return s
 *     elif isinstance(s, str):
 */
  __pyx_t_1 = PyBytes_Check(__pyx_v_s); 
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":325
 * cdef inline bytes asbytes(s):
 *     if isinstance(s, bytes):
 *         return s             # <<<<<<<<<<<<<<
 *     elif isinstance(s, str):
 *         return s.encode("ascii")
 */
    __Pyx_XDECREF(__pyx_r);
    if (!(likely(PyBytes_CheckExact(__pyx_v_s))||((__pyx_v_s) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_v_s))) __PYX_ERR(0, 325, __pyx_L1_error)
    __Pyx_INCREF(__pyx_v_s);
    __pyx_r = ((PyObject*)__pyx_v_s);
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":324
 * 
 * cdef inline bytes asbytes(s):
 *     if isinstance(s, bytes):             # <<<<<<<<<<<<<<
 *         return s
 *     elif isinstance(s, str):
 */
  }

  /* "pysdif/_pysdif.pyx":326
 *     if isinstance(s, bytes):
 *         return s
 *     elif isinstance(s, str):             # <<<<<<<<<<<<<<
 *         return s.encode("ascii")
 *     else:
 */
  __pyx_t_1 = PyString_Check(__pyx_v_s); 
  if (likely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":327
 *         return s
 *     elif isinstance(s, str):
 *         return s.encode("ascii")             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError("s should be either a str or bytes, got {}".format(type(s)))
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_n_s_ascii};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 327, __pyx_L1_error)
    __pyx_r = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":326
 *     if isinstance(s, bytes):
 *         return s
 *     elif isinstance(s, str):             # <<<<<<<<<<<<<<
 *         return s.encode("ascii")
 *     else:
 */
  }

  /* "pysdif/_pysdif.pyx":329
 *         return s.encode("ascii")
 *     else:
 *         raise TypeError("s should be either a str or bytes, got {}".format(type(s)))             # <<<<<<<<<<<<<<
 * 
 * cdef class MatrixTypeDefinition:
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_s_should_be_either_a_str_or_byte, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)Py_TYPE(__pyx_v_s))};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 329, __pyx_L1_error)
  }

  /* "pysdif/_pysdif.pyx":323
 *     return ft
 * 
 * cdef inline bytes asbytes(s):             # <<<<<<<<<<<<<<
 *     if isinstance(s, bytes):
 *         return s
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysdif._pysdif.asbytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":335
 *     cdef public list column_names
 * 
 *     def __init__(self, signature, list column_names):             # <<<<<<<<<<<<<<
 *         """
 *         Args:
 */

/* Python wrapper */
static int __pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
PyDoc_STRVAR(__pyx_doc_6pysdif_7_pysdif_20MatrixTypeDefinition___init__, "\n        Args:\n            signature (str): A 4 char signature\n            column_names: list[str] - A list of column names, [\"Col1\", \"Col2\", \"Col3\", ...]\n        ");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_6pysdif_7_pysdif_20MatrixTypeDefinition___init__;
#endif
static int __pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_signature = 0;
  PyObject *__pyx_v_column_names = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_signature,&__pyx_n_s_column_names,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_signature)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 335, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_column_names)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 335, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 335, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 335, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
      values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    }
    __pyx_v_signature = values[0];
    __pyx_v_column_names = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 335, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.MatrixTypeDefinition.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_column_names), (&PyList_Type), 1, "column_names", 1))) __PYX_ERR(0, 335, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition___init__(((struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *)__pyx_v_self), __pyx_v_signature, __pyx_v_column_names);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition___init__(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_v_self, PyObject *__pyx_v_signature, PyObject *__pyx_v_column_names) {
  PyObject *__pyx_7genexpr__pyx_v_name = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "pysdif/_pysdif.pyx":341
 *             column_names: list[str] - A list of column names, ["Col1", "Col2", "Col3", ...]
 *         """
 *         self.signature = asbytes(signature)             # <<<<<<<<<<<<<<
 *         self.column_names = [asbytes(name).strip() for name in column_names]
 * 
 */
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_signature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->signature);
  __Pyx_DECREF(__pyx_v_self->signature);
  __pyx_v_self->signature = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":342
 *         """
 *         self.signature = asbytes(signature)
 *         self.column_names = [asbytes(name).strip() for name in column_names]             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(__pyx_v_column_names == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 342, __pyx_L5_error)
    }
    __pyx_t_2 = __pyx_v_column_names; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = 0;
    for (;;) {
      {
        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 342, __pyx_L5_error)
        #endif
        if (__pyx_t_3 >= __pyx_temp) break;
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 342, __pyx_L5_error)
      #else
      __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 342, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_name, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_5 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_7genexpr__pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 342, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_strip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 342, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 342, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 342, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_name); __pyx_7genexpr__pyx_v_name = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_name); __pyx_7genexpr__pyx_v_name = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->column_names);
  __Pyx_DECREF(__pyx_v_self->column_names);
  __pyx_v_self->column_names = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":335
 *     cdef public list column_names
 * 
 *     def __init__(self, signature, list column_names):             # <<<<<<<<<<<<<<
 *         """
 *         Args:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pysdif._pysdif.MatrixTypeDefinition.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_name);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":344
 *         self.column_names = [asbytes(name).strip() for name in column_names]
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "1MTD(signature=%s, column_names=%s)" % (self.signature, self.column_names)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_3__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_2__repr__(((struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_2__repr__(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__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("__repr__", 1);

  /* "pysdif/_pysdif.pyx":345
 * 
 *     def __repr__(self):
 *         return "1MTD(signature=%s, column_names=%s)" % (self.signature, self.column_names)             # <<<<<<<<<<<<<<
 * 
 *     cdef SdifMatrixTypeT *toSdifMatrixType(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->signature);
  __Pyx_GIVEREF(__pyx_v_self->signature);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->signature)) __PYX_ERR(0, 345, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->column_names);
  __Pyx_GIVEREF(__pyx_v_self->column_names);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->column_names)) __PYX_ERR(0, 345, __pyx_L1_error);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_1MTD_signature_s_column_names_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 345, __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;

  /* "pysdif/_pysdif.pyx":344
 *         self.column_names = [asbytes(name).strip() for name in column_names]
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "1MTD(signature=%s, column_names=%s)" % (self.signature, self.column_names)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.MatrixTypeDefinition.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":347
 *         return "1MTD(signature=%s, column_names=%s)" % (self.signature, self.column_names)
 * 
 *     cdef SdifMatrixTypeT *toSdifMatrixType(self):             # <<<<<<<<<<<<<<
 *         return MatrixType_create(self.signature, self.column_names)
 * 
 */

static SdifMatrixTypeT *__pyx_f_6pysdif_7_pysdif_20MatrixTypeDefinition_toSdifMatrixType(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_v_self) {
  SdifMatrixTypeT *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  SdifMatrixTypeT *__pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("toSdifMatrixType", 1);

  /* "pysdif/_pysdif.pyx":348
 * 
 *     cdef SdifMatrixTypeT *toSdifMatrixType(self):
 *         return MatrixType_create(self.signature, self.column_names)             # <<<<<<<<<<<<<<
 * 
 * cdef MatrixTypesTable_to_list(SdifHashTableT *t):
 */
  __pyx_t_1 = __pyx_v_self->signature;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_self->column_names;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_6pysdif_7_pysdif_MatrixType_create(__pyx_t_1, __pyx_t_2); if (unlikely(__pyx_t_3 == ((SdifMatrixTypeT *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 348, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":347
 *         return "1MTD(signature=%s, column_names=%s)" % (self.signature, self.column_names)
 * 
 *     cdef SdifMatrixTypeT *toSdifMatrixType(self):             # <<<<<<<<<<<<<<
 *         return MatrixType_create(self.signature, self.column_names)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.MatrixTypeDefinition.toSdifMatrixType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":332
 * 
 * cdef class MatrixTypeDefinition:
 *     cdef public bytes signature             # <<<<<<<<<<<<<<
 *     cdef public list column_names
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_9signature_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_9signature_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_9signature___get__(((struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_9signature___get__(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->signature);
  __pyx_r = __pyx_v_self->signature;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_9signature_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_9signature_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_9signature_2__set__(((struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_9signature_2__set__(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 1);
  if (!(likely(PyBytes_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_v_value))) __PYX_ERR(0, 332, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->signature);
  __Pyx_DECREF(__pyx_v_self->signature);
  __pyx_v_self->signature = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.MatrixTypeDefinition.signature.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_9signature_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_9signature_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_9signature_4__del__(((struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *)__pyx_v_self));

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

static int __pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_9signature_4__del__(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->signature);
  __Pyx_DECREF(__pyx_v_self->signature);
  __pyx_v_self->signature = ((PyObject*)Py_None);

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

/* "pysdif/_pysdif.pyx":333
 * cdef class MatrixTypeDefinition:
 *     cdef public bytes signature
 *     cdef public list column_names             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, signature, list column_names):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_12column_names_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_12column_names_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_12column_names___get__(((struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_12column_names___get__(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->column_names);
  __pyx_r = __pyx_v_self->column_names;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_12column_names_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_12column_names_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_12column_names_2__set__(((struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_12column_names_2__set__(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 1);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(0, 333, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->column_names);
  __Pyx_DECREF(__pyx_v_self->column_names);
  __pyx_v_self->column_names = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.MatrixTypeDefinition.column_names.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_12column_names_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_12column_names_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_12column_names_4__del__(((struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *)__pyx_v_self));

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

static int __pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_12column_names_4__del__(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->column_names);
  __Pyx_DECREF(__pyx_v_self->column_names);
  __pyx_v_self->column_names = ((PyObject*)Py_None);

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_5__reduce_cython__(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_20MatrixTypeDefinition_4__reduce_cython__, "MatrixTypeDefinition.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_20MatrixTypeDefinition_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_20MatrixTypeDefinition_4__reduce_cython__};
static PyObject *__pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_4__reduce_cython__(((struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_4__reduce_cython__(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 1);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.column_names, self.signature)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->column_names);
  __Pyx_GIVEREF(__pyx_v_self->column_names);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->column_names)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->signature);
  __Pyx_GIVEREF(__pyx_v_self->signature);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->signature)) __PYX_ERR(1, 5, __pyx_L1_error);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.column_names, self.signature)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self.column_names, self.signature)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  if (__pyx_t_2) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.column_names is not None or self.signature is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.column_names, self.signature)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.column_names is not None or self.signature is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_MatrixTypeDefinition, (type(self), 0x8e7a8c2, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->column_names != ((PyObject*)Py_None));
    if (!__pyx_t_4) {
    } else {
      __pyx_t_2 = __pyx_t_4;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_4 = (__pyx_v_self->signature != ((PyObject*)Py_None));
    __pyx_t_2 = __pyx_t_4;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_2;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.column_names is not None or self.signature is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_MatrixTypeDefinition, (type(self), 0x8e7a8c2, None), state
 *     else:
 */
  if (__pyx_v_use_setstate) {

    /* "(tree fragment)":13
 *         use_setstate = self.column_names is not None or self.signature is not None
 *     if use_setstate:
 *         return __pyx_unpickle_MatrixTypeDefinition, (type(self), 0x8e7a8c2, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_MatrixTypeDefinition, (type(self), 0x8e7a8c2, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_MatrixTypeDefinit); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_149399746);
    __Pyx_GIVEREF(__pyx_int_149399746);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_149399746)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __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)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.column_names is not None or self.signature is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_MatrixTypeDefinition, (type(self), 0x8e7a8c2, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_MatrixTypeDefinition, (type(self), 0x8e7a8c2, None), state
 *     else:
 *         return __pyx_unpickle_MatrixTypeDefinition, (type(self), 0x8e7a8c2, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_MatrixTypeDefinition__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_MatrixTypeDefinit); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_149399746);
    __Pyx_GIVEREF(__pyx_int_149399746);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_149399746)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pysdif._pysdif.MatrixTypeDefinition.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_MatrixTypeDefinition, (type(self), 0x8e7a8c2, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_MatrixTypeDefinition__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_7__setstate_cython__(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_20MatrixTypeDefinition_6__setstate_cython__, "MatrixTypeDefinition.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_20MatrixTypeDefinition_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_20MatrixTypeDefinition_6__setstate_cython__};
static PyObject *__pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_7__setstate_cython__(PyObject *__pyx_v_self, 
#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___pyx_state = 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("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.MatrixTypeDefinition.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_6__setstate_cython__(((struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_20MatrixTypeDefinition_6__setstate_cython__(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 1);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_MatrixTypeDefinition, (type(self), 0x8e7a8c2, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_MatrixTypeDefinition__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif___pyx_unpickle_MatrixTypeDefinition__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_MatrixTypeDefinition, (type(self), 0x8e7a8c2, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_MatrixTypeDefinition__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.MatrixTypeDefinition.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":350
 *         return MatrixType_create(self.signature, self.column_names)
 * 
 * cdef MatrixTypesTable_to_list(SdifHashTableT *t):             # <<<<<<<<<<<<<<
 *     cdef unsigned int i
 *     cdef SdifHashNT *pName
 */

static PyObject *__pyx_f_6pysdif_7_pysdif_MatrixTypesTable_to_list(SdifHashTableT *__pyx_v_t) {
  unsigned int __pyx_v_i;
  SdifHashNT *__pyx_v_pName;
  SdifMatrixTypeT *__pyx_v_matrix;
  SdifColumnDefT *__pyx_v_column_def;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_v_column_names = 0;
  PyObject *__pyx_v_signature = 0;
  struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_v_row = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  unsigned int __pyx_t_2;
  unsigned int __pyx_t_3;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  SdifHashNT *__pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("MatrixTypesTable_to_list", 1);

  /* "pysdif/_pysdif.pyx":355
 *     cdef SdifMatrixTypeT *matrix
 *     cdef SdifColumnDefT *column_def
 *     cdef list out = []             # <<<<<<<<<<<<<<
 *     cdef list column_names
 *     cdef bytes signature
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":358
 *     cdef list column_names
 *     cdef bytes signature
 *     for i in range(t.HashSize):             # <<<<<<<<<<<<<<
 *         pName = t.Table[i]
 *         while pName:
 */
  __pyx_t_2 = __pyx_v_t->HashSize;
  __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;

    /* "pysdif/_pysdif.pyx":359
 *     cdef bytes signature
 *     for i in range(t.HashSize):
 *         pName = t.Table[i]             # <<<<<<<<<<<<<<
 *         while pName:
 *             matrix = <SdifMatrixTypeT *>(pName.Data)
 */
    __pyx_v_pName = (__pyx_v_t->Table[__pyx_v_i]);

    /* "pysdif/_pysdif.pyx":360
 *     for i in range(t.HashSize):
 *         pName = t.Table[i]
 *         while pName:             # <<<<<<<<<<<<<<
 *             matrix = <SdifMatrixTypeT *>(pName.Data)
 *             if not SdifListIsEmpty(matrix.ColumnUserList):
 */
    while (1) {
      __pyx_t_5 = (__pyx_v_pName != 0);
      if (!__pyx_t_5) break;

      /* "pysdif/_pysdif.pyx":361
 *         pName = t.Table[i]
 *         while pName:
 *             matrix = <SdifMatrixTypeT *>(pName.Data)             # <<<<<<<<<<<<<<
 *             if not SdifListIsEmpty(matrix.ColumnUserList):
 *                 signature = sig2str(matrix.Signature)
 */
      __pyx_v_matrix = ((SdifMatrixTypeT *)__pyx_v_pName->Data);

      /* "pysdif/_pysdif.pyx":362
 *         while pName:
 *             matrix = <SdifMatrixTypeT *>(pName.Data)
 *             if not SdifListIsEmpty(matrix.ColumnUserList):             # <<<<<<<<<<<<<<
 *                 signature = sig2str(matrix.Signature)
 *                 column_def = <SdifColumnDefT *>SdifListGetHead(matrix.ColumnUserList)
 */
      __pyx_t_5 = (!(SdifListIsEmpty(__pyx_v_matrix->ColumnUserList) != 0));
      if (__pyx_t_5) {

        /* "pysdif/_pysdif.pyx":363
 *             matrix = <SdifMatrixTypeT *>(pName.Data)
 *             if not SdifListIsEmpty(matrix.ColumnUserList):
 *                 signature = sig2str(matrix.Signature)             # <<<<<<<<<<<<<<
 *                 column_def = <SdifColumnDefT *>SdifListGetHead(matrix.ColumnUserList)
 *                 column_names = []
 */
        __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_sig2str(__pyx_v_matrix->Signature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_XDECREF_SET(__pyx_v_signature, ((PyObject*)__pyx_t_1));
        __pyx_t_1 = 0;

        /* "pysdif/_pysdif.pyx":364
 *             if not SdifListIsEmpty(matrix.ColumnUserList):
 *                 signature = sig2str(matrix.Signature)
 *                 column_def = <SdifColumnDefT *>SdifListGetHead(matrix.ColumnUserList)             # <<<<<<<<<<<<<<
 *                 column_names = []
 *                 column_names.append(bytes(column_def.Name))
 */
        __pyx_v_column_def = ((SdifColumnDefT *)SdifListGetHead(__pyx_v_matrix->ColumnUserList));

        /* "pysdif/_pysdif.pyx":365
 *                 signature = sig2str(matrix.Signature)
 *                 column_def = <SdifColumnDefT *>SdifListGetHead(matrix.ColumnUserList)
 *                 column_names = []             # <<<<<<<<<<<<<<
 *                 column_names.append(bytes(column_def.Name))
 *                 while SdifListIsNext(matrix.ColumnUserList):
 */
        __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_XDECREF_SET(__pyx_v_column_names, ((PyObject*)__pyx_t_1));
        __pyx_t_1 = 0;

        /* "pysdif/_pysdif.pyx":366
 *                 column_def = <SdifColumnDefT *>SdifListGetHead(matrix.ColumnUserList)
 *                 column_names = []
 *                 column_names.append(bytes(column_def.Name))             # <<<<<<<<<<<<<<
 *                 while SdifListIsNext(matrix.ColumnUserList):
 *                     column_def = <SdifColumnDefT *>(SdifListGetNext(matrix.ColumnUserList))
 */
        __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_column_def->Name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 366, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_column_names, __pyx_t_6); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 366, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "pysdif/_pysdif.pyx":367
 *                 column_names = []
 *                 column_names.append(bytes(column_def.Name))
 *                 while SdifListIsNext(matrix.ColumnUserList):             # <<<<<<<<<<<<<<
 *                     column_def = <SdifColumnDefT *>(SdifListGetNext(matrix.ColumnUserList))
 *                     column_names.append(bytes(column_def.Name))
 */
        while (1) {
          __pyx_t_5 = (SdifListIsNext(__pyx_v_matrix->ColumnUserList) != 0);
          if (!__pyx_t_5) break;

          /* "pysdif/_pysdif.pyx":368
 *                 column_names.append(bytes(column_def.Name))
 *                 while SdifListIsNext(matrix.ColumnUserList):
 *                     column_def = <SdifColumnDefT *>(SdifListGetNext(matrix.ColumnUserList))             # <<<<<<<<<<<<<<
 *                     column_names.append(bytes(column_def.Name))
 *                 row = MatrixTypeDefinition(signature=signature, column_names=column_names)
 */
          __pyx_v_column_def = ((SdifColumnDefT *)SdifListGetNext(__pyx_v_matrix->ColumnUserList));

          /* "pysdif/_pysdif.pyx":369
 *                 while SdifListIsNext(matrix.ColumnUserList):
 *                     column_def = <SdifColumnDefT *>(SdifListGetNext(matrix.ColumnUserList))
 *                     column_names.append(bytes(column_def.Name))             # <<<<<<<<<<<<<<
 *                 row = MatrixTypeDefinition(signature=signature, column_names=column_names)
 *                 out.append(row)
 */
          __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_column_def->Name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_column_names, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 369, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }

        /* "pysdif/_pysdif.pyx":370
 *                     column_def = <SdifColumnDefT *>(SdifListGetNext(matrix.ColumnUserList))
 *                     column_names.append(bytes(column_def.Name))
 *                 row = MatrixTypeDefinition(signature=signature, column_names=column_names)             # <<<<<<<<<<<<<<
 *                 out.append(row)
 *             pName = pName.Next
 */
        __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_signature, __pyx_v_signature) < 0) __PYX_ERR(0, 370, __pyx_L1_error)
        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_column_names, __pyx_v_column_names) < 0) __PYX_ERR(0, 370, __pyx_L1_error)
        __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 370, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF_SET(__pyx_v_row, ((struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *)__pyx_t_6));
        __pyx_t_6 = 0;

        /* "pysdif/_pysdif.pyx":371
 *                     column_names.append(bytes(column_def.Name))
 *                 row = MatrixTypeDefinition(signature=signature, column_names=column_names)
 *                 out.append(row)             # <<<<<<<<<<<<<<
 *             pName = pName.Next
 *     return out
 */
        __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_out, ((PyObject *)__pyx_v_row)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 371, __pyx_L1_error)

        /* "pysdif/_pysdif.pyx":362
 *         while pName:
 *             matrix = <SdifMatrixTypeT *>(pName.Data)
 *             if not SdifListIsEmpty(matrix.ColumnUserList):             # <<<<<<<<<<<<<<
 *                 signature = sig2str(matrix.Signature)
 *                 column_def = <SdifColumnDefT *>SdifListGetHead(matrix.ColumnUserList)
 */
      }

      /* "pysdif/_pysdif.pyx":372
 *                 row = MatrixTypeDefinition(signature=signature, column_names=column_names)
 *                 out.append(row)
 *             pName = pName.Next             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
      __pyx_t_8 = __pyx_v_pName->Next;
      __pyx_v_pName = __pyx_t_8;
    }
  }

  /* "pysdif/_pysdif.pyx":373
 *                 out.append(row)
 *             pName = pName.Next
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef class Component:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":350
 *         return MatrixType_create(self.signature, self.column_names)
 * 
 * cdef MatrixTypesTable_to_list(SdifHashTableT *t):             # <<<<<<<<<<<<<<
 *     cdef unsigned int i
 *     cdef SdifHashNT *pName
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pysdif._pysdif.MatrixTypesTable_to_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_column_names);
  __Pyx_XDECREF(__pyx_v_signature);
  __Pyx_XDECREF((PyObject *)__pyx_v_row);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":380
 *     cdef readonly unsigned int num
 * 
 *     def __init__(self, signature, name, num=0):             # <<<<<<<<<<<<<<
 *         self.signature = asbytes(signature)
 *         self.name = asbytes(name)
 */

/* Python wrapper */
static int __pyx_pw_6pysdif_7_pysdif_9Component_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pysdif_7_pysdif_9Component_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_signature = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_num = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  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;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_signature,&__pyx_n_s_name,&__pyx_n_s_num,0};
    values[2] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_int_0));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_signature)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 380, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 380, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 380, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_num);
          if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 380, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 380, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_signature = values[0];
    __pyx_v_name = values[1];
    __pyx_v_num = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 380, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.Component.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_9Component___init__(((struct __pyx_obj_6pysdif_7_pysdif_Component *)__pyx_v_self), __pyx_v_signature, __pyx_v_name, __pyx_v_num);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pysdif_7_pysdif_9Component___init__(struct __pyx_obj_6pysdif_7_pysdif_Component *__pyx_v_self, PyObject *__pyx_v_signature, PyObject *__pyx_v_name, PyObject *__pyx_v_num) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  unsigned int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "pysdif/_pysdif.pyx":381
 * 
 *     def __init__(self, signature, name, num=0):
 *         self.signature = asbytes(signature)             # <<<<<<<<<<<<<<
 *         self.name = asbytes(name)
 *         self.num = num
 */
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_signature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->signature);
  __Pyx_DECREF(__pyx_v_self->signature);
  __pyx_v_self->signature = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":382
 *     def __init__(self, signature, name, num=0):
 *         self.signature = asbytes(signature)
 *         self.name = asbytes(name)             # <<<<<<<<<<<<<<
 *         self.num = num
 * 
 */
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":383
 *         self.signature = asbytes(signature)
 *         self.name = asbytes(name)
 *         self.num = num             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_int(__pyx_v_num); if (unlikely((__pyx_t_2 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 383, __pyx_L1_error)
  __pyx_v_self->num = __pyx_t_2;

  /* "pysdif/_pysdif.pyx":380
 *     cdef readonly unsigned int num
 * 
 *     def __init__(self, signature, name, num=0):             # <<<<<<<<<<<<<<
 *         self.signature = asbytes(signature)
 *         self.name = asbytes(name)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.Component.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":385
 *         self.num = num
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "Component(signature=%s, name=%s, num=%d)" % (
 *                self.signature, self.name, self.num)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_9Component_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_9Component_3__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_9Component_2__repr__(((struct __pyx_obj_6pysdif_7_pysdif_Component *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_9Component_2__repr__(struct __pyx_obj_6pysdif_7_pysdif_Component *__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("__repr__", 1);

  /* "pysdif/_pysdif.pyx":386
 * 
 *     def __repr__(self):
 *         return "Component(signature=%s, name=%s, num=%d)" % (             # <<<<<<<<<<<<<<
 *                self.signature, self.name, self.num)
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "pysdif/_pysdif.pyx":387
 *     def __repr__(self):
 *         return "Component(signature=%s, name=%s, num=%d)" % (
 *                self.signature, self.name, self.num)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->num); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->signature);
  __Pyx_GIVEREF(__pyx_v_self->signature);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->signature)) __PYX_ERR(0, 387, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->name);
  __Pyx_GIVEREF(__pyx_v_self->name);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->name)) __PYX_ERR(0, 387, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":386
 * 
 *     def __repr__(self):
 *         return "Component(signature=%s, name=%s, num=%d)" % (             # <<<<<<<<<<<<<<
 *                self.signature, self.name, self.num)
 * 
 */
  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Component_signature_s_name_s_num, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":385
 *         self.num = num
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "Component(signature=%s, name=%s, num=%d)" % (
 *                self.signature, self.name, self.num)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.Component.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":376
 * 
 * cdef class Component:
 *     cdef readonly bytes signature             # <<<<<<<<<<<<<<
 *     cdef readonly bytes name
 *     cdef readonly unsigned int num
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_9Component_9signature_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_9Component_9signature_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_9Component_9signature___get__(((struct __pyx_obj_6pysdif_7_pysdif_Component *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_9Component_9signature___get__(struct __pyx_obj_6pysdif_7_pysdif_Component *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->signature);
  __pyx_r = __pyx_v_self->signature;
  goto __pyx_L0;

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

/* "pysdif/_pysdif.pyx":377
 * cdef class Component:
 *     cdef readonly bytes signature
 *     cdef readonly bytes name             # <<<<<<<<<<<<<<
 *     cdef readonly unsigned int num
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_9Component_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_9Component_4name_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_9Component_4name___get__(((struct __pyx_obj_6pysdif_7_pysdif_Component *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_9Component_4name___get__(struct __pyx_obj_6pysdif_7_pysdif_Component *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->name);
  __pyx_r = __pyx_v_self->name;
  goto __pyx_L0;

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

/* "pysdif/_pysdif.pyx":378
 *     cdef readonly bytes signature
 *     cdef readonly bytes name
 *     cdef readonly unsigned int num             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, signature, name, num=0):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_9Component_3num_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_9Component_3num_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_9Component_3num___get__(((struct __pyx_obj_6pysdif_7_pysdif_Component *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_9Component_3num___get__(struct __pyx_obj_6pysdif_7_pysdif_Component *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->num); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.Component.num.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_9Component_5__reduce_cython__(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_9Component_4__reduce_cython__, "Component.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_9Component_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_9Component_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_9Component_4__reduce_cython__};
static PyObject *__pyx_pw_6pysdif_7_pysdif_9Component_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_9Component_4__reduce_cython__(((struct __pyx_obj_6pysdif_7_pysdif_Component *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_9Component_4__reduce_cython__(struct __pyx_obj_6pysdif_7_pysdif_Component *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 1);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.name, self.num, self.signature)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->num); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->name);
  __Pyx_GIVEREF(__pyx_v_self->name);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->name)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->signature);
  __Pyx_GIVEREF(__pyx_v_self->signature);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->signature)) __PYX_ERR(1, 5, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.name, self.num, self.signature)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self.name, self.num, self.signature)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.name is not None or self.signature is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.name, self.num, self.signature)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.name is not None or self.signature is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Component, (type(self), 0xdb4a2e1, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->name != ((PyObject*)Py_None));
    if (!__pyx_t_4) {
    } else {
      __pyx_t_3 = __pyx_t_4;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_4 = (__pyx_v_self->signature != ((PyObject*)Py_None));
    __pyx_t_3 = __pyx_t_4;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.name is not None or self.signature is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Component, (type(self), 0xdb4a2e1, None), state
 *     else:
 */
  if (__pyx_v_use_setstate) {

    /* "(tree fragment)":13
 *         use_setstate = self.name is not None or self.signature is not None
 *     if use_setstate:
 *         return __pyx_unpickle_Component, (type(self), 0xdb4a2e1, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Component, (type(self), 0xdb4a2e1, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_Component); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_229941985);
    __Pyx_GIVEREF(__pyx_int_229941985);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_229941985)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.name is not None or self.signature is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Component, (type(self), 0xdb4a2e1, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Component, (type(self), 0xdb4a2e1, None), state
 *     else:
 *         return __pyx_unpickle_Component, (type(self), 0xdb4a2e1, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Component__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Component); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_229941985);
    __Pyx_GIVEREF(__pyx_int_229941985);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_229941985)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pysdif._pysdif.Component.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Component, (type(self), 0xdb4a2e1, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Component__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_9Component_7__setstate_cython__(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_9Component_6__setstate_cython__, "Component.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_9Component_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_9Component_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_9Component_6__setstate_cython__};
static PyObject *__pyx_pw_6pysdif_7_pysdif_9Component_7__setstate_cython__(PyObject *__pyx_v_self, 
#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___pyx_state = 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("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.Component.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_9Component_6__setstate_cython__(((struct __pyx_obj_6pysdif_7_pysdif_Component *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_9Component_6__setstate_cython__(struct __pyx_obj_6pysdif_7_pysdif_Component *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 1);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Component, (type(self), 0xdb4a2e1, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Component__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif___pyx_unpickle_Component__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Component, (type(self), 0xdb4a2e1, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Component__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.Component.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":390
 * 
 * 
 * cdef Component Component_from_SdifComponent(SdifComponentT *c):             # <<<<<<<<<<<<<<
 *     cdef Component out = Component(sig2str(c.MtrxS), bytes(c.Name), c.Num)
 *     return out
 */

static struct __pyx_obj_6pysdif_7_pysdif_Component *__pyx_f_6pysdif_7_pysdif_Component_from_SdifComponent(SdifComponentT *__pyx_v_c) {
  struct __pyx_obj_6pysdif_7_pysdif_Component *__pyx_v_out = 0;
  struct __pyx_obj_6pysdif_7_pysdif_Component *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Component_from_SdifComponent", 1);

  /* "pysdif/_pysdif.pyx":391
 * 
 * cdef Component Component_from_SdifComponent(SdifComponentT *c):
 *     cdef Component out = Component(sig2str(c.MtrxS), bytes(c.Name), c.Num)             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_sig2str(__pyx_v_c->MtrxS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_c->Name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_SdifUInt4(__pyx_v_c->Num); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 391, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2)) __PYX_ERR(0, 391, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pysdif_7_pysdif_Component), __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_out = ((struct __pyx_obj_6pysdif_7_pysdif_Component *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":392
 * cdef Component Component_from_SdifComponent(SdifComponentT *c):
 *     cdef Component out = Component(sig2str(c.MtrxS), bytes(c.Name), c.Num)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef FrameTypesTable_to_list(SdifHashTableT *t):
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":390
 * 
 * 
 * cdef Component Component_from_SdifComponent(SdifComponentT *c):             # <<<<<<<<<<<<<<
 *     cdef Component out = Component(sig2str(c.MtrxS), bytes(c.Name), c.Num)
 *     return out
 */

  /* 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("pysdif._pysdif.Component_from_SdifComponent", __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;
}

/* "pysdif/_pysdif.pyx":394
 *     return out
 * 
 * cdef FrameTypesTable_to_list(SdifHashTableT *t):             # <<<<<<<<<<<<<<
 *     cdef unsigned int i
 *     cdef SdifHashNT *pName
 */

static PyObject *__pyx_f_6pysdif_7_pysdif_FrameTypesTable_to_list(SdifHashTableT *__pyx_v_t) {
  unsigned int __pyx_v_i;
  SdifHashNT *__pyx_v_pName;
  SdifFrameTypeT *__pyx_v_frame;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_v_components = NULL;
  PyObject *__pyx_v_signature = NULL;
  long __pyx_v_j;
  struct __pyx_obj_6pysdif_7_pysdif_Component *__pyx_v_component = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  unsigned int __pyx_t_2;
  unsigned int __pyx_t_3;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  long __pyx_t_6;
  long __pyx_t_7;
  long __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  SdifHashNT *__pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("FrameTypesTable_to_list", 1);

  /* "pysdif/_pysdif.pyx":398
 *     cdef SdifHashNT *pName
 *     cdef SdifFrameTypeT *frame
 *     cdef list out = []             # <<<<<<<<<<<<<<
 * 
 *     for i in range(t.HashSize):
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":400
 *     cdef list out = []
 * 
 *     for i in range(t.HashSize):             # <<<<<<<<<<<<<<
 *         pName = t.Table[i]
 *         while pName:
 */
  __pyx_t_2 = __pyx_v_t->HashSize;
  __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;

    /* "pysdif/_pysdif.pyx":401
 * 
 *     for i in range(t.HashSize):
 *         pName = t.Table[i]             # <<<<<<<<<<<<<<
 *         while pName:
 *             frame = <SdifFrameTypeT *>(pName.Data)
 */
    __pyx_v_pName = (__pyx_v_t->Table[__pyx_v_i]);

    /* "pysdif/_pysdif.pyx":402
 *     for i in range(t.HashSize):
 *         pName = t.Table[i]
 *         while pName:             # <<<<<<<<<<<<<<
 *             frame = <SdifFrameTypeT *>(pName.Data)
 *             if frame.NbComponentUse > 0:
 */
    while (1) {
      __pyx_t_5 = (__pyx_v_pName != 0);
      if (!__pyx_t_5) break;

      /* "pysdif/_pysdif.pyx":403
 *         pName = t.Table[i]
 *         while pName:
 *             frame = <SdifFrameTypeT *>(pName.Data)             # <<<<<<<<<<<<<<
 *             if frame.NbComponentUse > 0:
 *                 components = []
 */
      __pyx_v_frame = ((SdifFrameTypeT *)__pyx_v_pName->Data);

      /* "pysdif/_pysdif.pyx":404
 *         while pName:
 *             frame = <SdifFrameTypeT *>(pName.Data)
 *             if frame.NbComponentUse > 0:             # <<<<<<<<<<<<<<
 *                 components = []
 *                 signature = sig2str(frame.Signature)
 */
      __pyx_t_5 = (__pyx_v_frame->NbComponentUse > 0);
      if (__pyx_t_5) {

        /* "pysdif/_pysdif.pyx":405
 *             frame = <SdifFrameTypeT *>(pName.Data)
 *             if frame.NbComponentUse > 0:
 *                 components = []             # <<<<<<<<<<<<<<
 *                 signature = sig2str(frame.Signature)
 *                 for j in range(frame.NbComponent - frame.NbComponentUse + 1, frame.NbComponent + 1):
 */
        __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 405, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_XDECREF_SET(__pyx_v_components, ((PyObject*)__pyx_t_1));
        __pyx_t_1 = 0;

        /* "pysdif/_pysdif.pyx":406
 *             if frame.NbComponentUse > 0:
 *                 components = []
 *                 signature = sig2str(frame.Signature)             # <<<<<<<<<<<<<<
 *                 for j in range(frame.NbComponent - frame.NbComponentUse + 1, frame.NbComponent + 1):
 *                     component = Component_from_SdifComponent(SdifFrameTypeGetNthComponent(frame, j))
 */
        __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_sig2str(__pyx_v_frame->Signature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 406, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_XDECREF_SET(__pyx_v_signature, ((PyObject*)__pyx_t_1));
        __pyx_t_1 = 0;

        /* "pysdif/_pysdif.pyx":407
 *                 components = []
 *                 signature = sig2str(frame.Signature)
 *                 for j in range(frame.NbComponent - frame.NbComponentUse + 1, frame.NbComponent + 1):             # <<<<<<<<<<<<<<
 *                     component = Component_from_SdifComponent(SdifFrameTypeGetNthComponent(frame, j))
 *                     components.append(component)
 */
        __pyx_t_6 = (__pyx_v_frame->NbComponent + 1);
        __pyx_t_7 = __pyx_t_6;
        for (__pyx_t_8 = ((__pyx_v_frame->NbComponent - __pyx_v_frame->NbComponentUse) + 1); __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
          __pyx_v_j = __pyx_t_8;

          /* "pysdif/_pysdif.pyx":408
 *                 signature = sig2str(frame.Signature)
 *                 for j in range(frame.NbComponent - frame.NbComponentUse + 1, frame.NbComponent + 1):
 *                     component = Component_from_SdifComponent(SdifFrameTypeGetNthComponent(frame, j))             # <<<<<<<<<<<<<<
 *                     components.append(component)
 *                 out.append(FrameTypeDefinition(signature, components))
 */
          __pyx_t_1 = ((PyObject *)__pyx_f_6pysdif_7_pysdif_Component_from_SdifComponent(SdifFrameTypeGetNthComponent(__pyx_v_frame, __pyx_v_j))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_XDECREF_SET(__pyx_v_component, ((struct __pyx_obj_6pysdif_7_pysdif_Component *)__pyx_t_1));
          __pyx_t_1 = 0;

          /* "pysdif/_pysdif.pyx":409
 *                 for j in range(frame.NbComponent - frame.NbComponentUse + 1, frame.NbComponent + 1):
 *                     component = Component_from_SdifComponent(SdifFrameTypeGetNthComponent(frame, j))
 *                     components.append(component)             # <<<<<<<<<<<<<<
 *                 out.append(FrameTypeDefinition(signature, components))
 *             pName = pName.Next
 */
          __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_components, ((PyObject *)__pyx_v_component)); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 409, __pyx_L1_error)
        }

        /* "pysdif/_pysdif.pyx":410
 *                     component = Component_from_SdifComponent(SdifFrameTypeGetNthComponent(frame, j))
 *                     components.append(component)
 *                 out.append(FrameTypeDefinition(signature, components))             # <<<<<<<<<<<<<<
 *             pName = pName.Next
 *     return out
 */
        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 410, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_signature);
        __Pyx_GIVEREF(__pyx_v_signature);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_signature)) __PYX_ERR(0, 410, __pyx_L1_error);
        __Pyx_INCREF(__pyx_v_components);
        __Pyx_GIVEREF(__pyx_v_components);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_components)) __PYX_ERR(0, 410, __pyx_L1_error);
        __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pysdif_7_pysdif_FrameTypeDefinition), __pyx_t_1, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 410, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_out, __pyx_t_10); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 410, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

        /* "pysdif/_pysdif.pyx":404
 *         while pName:
 *             frame = <SdifFrameTypeT *>(pName.Data)
 *             if frame.NbComponentUse > 0:             # <<<<<<<<<<<<<<
 *                 components = []
 *                 signature = sig2str(frame.Signature)
 */
      }

      /* "pysdif/_pysdif.pyx":411
 *                     components.append(component)
 *                 out.append(FrameTypeDefinition(signature, components))
 *             pName = pName.Next             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
      __pyx_t_11 = __pyx_v_pName->Next;
      __pyx_v_pName = __pyx_t_11;
    }
  }

  /* "pysdif/_pysdif.pyx":412
 *                 out.append(FrameTypeDefinition(signature, components))
 *             pName = pName.Next
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef class FrameTypeDefinition:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":394
 *     return out
 * 
 * cdef FrameTypesTable_to_list(SdifHashTableT *t):             # <<<<<<<<<<<<<<
 *     cdef unsigned int i
 *     cdef SdifHashNT *pName
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pysdif._pysdif.FrameTypesTable_to_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_components);
  __Pyx_XDECREF(__pyx_v_signature);
  __Pyx_XDECREF((PyObject *)__pyx_v_component);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":418
 *     cdef readonly list components
 * 
 *     def __init__(self, signature, components):             # <<<<<<<<<<<<<<
 *         """
 *         Object representing a 1FTD
 */

/* Python wrapper */
static int __pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
PyDoc_STRVAR(__pyx_doc_6pysdif_7_pysdif_19FrameTypeDefinition___init__, "\n        Object representing a 1FTD\n\n        Args:\n            signature (str):  The signature of the frame\n            components: list[Component] - A list of components\n        ");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_6pysdif_7_pysdif_19FrameTypeDefinition___init__;
#endif
static int __pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_signature = 0;
  PyObject *__pyx_v_components = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_signature,&__pyx_n_s_components,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_signature)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 418, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_components)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 418, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 418, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 418, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
      values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    }
    __pyx_v_signature = values[0];
    __pyx_v_components = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 418, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.FrameTypeDefinition.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_19FrameTypeDefinition___init__(((struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *)__pyx_v_self), __pyx_v_signature, __pyx_v_components);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6pysdif_7_pysdif_19FrameTypeDefinition_8__init___2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pysdif/_pysdif.pyx":429
 *         assert len(signature) == 4
 *         assert isinstance(components, list)
 *         assert all(isinstance(c, Component) for c in components)             # <<<<<<<<<<<<<<
 *         self.signature = asbytes(signature)
 *         self.components = components
 */

static PyObject *__pyx_pf_6pysdif_7_pysdif_19FrameTypeDefinition_8__init___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
  struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct__genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct__genexpr *)__pyx_tp_new_6pysdif_7_pysdif___pyx_scope_struct__genexpr(__pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct__genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct__genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 429, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6pysdif_7_pysdif_19FrameTypeDefinition_8__init___2generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr, __pyx_n_s_pysdif__pysdif); if (unlikely(!gen)) __PYX_ERR(0, 429, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysdif._pysdif.FrameTypeDefinition.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_6pysdif_7_pysdif_19FrameTypeDefinition_8__init___2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct__genexpr *__pyx_cur_scope = ((struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct__genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 429, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 429, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 429, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 429, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 429, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 429, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 429, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 429, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 429, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 429, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_c);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_c, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v_c, __pyx_ptype_6pysdif_7_pysdif_Component); 
    __pyx_t_6 = (!__pyx_t_5);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;
  }
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_Generator_Replace_StopIteration(0);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":418
 *     cdef readonly list components
 * 
 *     def __init__(self, signature, components):             # <<<<<<<<<<<<<<
 *         """
 *         Object representing a 1FTD
 */

static int __pyx_pf_6pysdif_7_pysdif_19FrameTypeDefinition___init__(struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *__pyx_v_self, PyObject *__pyx_v_signature, PyObject *__pyx_v_components) {
  PyObject *__pyx_gb_6pysdif_7_pysdif_19FrameTypeDefinition_8__init___2generator = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "pysdif/_pysdif.pyx":426
 *             components: list[Component] - A list of components
 *         """
 *         assert isinstance(signature, (str, bytes))             # <<<<<<<<<<<<<<
 *         assert len(signature) == 4
 *         assert isinstance(components, list)
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_2 = PyString_Check(__pyx_v_signature); 
    if (!__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_2 = PyBytes_Check(__pyx_v_signature); 
    __pyx_t_1 = __pyx_t_2;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!__pyx_t_1)) {
      __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
      __PYX_ERR(0, 426, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 426, __pyx_L1_error)
  #endif

  /* "pysdif/_pysdif.pyx":427
 *         """
 *         assert isinstance(signature, (str, bytes))
 *         assert len(signature) == 4             # <<<<<<<<<<<<<<
 *         assert isinstance(components, list)
 *         assert all(isinstance(c, Component) for c in components)
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_3 = PyObject_Length(__pyx_v_signature); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 427, __pyx_L1_error)
    __pyx_t_1 = (__pyx_t_3 == 4);
    if (unlikely(!__pyx_t_1)) {
      __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
      __PYX_ERR(0, 427, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 427, __pyx_L1_error)
  #endif

  /* "pysdif/_pysdif.pyx":428
 *         assert isinstance(signature, (str, bytes))
 *         assert len(signature) == 4
 *         assert isinstance(components, list)             # <<<<<<<<<<<<<<
 *         assert all(isinstance(c, Component) for c in components)
 *         self.signature = asbytes(signature)
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = PyList_Check(__pyx_v_components); 
    if (unlikely(!__pyx_t_1)) {
      __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
      __PYX_ERR(0, 428, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 428, __pyx_L1_error)
  #endif

  /* "pysdif/_pysdif.pyx":429
 *         assert len(signature) == 4
 *         assert isinstance(components, list)
 *         assert all(isinstance(c, Component) for c in components)             # <<<<<<<<<<<<<<
 *         self.signature = asbytes(signature)
 *         self.components = components
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __pyx_pf_6pysdif_7_pysdif_19FrameTypeDefinition_8__init___genexpr(NULL, __pyx_v_components); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 429, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) {
      __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
      __PYX_ERR(0, 429, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 429, __pyx_L1_error)
  #endif

  /* "pysdif/_pysdif.pyx":430
 *         assert isinstance(components, list)
 *         assert all(isinstance(c, Component) for c in components)
 *         self.signature = asbytes(signature)             # <<<<<<<<<<<<<<
 *         self.components = components
 * 
 */
  __pyx_t_5 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_signature); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __Pyx_GOTREF(__pyx_v_self->signature);
  __Pyx_DECREF(__pyx_v_self->signature);
  __pyx_v_self->signature = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":431
 *         assert all(isinstance(c, Component) for c in components)
 *         self.signature = asbytes(signature)
 *         self.components = components             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  if (!(likely(PyList_CheckExact(__pyx_v_components))||((__pyx_v_components) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_components))) __PYX_ERR(0, 431, __pyx_L1_error)
  __pyx_t_5 = __pyx_v_components;
  __Pyx_INCREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __Pyx_GOTREF(__pyx_v_self->components);
  __Pyx_DECREF(__pyx_v_self->components);
  __pyx_v_self->components = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":418
 *     cdef readonly list components
 * 
 *     def __init__(self, signature, components):             # <<<<<<<<<<<<<<
 *         """
 *         Object representing a 1FTD
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pysdif._pysdif.FrameTypeDefinition.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_gb_6pysdif_7_pysdif_19FrameTypeDefinition_8__init___2generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":433
 *         self.components = components
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "1FTD(signature='%s', components=%s)" % (self.signature, self.components)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_3__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_19FrameTypeDefinition_2__repr__(((struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_19FrameTypeDefinition_2__repr__(struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *__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("__repr__", 1);

  /* "pysdif/_pysdif.pyx":434
 * 
 *     def __repr__(self):
 *         return "1FTD(signature='%s', components=%s)" % (self.signature, self.components)             # <<<<<<<<<<<<<<
 * 
 * # ----------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->signature);
  __Pyx_GIVEREF(__pyx_v_self->signature);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->signature)) __PYX_ERR(0, 434, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->components);
  __Pyx_GIVEREF(__pyx_v_self->components);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->components)) __PYX_ERR(0, 434, __pyx_L1_error);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_1FTD_signature_s_components_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 434, __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;

  /* "pysdif/_pysdif.pyx":433
 *         self.components = components
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "1FTD(signature='%s', components=%s)" % (self.signature, self.components)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.FrameTypeDefinition.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":415
 * 
 * cdef class FrameTypeDefinition:
 *     cdef readonly bytes signature             # <<<<<<<<<<<<<<
 *     cdef readonly list components
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_9signature_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_9signature_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_19FrameTypeDefinition_9signature___get__(((struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_19FrameTypeDefinition_9signature___get__(struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->signature);
  __pyx_r = __pyx_v_self->signature;
  goto __pyx_L0;

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

/* "pysdif/_pysdif.pyx":416
 * cdef class FrameTypeDefinition:
 *     cdef readonly bytes signature
 *     cdef readonly list components             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, signature, components):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_10components_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_10components_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_19FrameTypeDefinition_10components___get__(((struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_19FrameTypeDefinition_10components___get__(struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->components);
  __pyx_r = __pyx_v_self->components;
  goto __pyx_L0;

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_5__reduce_cython__(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_19FrameTypeDefinition_4__reduce_cython__, "FrameTypeDefinition.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_19FrameTypeDefinition_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_19FrameTypeDefinition_4__reduce_cython__};
static PyObject *__pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_19FrameTypeDefinition_4__reduce_cython__(((struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_19FrameTypeDefinition_4__reduce_cython__(struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 1);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.components, self.signature)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->components);
  __Pyx_GIVEREF(__pyx_v_self->components);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->components)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->signature);
  __Pyx_GIVEREF(__pyx_v_self->signature);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->signature)) __PYX_ERR(1, 5, __pyx_L1_error);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.components, self.signature)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self.components, self.signature)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  if (__pyx_t_2) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.components is not None or self.signature is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.components, self.signature)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.components is not None or self.signature is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_FrameTypeDefinition, (type(self), 0x10e6e84, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->components != ((PyObject*)Py_None));
    if (!__pyx_t_4) {
    } else {
      __pyx_t_2 = __pyx_t_4;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_4 = (__pyx_v_self->signature != ((PyObject*)Py_None));
    __pyx_t_2 = __pyx_t_4;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_2;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.components is not None or self.signature is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_FrameTypeDefinition, (type(self), 0x10e6e84, None), state
 *     else:
 */
  if (__pyx_v_use_setstate) {

    /* "(tree fragment)":13
 *         use_setstate = self.components is not None or self.signature is not None
 *     if use_setstate:
 *         return __pyx_unpickle_FrameTypeDefinition, (type(self), 0x10e6e84, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_FrameTypeDefinition, (type(self), 0x10e6e84, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_FrameTypeDefiniti); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_17723012);
    __Pyx_GIVEREF(__pyx_int_17723012);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_17723012)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __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)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.components is not None or self.signature is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_FrameTypeDefinition, (type(self), 0x10e6e84, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_FrameTypeDefinition, (type(self), 0x10e6e84, None), state
 *     else:
 *         return __pyx_unpickle_FrameTypeDefinition, (type(self), 0x10e6e84, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_FrameTypeDefinition__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_FrameTypeDefiniti); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_17723012);
    __Pyx_GIVEREF(__pyx_int_17723012);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_17723012)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pysdif._pysdif.FrameTypeDefinition.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FrameTypeDefinition, (type(self), 0x10e6e84, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FrameTypeDefinition__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_7__setstate_cython__(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_19FrameTypeDefinition_6__setstate_cython__, "FrameTypeDefinition.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_19FrameTypeDefinition_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_19FrameTypeDefinition_6__setstate_cython__};
static PyObject *__pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_7__setstate_cython__(PyObject *__pyx_v_self, 
#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___pyx_state = 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("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.FrameTypeDefinition.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_19FrameTypeDefinition_6__setstate_cython__(((struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_19FrameTypeDefinition_6__setstate_cython__(struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 1);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_FrameTypeDefinition, (type(self), 0x10e6e84, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_FrameTypeDefinition__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif___pyx_unpickle_FrameTypeDefinition__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FrameTypeDefinition, (type(self), 0x10e6e84, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FrameTypeDefinition__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.FrameTypeDefinition.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":447
 * }
 * 
 * def read_sdiftypes():             # <<<<<<<<<<<<<<
 *     """
 *     Retrieves predefined types definitions parsed from SdifTypes.STYP
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_5read_sdiftypes(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6pysdif_7_pysdif_4read_sdiftypes, "read_sdiftypes()\n\n    Retrieves predefined types definitions parsed from SdifTypes.STYP\n\n    Returns: \n        a tuple (frametypes, matrixtypes)\n    ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_5read_sdiftypes = {"read_sdiftypes", (PyCFunction)__pyx_pw_6pysdif_7_pysdif_5read_sdiftypes, METH_NOARGS, __pyx_doc_6pysdif_7_pysdif_4read_sdiftypes};
static PyObject *__pyx_pw_6pysdif_7_pysdif_5read_sdiftypes(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_sdiftypes (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_4read_sdiftypes(__pyx_self);

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_4read_sdiftypes(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_frametypes = NULL;
  PyObject *__pyx_v_matrixtypes = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("read_sdiftypes", 1);

  /* "pysdif/_pysdif.pyx":454
 *         a tuple (frametypes, matrixtypes)
 *     """
 *     sdif_init()             # <<<<<<<<<<<<<<
 *     frametypes = FrameTypesTable_to_list(gSdifPredefinedTypes.FrameTypesTable)
 *     matrixtypes = MatrixTypesTable_to_list(gSdifPredefinedTypes.MatrixTypesTable)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sdif_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":455
 *     """
 *     sdif_init()
 *     frametypes = FrameTypesTable_to_list(gSdifPredefinedTypes.FrameTypesTable)             # <<<<<<<<<<<<<<
 *     matrixtypes = MatrixTypesTable_to_list(gSdifPredefinedTypes.MatrixTypesTable)
 *     return frametypes, matrixtypes
 */
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_FrameTypesTable_to_list(gSdifPredefinedTypes->FrameTypesTable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_frametypes = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":456
 *     sdif_init()
 *     frametypes = FrameTypesTable_to_list(gSdifPredefinedTypes.FrameTypesTable)
 *     matrixtypes = MatrixTypesTable_to_list(gSdifPredefinedTypes.MatrixTypesTable)             # <<<<<<<<<<<<<<
 *     return frametypes, matrixtypes
 * 
 */
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_MatrixTypesTable_to_list(gSdifPredefinedTypes->MatrixTypesTable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_matrixtypes = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":457
 *     frametypes = FrameTypesTable_to_list(gSdifPredefinedTypes.FrameTypesTable)
 *     matrixtypes = MatrixTypesTable_to_list(gSdifPredefinedTypes.MatrixTypesTable)
 *     return frametypes, matrixtypes             # <<<<<<<<<<<<<<
 * 
 * def _frametypes_populate():
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_frametypes);
  __Pyx_GIVEREF(__pyx_v_frametypes);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_frametypes)) __PYX_ERR(0, 457, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_matrixtypes);
  __Pyx_GIVEREF(__pyx_v_matrixtypes);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_matrixtypes)) __PYX_ERR(0, 457, __pyx_L1_error);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":447
 * }
 * 
 * def read_sdiftypes():             # <<<<<<<<<<<<<<
 *     """
 *     Retrieves predefined types definitions parsed from SdifTypes.STYP
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysdif._pysdif.read_sdiftypes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_frametypes);
  __Pyx_XDECREF(__pyx_v_matrixtypes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":459
 *     return frametypes, matrixtypes
 * 
 * def _frametypes_populate():             # <<<<<<<<<<<<<<
 *     frametypeslist, matrixtypeslist = read_sdiftypes()
 *     frametypes = {f.signature: f.components for f in frametypeslist}
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_7_frametypes_populate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6pysdif_7_pysdif_6_frametypes_populate, "_frametypes_populate()");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_7_frametypes_populate = {"_frametypes_populate", (PyCFunction)__pyx_pw_6pysdif_7_pysdif_7_frametypes_populate, METH_NOARGS, __pyx_doc_6pysdif_7_pysdif_6_frametypes_populate};
static PyObject *__pyx_pw_6pysdif_7_pysdif_7_frametypes_populate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_frametypes_populate (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6_frametypes_populate(__pyx_self);

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6_frametypes_populate(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_frametypeslist = NULL;
  PyObject *__pyx_v_matrixtypeslist = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_frametypes = NULL;
  PyObject *__pyx_v_matrixtypes = NULL;
  PyObject *__pyx_v_allframetypes = NULL;
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_v_components = NULL;
  PyObject *__pyx_v_allmatrixtypes = NULL;
  PyObject *__pyx_v_matrixsig = NULL;
  PyObject *__pyx_v_column_names = NULL;
  PyObject *__pyx_8genexpr2__pyx_v_f = NULL;
  PyObject *__pyx_8genexpr3__pyx_v_m = NULL;
  PyObject *__pyx_8genexpr4__pyx_v_comp = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_frametypes_populate", 1);

  /* "pysdif/_pysdif.pyx":460
 * 
 * def _frametypes_populate():
 *     frametypeslist, matrixtypeslist = read_sdiftypes()             # <<<<<<<<<<<<<<
 *     frametypes = {f.signature: f.components for f in frametypeslist}
 *     matrixtypes = {m.signature: m.column_names for m in matrixtypeslist}
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_read_sdiftypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 460, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
    index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 460, __pyx_L1_error)
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 460, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_frametypeslist = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_matrixtypeslist = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pysdif/_pysdif.pyx":461
 * def _frametypes_populate():
 *     frametypeslist, matrixtypeslist = read_sdiftypes()
 *     frametypes = {f.signature: f.components for f in frametypeslist}             # <<<<<<<<<<<<<<
 *     matrixtypes = {m.signature: m.column_names for m in matrixtypeslist}
 *     allframetypes = SDIF_PREDEFINEDTYPES['frametypes']
 */
  { /* enter inner scope */
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_v_frametypeslist)) || PyTuple_CheckExact(__pyx_v_frametypeslist)) {
      __pyx_t_3 = __pyx_v_frametypeslist; __Pyx_INCREF(__pyx_t_3);
      __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_frametypeslist); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 461, __pyx_L7_error)
    }
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 461, __pyx_L7_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 461, __pyx_L7_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 461, __pyx_L7_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 461, __pyx_L7_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_8(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 461, __pyx_L7_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_f, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr2__pyx_v_f, __pyx_n_s_signature); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr2__pyx_v_f, __pyx_n_s_components); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 461, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_t_2, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 461, __pyx_L7_error)
      __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_XDECREF(__pyx_8genexpr2__pyx_v_f); __pyx_8genexpr2__pyx_v_f = 0;
    goto __pyx_L11_exit_scope;
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_f); __pyx_8genexpr2__pyx_v_f = 0;
    goto __pyx_L1_error;
    __pyx_L11_exit_scope:;
  } /* exit inner scope */
  __pyx_v_frametypes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":462
 *     frametypeslist, matrixtypeslist = read_sdiftypes()
 *     frametypes = {f.signature: f.components for f in frametypeslist}
 *     matrixtypes = {m.signature: m.column_names for m in matrixtypeslist}             # <<<<<<<<<<<<<<
 *     allframetypes = SDIF_PREDEFINEDTYPES['frametypes']
 *     for f in frametypeslist:
 */
  { /* enter inner scope */
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L14_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_v_matrixtypeslist)) || PyTuple_CheckExact(__pyx_v_matrixtypeslist)) {
      __pyx_t_3 = __pyx_v_matrixtypeslist; __Pyx_INCREF(__pyx_t_3);
      __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_matrixtypeslist); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 462, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 462, __pyx_L14_error)
    }
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 462, __pyx_L14_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 462, __pyx_L14_error)
          #else
          __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 462, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 462, __pyx_L14_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 462, __pyx_L14_error)
          #else
          __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 462, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_8(__pyx_t_3);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 462, __pyx_L14_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_m, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr3__pyx_v_m, __pyx_n_s_signature); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 462, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr3__pyx_v_m, __pyx_n_s_column_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_t_5, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 462, __pyx_L14_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_m); __pyx_8genexpr3__pyx_v_m = 0;
    goto __pyx_L18_exit_scope;
    __pyx_L14_error:;
    __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_m); __pyx_8genexpr3__pyx_v_m = 0;
    goto __pyx_L1_error;
    __pyx_L18_exit_scope:;
  } /* exit inner scope */
  __pyx_v_matrixtypes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":463
 *     frametypes = {f.signature: f.components for f in frametypeslist}
 *     matrixtypes = {m.signature: m.column_names for m in matrixtypeslist}
 *     allframetypes = SDIF_PREDEFINEDTYPES['frametypes']             # <<<<<<<<<<<<<<
 *     for f in frametypeslist:
 *         components = [b" ".join((comp.signature, comp.name)) for comp in f.components]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SDIF_PREDEFINEDTYPES); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_frametypes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_allframetypes = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pysdif/_pysdif.pyx":464
 *     matrixtypes = {m.signature: m.column_names for m in matrixtypeslist}
 *     allframetypes = SDIF_PREDEFINEDTYPES['frametypes']
 *     for f in frametypeslist:             # <<<<<<<<<<<<<<
 *         components = [b" ".join((comp.signature, comp.name)) for comp in f.components]
 *         allframetypes[asbytes(f.signature)] = components
 */
  if (likely(PyList_CheckExact(__pyx_v_frametypeslist)) || PyTuple_CheckExact(__pyx_v_frametypeslist)) {
    __pyx_t_3 = __pyx_v_frametypeslist; __Pyx_INCREF(__pyx_t_3);
    __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_frametypeslist); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 464, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 464, __pyx_L1_error)
          #endif
          if (__pyx_t_7 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 464, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 464, __pyx_L1_error)
          #endif
          if (__pyx_t_7 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 464, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_8(__pyx_t_3);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 464, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pysdif/_pysdif.pyx":465
 *     allframetypes = SDIF_PREDEFINEDTYPES['frametypes']
 *     for f in frametypeslist:
 *         components = [b" ".join((comp.signature, comp.name)) for comp in f.components]             # <<<<<<<<<<<<<<
 *         allframetypes[asbytes(f.signature)] = components
 *     allmatrixtypes = SDIF_PREDEFINEDTYPES['matrixtypes']
 */
    { /* enter inner scope */
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L23_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_components); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L23_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
        __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5);
        __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 465, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 465, __pyx_L23_error)
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      for (;;) {
        if (likely(!__pyx_t_10)) {
          if (likely(PyList_CheckExact(__pyx_t_5))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 465, __pyx_L23_error)
              #endif
              if (__pyx_t_9 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 465, __pyx_L23_error)
            #else
            __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L23_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 465, __pyx_L23_error)
              #endif
              if (__pyx_t_9 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 465, __pyx_L23_error)
            #else
            __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L23_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          }
        } else {
          __pyx_t_2 = __pyx_t_10(__pyx_t_5);
          if (unlikely(!__pyx_t_2)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 465, __pyx_L23_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_comp, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr4__pyx_v_comp, __pyx_n_s_signature); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr4__pyx_v_comp, __pyx_n_s_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 465, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 465, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_2);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2)) __PYX_ERR(0, 465, __pyx_L23_error);
        __Pyx_GIVEREF(__pyx_t_11);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_11)) __PYX_ERR(0, 465, __pyx_L23_error);
        __pyx_t_2 = 0;
        __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_PyBytes_Join(__pyx_kp_b__4, __pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 465, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 465, __pyx_L23_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_comp); __pyx_8genexpr4__pyx_v_comp = 0;
      goto __pyx_L27_exit_scope;
      __pyx_L23_error:;
      __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_comp); __pyx_8genexpr4__pyx_v_comp = 0;
      goto __pyx_L1_error;
      __pyx_L27_exit_scope:;
    } /* exit inner scope */
    __Pyx_XDECREF_SET(__pyx_v_components, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pysdif/_pysdif.pyx":466
 *     for f in frametypeslist:
 *         components = [b" ".join((comp.signature, comp.name)) for comp in f.components]
 *         allframetypes[asbytes(f.signature)] = components             # <<<<<<<<<<<<<<
 *     allmatrixtypes = SDIF_PREDEFINEDTYPES['matrixtypes']
 *     for matrixsig, column_names in matrixtypes.items():
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_signature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely((PyObject_SetItem(__pyx_v_allframetypes, __pyx_t_5, __pyx_v_components) < 0))) __PYX_ERR(0, 466, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pysdif/_pysdif.pyx":464
 *     matrixtypes = {m.signature: m.column_names for m in matrixtypeslist}
 *     allframetypes = SDIF_PREDEFINEDTYPES['frametypes']
 *     for f in frametypeslist:             # <<<<<<<<<<<<<<
 *         components = [b" ".join((comp.signature, comp.name)) for comp in f.components]
 *         allframetypes[asbytes(f.signature)] = components
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysdif/_pysdif.pyx":467
 *         components = [b" ".join((comp.signature, comp.name)) for comp in f.components]
 *         allframetypes[asbytes(f.signature)] = components
 *     allmatrixtypes = SDIF_PREDEFINEDTYPES['matrixtypes']             # <<<<<<<<<<<<<<
 *     for matrixsig, column_names in matrixtypes.items():
 *         allmatrixtypes[asbytes(matrixsig)] = b", ".join(column_names)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SDIF_PREDEFINEDTYPES); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_matrixtypes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_allmatrixtypes = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":468
 *         allframetypes[asbytes(f.signature)] = components
 *     allmatrixtypes = SDIF_PREDEFINEDTYPES['matrixtypes']
 *     for matrixsig, column_names in matrixtypes.items():             # <<<<<<<<<<<<<<
 *         allmatrixtypes[asbytes(matrixsig)] = b", ".join(column_names)
 * 
 */
  __pyx_t_7 = 0;
  __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_matrixtypes, 1, __pyx_n_s_items, (&__pyx_t_9), (&__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __pyx_t_5 = __pyx_t_3;
  __pyx_t_3 = 0;
  while (1) {
    __pyx_t_13 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_9, &__pyx_t_7, &__pyx_t_3, &__pyx_t_1, NULL, __pyx_t_4);
    if (unlikely(__pyx_t_13 == 0)) break;
    if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_matrixsig, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_column_names, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pysdif/_pysdif.pyx":469
 *     allmatrixtypes = SDIF_PREDEFINEDTYPES['matrixtypes']
 *     for matrixsig, column_names in matrixtypes.items():
 *         allmatrixtypes[asbytes(matrixsig)] = b", ".join(column_names)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_1 = __Pyx_PyBytes_Join(__pyx_kp_b__5, __pyx_v_column_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_matrixsig); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely((PyObject_SetItem(__pyx_v_allmatrixtypes, __pyx_t_3, __pyx_t_1) < 0))) __PYX_ERR(0, 469, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":459
 *     return frametypes, matrixtypes
 * 
 * def _frametypes_populate():             # <<<<<<<<<<<<<<
 *     frametypeslist, matrixtypeslist = read_sdiftypes()
 *     frametypes = {f.signature: f.components for f in frametypeslist}
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("pysdif._pysdif._frametypes_populate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_frametypeslist);
  __Pyx_XDECREF(__pyx_v_matrixtypeslist);
  __Pyx_XDECREF(__pyx_v_frametypes);
  __Pyx_XDECREF(__pyx_v_matrixtypes);
  __Pyx_XDECREF(__pyx_v_allframetypes);
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_components);
  __Pyx_XDECREF(__pyx_v_allmatrixtypes);
  __Pyx_XDECREF(__pyx_v_matrixsig);
  __Pyx_XDECREF(__pyx_v_column_names);
  __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_f);
  __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_m);
  __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_comp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":472
 * 
 * 
 * def predefined_frametypes():             # <<<<<<<<<<<<<<
 *     """
 *     Returns a dict of predefined sdif frame types
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_9predefined_frametypes(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6pysdif_7_pysdif_8predefined_frametypes, "predefined_frametypes()\n\n    Returns a dict of predefined sdif frame types\n\n    Returns:\n        (dict[str: list[str]]) A dict (framesig: components)\n    ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_9predefined_frametypes = {"predefined_frametypes", (PyCFunction)__pyx_pw_6pysdif_7_pysdif_9predefined_frametypes, METH_NOARGS, __pyx_doc_6pysdif_7_pysdif_8predefined_frametypes};
static PyObject *__pyx_pw_6pysdif_7_pysdif_9predefined_frametypes(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("predefined_frametypes (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8predefined_frametypes(__pyx_self);

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8predefined_frametypes(CYTHON_UNUSED PyObject *__pyx_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("predefined_frametypes", 1);

  /* "pysdif/_pysdif.pyx":479
 *         (dict[str: list[str]]) A dict (framesig: components)
 *     """
 *     return SDIF_PREDEFINEDTYPES['frametypes']             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SDIF_PREDEFINEDTYPES); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_frametypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 479, __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;

  /* "pysdif/_pysdif.pyx":472
 * 
 * 
 * def predefined_frametypes():             # <<<<<<<<<<<<<<
 *     """
 *     Returns a dict of predefined sdif frame types
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.predefined_frametypes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":482
 * 
 * 
 * def predefined_matrixtypes():             # <<<<<<<<<<<<<<
 *     """
 *     Returns a list of predefined sdif matrix types
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_11predefined_matrixtypes(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6pysdif_7_pysdif_10predefined_matrixtypes, "predefined_matrixtypes()\n\n    Returns a list of predefined sdif matrix types\n\n    Returns:\n        (dict[str, list[str]) A dict (matrisig: column_names)\n    ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_11predefined_matrixtypes = {"predefined_matrixtypes", (PyCFunction)__pyx_pw_6pysdif_7_pysdif_11predefined_matrixtypes, METH_NOARGS, __pyx_doc_6pysdif_7_pysdif_10predefined_matrixtypes};
static PyObject *__pyx_pw_6pysdif_7_pysdif_11predefined_matrixtypes(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("predefined_matrixtypes (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_10predefined_matrixtypes(__pyx_self);

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_10predefined_matrixtypes(CYTHON_UNUSED PyObject *__pyx_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("predefined_matrixtypes", 1);

  /* "pysdif/_pysdif.pyx":489
 *         (dict[str, list[str]) A dict (matrisig: column_names)
 *     """
 *     return SDIF_PREDEFINEDTYPES['matrixtypes']             # <<<<<<<<<<<<<<
 * 
 * # ----------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SDIF_PREDEFINEDTYPES); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_matrixtypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __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;

  /* "pysdif/_pysdif.pyx":482
 * 
 * 
 * def predefined_matrixtypes():             # <<<<<<<<<<<<<<
 *     """
 *     Returns a list of predefined sdif matrix types
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.predefined_matrixtypes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":493
 * # ----------------------------------------------------------------------
 * 
 * def _find_sdiftypes():             # <<<<<<<<<<<<<<
 * 
 *     def get_packaged_sdiftypes():
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_13_find_sdiftypes(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6pysdif_7_pysdif_12_find_sdiftypes, "_find_sdiftypes()");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_13_find_sdiftypes = {"_find_sdiftypes", (PyCFunction)__pyx_pw_6pysdif_7_pysdif_13_find_sdiftypes, METH_NOARGS, __pyx_doc_6pysdif_7_pysdif_12_find_sdiftypes};
static PyObject *__pyx_pw_6pysdif_7_pysdif_13_find_sdiftypes(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_find_sdiftypes (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_12_find_sdiftypes(__pyx_self);

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

/* "pysdif/_pysdif.pyx":495
 * def _find_sdiftypes():
 * 
 *     def get_packaged_sdiftypes():             # <<<<<<<<<<<<<<
 *         try:
 *             thisfile = __file__
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_15_find_sdiftypes_1get_packaged_sdiftypes(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_15_find_sdiftypes_1get_packaged_sdiftypes = {"get_packaged_sdiftypes", (PyCFunction)__pyx_pw_6pysdif_7_pysdif_15_find_sdiftypes_1get_packaged_sdiftypes, METH_NOARGS, 0};
static PyObject *__pyx_pw_6pysdif_7_pysdif_15_find_sdiftypes_1get_packaged_sdiftypes(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_packaged_sdiftypes (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_15_find_sdiftypes_get_packaged_sdiftypes(__pyx_self);

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_15_find_sdiftypes_get_packaged_sdiftypes(CYTHON_UNUSED PyObject *__pyx_self) {
  CYTHON_UNUSED PyObject *__pyx_v_thisfile = NULL;
  PyObject *__pyx_v_datadir = NULL;
  PyObject *__pyx_v_sdiftypes_data = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_packaged_sdiftypes", 1);

  /* "pysdif/_pysdif.pyx":496
 * 
 *     def get_packaged_sdiftypes():
 *         try:             # <<<<<<<<<<<<<<
 *             thisfile = __file__
 *         except NameError:
 */
  {
    __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:*/ {

      /* "pysdif/_pysdif.pyx":497
 *     def get_packaged_sdiftypes():
 *         try:
 *             thisfile = __file__             # <<<<<<<<<<<<<<
 *         except NameError:
 *             return None
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_file); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 497, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_thisfile = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "pysdif/_pysdif.pyx":496
 * 
 *     def get_packaged_sdiftypes():
 *         try:             # <<<<<<<<<<<<<<
 *             thisfile = __file__
 *         except NameError:
 */
    }
    __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_4); __pyx_t_4 = 0;

    /* "pysdif/_pysdif.pyx":498
 *         try:
 *             thisfile = __file__
 *         except NameError:             # <<<<<<<<<<<<<<
 *             return None
 *         datadir = os.path.join(os.path.split(__file__)[0], "data")
 */
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError);
    if (__pyx_t_5) {
      __Pyx_AddTraceback("pysdif._pysdif._find_sdiftypes.get_packaged_sdiftypes", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 498, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "pysdif/_pysdif.pyx":499
 *             thisfile = __file__
 *         except NameError:
 *             return None             # <<<<<<<<<<<<<<
 *         datadir = os.path.join(os.path.split(__file__)[0], "data")
 *         sdiftypes_data = os.path.join(datadir, "SdifTypes.STYP")
 */
      __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_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "pysdif/_pysdif.pyx":496
 * 
 *     def get_packaged_sdiftypes():
 *         try:             # <<<<<<<<<<<<<<
 *             thisfile = __file__
 *         except NameError:
 */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L8_try_end:;
  }

  /* "pysdif/_pysdif.pyx":500
 *         except NameError:
 *             return None
 *         datadir = os.path.join(os.path.split(__file__)[0], "data")             # <<<<<<<<<<<<<<
 *         sdiftypes_data = os.path.join(datadir, "SdifTypes.STYP")
 *         if os.path.exists(sdiftypes_data):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_join); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_os); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_path); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_file); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_9};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_8, __pyx_n_s_data};
    __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_datadir = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "pysdif/_pysdif.pyx":501
 *             return None
 *         datadir = os.path.join(os.path.split(__file__)[0], "data")
 *         sdiftypes_data = os.path.join(datadir, "SdifTypes.STYP")             # <<<<<<<<<<<<<<
 *         if os.path.exists(sdiftypes_data):
 *             return sdiftypes_data
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_path); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_join); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_datadir, __pyx_kp_s_SdifTypes_STYP};
    __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_sdiftypes_data = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "pysdif/_pysdif.pyx":502
 *         datadir = os.path.join(os.path.split(__file__)[0], "data")
 *         sdiftypes_data = os.path.join(datadir, "SdifTypes.STYP")
 *         if os.path.exists(sdiftypes_data):             # <<<<<<<<<<<<<<
 *             return sdiftypes_data
 *         return None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_path); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_exists); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_sdiftypes_data};
    __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_11) {

    /* "pysdif/_pysdif.pyx":503
 *         sdiftypes_data = os.path.join(datadir, "SdifTypes.STYP")
 *         if os.path.exists(sdiftypes_data):
 *             return sdiftypes_data             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_sdiftypes_data);
    __pyx_r = __pyx_v_sdiftypes_data;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":502
 *         datadir = os.path.join(os.path.split(__file__)[0], "data")
 *         sdiftypes_data = os.path.join(datadir, "SdifTypes.STYP")
 *         if os.path.exists(sdiftypes_data):             # <<<<<<<<<<<<<<
 *             return sdiftypes_data
 *         return None
 */
  }

  /* "pysdif/_pysdif.pyx":504
 *         if os.path.exists(sdiftypes_data):
 *             return sdiftypes_data
 *         return None             # <<<<<<<<<<<<<<
 * 
 *     pl = platform.system()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":495
 * def _find_sdiftypes():
 * 
 *     def get_packaged_sdiftypes():             # <<<<<<<<<<<<<<
 *         try:
 *             thisfile = __file__
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pysdif._pysdif._find_sdiftypes.get_packaged_sdiftypes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_thisfile);
  __Pyx_XDECREF(__pyx_v_datadir);
  __Pyx_XDECREF(__pyx_v_sdiftypes_data);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":493
 * # ----------------------------------------------------------------------
 * 
 * def _find_sdiftypes():             # <<<<<<<<<<<<<<
 * 
 *     def get_packaged_sdiftypes():
 */

static PyObject *__pyx_pf_6pysdif_7_pysdif_12_find_sdiftypes(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_get_packaged_sdiftypes = 0;
  PyObject *__pyx_v_pl = NULL;
  PyObject *__pyx_v_paths = NULL;
  PyObject *__pyx_v_warnings = NULL;
  PyObject *__pyx_v_p = NULL;
  PyObject *__pyx_v_p2 = NULL;
  PyObject *__pyx_v_packaged_sdiftypes = NULL;
  PyObject *__pyx_8genexpr5__pyx_v_p = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_find_sdiftypes", 1);

  /* "pysdif/_pysdif.pyx":495
 * def _find_sdiftypes():
 * 
 *     def get_packaged_sdiftypes():             # <<<<<<<<<<<<<<
 *         try:
 *             thisfile = __file__
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_15_find_sdiftypes_1get_packaged_sdiftypes, 0, __pyx_n_s_find_sdiftypes_locals_get_packa, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_get_packaged_sdiftypes = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":506
 *         return None
 * 
 *     pl = platform.system()             # <<<<<<<<<<<<<<
 *     if pl == "Linux":
 *         paths = [".", "/usr/local/share", "/usr/share", "~/.local/share"]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_platform); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_system); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_pl = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":507
 * 
 *     pl = platform.system()
 *     if pl == "Linux":             # <<<<<<<<<<<<<<
 *         paths = [".", "/usr/local/share", "/usr/share", "~/.local/share"]
 *     elif pl == "Windows":
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_pl, __pyx_n_s_Linux, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 507, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pysdif/_pysdif.pyx":508
 *     pl = platform.system()
 *     if pl == "Linux":
 *         paths = [".", "/usr/local/share", "/usr/share", "~/.local/share"]             # <<<<<<<<<<<<<<
 *     elif pl == "Windows":
 *         paths = ["."]
 */
    __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_kp_s__8);
    __Pyx_GIVEREF(__pyx_kp_s__8);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s__8)) __PYX_ERR(0, 508, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_s_usr_local_share);
    __Pyx_GIVEREF(__pyx_kp_s_usr_local_share);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_kp_s_usr_local_share)) __PYX_ERR(0, 508, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_s_usr_share);
    __Pyx_GIVEREF(__pyx_kp_s_usr_share);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_kp_s_usr_share)) __PYX_ERR(0, 508, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_s_local_share);
    __Pyx_GIVEREF(__pyx_kp_s_local_share);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_kp_s_local_share)) __PYX_ERR(0, 508, __pyx_L1_error);
    __pyx_v_paths = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pysdif/_pysdif.pyx":507
 * 
 *     pl = platform.system()
 *     if pl == "Linux":             # <<<<<<<<<<<<<<
 *         paths = [".", "/usr/local/share", "/usr/share", "~/.local/share"]
 *     elif pl == "Windows":
 */
    goto __pyx_L3;
  }

  /* "pysdif/_pysdif.pyx":509
 *     if pl == "Linux":
 *         paths = [".", "/usr/local/share", "/usr/share", "~/.local/share"]
 *     elif pl == "Windows":             # <<<<<<<<<<<<<<
 *         paths = ["."]
 *     elif pl == "Darwin":
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_pl, __pyx_n_s_Windows, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 509, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pysdif/_pysdif.pyx":510
 *         paths = [".", "/usr/local/share", "/usr/share", "~/.local/share"]
 *     elif pl == "Windows":
 *         paths = ["."]             # <<<<<<<<<<<<<<
 *     elif pl == "Darwin":
 *         paths = [".", "/usr/local/share", "/usr/share", "~/.local/share"]
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_kp_s__8);
    __Pyx_GIVEREF(__pyx_kp_s__8);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s__8)) __PYX_ERR(0, 510, __pyx_L1_error);
    __pyx_v_paths = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pysdif/_pysdif.pyx":509
 *     if pl == "Linux":
 *         paths = [".", "/usr/local/share", "/usr/share", "~/.local/share"]
 *     elif pl == "Windows":             # <<<<<<<<<<<<<<
 *         paths = ["."]
 *     elif pl == "Darwin":
 */
    goto __pyx_L3;
  }

  /* "pysdif/_pysdif.pyx":511
 *     elif pl == "Windows":
 *         paths = ["."]
 *     elif pl == "Darwin":             # <<<<<<<<<<<<<<
 *         paths = [".", "/usr/local/share", "/usr/share", "~/.local/share"]
 *     else:
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_pl, __pyx_n_s_Darwin, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 511, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pysdif/_pysdif.pyx":512
 *         paths = ["."]
 *     elif pl == "Darwin":
 *         paths = [".", "/usr/local/share", "/usr/share", "~/.local/share"]             # <<<<<<<<<<<<<<
 *     else:
 *         import warnings
 */
    __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_kp_s__8);
    __Pyx_GIVEREF(__pyx_kp_s__8);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s__8)) __PYX_ERR(0, 512, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_s_usr_local_share);
    __Pyx_GIVEREF(__pyx_kp_s_usr_local_share);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_kp_s_usr_local_share)) __PYX_ERR(0, 512, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_s_usr_share);
    __Pyx_GIVEREF(__pyx_kp_s_usr_share);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_kp_s_usr_share)) __PYX_ERR(0, 512, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_s_local_share);
    __Pyx_GIVEREF(__pyx_kp_s_local_share);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_kp_s_local_share)) __PYX_ERR(0, 512, __pyx_L1_error);
    __pyx_v_paths = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pysdif/_pysdif.pyx":511
 *     elif pl == "Windows":
 *         paths = ["."]
 *     elif pl == "Darwin":             # <<<<<<<<<<<<<<
 *         paths = [".", "/usr/local/share", "/usr/share", "~/.local/share"]
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pysdif/_pysdif.pyx":514
 *         paths = [".", "/usr/local/share", "/usr/share", "~/.local/share"]
 *     else:
 *         import warnings             # <<<<<<<<<<<<<<
 *         warnings.warn("Platform unknown")
 *         return ""
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_warnings, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_warnings = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pysdif/_pysdif.pyx":515
 *     else:
 *         import warnings
 *         warnings.warn("Platform unknown")             # <<<<<<<<<<<<<<
 *         return ""
 *     paths = [os.path.abspath(os.path.expanduser(p)) for p in paths]
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_warnings, __pyx_n_s_warn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_s_Platform_unknown};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysdif/_pysdif.pyx":516
 *         import warnings
 *         warnings.warn("Platform unknown")
 *         return ""             # <<<<<<<<<<<<<<
 *     paths = [os.path.abspath(os.path.expanduser(p)) for p in paths]
 *     for p in paths:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_s__10);
    __pyx_r = __pyx_kp_s__10;
    goto __pyx_L0;
  }
  __pyx_L3:;

  /* "pysdif/_pysdif.pyx":517
 *         warnings.warn("Platform unknown")
 *         return ""
 *     paths = [os.path.abspath(os.path.expanduser(p)) for p in paths]             # <<<<<<<<<<<<<<
 *     for p in paths:
 *         p2 = os.path.join(p, "SdifTypes.STYP")
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_v_paths; __Pyx_INCREF(__pyx_t_3);
    __pyx_t_6 = 0;
    for (;;) {
      {
        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 517, __pyx_L6_error)
        #endif
        if (__pyx_t_6 >= __pyx_temp) break;
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 517, __pyx_L6_error)
      #else
      __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 517, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_p, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_os); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 517, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_path); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 517, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_abspath); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 517, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_os); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 517, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_path); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 517, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_expanduser); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 517, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_8genexpr5__pyx_v_p};
        __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 517, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __pyx_t_9 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_8};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 517, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 517, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_p); __pyx_8genexpr5__pyx_v_p = 0;
    goto __pyx_L10_exit_scope;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_p); __pyx_8genexpr5__pyx_v_p = 0;
    goto __pyx_L1_error;
    __pyx_L10_exit_scope:;
  } /* exit inner scope */
  __Pyx_DECREF_SET(__pyx_v_paths, ((PyObject*)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":518
 *         return ""
 *     paths = [os.path.abspath(os.path.expanduser(p)) for p in paths]
 *     for p in paths:             # <<<<<<<<<<<<<<
 *         p2 = os.path.join(p, "SdifTypes.STYP")
 *         if os.path.exists(p2):
 */
  __pyx_t_1 = __pyx_v_paths; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_MACROS
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 518, __pyx_L1_error)
      #endif
      if (__pyx_t_6 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 518, __pyx_L1_error)
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pysdif/_pysdif.pyx":519
 *     paths = [os.path.abspath(os.path.expanduser(p)) for p in paths]
 *     for p in paths:
 *         p2 = os.path.join(p, "SdifTypes.STYP")             # <<<<<<<<<<<<<<
 *         if os.path.exists(p2):
 *             return p2
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_join); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_p, __pyx_kp_s_SdifTypes_STYP};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 519, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_p2, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pysdif/_pysdif.pyx":520
 *     for p in paths:
 *         p2 = os.path.join(p, "SdifTypes.STYP")
 *         if os.path.exists(p2):             # <<<<<<<<<<<<<<
 *             return p2
 *     else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_exists); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_p2};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 520, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 520, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_5) {

      /* "pysdif/_pysdif.pyx":521
 *         p2 = os.path.join(p, "SdifTypes.STYP")
 *         if os.path.exists(p2):
 *             return p2             # <<<<<<<<<<<<<<
 *     else:
 *         packaged_sdiftypes = get_packaged_sdiftypes()
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_p2);
      __pyx_r = __pyx_v_p2;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pysdif/_pysdif.pyx":520
 *     for p in paths:
 *         p2 = os.path.join(p, "SdifTypes.STYP")
 *         if os.path.exists(p2):             # <<<<<<<<<<<<<<
 *             return p2
 *     else:
 */
    }

    /* "pysdif/_pysdif.pyx":518
 *         return ""
 *     paths = [os.path.abspath(os.path.expanduser(p)) for p in paths]
 *     for p in paths:             # <<<<<<<<<<<<<<
 *         p2 = os.path.join(p, "SdifTypes.STYP")
 *         if os.path.exists(p2):
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  /*else*/ {

    /* "pysdif/_pysdif.pyx":523
 *             return p2
 *     else:
 *         packaged_sdiftypes = get_packaged_sdiftypes()             # <<<<<<<<<<<<<<
 *         if packaged_sdiftypes is not None:
 *             return packaged_sdiftypes
 */
    __pyx_t_1 = __pyx_pf_6pysdif_7_pysdif_15_find_sdiftypes_get_packaged_sdiftypes(__pyx_v_get_packaged_sdiftypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_packaged_sdiftypes = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pysdif/_pysdif.pyx":524
 *     else:
 *         packaged_sdiftypes = get_packaged_sdiftypes()
 *         if packaged_sdiftypes is not None:             # <<<<<<<<<<<<<<
 *             return packaged_sdiftypes
 *     return ""
 */
    __pyx_t_5 = (__pyx_v_packaged_sdiftypes != Py_None);
    if (__pyx_t_5) {

      /* "pysdif/_pysdif.pyx":525
 *         packaged_sdiftypes = get_packaged_sdiftypes()
 *         if packaged_sdiftypes is not None:
 *             return packaged_sdiftypes             # <<<<<<<<<<<<<<
 *     return ""
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_packaged_sdiftypes);
      __pyx_r = __pyx_v_packaged_sdiftypes;
      goto __pyx_L0;

      /* "pysdif/_pysdif.pyx":524
 *     else:
 *         packaged_sdiftypes = get_packaged_sdiftypes()
 *         if packaged_sdiftypes is not None:             # <<<<<<<<<<<<<<
 *             return packaged_sdiftypes
 *     return ""
 */
    }
  }

  /* "pysdif/_pysdif.pyx":526
 *         if packaged_sdiftypes is not None:
 *             return packaged_sdiftypes
 *     return ""             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_kp_s__10);
  __pyx_r = __pyx_kp_s__10;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":493
 * # ----------------------------------------------------------------------
 * 
 * def _find_sdiftypes():             # <<<<<<<<<<<<<<
 * 
 *     def get_packaged_sdiftypes():
 */

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pysdif._pysdif._find_sdiftypes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_get_packaged_sdiftypes);
  __Pyx_XDECREF(__pyx_v_pl);
  __Pyx_XDECREF(__pyx_v_paths);
  __Pyx_XDECREF(__pyx_v_warnings);
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XDECREF(__pyx_v_p2);
  __Pyx_XDECREF(__pyx_v_packaged_sdiftypes);
  __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_p);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":529
 * 
 * 
 * def sdif_init(sdiftypes_path=None):             # <<<<<<<<<<<<<<
 *     """
 *     Initialize the sdif library
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_15sdif_init(PyObject *__pyx_self, 
#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_6pysdif_7_pysdif_14sdif_init, "sdif_init(sdiftypes_path=None)\n\n    Initialize the sdif library \n\n    This function is called automatically whenever an instance of\n    SdifFile is created. Calling this function explicitely only has an\n    effect if done previous to any usage of the `pysdif` library, to \n    point the library to a `SdifTypes.STYP` file. This file is used\n    by the underlying code as a library for known SDIF frames and matrix\n    definitions. \n\n    If called without arguments, the default paths will be searched. If an empty \n    string is given, no `SdifTypes.STYP` will be used\n\n    Args:\n        sdiftypes_path (str): The path to `SdifTypes.STYP`, or None to search\n            in default paths\n\n    Returns:\n       (bool) True if the library was initialized, False if it was already \n       initialized. In such a case, the path passed will not have any effect\n    ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_15sdif_init = {"sdif_init", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_15sdif_init, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_14sdif_init};
static PyObject *__pyx_pw_6pysdif_7_pysdif_15sdif_init(PyObject *__pyx_self, 
#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_sdiftypes_path = 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("sdif_init (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_sdiftypes_path,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sdiftypes_path);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 529, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "sdif_init") < 0)) __PYX_ERR(0, 529, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_sdiftypes_path = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sdif_init", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 529, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.sdif_init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_14sdif_init(__pyx_self, __pyx_v_sdiftypes_path);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_14sdif_init(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sdiftypes_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  const char* __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sdif_init", 0);
  __Pyx_INCREF(__pyx_v_sdiftypes_path);

  /* "pysdif/_pysdif.pyx":552
 *     """
 *     global _g_sdif_initiated
 *     import_array()             # <<<<<<<<<<<<<<
 *     if _g_sdif_initiated == 0:
 *         _g_sdif_initiated = 1
 */
  import_array();

  /* "pysdif/_pysdif.pyx":553
 *     global _g_sdif_initiated
 *     import_array()
 *     if _g_sdif_initiated == 0:             # <<<<<<<<<<<<<<
 *         _g_sdif_initiated = 1
 *         if sdiftypes_path is None:
 */
  __pyx_t_1 = (__pyx_v_6pysdif_7_pysdif__g_sdif_initiated == 0);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":554
 *     import_array()
 *     if _g_sdif_initiated == 0:
 *         _g_sdif_initiated = 1             # <<<<<<<<<<<<<<
 *         if sdiftypes_path is None:
 *             sdiftypes_path = _find_sdiftypes()
 */
    __pyx_v_6pysdif_7_pysdif__g_sdif_initiated = 1;

    /* "pysdif/_pysdif.pyx":555
 *     if _g_sdif_initiated == 0:
 *         _g_sdif_initiated = 1
 *         if sdiftypes_path is None:             # <<<<<<<<<<<<<<
 *             sdiftypes_path = _find_sdiftypes()
 *         if os.path.exists(sdiftypes_path):
 */
    __pyx_t_1 = (__pyx_v_sdiftypes_path == Py_None);
    if (__pyx_t_1) {

      /* "pysdif/_pysdif.pyx":556
 *         _g_sdif_initiated = 1
 *         if sdiftypes_path is None:
 *             sdiftypes_path = _find_sdiftypes()             # <<<<<<<<<<<<<<
 *         if os.path.exists(sdiftypes_path):
 *             SdifGenInitCond(asbytes(sdiftypes_path))
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_find_sdiftypes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 556, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_sdiftypes_path, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pysdif/_pysdif.pyx":555
 *     if _g_sdif_initiated == 0:
 *         _g_sdif_initiated = 1
 *         if sdiftypes_path is None:             # <<<<<<<<<<<<<<
 *             sdiftypes_path = _find_sdiftypes()
 *         if os.path.exists(sdiftypes_path):
 */
    }

    /* "pysdif/_pysdif.pyx":557
 *         if sdiftypes_path is None:
 *             sdiftypes_path = _find_sdiftypes()
 *         if os.path.exists(sdiftypes_path):             # <<<<<<<<<<<<<<
 *             SdifGenInitCond(asbytes(sdiftypes_path))
 *             logger.info("Sdif initialized using path: %s" % sdiftypes_path)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_exists); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_sdiftypes_path};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 557, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "pysdif/_pysdif.pyx":558
 *             sdiftypes_path = _find_sdiftypes()
 *         if os.path.exists(sdiftypes_path):
 *             SdifGenInitCond(asbytes(sdiftypes_path))             # <<<<<<<<<<<<<<
 *             logger.info("Sdif initialized using path: %s" % sdiftypes_path)
 *         else:
 */
      __pyx_t_2 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_sdiftypes_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(__pyx_t_2 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
        __PYX_ERR(0, 558, __pyx_L1_error)
      }
      __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_t_2); if (unlikely((__pyx_t_6 == ((const char*)NULL)) && PyErr_Occurred())) __PYX_ERR(0, 558, __pyx_L1_error)
      SdifGenInitCond(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pysdif/_pysdif.pyx":559
 *         if os.path.exists(sdiftypes_path):
 *             SdifGenInitCond(asbytes(sdiftypes_path))
 *             logger.info("Sdif initialized using path: %s" % sdiftypes_path)             # <<<<<<<<<<<<<<
 *         else:
 *             SdifGenInitCond(b"")
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Sdif_initialized_using_path_s, __pyx_v_sdiftypes_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pysdif/_pysdif.pyx":557
 *         if sdiftypes_path is None:
 *             sdiftypes_path = _find_sdiftypes()
 *         if os.path.exists(sdiftypes_path):             # <<<<<<<<<<<<<<
 *             SdifGenInitCond(asbytes(sdiftypes_path))
 *             logger.info("Sdif initialized using path: %s" % sdiftypes_path)
 */
      goto __pyx_L5;
    }

    /* "pysdif/_pysdif.pyx":561
 *             logger.info("Sdif initialized using path: %s" % sdiftypes_path)
 *         else:
 *             SdifGenInitCond(b"")             # <<<<<<<<<<<<<<
 *             logger.info("Sdif initialized without SdifTypes.")
 *         _frametypes_populate()
 */
    /*else*/ {
      SdifGenInitCond(((const char*)""));

      /* "pysdif/_pysdif.pyx":562
 *         else:
 *             SdifGenInitCond(b"")
 *             logger.info("Sdif initialized without SdifTypes.")             # <<<<<<<<<<<<<<
 *         _frametypes_populate()
 *     return bool(_g_sdif_initiated)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 562, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_Sdif_initialized_without_SdifTyp};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_L5:;

    /* "pysdif/_pysdif.pyx":563
 *             SdifGenInitCond(b"")
 *             logger.info("Sdif initialized without SdifTypes.")
 *         _frametypes_populate()             # <<<<<<<<<<<<<<
 *     return bool(_g_sdif_initiated)
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_frametypes_populate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysdif/_pysdif.pyx":553
 *     global _g_sdif_initiated
 *     import_array()
 *     if _g_sdif_initiated == 0:             # <<<<<<<<<<<<<<
 *         _g_sdif_initiated = 1
 *         if sdiftypes_path is None:
 */
  }

  /* "pysdif/_pysdif.pyx":564
 *             logger.info("Sdif initialized without SdifTypes.")
 *         _frametypes_populate()
 *     return bool(_g_sdif_initiated)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_6pysdif_7_pysdif__g_sdif_initiated); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 564, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":529
 * 
 * 
 * def sdif_init(sdiftypes_path=None):             # <<<<<<<<<<<<<<
 *     """
 *     Initialize the sdif library
 */

  /* 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_7);
  __Pyx_AddTraceback("pysdif._pysdif.sdif_init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sdiftypes_path);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":567
 * 
 * 
 * def sdif_cleanup():             # <<<<<<<<<<<<<<
 *     SdifGenKill()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_17sdif_cleanup(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6pysdif_7_pysdif_16sdif_cleanup, "sdif_cleanup()");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_17sdif_cleanup = {"sdif_cleanup", (PyCFunction)__pyx_pw_6pysdif_7_pysdif_17sdif_cleanup, METH_NOARGS, __pyx_doc_6pysdif_7_pysdif_16sdif_cleanup};
static PyObject *__pyx_pw_6pysdif_7_pysdif_17sdif_cleanup(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sdif_cleanup (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_16sdif_cleanup(__pyx_self);

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_16sdif_cleanup(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sdif_cleanup", 1);

  /* "pysdif/_pysdif.pyx":568
 * 
 * def sdif_cleanup():
 *     SdifGenKill()             # <<<<<<<<<<<<<<
 * 
 * # Forward declarations
 */
  SdifGenKill();

  /* "pysdif/_pysdif.pyx":567
 * 
 * 
 * def sdif_cleanup():             # <<<<<<<<<<<<<<
 *     SdifGenKill()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":610
 * )
 * 
 * def framestatus2str(int status):             # <<<<<<<<<<<<<<
 *     if 0 <= status < 6:
 *         return _framestatus2str[status]
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_19framestatus2str(PyObject *__pyx_self, 
#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_6pysdif_7_pysdif_18framestatus2str, "framestatus2str(int status)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_19framestatus2str = {"framestatus2str", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_19framestatus2str, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_18framestatus2str};
static PyObject *__pyx_pw_6pysdif_7_pysdif_19framestatus2str(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_status;
  #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("framestatus2str (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_status,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_status)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 610, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "framestatus2str") < 0)) __PYX_ERR(0, 610, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_status = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_status == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 610, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("framestatus2str", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 610, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.framestatus2str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_18framestatus2str(__pyx_self, __pyx_v_status);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_18framestatus2str(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_status) {
  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("framestatus2str", 1);

  /* "pysdif/_pysdif.pyx":611
 * 
 * def framestatus2str(int status):
 *     if 0 <= status < 6:             # <<<<<<<<<<<<<<
 *         return _framestatus2str[status]
 *     return None
 */
  __pyx_t_1 = (0 <= __pyx_v_status);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_status < 6);
  }
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":612
 * def framestatus2str(int status):
 *     if 0 <= status < 6:
 *         return _framestatus2str[status]             # <<<<<<<<<<<<<<
 *     return None
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(__pyx_v_6pysdif_7_pysdif__framestatus2str == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 612, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_6pysdif_7_pysdif__framestatus2str, __pyx_v_status, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":611
 * 
 * def framestatus2str(int status):
 *     if 0 <= status < 6:             # <<<<<<<<<<<<<<
 *         return _framestatus2str[status]
 *     return None
 */
  }

  /* "pysdif/_pysdif.pyx":613
 *     if 0 <= status < 6:
 *         return _framestatus2str[status]
 *     return None             # <<<<<<<<<<<<<<
 * 
 * cdef tuple _matrixstatus2str = (
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":610
 * )
 * 
 * def framestatus2str(int status):             # <<<<<<<<<<<<<<
 *     if 0 <= status < 6:
 *         return _framestatus2str[status]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.framestatus2str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":624
 * )
 * 
 * def matrixstatus2str(int status):             # <<<<<<<<<<<<<<
 *     """
 *     Return a string identifier for a matrix status.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_21matrixstatus2str(PyObject *__pyx_self, 
#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_6pysdif_7_pysdif_20matrixstatus2str, "matrixstatus2str(int status)\n\n    Return a string identifier for a matrix status. \n\n    Args:\n        status (int): The matrix status \n\n    Returns:\n        (str) A corresponding string identifier\n\n    ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_21matrixstatus2str = {"matrixstatus2str", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_21matrixstatus2str, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_20matrixstatus2str};
static PyObject *__pyx_pw_6pysdif_7_pysdif_21matrixstatus2str(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_status;
  #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("matrixstatus2str (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_status,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_status)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 624, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "matrixstatus2str") < 0)) __PYX_ERR(0, 624, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_status = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_status == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 624, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("matrixstatus2str", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 624, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.matrixstatus2str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_20matrixstatus2str(__pyx_self, __pyx_v_status);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_20matrixstatus2str(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_status) {
  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("matrixstatus2str", 1);

  /* "pysdif/_pysdif.pyx":635
 * 
 *     """
 *     if 0 <= status < 6:             # <<<<<<<<<<<<<<
 *         return _matrixstatus2str[status]
 *     return None
 */
  __pyx_t_1 = (0 <= __pyx_v_status);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_status < 6);
  }
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":636
 *     """
 *     if 0 <= status < 6:
 *         return _matrixstatus2str[status]             # <<<<<<<<<<<<<<
 *     return None
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(__pyx_v_6pysdif_7_pysdif__matrixstatus2str == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 636, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_6pysdif_7_pysdif__matrixstatus2str, __pyx_v_status, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":635
 * 
 *     """
 *     if 0 <= status < 6:             # <<<<<<<<<<<<<<
 *         return _matrixstatus2str[status]
 *     return None
 */
  }

  /* "pysdif/_pysdif.pyx":637
 *     if 0 <= status < 6:
 *         return _matrixstatus2str[status]
 *     return None             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":624
 * )
 * 
 * def matrixstatus2str(int status):             # <<<<<<<<<<<<<<
 *     """
 *     Return a string identifier for a matrix status.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.matrixstatus2str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":675
 *     cdef int _valid
 * 
 *     def __cinit__(self, SdifFile source):             # <<<<<<<<<<<<<<
 *         if source is not None:
 *             self.source = source
 */

/* Python wrapper */
static int __pyx_pw_6pysdif_7_pysdif_6Matrix_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pysdif_7_pysdif_6Matrix_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_source = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_source)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 675, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 675, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    }
    __pyx_v_source = ((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 675, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.Matrix.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_source), __pyx_ptype_6pysdif_7_pysdif_SdifFile, 1, "source", 0))) __PYX_ERR(0, 675, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6Matrix___cinit__(((struct __pyx_obj_6pysdif_7_pysdif_Matrix *)__pyx_v_self), __pyx_v_source);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pysdif_7_pysdif_6Matrix___cinit__(struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self, struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_source) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  SdifFileT *__pyx_t_2;
  __Pyx_RefNannySetupContext("__cinit__", 1);

  /* "pysdif/_pysdif.pyx":676
 * 
 *     def __cinit__(self, SdifFile source):
 *         if source is not None:             # <<<<<<<<<<<<<<
 *             self.source = source
 *             self.source_this = source.this
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_source) != Py_None);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":677
 *     def __cinit__(self, SdifFile source):
 *         if source is not None:
 *             self.source = source             # <<<<<<<<<<<<<<
 *             self.source_this = source.this
 *             self.data = None
 */
    __Pyx_INCREF((PyObject *)__pyx_v_source);
    __Pyx_GIVEREF((PyObject *)__pyx_v_source);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->source);
    __Pyx_DECREF((PyObject *)__pyx_v_self->source);
    __pyx_v_self->source = __pyx_v_source;

    /* "pysdif/_pysdif.pyx":678
 *         if source is not None:
 *             self.source = source
 *             self.source_this = source.this             # <<<<<<<<<<<<<<
 *             self.data = None
 *             self._signature = 0
 */
    __pyx_t_2 = __pyx_v_source->this;
    __pyx_v_self->source_this = __pyx_t_2;

    /* "pysdif/_pysdif.pyx":679
 *             self.source = source
 *             self.source_this = source.this
 *             self.data = None             # <<<<<<<<<<<<<<
 *             self._signature = 0
 *             self._status = eMatrixHeaderRead
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->data);
    __Pyx_DECREF((PyObject *)__pyx_v_self->data);
    __pyx_v_self->data = ((PyArrayObject *)Py_None);

    /* "pysdif/_pysdif.pyx":680
 *             self.source_this = source.this
 *             self.data = None
 *             self._signature = 0             # <<<<<<<<<<<<<<
 *             self._status = eMatrixHeaderRead
 *         else:
 */
    __pyx_v_self->_signature = 0;

    /* "pysdif/_pysdif.pyx":681
 *             self.data = None
 *             self._signature = 0
 *             self._status = eMatrixHeaderRead             # <<<<<<<<<<<<<<
 *         else:
 *             self.source_this = NULL
 */
    __pyx_v_self->_status = __pyx_e_6pysdif_7_pysdif_eMatrixHeaderRead;

    /* "pysdif/_pysdif.pyx":676
 * 
 *     def __cinit__(self, SdifFile source):
 *         if source is not None:             # <<<<<<<<<<<<<<
 *             self.source = source
 *             self.source_this = source.this
 */
    goto __pyx_L3;
  }

  /* "pysdif/_pysdif.pyx":683
 *             self._status = eMatrixHeaderRead
 *         else:
 *             self.source_this = NULL             # <<<<<<<<<<<<<<
 *             self._status = eMatrixOffline
 * 
 */
  /*else*/ {
    __pyx_v_self->source_this = NULL;

    /* "pysdif/_pysdif.pyx":684
 *         else:
 *             self.source_this = NULL
 *             self._status = eMatrixOffline             # <<<<<<<<<<<<<<
 * 
 *     property rows:
 */
    __pyx_v_self->_status = __pyx_e_6pysdif_7_pysdif_eMatrixOffline;
  }
  __pyx_L3:;

  /* "pysdif/_pysdif.pyx":675
 *     cdef int _valid
 * 
 *     def __cinit__(self, SdifFile source):             # <<<<<<<<<<<<<<
 *         if source is not None:
 *             self.source = source
 */

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

/* "pysdif/_pysdif.pyx":687
 * 
 *     property rows:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.source_this:
 *                 return self.source_this.CurrMtrxH.NbRow
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_4rows_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_4rows_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6Matrix_4rows___get__(((struct __pyx_obj_6pysdif_7_pysdif_Matrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_4rows___get__(struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysdif/_pysdif.pyx":688
 *     property rows:
 *         def __get__(self):
 *             if self.source_this:             # <<<<<<<<<<<<<<
 *                 return self.source_this.CurrMtrxH.NbRow
 *             else:
 */
  __pyx_t_1 = (__pyx_v_self->source_this != 0);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":689
 *         def __get__(self):
 *             if self.source_this:
 *                 return self.source_this.CurrMtrxH.NbRow             # <<<<<<<<<<<<<<
 *             else:
 *                 return len(self.data)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_SdifUInt4(__pyx_v_self->source_this->CurrMtrxH->NbRow); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 689, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":688
 *     property rows:
 *         def __get__(self):
 *             if self.source_this:             # <<<<<<<<<<<<<<
 *                 return self.source_this.CurrMtrxH.NbRow
 *             else:
 */
  }

  /* "pysdif/_pysdif.pyx":691
 *                 return self.source_this.CurrMtrxH.NbRow
 *             else:
 *                 return len(self.data)             # <<<<<<<<<<<<<<
 * 
 *     property cols:
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = ((PyObject *)__pyx_v_self->data);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 691, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 691, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "pysdif/_pysdif.pyx":687
 * 
 *     property rows:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.source_this:
 *                 return self.source_this.CurrMtrxH.NbRow
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.Matrix.rows.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":694
 * 
 *     property cols:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.source_this:
 *                 return self.source_this.CurrMtrxH.NbCol
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_4cols_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_4cols_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6Matrix_4cols___get__(((struct __pyx_obj_6pysdif_7_pysdif_Matrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_4cols___get__(struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysdif/_pysdif.pyx":695
 *     property cols:
 *         def __get__(self):
 *             if self.source_this:             # <<<<<<<<<<<<<<
 *                 return self.source_this.CurrMtrxH.NbCol
 *             else:
 */
  __pyx_t_1 = (__pyx_v_self->source_this != 0);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":696
 *         def __get__(self):
 *             if self.source_this:
 *                 return self.source_this.CurrMtrxH.NbCol             # <<<<<<<<<<<<<<
 *             else:
 *                 return len(self.data[0])
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_SdifUInt4(__pyx_v_self->source_this->CurrMtrxH->NbCol); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":695
 *     property cols:
 *         def __get__(self):
 *             if self.source_this:             # <<<<<<<<<<<<<<
 *                 return self.source_this.CurrMtrxH.NbCol
 *             else:
 */
  }

  /* "pysdif/_pysdif.pyx":698
 *                 return self.source_this.CurrMtrxH.NbCol
 *             else:
 *                 return len(self.data[0])             # <<<<<<<<<<<<<<
 * 
 *     property dtype:
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->data), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 698, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "pysdif/_pysdif.pyx":694
 * 
 *     property cols:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.source_this:
 *                 return self.source_this.CurrMtrxH.NbCol
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.Matrix.cols.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":701
 * 
 *     property dtype:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.source_this:
 *                 return _SDIF_DATATYPES[self.source_this.CurrMtrxH.DataType]
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_5dtype_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_5dtype_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6Matrix_5dtype___get__(((struct __pyx_obj_6pysdif_7_pysdif_Matrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_5dtype___get__(struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self) {
  PyObject *__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("__get__", 1);

  /* "pysdif/_pysdif.pyx":702
 *     property dtype:
 *         def __get__(self):
 *             if self.source_this:             # <<<<<<<<<<<<<<
 *                 return _SDIF_DATATYPES[self.source_this.CurrMtrxH.DataType]
 *             else:
 */
  __pyx_t_1 = (__pyx_v_self->source_this != 0);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":703
 *         def __get__(self):
 *             if self.source_this:
 *                 return _SDIF_DATATYPES[self.source_this.CurrMtrxH.DataType]             # <<<<<<<<<<<<<<
 *             else:
 *                 return self.data.dtype
 */
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(__pyx_v_6pysdif_7_pysdif__SDIF_DATATYPES == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 703, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_PyInt_From_enum__SdifDataTypeE(__pyx_v_self->source_this->CurrMtrxH->DataType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_6pysdif_7_pysdif__SDIF_DATATYPES, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":702
 *     property dtype:
 *         def __get__(self):
 *             if self.source_this:             # <<<<<<<<<<<<<<
 *                 return _SDIF_DATATYPES[self.source_this.CurrMtrxH.DataType]
 *             else:
 */
  }

  /* "pysdif/_pysdif.pyx":705
 *                 return _SDIF_DATATYPES[self.source_this.CurrMtrxH.DataType]
 *             else:
 *                 return self.data.dtype             # <<<<<<<<<<<<<<
 * 
 *     property signature:
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 705, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "pysdif/_pysdif.pyx":701
 * 
 *     property dtype:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.source_this:
 *                 return _SDIF_DATATYPES[self.source_this.CurrMtrxH.DataType]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysdif._pysdif.Matrix.dtype.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":708
 * 
 *     property signature:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.source_this:
 *                 return sig2str(self.source_this.CurrMtrxH.Signature)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_9signature_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_9signature_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6Matrix_9signature___get__(((struct __pyx_obj_6pysdif_7_pysdif_Matrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_9signature___get__(struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self) {
  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__", 1);

  /* "pysdif/_pysdif.pyx":709
 *     property signature:
 *         def __get__(self):
 *             if self.source_this:             # <<<<<<<<<<<<<<
 *                 return sig2str(self.source_this.CurrMtrxH.Signature)
 *             else:
 */
  __pyx_t_1 = (__pyx_v_self->source_this != 0);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":710
 *         def __get__(self):
 *             if self.source_this:
 *                 return sig2str(self.source_this.CurrMtrxH.Signature)             # <<<<<<<<<<<<<<
 *             else:
 *                 return sig2str(self._signature)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pysdif_7_pysdif_sig2str(__pyx_v_self->source_this->CurrMtrxH->Signature); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":709
 *     property signature:
 *         def __get__(self):
 *             if self.source_this:             # <<<<<<<<<<<<<<
 *                 return sig2str(self.source_this.CurrMtrxH.Signature)
 *             else:
 */
  }

  /* "pysdif/_pysdif.pyx":712
 *                 return sig2str(self.source_this.CurrMtrxH.Signature)
 *             else:
 *                 return sig2str(self._signature)             # <<<<<<<<<<<<<<
 * 
 *     property numerical_signature:
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pysdif_7_pysdif_sig2str(__pyx_v_self->_signature); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "pysdif/_pysdif.pyx":708
 * 
 *     property signature:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.source_this:
 *                 return sig2str(self.source_this.CurrMtrxH.Signature)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.Matrix.signature.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":715
 * 
 *     property numerical_signature:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             #if self.header:
 *             if self.source_this:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_19numerical_signature_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_19numerical_signature_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6Matrix_19numerical_signature___get__(((struct __pyx_obj_6pysdif_7_pysdif_Matrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_19numerical_signature___get__(struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self) {
  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__", 1);

  /* "pysdif/_pysdif.pyx":717
 *         def __get__(self):
 *             #if self.header:
 *             if self.source_this:             # <<<<<<<<<<<<<<
 *                 return self.source_this.CurrMtrxH.Signature
 *             else:
 */
  __pyx_t_1 = (__pyx_v_self->source_this != 0);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":718
 *             #if self.header:
 *             if self.source_this:
 *                 return self.source_this.CurrMtrxH.Signature             # <<<<<<<<<<<<<<
 *             else:
 *                 return self._signature
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_SdifUInt4(__pyx_v_self->source_this->CurrMtrxH->Signature); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":717
 *         def __get__(self):
 *             #if self.header:
 *             if self.source_this:             # <<<<<<<<<<<<<<
 *                 return self.source_this.CurrMtrxH.Signature
 *             else:
 */
  }

  /* "pysdif/_pysdif.pyx":720
 *                 return self.source_this.CurrMtrxH.Signature
 *             else:
 *                 return self._signature             # <<<<<<<<<<<<<<
 * 
 *     def get_data(self, copy=True):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_SdifUInt4(__pyx_v_self->_signature); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "pysdif/_pysdif.pyx":715
 * 
 *     property numerical_signature:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             #if self.header:
 *             if self.source_this:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.Matrix.numerical_signature.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":722
 *                 return self._signature
 * 
 *     def get_data(self, copy=True):             # <<<<<<<<<<<<<<
 *         """
 *         Read the data from the matrix as a numpy array
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_3get_data(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_6Matrix_2get_data, "Matrix.get_data(self, copy=True)\n\n        Read the data from the matrix as a numpy array\n        \n        !!! note\n\n            If copy is False, the data is not copied to the array. \n            The array is only a 'view' of this data and does not own it,\n            so it is only valid until you read a new matrix. \n        \n            If you want to keep the data, do get_data(copy=True) or call\n            .copy() on the resulting numpy array \n       \n        Args:\n            copy (bool): if True, the returned data is a copy of the data read\n                and will not be invalidated\n\n        Returns:\n            (numpy.array) The data as a numpy.array. If copy==False, this data\n            is a view on the decoded data and will be invalidated when a new\n            matrix is read\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_6Matrix_3get_data = {"get_data", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6Matrix_3get_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6Matrix_2get_data};
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_3get_data(PyObject *__pyx_v_self, 
#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_copy = 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("get_data (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_copy,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_copy);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_data") < 0)) __PYX_ERR(0, 722, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_copy = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_data", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 722, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.Matrix.get_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6Matrix_2get_data(((struct __pyx_obj_6pysdif_7_pysdif_Matrix *)__pyx_v_self), __pyx_v_copy);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_2get_data(struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self, PyObject *__pyx_v_copy) {
  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_data", 1);

  /* "pysdif/_pysdif.pyx":744
 *             matrix is read
 *         """
 *         if self.source.matrix_status == eMatrixHeaderRead:             # <<<<<<<<<<<<<<
 *             self.source._matrix_read_data()
 * 
 */
  __pyx_t_1 = (__pyx_v_self->source->matrix_status == __pyx_e_6pysdif_7_pysdif_eMatrixHeaderRead);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":745
 *         """
 *         if self.source.matrix_status == eMatrixHeaderRead:
 *             self.source._matrix_read_data()             # <<<<<<<<<<<<<<
 * 
 *         if copy:
 */
    __pyx_f_6pysdif_7_pysdif_8SdifFile__matrix_read_data(__pyx_v_self->source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 745, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":744
 *             matrix is read
 *         """
 *         if self.source.matrix_status == eMatrixHeaderRead:             # <<<<<<<<<<<<<<
 *             self.source._matrix_read_data()
 * 
 */
  }

  /* "pysdif/_pysdif.pyx":747
 *             self.source._matrix_read_data()
 * 
 *         if copy:             # <<<<<<<<<<<<<<
 *             return _array_from_matrix_data_copy(self.source_this.CurrMtrxData)
 *         return _array_from_matrix_data_no_copy(self.source_this.CurrMtrxData)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_copy); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 747, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":748
 * 
 *         if copy:
 *             return _array_from_matrix_data_copy(self.source_this.CurrMtrxData)             # <<<<<<<<<<<<<<
 *         return _array_from_matrix_data_no_copy(self.source_this.CurrMtrxData)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = ((PyObject *)__pyx_f_6pysdif_7_pysdif__array_from_matrix_data_copy(__pyx_v_self->source_this->CurrMtrxData)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 748, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":747
 *             self.source._matrix_read_data()
 * 
 *         if copy:             # <<<<<<<<<<<<<<
 *             return _array_from_matrix_data_copy(self.source_this.CurrMtrxData)
 *         return _array_from_matrix_data_no_copy(self.source_this.CurrMtrxData)
 */
  }

  /* "pysdif/_pysdif.pyx":749
 *         if copy:
 *             return _array_from_matrix_data_copy(self.source_this.CurrMtrxData)
 *         return _array_from_matrix_data_no_copy(self.source_this.CurrMtrxData)             # <<<<<<<<<<<<<<
 * 
 *     def column_names(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_f_6pysdif_7_pysdif__array_from_matrix_data_no_copy(__pyx_v_self->source_this->CurrMtrxData)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":722
 *                 return self._signature
 * 
 *     def get_data(self, copy=True):             # <<<<<<<<<<<<<<
 *         """
 *         Read the data from the matrix as a numpy array
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.Matrix.get_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":751
 *         return _array_from_matrix_data_no_copy(self.source_this.CurrMtrxData)
 * 
 *     def column_names(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a list of column names for the current matrix
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_5column_names(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_6Matrix_4column_names, "Matrix.column_names(self)\n\n        Returns a list of column names for the current matrix\n\n        Returns:\n            (list[str]) Column names\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_6Matrix_5column_names = {"column_names", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6Matrix_5column_names, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6Matrix_4column_names};
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_5column_names(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("column_names (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("column_names", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "column_names", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6Matrix_4column_names(((struct __pyx_obj_6pysdif_7_pysdif_Matrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_4column_names(struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self) {
  PyObject *__pyx_v_sig = 0;
  PyObject *__pyx_v_matrixtypes = NULL;
  PyObject *__pyx_v_colnames = NULL;
  PyObject *__pyx_8genexpr6__pyx_v_mtd = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("column_names", 1);

  /* "pysdif/_pysdif.pyx":758
 *             (list[str]) Column names
 *         """
 *         cdef bytes sig = self.signature             # <<<<<<<<<<<<<<
 *         matrixtypes = {mtd.signaturesture: mtd.column_names for mtd in self.source.get_matrix_types()}
 *         colnames = matrixtypes.get(sig)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_signature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 758, __pyx_L1_error)
  __pyx_v_sig = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":759
 *         """
 *         cdef bytes sig = self.signature
 *         matrixtypes = {mtd.signaturesture: mtd.column_names for mtd in self.source.get_matrix_types()}             # <<<<<<<<<<<<<<
 *         colnames = matrixtypes.get(sig)
 *         if colnames is None:
 */
  { /* enter inner scope */
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 759, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->source), __pyx_n_s_get_matrix_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 759, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 759, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3);
      __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 759, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 759, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 759, __pyx_L5_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 759, __pyx_L5_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 759, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 759, __pyx_L5_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 759, __pyx_L5_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 759, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_7(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 759, __pyx_L5_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_mtd, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr6__pyx_v_mtd, __pyx_n_s_signaturesture); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 759, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr6__pyx_v_mtd, __pyx_n_s_column_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 759, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 759, __pyx_L5_error)
      __Pyx_DECREF(__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_XDECREF(__pyx_8genexpr6__pyx_v_mtd); __pyx_8genexpr6__pyx_v_mtd = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_mtd); __pyx_8genexpr6__pyx_v_mtd = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __pyx_v_matrixtypes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":760
 *         cdef bytes sig = self.signature
 *         matrixtypes = {mtd.signaturesture: mtd.column_names for mtd in self.source.get_matrix_types()}
 *         colnames = matrixtypes.get(sig)             # <<<<<<<<<<<<<<
 *         if colnames is None:
 *             raise KeyError("This matrix type ({sig}) does not seem to be defined!".format(sig=sig))
 */
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_matrixtypes, __pyx_v_sig, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_colnames = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":761
 *         matrixtypes = {mtd.signaturesture: mtd.column_names for mtd in self.source.get_matrix_types()}
 *         colnames = matrixtypes.get(sig)
 *         if colnames is None:             # <<<<<<<<<<<<<<
 *             raise KeyError("This matrix type ({sig}) does not seem to be defined!".format(sig=sig))
 *         return colnames
 */
  __pyx_t_8 = (__pyx_v_colnames == Py_None);
  if (unlikely(__pyx_t_8)) {

    /* "pysdif/_pysdif.pyx":762
 *         colnames = matrixtypes.get(sig)
 *         if colnames is None:
 *             raise KeyError("This matrix type ({sig}) does not seem to be defined!".format(sig=sig))             # <<<<<<<<<<<<<<
 *         return colnames
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_This_matrix_type_sig_does_not_se, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_sig, __pyx_v_sig) < 0) __PYX_ERR(0, 762, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 762, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":761
 *         matrixtypes = {mtd.signaturesture: mtd.column_names for mtd in self.source.get_matrix_types()}
 *         colnames = matrixtypes.get(sig)
 *         if colnames is None:             # <<<<<<<<<<<<<<
 *             raise KeyError("This matrix type ({sig}) does not seem to be defined!".format(sig=sig))
 *         return colnames
 */
  }

  /* "pysdif/_pysdif.pyx":763
 *         if colnames is None:
 *             raise KeyError("This matrix type ({sig}) does not seem to be defined!".format(sig=sig))
 *         return colnames             # <<<<<<<<<<<<<<
 * 
 *     def skip(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_colnames);
  __pyx_r = __pyx_v_colnames;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":751
 *         return _array_from_matrix_data_no_copy(self.source_this.CurrMtrxData)
 * 
 *     def column_names(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a list of column names for the current matrix
 */

  /* 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("pysdif._pysdif.Matrix.column_names", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sig);
  __Pyx_XDECREF(__pyx_v_matrixtypes);
  __Pyx_XDECREF(__pyx_v_colnames);
  __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_mtd);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":765
 *         return colnames
 * 
 *     def skip(self):             # <<<<<<<<<<<<<<
 *         """
 *         Skip reading the data
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_7skip(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_6Matrix_6skip, "Matrix.skip(self)\n\n        Skip reading the data \n\n        This method can only be called if the data was not already read\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_6Matrix_7skip = {"skip", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6Matrix_7skip, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6Matrix_6skip};
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_7skip(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("skip (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("skip", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "skip", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6Matrix_6skip(((struct __pyx_obj_6pysdif_7_pysdif_Matrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_6skip(struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("skip", 1);

  /* "pysdif/_pysdif.pyx":771
 *         This method can only be called if the data was not already read
 *         """
 *         if self.status == eMatrixHeaderRead:             # <<<<<<<<<<<<<<
 *             self.source.matrix_skip_data()
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_enum____pyx_t_6pysdif_7_pysdif_MatrixStatusE(__pyx_e_6pysdif_7_pysdif_eMatrixHeaderRead); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(__pyx_t_4)) {

    /* "pysdif/_pysdif.pyx":772
 *         """
 *         if self.status == eMatrixHeaderRead:
 *             self.source.matrix_skip_data()             # <<<<<<<<<<<<<<
 *         else:
 *             raise SdifOrderError("Can't skip the matrix, status is %s" % (matrixstatus2str(self._status)))
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->source), __pyx_n_s_matrix_skip_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 772, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pysdif/_pysdif.pyx":771
 *         This method can only be called if the data was not already read
 *         """
 *         if self.status == eMatrixHeaderRead:             # <<<<<<<<<<<<<<
 *             self.source.matrix_skip_data()
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pysdif/_pysdif.pyx":774
 *             self.source.matrix_skip_data()
 *         else:
 *             raise SdifOrderError("Can't skip the matrix, status is %s" % (matrixstatus2str(self._status)))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SdifOrderError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_matrixstatus2str); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyInt_From_enum____pyx_t_6pysdif_7_pysdif_MatrixStatusE(__pyx_v_self->_status); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 774, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_t_6 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Can_t_skip_the_matrix_status_is, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 774, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 774, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pysdif/_pysdif.pyx":765
 *         return colnames
 * 
 *     def skip(self):             # <<<<<<<<<<<<<<
 *         """
 *         Skip reading the data
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pysdif._pysdif.Matrix.skip", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":776
 *             raise SdifOrderError("Can't skip the matrix, status is %s" % (matrixstatus2str(self._status)))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "Matrix(sig=%s, rows=%d, cols=%d, dtype=%s)" % (
 *                self.signature, self.rows, self.cols, str(self.dtype))
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_9__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6Matrix_8__repr__(((struct __pyx_obj_6pysdif_7_pysdif_Matrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_8__repr__(struct __pyx_obj_6pysdif_7_pysdif_Matrix *__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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "pysdif/_pysdif.pyx":777
 * 
 *     def __repr__(self):
 *         return "Matrix(sig=%s, rows=%d, cols=%d, dtype=%s)" % (             # <<<<<<<<<<<<<<
 *                self.signature, self.rows, self.cols, str(self.dtype))
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "pysdif/_pysdif.pyx":778
 *     def __repr__(self):
 *         return "Matrix(sig=%s, rows=%d, cols=%d, dtype=%s)" % (
 *                self.signature, self.rows, self.cols, str(self.dtype))             # <<<<<<<<<<<<<<
 * 
 *     property status:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_signature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_rows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cols); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_Str(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 778, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 778, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_5)) __PYX_ERR(0, 778, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":777
 * 
 *     def __repr__(self):
 *         return "Matrix(sig=%s, rows=%d, cols=%d, dtype=%s)" % (             # <<<<<<<<<<<<<<
 *                self.signature, self.rows, self.cols, str(self.dtype))
 * 
 */
  __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Matrix_sig_s_rows_d_cols_d_dtype, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":776
 *             raise SdifOrderError("Can't skip the matrix, status is %s" % (matrixstatus2str(self._status)))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "Matrix(sig=%s, rows=%d, cols=%d, dtype=%s)" % (
 *                self.signature, self.rows, self.cols, str(self.dtype))
 */

  /* 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("pysdif._pysdif.Matrix.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":781
 * 
 *     property status:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.source_this != NULL:
 *                 return self.source.matrix_status
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_6status_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_6status_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6Matrix_6status___get__(((struct __pyx_obj_6pysdif_7_pysdif_Matrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_6status___get__(struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self) {
  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__", 1);

  /* "pysdif/_pysdif.pyx":782
 *     property status:
 *         def __get__(self):
 *             if self.source_this != NULL:             # <<<<<<<<<<<<<<
 *                 return self.source.matrix_status
 *             else:
 */
  __pyx_t_1 = (__pyx_v_self->source_this != NULL);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":783
 *         def __get__(self):
 *             if self.source_this != NULL:
 *                 return self.source.matrix_status             # <<<<<<<<<<<<<<
 *             else:
 *                 return self._status
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_enum____pyx_t_6pysdif_7_pysdif_MatrixStatusE(__pyx_v_self->source->matrix_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":782
 *     property status:
 *         def __get__(self):
 *             if self.source_this != NULL:             # <<<<<<<<<<<<<<
 *                 return self.source.matrix_status
 *             else:
 */
  }

  /* "pysdif/_pysdif.pyx":785
 *                 return self.source.matrix_status
 *             else:
 *                 return self._status             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_enum____pyx_t_6pysdif_7_pysdif_MatrixStatusE(__pyx_v_self->_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "pysdif/_pysdif.pyx":781
 * 
 *     property status:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.source_this != NULL:
 *                 return self.source.matrix_status
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.Matrix.status.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_11__reduce_cython__(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_6Matrix_10__reduce_cython__, "Matrix.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_6Matrix_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6Matrix_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6Matrix_10__reduce_cython__};
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6Matrix_10__reduce_cython__(((struct __pyx_obj_6pysdif_7_pysdif_Matrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 1);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysdif._pysdif.Matrix.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_13__setstate_cython__(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_6Matrix_12__setstate_cython__, "Matrix.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_6Matrix_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6Matrix_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6Matrix_12__setstate_cython__};
static PyObject *__pyx_pw_6pysdif_7_pysdif_6Matrix_13__setstate_cython__(PyObject *__pyx_v_self, 
#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___pyx_state = 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("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.Matrix.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6Matrix_12__setstate_cython__(((struct __pyx_obj_6pysdif_7_pysdif_Matrix *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_6Matrix_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pysdif_7_pysdif_Matrix *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 1);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysdif._pysdif.Matrix.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":824
 *     cdef SdifFileT *source_this
 * 
 *     def __cinit__(self, SdifFile source):             # <<<<<<<<<<<<<<
 *         self.source = source
 *         self.source_this = source.this
 */

/* Python wrapper */
static int __pyx_pw_6pysdif_7_pysdif_6FrameR_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pysdif_7_pysdif_6FrameR_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_source = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_source)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 824, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 824, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    }
    __pyx_v_source = ((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 824, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.FrameR.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_source), __pyx_ptype_6pysdif_7_pysdif_SdifFile, 1, "source", 0))) __PYX_ERR(0, 824, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6FrameR___cinit__(((struct __pyx_obj_6pysdif_7_pysdif_FrameR *)__pyx_v_self), __pyx_v_source);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pysdif_7_pysdif_6FrameR___cinit__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self, struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_source) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  SdifFileT *__pyx_t_1;
  SdifFrameHeaderT *__pyx_t_2;
  __Pyx_RefNannySetupContext("__cinit__", 1);

  /* "pysdif/_pysdif.pyx":825
 * 
 *     def __cinit__(self, SdifFile source):
 *         self.source = source             # <<<<<<<<<<<<<<
 *         self.source_this = source.this
 *         self.header = source.this.CurrFramH
 */
  __Pyx_INCREF((PyObject *)__pyx_v_source);
  __Pyx_GIVEREF((PyObject *)__pyx_v_source);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->source);
  __Pyx_DECREF((PyObject *)__pyx_v_self->source);
  __pyx_v_self->source = __pyx_v_source;

  /* "pysdif/_pysdif.pyx":826
 *     def __cinit__(self, SdifFile source):
 *         self.source = source
 *         self.source_this = source.this             # <<<<<<<<<<<<<<
 *         self.header = source.this.CurrFramH
 * 
 */
  __pyx_t_1 = __pyx_v_source->this;
  __pyx_v_self->source_this = __pyx_t_1;

  /* "pysdif/_pysdif.pyx":827
 *         self.source = source
 *         self.source_this = source.this
 *         self.header = source.this.CurrFramH             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_2 = __pyx_v_source->this->CurrFramH;
  __pyx_v_self->header = __pyx_t_2;

  /* "pysdif/_pysdif.pyx":824
 *     cdef SdifFileT *source_this
 * 
 *     def __cinit__(self, SdifFile source):             # <<<<<<<<<<<<<<
 *         self.source = source
 *         self.source_this = source.this
 */

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

/* "pysdif/_pysdif.pyx":829
 *         self.header = source.this.CurrFramH
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.source = None
 * 
 */

/* Python wrapper */
static void __pyx_pw_6pysdif_7_pysdif_6FrameR_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_6pysdif_7_pysdif_6FrameR_3__dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_6pysdif_7_pysdif_6FrameR_2__dealloc__(((struct __pyx_obj_6pysdif_7_pysdif_FrameR *)__pyx_v_self));

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

static void __pyx_pf_6pysdif_7_pysdif_6FrameR_2__dealloc__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 1);

  /* "pysdif/_pysdif.pyx":830
 * 
 *     def __dealloc__(self):
 *         self.source = None             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->source);
  __Pyx_DECREF((PyObject *)__pyx_v_self->source);
  __pyx_v_self->source = ((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)Py_None);

  /* "pysdif/_pysdif.pyx":829
 *         self.header = source.this.CurrFramH
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.source = None
 * 
 */

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

/* "pysdif/_pysdif.pyx":832
 *         self.source = None
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "FrameR(signature={sig}, time={t}, matrices={num}, idx={idx})".format(
 *             sig=self.signature, t=self.time, num=self.num_matrices, idx=self.matrix_idx)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_5__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6FrameR_4__repr__(((struct __pyx_obj_6pysdif_7_pysdif_FrameR *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_4__repr__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "pysdif/_pysdif.pyx":833
 * 
 *     def __repr__(self):
 *         return "FrameR(signature={sig}, time={t}, matrices={num}, idx={idx})".format(             # <<<<<<<<<<<<<<
 *             sig=self.signature, t=self.time, num=self.num_matrices, idx=self.matrix_idx)
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_FrameR_signature_sig_time_t_matr, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pysdif/_pysdif.pyx":834
 *     def __repr__(self):
 *         return "FrameR(signature={sig}, time={t}, matrices={num}, idx={idx})".format(
 *             sig=self.signature, t=self.time, num=self.num_matrices, idx=self.matrix_idx)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_signature); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_sig, __pyx_t_3) < 0) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_t, __pyx_t_3) < 0) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_matrices); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_num, __pyx_t_3) < 0) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_matrix_idx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_idx, __pyx_t_3) < 0) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysdif/_pysdif.pyx":833
 * 
 *     def __repr__(self):
 *         return "FrameR(signature={sig}, time={t}, matrices={num}, idx={idx})".format(             # <<<<<<<<<<<<<<
 *             sig=self.signature, t=self.time, num=self.num_matrices, idx=self.matrix_idx)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":832
 *         self.source = None
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "FrameR(signature={sig}, time={t}, matrices={num}, idx={idx})".format(
 *             sig=self.signature, t=self.time, num=self.num_matrices, idx=self.matrix_idx)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysdif._pysdif.FrameR.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":836
 *             sig=self.signature, t=self.time, num=self.num_matrices, idx=self.matrix_idx)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def signature(self):
 *         """ (str) The string signature of this frame """
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_9signature_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_9signature_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6FrameR_9signature___get__(((struct __pyx_obj_6pysdif_7_pysdif_FrameR *)__pyx_v_self));

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

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

  /* "pysdif/_pysdif.pyx":839
 *     def signature(self):
 *         """ (str) The string signature of this frame """
 *         return sig2str(self.source_this.CurrFramH.Signature)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_sig2str(__pyx_v_self->source_this->CurrFramH->Signature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":836
 *             sig=self.signature, t=self.time, num=self.num_matrices, idx=self.matrix_idx)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def signature(self):
 *         """ (str) The string signature of this frame """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.FrameR.signature.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":841
 *         return sig2str(self.source_this.CurrFramH.Signature)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def numerical_signature(self):
 *         if self.source_this.CurrFramH == NULL:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_19numerical_signature_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_19numerical_signature_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6FrameR_19numerical_signature___get__(((struct __pyx_obj_6pysdif_7_pysdif_FrameR *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_19numerical_signature___get__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysdif/_pysdif.pyx":843
 *     @property
 *     def numerical_signature(self):
 *         if self.source_this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("The header of the current frame has not been read")
 *         return self.source_this.CurrFramH.Signature
 */
  __pyx_t_1 = (__pyx_v_self->source_this->CurrFramH == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":844
 *     def numerical_signature(self):
 *         if self.source_this.CurrFramH == NULL:
 *             raise SdifOrderError("The header of the current frame has not been read")             # <<<<<<<<<<<<<<
 *         return self.source_this.CurrFramH.Signature
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SdifOrderError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_The_header_of_the_current_frame};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 844, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":843
 *     @property
 *     def numerical_signature(self):
 *         if self.source_this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("The header of the current frame has not been read")
 *         return self.source_this.CurrFramH.Signature
 */
  }

  /* "pysdif/_pysdif.pyx":845
 *         if self.source_this.CurrFramH == NULL:
 *             raise SdifOrderError("The header of the current frame has not been read")
 *         return self.source_this.CurrFramH.Signature             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_SdifUInt4(__pyx_v_self->source_this->CurrFramH->Signature); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":841
 *         return sig2str(self.source_this.CurrFramH.Signature)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def numerical_signature(self):
 *         if self.source_this.CurrFramH == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysdif._pysdif.FrameR.numerical_signature.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":847
 *         return self.source_this.CurrFramH.Signature
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def size(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_4size_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6FrameR_4size___get__(((struct __pyx_obj_6pysdif_7_pysdif_FrameR *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_4size___get__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysdif/_pysdif.pyx":852
 *         (int) The size of this frame in bytes
 *         """
 *         if self.source_this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("The header of the current frame has not been read")
 *         return self.source_this.CurrFramH.Size
 */
  __pyx_t_1 = (__pyx_v_self->source_this->CurrFramH == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":853
 *         """
 *         if self.source_this.CurrFramH == NULL:
 *             raise SdifOrderError("The header of the current frame has not been read")             # <<<<<<<<<<<<<<
 *         return self.source_this.CurrFramH.Size
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SdifOrderError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 853, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_The_header_of_the_current_frame};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 853, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":852
 *         (int) The size of this frame in bytes
 *         """
 *         if self.source_this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("The header of the current frame has not been read")
 *         return self.source_this.CurrFramH.Size
 */
  }

  /* "pysdif/_pysdif.pyx":854
 *         if self.source_this.CurrFramH == NULL:
 *             raise SdifOrderError("The header of the current frame has not been read")
 *         return self.source_this.CurrFramH.Size             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_SdifUInt4(__pyx_v_self->source_this->CurrFramH->Size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":847
 *         return self.source_this.CurrFramH.Signature
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def size(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysdif._pysdif.FrameR.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":856
 *         return self.source_this.CurrFramH.Size
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_matrices(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_12num_matrices_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_12num_matrices_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6FrameR_12num_matrices___get__(((struct __pyx_obj_6pysdif_7_pysdif_FrameR *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_12num_matrices___get__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysdif/_pysdif.pyx":861
 *         (int) The number of matrices in this frame
 *         """
 *         if self.source_this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("The header of the current frame has not been read")
 *         return self.source_this.CurrFramH.NbMatrix
 */
  __pyx_t_1 = (__pyx_v_self->source_this->CurrFramH == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":862
 *         """
 *         if self.source_this.CurrFramH == NULL:
 *             raise SdifOrderError("The header of the current frame has not been read")             # <<<<<<<<<<<<<<
 *         return self.source_this.CurrFramH.NbMatrix
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SdifOrderError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_The_header_of_the_current_frame};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 862, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 862, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":861
 *         (int) The number of matrices in this frame
 *         """
 *         if self.source_this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("The header of the current frame has not been read")
 *         return self.source_this.CurrFramH.NbMatrix
 */
  }

  /* "pysdif/_pysdif.pyx":863
 *         if self.source_this.CurrFramH == NULL:
 *             raise SdifOrderError("The header of the current frame has not been read")
 *         return self.source_this.CurrFramH.NbMatrix             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_SdifUInt4(__pyx_v_self->source_this->CurrFramH->NbMatrix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":856
 *         return self.source_this.CurrFramH.Size
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def num_matrices(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysdif._pysdif.FrameR.num_matrices.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":865
 *         return self.source_this.CurrFramH.NbMatrix
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.num_matrices
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_6pysdif_7_pysdif_6FrameR_7__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_6pysdif_7_pysdif_6FrameR_7__len__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6FrameR_6__len__(((struct __pyx_obj_6pysdif_7_pysdif_FrameR *)__pyx_v_self));

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

static Py_ssize_t __pyx_pf_6pysdif_7_pysdif_6FrameR_6__len__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__len__", 1);

  /* "pysdif/_pysdif.pyx":866
 * 
 *     def __len__(self):
 *         return self.num_matrices             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_matrices); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":865
 *         return self.source_this.CurrFramH.NbMatrix
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.num_matrices
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.FrameR.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":868
 *         return self.num_matrices
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def id(self):
 *         """ (int) The id of this frame """
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_2id_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6FrameR_2id___get__(((struct __pyx_obj_6pysdif_7_pysdif_FrameR *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_2id___get__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysdif/_pysdif.pyx":871
 *     def id(self):
 *         """ (int) The id of this frame """
 *         if self.source_this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("The header of the current frame has not been read")
 *         return self.source_this.CurrFramH.NumID
 */
  __pyx_t_1 = (__pyx_v_self->source_this->CurrFramH == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":872
 *         """ (int) The id of this frame """
 *         if self.source_this.CurrFramH == NULL:
 *             raise SdifOrderError("The header of the current frame has not been read")             # <<<<<<<<<<<<<<
 *         return self.source_this.CurrFramH.NumID
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SdifOrderError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 872, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_The_header_of_the_current_frame};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 872, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 872, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":871
 *     def id(self):
 *         """ (int) The id of this frame """
 *         if self.source_this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("The header of the current frame has not been read")
 *         return self.source_this.CurrFramH.NumID
 */
  }

  /* "pysdif/_pysdif.pyx":873
 *         if self.source_this.CurrFramH == NULL:
 *             raise SdifOrderError("The header of the current frame has not been read")
 *         return self.source_this.CurrFramH.NumID             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_SdifUInt4(__pyx_v_self->source_this->CurrFramH->NumID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":868
 *         return self.num_matrices
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def id(self):
 *         """ (int) The id of this frame """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysdif._pysdif.FrameR.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":875
 *         return self.source_this.CurrFramH.NumID
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def time(self):
 *         """ (float) The time of this frame """
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_4time_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_4time_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6FrameR_4time___get__(((struct __pyx_obj_6pysdif_7_pysdif_FrameR *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_4time___get__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysdif/_pysdif.pyx":878
 *     def time(self):
 *         """ (float) The time of this frame """
 *         if self.source_this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("The header of the current frame has not been read")
 *         return self.source_this.CurrFramH.Time
 */
  __pyx_t_1 = (__pyx_v_self->source_this->CurrFramH == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":879
 *         """ (float) The time of this frame """
 *         if self.source_this.CurrFramH == NULL:
 *             raise SdifOrderError("The header of the current frame has not been read")             # <<<<<<<<<<<<<<
 *         return self.source_this.CurrFramH.Time
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SdifOrderError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_The_header_of_the_current_frame};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 879, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":878
 *     def time(self):
 *         """ (float) The time of this frame """
 *         if self.source_this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("The header of the current frame has not been read")
 *         return self.source_this.CurrFramH.Time
 */
  }

  /* "pysdif/_pysdif.pyx":880
 *         if self.source_this.CurrFramH == NULL:
 *             raise SdifOrderError("The header of the current frame has not been read")
 *         return self.source_this.CurrFramH.Time             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->source_this->CurrFramH->Time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":875
 *         return self.source_this.CurrFramH.NumID
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def time(self):
 *         """ (float) The time of this frame """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysdif._pysdif.FrameR.time.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":882
 *         return self.source_this.CurrFramH.Time
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def matrix_idx(self):
 *         """The index of the current matrix"""
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_10matrix_idx_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_10matrix_idx_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6FrameR_10matrix_idx___get__(((struct __pyx_obj_6pysdif_7_pysdif_FrameR *)__pyx_v_self));

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

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

  /* "pysdif/_pysdif.pyx":885
 *     def matrix_idx(self):
 *         """The index of the current matrix"""
 *         return self.source.matrix_idx             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->source->matrix_idx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":882
 *         return self.source_this.CurrFramH.Time
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def matrix_idx(self):
 *         """The index of the current matrix"""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.FrameR.matrix_idx.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":887
 *         return self.source.matrix_idx
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         if self.source.frame_status >= eFrameSomeDataRead:
 *             raise RuntimeError("A Frame can only be iterated once")
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_9__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_9__iter__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6FrameR_8__iter__(((struct __pyx_obj_6pysdif_7_pysdif_FrameR *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_8__iter__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self) {
  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("__iter__", 1);

  /* "pysdif/_pysdif.pyx":888
 * 
 *     def __iter__(self):
 *         if self.source.frame_status >= eFrameSomeDataRead:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("A Frame can only be iterated once")
 *         self.source.frame_status = eFrameSomeDataRead
 */
  __pyx_t_1 = (__pyx_v_self->source->frame_status >= __pyx_e_6pysdif_7_pysdif_eFrameSomeDataRead);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":889
 *     def __iter__(self):
 *         if self.source.frame_status >= eFrameSomeDataRead:
 *             raise RuntimeError("A Frame can only be iterated once")             # <<<<<<<<<<<<<<
 *         self.source.frame_status = eFrameSomeDataRead
 *         return self
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 889, __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(0, 889, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":888
 * 
 *     def __iter__(self):
 *         if self.source.frame_status >= eFrameSomeDataRead:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("A Frame can only be iterated once")
 *         self.source.frame_status = eFrameSomeDataRead
 */
  }

  /* "pysdif/_pysdif.pyx":890
 *         if self.source.frame_status >= eFrameSomeDataRead:
 *             raise RuntimeError("A Frame can only be iterated once")
 *         self.source.frame_status = eFrameSomeDataRead             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->source->frame_status = __pyx_e_6pysdif_7_pysdif_eFrameSomeDataRead;

  /* "pysdif/_pysdif.pyx":891
 *             raise RuntimeError("A Frame can only be iterated once")
 *         self.source.frame_status = eFrameSomeDataRead
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":887
 *         return self.source.matrix_idx
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         if self.source.frame_status >= eFrameSomeDataRead:
 *             raise RuntimeError("A Frame can only be iterated once")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.FrameR.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":893
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read next matrix in this Frame. Raises StopIteration if no more matrices
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_11__next__(PyObject *__pyx_v_self); /*proto*/
PyDoc_STRVAR(__pyx_doc_6pysdif_7_pysdif_6FrameR_10__next__, "\n        Read next matrix in this Frame. Raises StopIteration if no more matrices\n\n        Returns:\n            (Matrix) the next matrix in this frame\n\n        !!! note\n\n            Only the header of the matrix will be read, to read the data\n            you must call the method matrix.get_data() on the resulting Matrix\n        ");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_6pysdif_7_pysdif_6FrameR_10__next__;
#endif
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_11__next__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6FrameR_10__next__(((struct __pyx_obj_6pysdif_7_pysdif_FrameR *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_10__next__(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self) {
  PyObject *__pyx_v_matrix = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_error_without_exception = 0; /* StopIteration */
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 1);

  /* "pysdif/_pysdif.pyx":905
 *             you must call the method matrix.get_data() on the resulting Matrix
 *         """
 *         matrix = self.source.next_matrix()             # <<<<<<<<<<<<<<
 *         if matrix is None:
 *             raise StopIteration
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->source), __pyx_n_s_next_matrix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_matrix = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":906
 *         """
 *         matrix = self.source.next_matrix()
 *         if matrix is None:             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         return matrix
 */
  __pyx_t_5 = (__pyx_v_matrix == Py_None);
  if (unlikely(__pyx_t_5)) {

    /* "pysdif/_pysdif.pyx":907
 *         matrix = self.source.next_matrix()
 *         if matrix is None:
 *             raise StopIteration             # <<<<<<<<<<<<<<
 *         return matrix
 * 
 */
    __pyx_error_without_exception = 1;
    goto __pyx_L1_error;;

    /* "pysdif/_pysdif.pyx":906
 *         """
 *         matrix = self.source.next_matrix()
 *         if matrix is None:             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         return matrix
 */
  }

  /* "pysdif/_pysdif.pyx":908
 *         if matrix is None:
 *             raise StopIteration
 *         return matrix             # <<<<<<<<<<<<<<
 * 
 *     def get_matrix(self, copy=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_matrix);
  __pyx_r = __pyx_v_matrix;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":893
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read next matrix in this Frame. Raises StopIteration if no more matrices
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  if (!__pyx_error_without_exception) {
    __Pyx_AddTraceback("pysdif._pysdif.FrameR.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  }
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_matrix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":910
 *         return matrix
 * 
 *     def get_matrix(self, copy=True):             # <<<<<<<<<<<<<<
 *         """
 *         Reads the next matrix entirely, returns (matrixsig, data)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_13get_matrix(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_6FrameR_12get_matrix, "FrameR.get_matrix(self, copy=True)\n\n        Reads the next matrix entirely, returns (matrixsig, data)\n\n        !!! note\n\n            Raises `StopIteration` when there are no more matrices\n\n        Args:\n            copy: return a copy of the data. If copy==False, then the data\n                is only valid as long as no other matrix is read. This is \n                done to avoid allocating new memory for each new matrix\n                for the cases where the data is not preversed but transformed\n                within a streaming procees.\n        \n        Returns:\n            (tuple[str, numpy.array]) A tuple (string signature, matrix data)\n\n        ## Example\n\n        ```python\n\n        frame = next(sdiffile)\n        while True:\n            sig, data = frame.get_matrix()\n            print(data)\n\n        ```\n\n        This is the same as:\n\n        ```python\n        frame = next(sdiffile)\n        for matrix in frame:\n            print(matrix.get_data())\n        ```\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_6FrameR_13get_matrix = {"get_matrix", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6FrameR_13get_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6FrameR_12get_matrix};
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_13get_matrix(PyObject *__pyx_v_self, 
#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_copy = 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("get_matrix (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_copy,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_copy);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 910, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_matrix") < 0)) __PYX_ERR(0, 910, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_copy = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_matrix", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 910, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.FrameR.get_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6FrameR_12get_matrix(((struct __pyx_obj_6pysdif_7_pysdif_FrameR *)__pyx_v_self), __pyx_v_copy);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_12get_matrix(struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self, PyObject *__pyx_v_copy) {
  PyObject *__pyx_v_matrix = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_matrix", 1);

  /* "pysdif/_pysdif.pyx":947
 *         ```
 *         """
 *         matrix = self.__next__()             # <<<<<<<<<<<<<<
 *         return matrix.signature, matrix.get_data(copy=copy)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_matrix = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":948
 *         """
 *         matrix = self.__next__()
 *         return matrix.signature, matrix.get_data(copy=copy)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_matrix, __pyx_n_s_signature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_matrix, __pyx_n_s_get_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_copy, __pyx_v_copy) < 0) __PYX_ERR(0, 948, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 948, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5)) __PYX_ERR(0, 948, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":910
 *         return matrix
 * 
 *     def get_matrix(self, copy=True):             # <<<<<<<<<<<<<<
 *         """
 *         Reads the next matrix entirely, returns (matrixsig, data)
 */

  /* 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("pysdif._pysdif.FrameR.get_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_matrix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_15__reduce_cython__(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_6FrameR_14__reduce_cython__, "FrameR.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_6FrameR_15__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6FrameR_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6FrameR_14__reduce_cython__};
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_15__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6FrameR_14__reduce_cython__(((struct __pyx_obj_6pysdif_7_pysdif_FrameR *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 1);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysdif._pysdif.FrameR.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_17__setstate_cython__(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_6FrameR_16__setstate_cython__, "FrameR.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_6FrameR_17__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6FrameR_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6FrameR_16__setstate_cython__};
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameR_17__setstate_cython__(PyObject *__pyx_v_self, 
#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___pyx_state = 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("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.FrameR.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6FrameR_16__setstate_cython__(((struct __pyx_obj_6pysdif_7_pysdif_FrameR *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameR_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pysdif_7_pysdif_FrameR *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 1);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysdif._pysdif.FrameR.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":992
 *     cdef int _written
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "FrameW(signature=%s, time=%f, streamID=%d, written=%s)" % (
 *             sig2str(self.signature), self.time, self.streamID, bool(self._written))
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameW_1__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameW_1__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6FrameW___repr__(((struct __pyx_obj_6pysdif_7_pysdif_FrameW *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameW___repr__(struct __pyx_obj_6pysdif_7_pysdif_FrameW *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "pysdif/_pysdif.pyx":993
 * 
 *     def __repr__(self):
 *         return "FrameW(signature=%s, time=%f, streamID=%d, written=%s)" % (             # <<<<<<<<<<<<<<
 *             sig2str(self.signature), self.time, self.streamID, bool(self._written))
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "pysdif/_pysdif.pyx":994
 *     def __repr__(self):
 *         return "FrameW(signature=%s, time=%f, streamID=%d, written=%s)" % (
 *             sig2str(self.signature), self.time, self.streamID, bool(self._written))             # <<<<<<<<<<<<<<
 * 
 *     def __enter__(self):
 */
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_sig2str(__pyx_v_self->signature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_SdifUInt4(__pyx_v_self->streamID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->_written); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_5))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2)) __PYX_ERR(0, 994, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3)) __PYX_ERR(0, 994, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_4)) __PYX_ERR(0, 994, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;

  /* "pysdif/_pysdif.pyx":993
 * 
 *     def __repr__(self):
 *         return "FrameW(signature=%s, time=%f, streamID=%d, written=%s)" % (             # <<<<<<<<<<<<<<
 *             sig2str(self.signature), self.time, self.streamID, bool(self._written))
 * 
 */
  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_FrameW_signature_s_time_f_stream, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":992
 *     cdef int _written
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "FrameW(signature=%s, time=%f, streamID=%d, written=%s)" % (
 *             sig2str(self.signature), self.time, self.streamID, bool(self._written))
 */

  /* 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("pysdif._pysdif.FrameW.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":996
 *             sig2str(self.signature), self.time, self.streamID, bool(self._written))
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         if self._written:
 *             raise RuntimeError("Frame has already been written!")
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameW_3__enter__(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_6FrameW_2__enter__, "FrameW.__enter__(self)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_6FrameW_3__enter__ = {"__enter__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6FrameW_3__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6FrameW_2__enter__};
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameW_3__enter__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__enter__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__enter__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6FrameW_2__enter__(((struct __pyx_obj_6pysdif_7_pysdif_FrameW *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameW_2__enter__(struct __pyx_obj_6pysdif_7_pysdif_FrameW *__pyx_v_self) {
  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("__enter__", 1);

  /* "pysdif/_pysdif.pyx":997
 * 
 *     def __enter__(self):
 *         if self._written:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Frame has already been written!")
 *         return self
 */
  __pyx_t_1 = (__pyx_v_self->_written != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":998
 *     def __enter__(self):
 *         if self._written:
 *             raise RuntimeError("Frame has already been written!")             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __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(0, 998, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":997
 * 
 *     def __enter__(self):
 *         if self._written:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Frame has already been written!")
 *         return self
 */
  }

  /* "pysdif/_pysdif.pyx":999
 *         if self._written:
 *             raise RuntimeError("Frame has already been written!")
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __exit__(self, exception_type, exception_value, traceback):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":996
 *             sig2str(self.signature), self.time, self.streamID, bool(self._written))
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         if self._written:
 *             raise RuntimeError("Frame has already been written!")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.FrameW.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1001
 *         return self
 * 
 *     def __exit__(self, exception_type, exception_value, traceback):             # <<<<<<<<<<<<<<
 *         if self.num_matrices == 0:
 *             logger.warning("No matrices were added! Frame not written")
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameW_5__exit__(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_6FrameW_4__exit__, "FrameW.__exit__(self, exception_type, exception_value, traceback)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_6FrameW_5__exit__ = {"__exit__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6FrameW_5__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6FrameW_4__exit__};
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameW_5__exit__(PyObject *__pyx_v_self, 
#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_exception_type = 0;
  CYTHON_UNUSED PyObject *__pyx_v_exception_value = 0;
  CYTHON_UNUSED PyObject *__pyx_v_traceback = 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("__exit__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_exception_type,&__pyx_n_s_exception_value,&__pyx_n_s_traceback,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_exception_type)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_exception_value)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); __PYX_ERR(0, 1001, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_traceback)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); __PYX_ERR(0, 1001, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__exit__") < 0)) __PYX_ERR(0, 1001, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_exception_type = values[0];
    __pyx_v_exception_value = values[1];
    __pyx_v_traceback = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1001, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.FrameW.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6FrameW_4__exit__(((struct __pyx_obj_6pysdif_7_pysdif_FrameW *)__pyx_v_self), __pyx_v_exception_type, __pyx_v_exception_value, __pyx_v_traceback);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameW_4__exit__(struct __pyx_obj_6pysdif_7_pysdif_FrameW *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exception_type, CYTHON_UNUSED PyObject *__pyx_v_exception_value, CYTHON_UNUSED PyObject *__pyx_v_traceback) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__exit__", 1);

  /* "pysdif/_pysdif.pyx":1002
 * 
 *     def __exit__(self, exception_type, exception_value, traceback):
 *         if self.num_matrices == 0:             # <<<<<<<<<<<<<<
 *             logger.warning("No matrices were added! Frame not written")
 *         elif self._written == 1:
 */
  __pyx_t_1 = (__pyx_v_self->num_matrices == 0);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1003
 *     def __exit__(self, exception_type, exception_value, traceback):
 *         if self.num_matrices == 0:
 *             logger.warning("No matrices were added! Frame not written")             # <<<<<<<<<<<<<<
 *         elif self._written == 1:
 *             logger.warning("Do not call frame.write() when using frame as a context manager")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_warning); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_s_No_matrices_were_added_Frame_not};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1003, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysdif/_pysdif.pyx":1002
 * 
 *     def __exit__(self, exception_type, exception_value, traceback):
 *         if self.num_matrices == 0:             # <<<<<<<<<<<<<<
 *             logger.warning("No matrices were added! Frame not written")
 *         elif self._written == 1:
 */
    goto __pyx_L3;
  }

  /* "pysdif/_pysdif.pyx":1004
 *         if self.num_matrices == 0:
 *             logger.warning("No matrices were added! Frame not written")
 *         elif self._written == 1:             # <<<<<<<<<<<<<<
 *             logger.warning("Do not call frame.write() when using frame as a context manager")
 *         else:
 */
  __pyx_t_1 = (__pyx_v_self->_written == 1);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1005
 *             logger.warning("No matrices were added! Frame not written")
 *         elif self._written == 1:
 *             logger.warning("Do not call frame.write() when using frame as a context manager")             # <<<<<<<<<<<<<<
 *         else:
 *             self.write()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1005, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_warning); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1005, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_Do_not_call_frame_write_when_usi};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1005, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysdif/_pysdif.pyx":1004
 *         if self.num_matrices == 0:
 *             logger.warning("No matrices were added! Frame not written")
 *         elif self._written == 1:             # <<<<<<<<<<<<<<
 *             logger.warning("Do not call frame.write() when using frame as a context manager")
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pysdif/_pysdif.pyx":1007
 *             logger.warning("Do not call frame.write() when using frame as a context manager")
 *         else:
 *             self.write()             # <<<<<<<<<<<<<<
 * 
 *     def __del__(self):
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1007, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1007, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "pysdif/_pysdif.pyx":1001
 *         return self
 * 
 *     def __exit__(self, exception_type, exception_value, traceback):             # <<<<<<<<<<<<<<
 *         if self.num_matrices == 0:
 *             logger.warning("No matrices were added! Frame not written")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysdif._pysdif.FrameW.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1009
 *             self.write()
 * 
 *     def __del__(self):             # <<<<<<<<<<<<<<
 *         if self.num_matrices > 0 and self._written == 0:
 *             logger.warning("Frame with %d matrices not written" % self.num_matrices)
 */

/* Python wrapper */
static void __pyx_pw_6pysdif_7_pysdif_6FrameW_7__del__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_6pysdif_7_pysdif_6FrameW_7__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_6pysdif_7_pysdif_6FrameW_6__del__(((struct __pyx_obj_6pysdif_7_pysdif_FrameW *)__pyx_v_self));

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

static void __pyx_pf_6pysdif_7_pysdif_6FrameW_6__del__(struct __pyx_obj_6pysdif_7_pysdif_FrameW *__pyx_v_self) {
  __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;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__", 1);

  /* "pysdif/_pysdif.pyx":1010
 * 
 *     def __del__(self):
 *         if self.num_matrices > 0 and self._written == 0:             # <<<<<<<<<<<<<<
 *             logger.warning("Frame with %d matrices not written" % self.num_matrices)
 * 
 */
  __pyx_t_2 = (__pyx_v_self->num_matrices > 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->_written == 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1011
 *     def __del__(self):
 *         if self.num_matrices > 0 and self._written == 0:
 *             logger.warning("Frame with %d matrices not written" % self.num_matrices)             # <<<<<<<<<<<<<<
 * 
 *     property written:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1011, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_warning); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1011, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyInt_From_SdifUInt4(__pyx_v_self->num_matrices); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1011, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Frame_with_d_matrices_not_writte, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1011, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __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(0, 1011, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pysdif/_pysdif.pyx":1010
 * 
 *     def __del__(self):
 *         if self.num_matrices > 0 and self._written == 0:             # <<<<<<<<<<<<<<
 *             logger.warning("Frame with %d matrices not written" % self.num_matrices)
 * 
 */
  }

  /* "pysdif/_pysdif.pyx":1009
 *             self.write()
 * 
 *     def __del__(self):             # <<<<<<<<<<<<<<
 *         if self.num_matrices > 0 and self._written == 0:
 *             logger.warning("Frame with %d matrices not written" % self.num_matrices)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("pysdif._pysdif.FrameW.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "pysdif/_pysdif.pyx":1014
 * 
 *     property written:
 *         def __get__(self): return bool(self._written)             # <<<<<<<<<<<<<<
 * 
 *     def add_matrix(self, str signature, c_numpy.ndarray data_array):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameW_7written_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameW_7written_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6FrameW_7written___get__(((struct __pyx_obj_6pysdif_7_pysdif_FrameW *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameW_7written___get__(struct __pyx_obj_6pysdif_7_pysdif_FrameW *__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("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_written); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.FrameW.written.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1016
 *         def __get__(self): return bool(self._written)
 * 
 *     def add_matrix(self, str signature, c_numpy.ndarray data_array):             # <<<<<<<<<<<<<<
 *         """
 *         Add a matrix to this Frame
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameW_9add_matrix(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_6FrameW_8add_matrix, "FrameW.add_matrix(self, str signature, ndarray data_array)\n\n        Add a matrix to this Frame\n\n        Args:\n            signature (str): the signature of the matrix\n            data_array (numpy.array): the data of the matrix, a 2D array.\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_6FrameW_9add_matrix = {"add_matrix", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6FrameW_9add_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6FrameW_8add_matrix};
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameW_9add_matrix(PyObject *__pyx_v_self, 
#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_signature = 0;
  PyArrayObject *__pyx_v_data_array = 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("add_matrix (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_signature,&__pyx_n_s_data_array,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_signature)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1016, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data_array)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1016, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("add_matrix", 1, 2, 2, 1); __PYX_ERR(0, 1016, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_matrix") < 0)) __PYX_ERR(0, 1016, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_signature = ((PyObject*)values[0]);
    __pyx_v_data_array = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_matrix", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1016, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.FrameW.add_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_signature), (&PyString_Type), 1, "signature", 1))) __PYX_ERR(0, 1016, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data_array), __pyx_ptype_5numpy_ndarray, 1, "data_array", 0))) __PYX_ERR(0, 1016, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6FrameW_8add_matrix(((struct __pyx_obj_6pysdif_7_pysdif_FrameW *)__pyx_v_self), __pyx_v_signature, __pyx_v_data_array);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameW_8add_matrix(struct __pyx_obj_6pysdif_7_pysdif_FrameW *__pyx_v_self, PyObject *__pyx_v_signature, PyArrayObject *__pyx_v_data_array) {
  PyObject *__pyx_v_shape = NULL;
  int __pyx_8genexpr7__pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  npy_intp *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  char *__pyx_t_11;
  unsigned int __pyx_t_12;
  npy_intp *__pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_matrix", 1);

  /* "pysdif/_pysdif.pyx":1024
 *             data_array (numpy.array): the data of the matrix, a 2D array.
 *         """
 *         if self.num_matrices >= 100:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Two many matrices for one frame")
 * 
 */
  __pyx_t_1 = (__pyx_v_self->num_matrices >= 0x64);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":1025
 *         """
 *         if self.num_matrices >= 100:
 *             raise RuntimeError("Two many matrices for one frame")             # <<<<<<<<<<<<<<
 * 
 *         if self._written:
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1025, __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(0, 1025, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1024
 *             data_array (numpy.array): the data of the matrix, a 2D array.
 *         """
 *         if self.num_matrices >= 100:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Two many matrices for one frame")
 * 
 */
  }

  /* "pysdif/_pysdif.pyx":1027
 *             raise RuntimeError("Two many matrices for one frame")
 * 
 *         if self._written:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Frame has already been written!")
 * 
 */
  __pyx_t_1 = (__pyx_v_self->_written != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":1028
 * 
 *         if self._written:
 *             raise RuntimeError("Frame has already been written!")             # <<<<<<<<<<<<<<
 * 
 *         if data_array.ndim != 2:
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1028, __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(0, 1028, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1027
 *             raise RuntimeError("Two many matrices for one frame")
 * 
 *         if self._written:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Frame has already been written!")
 * 
 */
  }

  /* "pysdif/_pysdif.pyx":1030
 *             raise RuntimeError("Frame has already been written!")
 * 
 *         if data_array.ndim != 2:             # <<<<<<<<<<<<<<
 *             shape = [data_array.shape[i] for i in range(data_array.ndim)]
 *             raise ValueError("Expected a 2D array, got %d dimensions, shape: %s, data: %s" % (data_array.ndim, str(shape), str(data_array)))
 */
  __pyx_t_3 = __pyx_f_5numpy_7ndarray_4ndim_ndim(__pyx_v_data_array); if (unlikely(__pyx_t_3 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1030, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_3 != 2);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":1031
 * 
 *         if data_array.ndim != 2:
 *             shape = [data_array.shape[i] for i in range(data_array.ndim)]             # <<<<<<<<<<<<<<
 *             raise ValueError("Expected a 2D array, got %d dimensions, shape: %s, data: %s" % (data_array.ndim, str(shape), str(data_array)))
 *         else:
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1031, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_f_5numpy_7ndarray_4ndim_ndim(__pyx_v_data_array); if (unlikely(__pyx_t_3 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1031, __pyx_L1_error)
      __pyx_t_4 = __pyx_t_3;
      for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
        __pyx_8genexpr7__pyx_v_i = __pyx_t_5;
        __pyx_t_6 = __pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_data_array); if (unlikely(__pyx_t_6 == ((npy_intp *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1031, __pyx_L1_error)
        __pyx_t_7 = PyInt_FromSsize_t((__pyx_t_6[__pyx_8genexpr7__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1031, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 1031, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    } /* exit inner scope */
    __pyx_v_shape = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pysdif/_pysdif.pyx":1032
 *         if data_array.ndim != 2:
 *             shape = [data_array.shape[i] for i in range(data_array.ndim)]
 *             raise ValueError("Expected a 2D array, got %d dimensions, shape: %s, data: %s" % (data_array.ndim, str(shape), str(data_array)))             # <<<<<<<<<<<<<<
 *         else:
 *             self.matrices.append(np.ascontiguousarray(data_array))
 */
    __pyx_t_3 = __pyx_f_5numpy_7ndarray_4ndim_ndim(__pyx_v_data_array); if (unlikely(__pyx_t_3 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1032, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyObject_Str(__pyx_v_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_Str(((PyObject *)__pyx_v_data_array)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2)) __PYX_ERR(0, 1032, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_7);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_7)) __PYX_ERR(0, 1032, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_8)) __PYX_ERR(0, 1032, __pyx_L1_error);
    __pyx_t_2 = 0;
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_Expected_a_2D_array_got_d_dimens, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_Raise(__pyx_t_9, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __PYX_ERR(0, 1032, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1030
 *             raise RuntimeError("Frame has already been written!")
 * 
 *         if data_array.ndim != 2:             # <<<<<<<<<<<<<<
 *             shape = [data_array.shape[i] for i in range(data_array.ndim)]
 *             raise ValueError("Expected a 2D array, got %d dimensions, shape: %s, data: %s" % (data_array.ndim, str(shape), str(data_array)))
 */
  }

  /* "pysdif/_pysdif.pyx":1034
 *             raise ValueError("Expected a 2D array, got %d dimensions, shape: %s, data: %s" % (data_array.ndim, str(shape), str(data_array)))
 *         else:
 *             self.matrices.append(np.ascontiguousarray(data_array))             # <<<<<<<<<<<<<<
 * 
 *         self.signatures[self.num_matrices] = str2sig(asbytes(signature))
 */
  /*else*/ {
    if (unlikely(__pyx_v_self->matrices == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
      __PYX_ERR(0, 1034, __pyx_L1_error)
    }
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1034, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1034, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = NULL;
    __pyx_t_3 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_3 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, ((PyObject *)__pyx_v_data_array)};
      __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_3, 1+__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1034, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_self->matrices, __pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1034, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }

  /* "pysdif/_pysdif.pyx":1036
 *             self.matrices.append(np.ascontiguousarray(data_array))
 * 
 *         self.signatures[self.num_matrices] = str2sig(asbytes(signature))             # <<<<<<<<<<<<<<
 *         self.datatypes[self.num_matrices] = dtype_numpy2sdif(data_array.descr.type_num)
 *         # self.signatures.append(asbytes(signature))
 */
  __pyx_t_9 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_signature); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (unlikely(__pyx_t_9 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1036, __pyx_L1_error)
  }
  __pyx_t_11 = __Pyx_PyBytes_AsWritableString(__pyx_t_9); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 1036, __pyx_L1_error)
  __pyx_t_12 = __pyx_f_6pysdif_7_pysdif_str2sig(__pyx_t_11); if (unlikely(__pyx_t_12 == ((unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1036, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  (__pyx_v_self->signatures[__pyx_v_self->num_matrices]) = __pyx_t_12;

  /* "pysdif/_pysdif.pyx":1037
 * 
 *         self.signatures[self.num_matrices] = str2sig(asbytes(signature))
 *         self.datatypes[self.num_matrices] = dtype_numpy2sdif(data_array.descr.type_num)             # <<<<<<<<<<<<<<
 *         # self.signatures.append(asbytes(signature))
 *         self.num_matrices += 1
 */
  __pyx_t_9 = ((PyObject *)__pyx_f_5numpy_7ndarray_5descr_descr(__pyx_v_data_array)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_3 = __pyx_f_6pysdif_7_pysdif_dtype_numpy2sdif(((PyArray_Descr *)__pyx_t_9)->type_num); if (unlikely(__pyx_t_3 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  (__pyx_v_self->datatypes[__pyx_v_self->num_matrices]) = __pyx_t_3;

  /* "pysdif/_pysdif.pyx":1039
 *         self.datatypes[self.num_matrices] = dtype_numpy2sdif(data_array.descr.type_num)
 *         # self.signatures.append(asbytes(signature))
 *         self.num_matrices += 1             # <<<<<<<<<<<<<<
 *         self.frame_size += SdifSizeOfMatrix(
 *             <SdifDataTypeET>(dtype_numpy2sdif(data_array.descr.type_num)),
 */
  __pyx_v_self->num_matrices = (__pyx_v_self->num_matrices + 1);

  /* "pysdif/_pysdif.pyx":1041
 *         self.num_matrices += 1
 *         self.frame_size += SdifSizeOfMatrix(
 *             <SdifDataTypeET>(dtype_numpy2sdif(data_array.descr.type_num)),             # <<<<<<<<<<<<<<
 *             data_array.shape[0], data_array.shape[1]) # rows, cols
 * 
 */
  __pyx_t_9 = ((PyObject *)__pyx_f_5numpy_7ndarray_5descr_descr(__pyx_v_data_array)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_3 = __pyx_f_6pysdif_7_pysdif_dtype_numpy2sdif(((PyArray_Descr *)__pyx_t_9)->type_num); if (unlikely(__pyx_t_3 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1041, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "pysdif/_pysdif.pyx":1042
 *         self.frame_size += SdifSizeOfMatrix(
 *             <SdifDataTypeET>(dtype_numpy2sdif(data_array.descr.type_num)),
 *             data_array.shape[0], data_array.shape[1]) # rows, cols             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_6 = __pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_data_array); if (unlikely(__pyx_t_6 == ((npy_intp *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1042, __pyx_L1_error)
  __pyx_t_13 = __pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_data_array); if (unlikely(__pyx_t_13 == ((npy_intp *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1042, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1040
 *         # self.signatures.append(asbytes(signature))
 *         self.num_matrices += 1
 *         self.frame_size += SdifSizeOfMatrix(             # <<<<<<<<<<<<<<
 *             <SdifDataTypeET>(dtype_numpy2sdif(data_array.descr.type_num)),
 *             data_array.shape[0], data_array.shape[1]) # rows, cols
 */
  __pyx_v_self->frame_size = (__pyx_v_self->frame_size + SdifSizeOfMatrix(((SdifDataTypeET)__pyx_t_3), (__pyx_t_6[0]), (__pyx_t_13[1])));

  /* "pysdif/_pysdif.pyx":1016
 *         def __get__(self): return bool(self._written)
 * 
 *     def add_matrix(self, str signature, c_numpy.ndarray data_array):             # <<<<<<<<<<<<<<
 *         """
 *         Add a matrix to this Frame
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pysdif._pysdif.FrameW.add_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_shape);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1045
 * 
 * 
 *     def write(self):             # <<<<<<<<<<<<<<
 *         """
 *         Write the current frame to disk.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameW_11write(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_6FrameW_10write, "FrameW.write(self)\n\n        Write the current frame to disk. \n\n        This function should be called after all matrices have been added\n        via add_matrix. The frame is written all at once.\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_6FrameW_11write = {"write", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6FrameW_11write, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6FrameW_10write};
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameW_11write(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("write", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "write", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6FrameW_10write(((struct __pyx_obj_6pysdif_7_pysdif_FrameW *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameW_10write(struct __pyx_obj_6pysdif_7_pysdif_FrameW *__pyx_v_self) {
  SdifUInt4 __pyx_v_fsz;
  SdifSignature __pyx_v_matrix_sig;
  int __pyx_v_dtype;
  PyArrayObject *__pyx_v_matrix = 0;
  int __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  SdifUInt4 __pyx_t_3;
  SdifUInt4 __pyx_t_4;
  int __pyx_t_5;
  npy_intp *__pyx_t_6;
  npy_intp *__pyx_t_7;
  char *__pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("write", 1);

  /* "pysdif/_pysdif.pyx":1052
 *         via add_matrix. The frame is written all at once.
 *         """
 *         if self._written:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Frame has already been written!")
 * 
 */
  __pyx_t_1 = (__pyx_v_self->_written != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":1053
 *         """
 *         if self._written:
 *             raise RuntimeError("Frame has already been written!")             # <<<<<<<<<<<<<<
 * 
 *         cdef SdifUInt4 fsz
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __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(0, 1053, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1052
 *         via add_matrix. The frame is written all at once.
 *         """
 *         if self._written:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Frame has already been written!")
 * 
 */
  }

  /* "pysdif/_pysdif.pyx":1060
 *         cdef c_numpy.ndarray matrix
 *         cdef int i
 *         SdifFSetCurrFrameHeader(self.sdiffile.this, self.signature, self.frame_size,             # <<<<<<<<<<<<<<
 *                                 self.num_matrices, self.streamID, self.time)
 *         fsz = SdifFWriteFrameHeader(self.sdiffile.this)
 */
  (void)(SdifFSetCurrFrameHeader(__pyx_v_self->sdiffile->this, __pyx_v_self->signature, __pyx_v_self->frame_size, __pyx_v_self->num_matrices, __pyx_v_self->streamID, __pyx_v_self->time));

  /* "pysdif/_pysdif.pyx":1062
 *         SdifFSetCurrFrameHeader(self.sdiffile.this, self.signature, self.frame_size,
 *                                 self.num_matrices, self.streamID, self.time)
 *         fsz = SdifFWriteFrameHeader(self.sdiffile.this)             # <<<<<<<<<<<<<<
 *         for i in range(self.num_matrices):
 *             matrix_sig = self.signatures[i]
 */
  __pyx_v_fsz = SdifFWriteFrameHeader(__pyx_v_self->sdiffile->this);

  /* "pysdif/_pysdif.pyx":1063
 *                                 self.num_matrices, self.streamID, self.time)
 *         fsz = SdifFWriteFrameHeader(self.sdiffile.this)
 *         for i in range(self.num_matrices):             # <<<<<<<<<<<<<<
 *             matrix_sig = self.signatures[i]
 *             matrix = self.matrices[i]
 */
  __pyx_t_3 = __pyx_v_self->num_matrices;
  __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;

    /* "pysdif/_pysdif.pyx":1064
 *         fsz = SdifFWriteFrameHeader(self.sdiffile.this)
 *         for i in range(self.num_matrices):
 *             matrix_sig = self.signatures[i]             # <<<<<<<<<<<<<<
 *             matrix = self.matrices[i]
 *             dtype = self.datatypes[i]
 */
    __pyx_v_matrix_sig = (__pyx_v_self->signatures[__pyx_v_i]);

    /* "pysdif/_pysdif.pyx":1065
 *         for i in range(self.num_matrices):
 *             matrix_sig = self.signatures[i]
 *             matrix = self.matrices[i]             # <<<<<<<<<<<<<<
 *             dtype = self.datatypes[i]
 *             fsz += SdifFWriteMatrix(self.sdiffile.this, matrix_sig,
 */
    if (unlikely(__pyx_v_self->matrices == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 1065, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->matrices, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1065, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_matrix, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pysdif/_pysdif.pyx":1066
 *             matrix_sig = self.signatures[i]
 *             matrix = self.matrices[i]
 *             dtype = self.datatypes[i]             # <<<<<<<<<<<<<<
 *             fsz += SdifFWriteMatrix(self.sdiffile.this, matrix_sig,
 *                                     <SdifDataTypeET>dtype,
 */
    __pyx_v_dtype = (__pyx_v_self->datatypes[__pyx_v_i]);

    /* "pysdif/_pysdif.pyx":1069
 *             fsz += SdifFWriteMatrix(self.sdiffile.this, matrix_sig,
 *                                     <SdifDataTypeET>dtype,
 *                                     matrix.shape[0], matrix.shape[1],   # rows, cols             # <<<<<<<<<<<<<<
 *                                     matrix.data)
 *         self._written = 1
 */
    __pyx_t_6 = __pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_matrix); if (unlikely(__pyx_t_6 == ((npy_intp *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1069, __pyx_L1_error)
    __pyx_t_7 = __pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_matrix); if (unlikely(__pyx_t_7 == ((npy_intp *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1069, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1070
 *                                     <SdifDataTypeET>dtype,
 *                                     matrix.shape[0], matrix.shape[1],   # rows, cols
 *                                     matrix.data)             # <<<<<<<<<<<<<<
 *         self._written = 1
 *         self.sdiffile.write_status = eSdifMatrixData
 */
    __pyx_t_8 = __pyx_f_5numpy_7ndarray_4data_data(__pyx_v_matrix); if (unlikely(__pyx_t_8 == ((char *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1070, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1067
 *             matrix = self.matrices[i]
 *             dtype = self.datatypes[i]
 *             fsz += SdifFWriteMatrix(self.sdiffile.this, matrix_sig,             # <<<<<<<<<<<<<<
 *                                     <SdifDataTypeET>dtype,
 *                                     matrix.shape[0], matrix.shape[1],   # rows, cols
 */
    __pyx_v_fsz = (__pyx_v_fsz + SdifFWriteMatrix(__pyx_v_self->sdiffile->this, __pyx_v_matrix_sig, ((SdifDataTypeET)__pyx_v_dtype), (__pyx_t_6[0]), (__pyx_t_7[1]), __pyx_t_8));
  }

  /* "pysdif/_pysdif.pyx":1071
 *                                     matrix.shape[0], matrix.shape[1],   # rows, cols
 *                                     matrix.data)
 *         self._written = 1             # <<<<<<<<<<<<<<
 *         self.sdiffile.write_status = eSdifMatrixData
 * 
 */
  __pyx_v_self->_written = 1;

  /* "pysdif/_pysdif.pyx":1072
 *                                     matrix.data)
 *         self._written = 1
 *         self.sdiffile.write_status = eSdifMatrixData             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->sdiffile->write_status = __pyx_e_6pysdif_7_pysdif_eSdifMatrixData;

  /* "pysdif/_pysdif.pyx":1045
 * 
 * 
 *     def write(self):             # <<<<<<<<<<<<<<
 *         """
 *         Write the current frame to disk.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.FrameW.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_matrix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameW_13__reduce_cython__(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_6FrameW_12__reduce_cython__, "FrameW.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_6FrameW_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6FrameW_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6FrameW_12__reduce_cython__};
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameW_13__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6FrameW_12__reduce_cython__(((struct __pyx_obj_6pysdif_7_pysdif_FrameW *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameW_12__reduce_cython__(struct __pyx_obj_6pysdif_7_pysdif_FrameW *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  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;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 1);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._written, self.datatypes, self.frame_size, self.matrices, self.num_matrices, self.sdiffile, self.signature, self.signatures, self.streamID, self.time)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_written); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_carray_to_py_int(__pyx_v_self->datatypes, 0x64); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_SdifUInt4(__pyx_v_self->frame_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_SdifUInt4(__pyx_v_self->num_matrices); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_SdifUInt4(__pyx_v_self->signature); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_carray_to_py_SdifSignature(__pyx_v_self->signatures, 0x64); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyInt_From_SdifUInt4(__pyx_v_self->streamID); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = PyFloat_FromDouble(__pyx_v_self->time); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = PyTuple_New(10); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->matrices);
  __Pyx_GIVEREF(__pyx_v_self->matrices);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_v_self->matrices)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_INCREF((PyObject *)__pyx_v_self->sdiffile);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->sdiffile);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 5, ((PyObject *)__pyx_v_self->sdiffile))) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 6, __pyx_t_5)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 7, __pyx_t_6)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_7);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 8, __pyx_t_7)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_8);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 9, __pyx_t_8)) __PYX_ERR(1, 5, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._written, self.datatypes, self.frame_size, self.matrices, self.num_matrices, self.sdiffile, self.signature, self.signatures, self.streamID, self.time)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_9 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_v__dict = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "(tree fragment)":7
 *     state = (self._written, self.datatypes, self.frame_size, self.matrices, self.num_matrices, self.sdiffile, self.signature, self.signatures, self.streamID, self.time)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_10 = (__pyx_v__dict != Py_None);
  if (__pyx_t_10) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
    __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_8));
    __pyx_t_8 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.matrices is not None or self.sdiffile is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._written, self.datatypes, self.frame_size, self.matrices, self.num_matrices, self.sdiffile, self.signature, self.signatures, self.streamID, self.time)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.matrices is not None or self.sdiffile is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_FrameW, (type(self), 0x703a645, None), state
 */
  /*else*/ {
    __pyx_t_11 = (__pyx_v_self->matrices != ((PyObject*)Py_None));
    if (!__pyx_t_11) {
    } else {
      __pyx_t_10 = __pyx_t_11;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_11 = (((PyObject *)__pyx_v_self->sdiffile) != Py_None);
    __pyx_t_10 = __pyx_t_11;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_10;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.matrices is not None or self.sdiffile is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_FrameW, (type(self), 0x703a645, None), state
 *     else:
 */
  if (__pyx_v_use_setstate) {

    /* "(tree fragment)":13
 *         use_setstate = self.matrices is not None or self.sdiffile is not None
 *     if use_setstate:
 *         return __pyx_unpickle_FrameW, (type(self), 0x703a645, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_FrameW, (type(self), 0x703a645, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_pyx_unpickle_FrameW); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_117679685);
    __Pyx_GIVEREF(__pyx_int_117679685);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_int_117679685)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_9);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.matrices is not None or self.sdiffile is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_FrameW, (type(self), 0x703a645, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_FrameW, (type(self), 0x703a645, None), state
 *     else:
 *         return __pyx_unpickle_FrameW, (type(self), 0x703a645, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_FrameW__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_pyx_unpickle_FrameW); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_117679685);
    __Pyx_GIVEREF(__pyx_int_117679685);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_int_117679685)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_7);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_9);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_9)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_7 = 0;
    __pyx_t_9 = 0;
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* 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_AddTraceback("pysdif._pysdif.FrameW.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FrameW, (type(self), 0x703a645, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FrameW__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameW_15__setstate_cython__(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_6FrameW_14__setstate_cython__, "FrameW.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_6FrameW_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6FrameW_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6FrameW_14__setstate_cython__};
static PyObject *__pyx_pw_6pysdif_7_pysdif_6FrameW_15__setstate_cython__(PyObject *__pyx_v_self, 
#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___pyx_state = 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("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.FrameW.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_6FrameW_14__setstate_cython__(((struct __pyx_obj_6pysdif_7_pysdif_FrameW *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_6FrameW_14__setstate_cython__(struct __pyx_obj_6pysdif_7_pysdif_FrameW *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 1);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_FrameW, (type(self), 0x703a645, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_FrameW__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif___pyx_unpickle_FrameW__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FrameW, (type(self), 0x703a645, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FrameW__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.FrameW.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1075
 * 
 * 
 * cdef FrameW FrameW_new(SdifFile sdiffile, SdifSignature sig,             # <<<<<<<<<<<<<<
 *                        SdifFloat8 time, SdifUInt4 streamID=0):
 *     cdef FrameW f = FrameW()
 */

static struct __pyx_obj_6pysdif_7_pysdif_FrameW *__pyx_f_6pysdif_7_pysdif_FrameW_new(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_sdiffile, SdifSignature __pyx_v_sig, SdifFloat8 __pyx_v_time, struct __pyx_opt_args_6pysdif_7_pysdif_FrameW_new *__pyx_optional_args) {
  SdifUInt4 __pyx_v_streamID = ((SdifUInt4)0);
  struct __pyx_obj_6pysdif_7_pysdif_FrameW *__pyx_v_f = 0;
  struct __pyx_obj_6pysdif_7_pysdif_FrameW *__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("FrameW_new", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_streamID = __pyx_optional_args->streamID;
    }
  }

  /* "pysdif/_pysdif.pyx":1077
 * cdef FrameW FrameW_new(SdifFile sdiffile, SdifSignature sig,
 *                        SdifFloat8 time, SdifUInt4 streamID=0):
 *     cdef FrameW f = FrameW()             # <<<<<<<<<<<<<<
 *     f.sdiffile = sdiffile
 *     f.signature = sig
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6pysdif_7_pysdif_FrameW)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1077, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_f = ((struct __pyx_obj_6pysdif_7_pysdif_FrameW *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":1078
 *                        SdifFloat8 time, SdifUInt4 streamID=0):
 *     cdef FrameW f = FrameW()
 *     f.sdiffile = sdiffile             # <<<<<<<<<<<<<<
 *     f.signature = sig
 *     f.time = time
 */
  __Pyx_INCREF((PyObject *)__pyx_v_sdiffile);
  __Pyx_GIVEREF((PyObject *)__pyx_v_sdiffile);
  __Pyx_GOTREF((PyObject *)__pyx_v_f->sdiffile);
  __Pyx_DECREF((PyObject *)__pyx_v_f->sdiffile);
  __pyx_v_f->sdiffile = __pyx_v_sdiffile;

  /* "pysdif/_pysdif.pyx":1079
 *     cdef FrameW f = FrameW()
 *     f.sdiffile = sdiffile
 *     f.signature = sig             # <<<<<<<<<<<<<<
 *     f.time = time
 *     f.streamID = streamID
 */
  __pyx_v_f->signature = __pyx_v_sig;

  /* "pysdif/_pysdif.pyx":1080
 *     f.sdiffile = sdiffile
 *     f.signature = sig
 *     f.time = time             # <<<<<<<<<<<<<<
 *     f.streamID = streamID
 *     f.matrices = []
 */
  __pyx_v_f->time = __pyx_v_time;

  /* "pysdif/_pysdif.pyx":1081
 *     f.signature = sig
 *     f.time = time
 *     f.streamID = streamID             # <<<<<<<<<<<<<<
 *     f.matrices = []
 *     f.frame_size = SdifSizeOfFrameHeader()
 */
  __pyx_v_f->streamID = __pyx_v_streamID;

  /* "pysdif/_pysdif.pyx":1082
 *     f.time = time
 *     f.streamID = streamID
 *     f.matrices = []             # <<<<<<<<<<<<<<
 *     f.frame_size = SdifSizeOfFrameHeader()
 *     f.num_matrices = 0
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_f->matrices);
  __Pyx_DECREF(__pyx_v_f->matrices);
  __pyx_v_f->matrices = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":1083
 *     f.streamID = streamID
 *     f.matrices = []
 *     f.frame_size = SdifSizeOfFrameHeader()             # <<<<<<<<<<<<<<
 *     f.num_matrices = 0
 *     f._written = 0
 */
  __pyx_v_f->frame_size = SdifSizeOfFrameHeader();

  /* "pysdif/_pysdif.pyx":1084
 *     f.matrices = []
 *     f.frame_size = SdifSizeOfFrameHeader()
 *     f.num_matrices = 0             # <<<<<<<<<<<<<<
 *     f._written = 0
 *     return f
 */
  __pyx_v_f->num_matrices = 0;

  /* "pysdif/_pysdif.pyx":1085
 *     f.frame_size = SdifSizeOfFrameHeader()
 *     f.num_matrices = 0
 *     f._written = 0             # <<<<<<<<<<<<<<
 *     return f
 * 
 */
  __pyx_v_f->_written = 0;

  /* "pysdif/_pysdif.pyx":1086
 *     f.num_matrices = 0
 *     f._written = 0
 *     return f             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_f);
  __pyx_r = __pyx_v_f;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1075
 * 
 * 
 * cdef FrameW FrameW_new(SdifFile sdiffile, SdifSignature sig,             # <<<<<<<<<<<<<<
 *                        SdifFloat8 time, SdifUInt4 streamID=0):
 *     cdef FrameW f = FrameW()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.FrameW_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_f);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1166
 *     cdef set _matrixtypes_defined  # a set of byte signatures
 * 
 *     def __cinit__(self, filename, mode="r", predefined_type=None):             # <<<<<<<<<<<<<<
 *         sdif_init()
 *         self.this = NULL
 */

/* Python wrapper */
static int __pyx_pw_6pysdif_7_pysdif_8SdifFile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pysdif_7_pysdif_8SdifFile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_filename = 0;
  PyObject *__pyx_v_mode = 0;
  CYTHON_UNUSED PyObject *__pyx_v_predefined_type = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  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;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_mode,&__pyx_n_s_predefined_type,0};
    values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_n_s_r));
    values[2] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1166, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode);
          if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1166, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_predefined_type);
          if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1166, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1166, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_filename = values[0];
    __pyx_v_mode = values[1];
    __pyx_v_predefined_type = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1166, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile___cinit__(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self), __pyx_v_filename, __pyx_v_mode, __pyx_v_predefined_type);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pysdif_7_pysdif_8SdifFile___cinit__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, CYTHON_UNUSED PyObject *__pyx_v_predefined_type) {
  PyObject *__pyx_v_errormsg = NULL;
  PyObject *__pyx_v_path = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  const char* __pyx_t_9;
  SdifFileModeET __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_INCREF(__pyx_v_filename);

  /* "pysdif/_pysdif.pyx":1167
 * 
 *     def __cinit__(self, filename, mode="r", predefined_type=None):
 *         sdif_init()             # <<<<<<<<<<<<<<
 *         self.this = NULL
 *         errormsg = None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sdif_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":1168
 *     def __cinit__(self, filename, mode="r", predefined_type=None):
 *         sdif_init()
 *         self.this = NULL             # <<<<<<<<<<<<<<
 *         errormsg = None
 *         filename = asbytes(filename)
 */
  __pyx_v_self->this = NULL;

  /* "pysdif/_pysdif.pyx":1169
 *         sdif_init()
 *         self.this = NULL
 *         errormsg = None             # <<<<<<<<<<<<<<
 *         filename = asbytes(filename)
 *         if mode == "r" or mode == "rw":
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_errormsg = Py_None;

  /* "pysdif/_pysdif.pyx":1170
 *         self.this = NULL
 *         errormsg = None
 *         filename = asbytes(filename)             # <<<<<<<<<<<<<<
 *         if mode == "r" or mode == "rw":
 *             if not os.path.exists(filename):
 */
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":1171
 *         errormsg = None
 *         filename = asbytes(filename)
 *         if mode == "r" or mode == "rw":             # <<<<<<<<<<<<<<
 *             if not os.path.exists(filename):
 *                 errormsg = "path not found, cannot open sdif file for reading"
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_r, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1171, __pyx_L1_error)
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_rw, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1171, __pyx_L1_error)
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "pysdif/_pysdif.pyx":1172
 *         filename = asbytes(filename)
 *         if mode == "r" or mode == "rw":
 *             if not os.path.exists(filename):             # <<<<<<<<<<<<<<
 *                 errormsg = "path not found, cannot open sdif file for reading"
 *         elif mode == "w":
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_exists); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_filename};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1172, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = (!__pyx_t_5);
    if (__pyx_t_6) {

      /* "pysdif/_pysdif.pyx":1173
 *         if mode == "r" or mode == "rw":
 *             if not os.path.exists(filename):
 *                 errormsg = "path not found, cannot open sdif file for reading"             # <<<<<<<<<<<<<<
 *         elif mode == "w":
 *             path = os.path.split(os.path.abspath(filename))[0]
 */
      __Pyx_INCREF(__pyx_kp_s_path_not_found_cannot_open_sdif);
      __Pyx_DECREF_SET(__pyx_v_errormsg, __pyx_kp_s_path_not_found_cannot_open_sdif);

      /* "pysdif/_pysdif.pyx":1172
 *         filename = asbytes(filename)
 *         if mode == "r" or mode == "rw":
 *             if not os.path.exists(filename):             # <<<<<<<<<<<<<<
 *                 errormsg = "path not found, cannot open sdif file for reading"
 *         elif mode == "w":
 */
    }

    /* "pysdif/_pysdif.pyx":1171
 *         errormsg = None
 *         filename = asbytes(filename)
 *         if mode == "r" or mode == "rw":             # <<<<<<<<<<<<<<
 *             if not os.path.exists(filename):
 *                 errormsg = "path not found, cannot open sdif file for reading"
 */
    goto __pyx_L3;
  }

  /* "pysdif/_pysdif.pyx":1174
 *             if not os.path.exists(filename):
 *                 errormsg = "path not found, cannot open sdif file for reading"
 *         elif mode == "w":             # <<<<<<<<<<<<<<
 *             path = os.path.split(os.path.abspath(filename))[0]
 *             if not os.path.exists(path):
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_w, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1174, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pysdif/_pysdif.pyx":1175
 *                 errormsg = "path not found, cannot open sdif file for reading"
 *         elif mode == "w":
 *             path = os.path.split(os.path.abspath(filename))[0]             # <<<<<<<<<<<<<<
 *             if not os.path.exists(path):
 *                 errormsg = "Path %s does not exist, can't create a file" % path
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_os); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_path); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_abspath); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_filename};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_t_7 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_path = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pysdif/_pysdif.pyx":1176
 *         elif mode == "w":
 *             path = os.path.split(os.path.abspath(filename))[0]
 *             if not os.path.exists(path):             # <<<<<<<<<<<<<<
 *                 errormsg = "Path %s does not exist, can't create a file" % path
 *         else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_exists); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_path};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1176, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1176, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = (!__pyx_t_6);
    if (__pyx_t_5) {

      /* "pysdif/_pysdif.pyx":1177
 *             path = os.path.split(os.path.abspath(filename))[0]
 *             if not os.path.exists(path):
 *                 errormsg = "Path %s does not exist, can't create a file" % path             # <<<<<<<<<<<<<<
 *         else:
 *             errormsg = "mode should be on of 'r', 'w', 'rw'"
 */
      __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Path_s_does_not_exist_can_t_crea, __pyx_v_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_errormsg, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pysdif/_pysdif.pyx":1176
 *         elif mode == "w":
 *             path = os.path.split(os.path.abspath(filename))[0]
 *             if not os.path.exists(path):             # <<<<<<<<<<<<<<
 *                 errormsg = "Path %s does not exist, can't create a file" % path
 *         else:
 */
    }

    /* "pysdif/_pysdif.pyx":1174
 *             if not os.path.exists(filename):
 *                 errormsg = "path not found, cannot open sdif file for reading"
 *         elif mode == "w":             # <<<<<<<<<<<<<<
 *             path = os.path.split(os.path.abspath(filename))[0]
 *             if not os.path.exists(path):
 */
    goto __pyx_L3;
  }

  /* "pysdif/_pysdif.pyx":1179
 *                 errormsg = "Path %s does not exist, can't create a file" % path
 *         else:
 *             errormsg = "mode should be on of 'r', 'w', 'rw'"             # <<<<<<<<<<<<<<
 * 
 *         if errormsg is not None:
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_kp_s_mode_should_be_on_of_r_w_rw);
    __Pyx_DECREF_SET(__pyx_v_errormsg, __pyx_kp_s_mode_should_be_on_of_r_w_rw);
  }
  __pyx_L3:;

  /* "pysdif/_pysdif.pyx":1181
 *             errormsg = "mode should be on of 'r', 'w', 'rw'"
 * 
 *         if errormsg is not None:             # <<<<<<<<<<<<<<
 *             self.eof = SDIF_CLOSED
 *             print(errormsg)
 */
  __pyx_t_5 = (__pyx_v_errormsg != Py_None);
  if (__pyx_t_5) {

    /* "pysdif/_pysdif.pyx":1182
 * 
 *         if errormsg is not None:
 *             self.eof = SDIF_CLOSED             # <<<<<<<<<<<<<<
 *             print(errormsg)
 *             logger.error(errormsg)
 */
    __pyx_v_self->eof = __pyx_v_6pysdif_7_pysdif_SDIF_CLOSED;

    /* "pysdif/_pysdif.pyx":1183
 *         if errormsg is not None:
 *             self.eof = SDIF_CLOSED
 *             print(errormsg)             # <<<<<<<<<<<<<<
 *             logger.error(errormsg)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v_errormsg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysdif/_pysdif.pyx":1184
 *             self.eof = SDIF_CLOSED
 *             print(errormsg)
 *             logger.error(errormsg)             # <<<<<<<<<<<<<<
 *         else:
 *             self.this = SdifFOpen(asbytes(filename), FILEMODE_STR2MODE[mode])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_errormsg};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1184, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysdif/_pysdif.pyx":1181
 *             errormsg = "mode should be on of 'r', 'w', 'rw'"
 * 
 *         if errormsg is not None:             # <<<<<<<<<<<<<<
 *             self.eof = SDIF_CLOSED
 *             print(errormsg)
 */
    goto __pyx_L8;
  }

  /* "pysdif/_pysdif.pyx":1186
 *             logger.error(errormsg)
 *         else:
 *             self.this = SdifFOpen(asbytes(filename), FILEMODE_STR2MODE[mode])             # <<<<<<<<<<<<<<
 *             self.eof = 0
 *             self.matrix_idx = 0
 */
  /*else*/ {
    __pyx_t_2 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(__pyx_t_2 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
      __PYX_ERR(0, 1186, __pyx_L1_error)
    }
    __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_t_2); if (unlikely((__pyx_t_9 == ((const char*)NULL)) && PyErr_Occurred())) __PYX_ERR(0, 1186, __pyx_L1_error)
    if (unlikely(__pyx_v_6pysdif_7_pysdif_FILEMODE_STR2MODE == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 1186, __pyx_L1_error)
    }
    __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_6pysdif_7_pysdif_FILEMODE_STR2MODE, __pyx_v_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = ((enum SdifFileModeE)__Pyx_PyInt_As_enum__SdifFileModeE(__pyx_t_3)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1186, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_self->this = SdifFOpen(__pyx_t_9, __pyx_t_10);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysdif/_pysdif.pyx":1187
 *         else:
 *             self.this = SdifFOpen(asbytes(filename), FILEMODE_STR2MODE[mode])
 *             self.eof = 0             # <<<<<<<<<<<<<<
 *             self.matrix_idx = 0
 * 
 */
    __pyx_v_self->eof = 0;

    /* "pysdif/_pysdif.pyx":1188
 *             self.this = SdifFOpen(asbytes(filename), FILEMODE_STR2MODE[mode])
 *             self.eof = 0
 *             self.matrix_idx = 0             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, str filename, mode="r"):
 */
    __pyx_v_self->matrix_idx = 0;
  }
  __pyx_L8:;

  /* "pysdif/_pysdif.pyx":1166
 *     cdef set _matrixtypes_defined  # a set of byte signatures
 * 
 *     def __cinit__(self, filename, mode="r", predefined_type=None):             # <<<<<<<<<<<<<<
 *         sdif_init()
 *         self.this = NULL
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_errormsg);
  __Pyx_XDECREF(__pyx_v_path);
  __Pyx_XDECREF(__pyx_v_filename);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1190
 *             self.matrix_idx = 0
 * 
 *     def __init__(self, str filename, mode="r"):             # <<<<<<<<<<<<<<
 *         """
 *         Args:
 */

/* Python wrapper */
static int __pyx_pw_6pysdif_7_pysdif_8SdifFile_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
PyDoc_STRVAR(__pyx_doc_6pysdif_7_pysdif_8SdifFile_2__init__, "\n        Args:\n            filename (str): the sdif file to open\n            mode (str): r=read, w=write\n        ");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_6pysdif_7_pysdif_8SdifFile_2__init__;
#endif
static int __pyx_pw_6pysdif_7_pysdif_8SdifFile_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_filename = 0;
  CYTHON_UNUSED PyObject *__pyx_v_mode = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_mode,0};
    values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_n_s_r));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1190, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode);
          if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1190, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1190, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_filename = ((PyObject*)values[0]);
    __pyx_v_mode = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1190, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filename), (&PyString_Type), 1, "filename", 1))) __PYX_ERR(0, 1190, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_2__init__(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self), __pyx_v_filename, __pyx_v_mode);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pysdif_7_pysdif_8SdifFile_2__init__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, PyObject *__pyx_v_filename, CYTHON_UNUSED PyObject *__pyx_v_mode) {
  PyObject *__pyx_v_sigs = NULL;
  PyObject *__pyx_8genexpr8__pyx_v_ftd = NULL;
  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;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "pysdif/_pysdif.pyx":1196
 *             mode (str): r=read, w=write
 *         """
 *         if self.eof == SDIF_CLOSED or self.this == NULL:             # <<<<<<<<<<<<<<
 *             logger.debug("error opening file")
 *             raise IOError("Could not open %s" % filename)
 */
  __pyx_t_2 = (__pyx_v_self->eof == __pyx_v_6pysdif_7_pysdif_SDIF_CLOSED);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->this == NULL);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":1197
 *         """
 *         if self.eof == SDIF_CLOSED or self.this == NULL:
 *             logger.debug("error opening file")             # <<<<<<<<<<<<<<
 *             raise IOError("Could not open %s" % filename)
 *         logger.debug("SdifFile.__init__")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_debug); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_error_opening_file};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pysdif/_pysdif.pyx":1198
 *         if self.eof == SDIF_CLOSED or self.this == NULL:
 *             logger.debug("error opening file")
 *             raise IOError("Could not open %s" % filename)             # <<<<<<<<<<<<<<
 *         logger.debug("SdifFile.__init__")
 *         if self.this.Mode == eReadFile:
 */
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Could_not_open_s, __pyx_v_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 1198, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1196
 *             mode (str): r=read, w=write
 *         """
 *         if self.eof == SDIF_CLOSED or self.this == NULL:             # <<<<<<<<<<<<<<
 *             logger.debug("error opening file")
 *             raise IOError("Could not open %s" % filename)
 */
  }

  /* "pysdif/_pysdif.pyx":1199
 *             logger.debug("error opening file")
 *             raise IOError("Could not open %s" % filename)
 *         logger.debug("SdifFile.__init__")             # <<<<<<<<<<<<<<
 *         if self.this.Mode == eReadFile:
 *             self.init_read()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_s_SdifFile___init};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":1200
 *             raise IOError("Could not open %s" % filename)
 *         logger.debug("SdifFile.__init__")
 *         if self.this.Mode == eReadFile:             # <<<<<<<<<<<<<<
 *             self.init_read()
 *             sigs = {ftd.signature for ftd in self.get_frame_types()}
 */
  switch (__pyx_v_self->this->Mode) {
    case eReadFile:

    /* "pysdif/_pysdif.pyx":1201
 *         logger.debug("SdifFile.__init__")
 *         if self.this.Mode == eReadFile:
 *             self.init_read()             # <<<<<<<<<<<<<<
 *             sigs = {ftd.signature for ftd in self.get_frame_types()}
 *             if self.signature not in sigs:
 */
    ((struct __pyx_vtabstruct_6pysdif_7_pysdif_SdifFile *)__pyx_v_self->__pyx_vtab)->init_read(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1201, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1202
 *         if self.this.Mode == eReadFile:
 *             self.init_read()
 *             sigs = {ftd.signature for ftd in self.get_frame_types()}             # <<<<<<<<<<<<<<
 *             if self.signature not in sigs:
 *                 if self.signature in predefined_frametypes():
 */
    { /* enter inner scope */
      __pyx_t_5 = PySet_New(NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1202, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_frame_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1202, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1202, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
        __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3);
        __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1202, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1202, __pyx_L8_error)
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (likely(!__pyx_t_9)) {
          if (likely(PyList_CheckExact(__pyx_t_3))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1202, __pyx_L8_error)
              #endif
              if (__pyx_t_8 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 1202, __pyx_L8_error)
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1202, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1202, __pyx_L8_error)
              #endif
              if (__pyx_t_8 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 1202, __pyx_L8_error)
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1202, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          }
        } else {
          __pyx_t_4 = __pyx_t_9(__pyx_t_3);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 1202, __pyx_L8_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_ftd, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr8__pyx_v_ftd, __pyx_n_s_signature); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1202, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(PySet_Add(__pyx_t_5, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1202, __pyx_L8_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_ftd); __pyx_8genexpr8__pyx_v_ftd = 0;
      goto __pyx_L12_exit_scope;
      __pyx_L8_error:;
      __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_ftd); __pyx_8genexpr8__pyx_v_ftd = 0;
      goto __pyx_L1_error;
      __pyx_L12_exit_scope:;
    } /* exit inner scope */
    __pyx_v_sigs = ((PyObject*)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "pysdif/_pysdif.pyx":1203
 *             self.init_read()
 *             sigs = {ftd.signature for ftd in self.get_frame_types()}
 *             if self.signature not in sigs:             # <<<<<<<<<<<<<<
 *                 if self.signature in predefined_frametypes():
 *                     self.add_predefined_frametype(self.signature)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_signature); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = (__Pyx_PySet_ContainsTF(__pyx_t_5, __pyx_v_sigs, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1203, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_1) {

      /* "pysdif/_pysdif.pyx":1204
 *             sigs = {ftd.signature for ftd in self.get_frame_types()}
 *             if self.signature not in sigs:
 *                 if self.signature in predefined_frametypes():             # <<<<<<<<<<<<<<
 *                     self.add_predefined_frametype(self.signature)
 *                 else:
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_signature); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_predefined_frametypes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1204, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_5, __pyx_t_3, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1204, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_1) {

        /* "pysdif/_pysdif.pyx":1205
 *             if self.signature not in sigs:
 *                 if self.signature in predefined_frametypes():
 *                     self.add_predefined_frametype(self.signature)             # <<<<<<<<<<<<<<
 *                 else:
 *                     logger.error("Undefined frametype: {sig}.\n"
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_predefined_frametype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1205, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_signature); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1205, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = NULL;
        __pyx_t_6 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_6 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_4};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1205, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "pysdif/_pysdif.pyx":1204
 *             sigs = {ftd.signature for ftd in self.get_frame_types()}
 *             if self.signature not in sigs:
 *                 if self.signature in predefined_frametypes():             # <<<<<<<<<<<<<<
 *                     self.add_predefined_frametype(self.signature)
 *                 else:
 */
        goto __pyx_L14;
      }

      /* "pysdif/_pysdif.pyx":1207
 *                     self.add_predefined_frametype(self.signature)
 *                 else:
 *                     logger.error("Undefined frametype: {sig}.\n"             # <<<<<<<<<<<<<<
 *                                  "You must add the frametype definition and the"
 *                                  "corresponding matrix definitions before reading"
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1207, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1207, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "pysdif/_pysdif.pyx":1210
 *                                  "You must add the frametype definition and the"
 *                                  "corresponding matrix definitions before reading"
 *                                  "".format(sig=self.signature))             # <<<<<<<<<<<<<<
 *         elif self.this.Mode == eWriteFile:
 *             self.init_write()
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Undefined_frametype_sig_You_must, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1210, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1210, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_signature); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1210, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_sig, __pyx_t_10) < 0) __PYX_ERR(0, 1210, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1210, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = NULL;
        __pyx_t_6 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_6 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_10};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1207, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __pyx_L14:;

      /* "pysdif/_pysdif.pyx":1203
 *             self.init_read()
 *             sigs = {ftd.signature for ftd in self.get_frame_types()}
 *             if self.signature not in sigs:             # <<<<<<<<<<<<<<
 *                 if self.signature in predefined_frametypes():
 *                     self.add_predefined_frametype(self.signature)
 */
    }

    /* "pysdif/_pysdif.pyx":1200
 *             raise IOError("Could not open %s" % filename)
 *         logger.debug("SdifFile.__init__")
 *         if self.this.Mode == eReadFile:             # <<<<<<<<<<<<<<
 *             self.init_read()
 *             sigs = {ftd.signature for ftd in self.get_frame_types()}
 */
    break;
    case eWriteFile:

    /* "pysdif/_pysdif.pyx":1212
 *                                  "".format(sig=self.signature))
 *         elif self.this.Mode == eWriteFile:
 *             self.init_write()             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
    ((struct __pyx_vtabstruct_6pysdif_7_pysdif_SdifFile *)__pyx_v_self->__pyx_vtab)->init_write(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1212, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1211
 *                                  "corresponding matrix definitions before reading"
 *                                  "".format(sig=self.signature))
 *         elif self.this.Mode == eWriteFile:             # <<<<<<<<<<<<<<
 *             self.init_write()
 * 
 */
    break;
    default: break;
  }

  /* "pysdif/_pysdif.pyx":1190
 *             self.matrix_idx = 0
 * 
 *     def __init__(self, str filename, mode="r"):             # <<<<<<<<<<<<<<
 *         """
 *         Args:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sigs);
  __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_ftd);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1214
 *             self.init_write()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self.this == NULL:
 *             return "SdifFile(NULL)"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_5__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_4__repr__(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_4__repr__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "pysdif/_pysdif.pyx":1215
 * 
 *     def __repr__(self):
 *         if self.this == NULL:             # <<<<<<<<<<<<<<
 *             return "SdifFile(NULL)"
 *         l = []
 */
  __pyx_t_1 = (__pyx_v_self->this == NULL);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1216
 *     def __repr__(self):
 *         if self.this == NULL:
 *             return "SdifFile(NULL)"             # <<<<<<<<<<<<<<
 *         l = []
 *         l.append("SdifFile(name={name}, mode={mode})".format(name=self.name, mode=self.mode))
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_s_SdifFile_NULL);
    __pyx_r = __pyx_kp_s_SdifFile_NULL;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1215
 * 
 *     def __repr__(self):
 *         if self.this == NULL:             # <<<<<<<<<<<<<<
 *             return "SdifFile(NULL)"
 *         l = []
 */
  }

  /* "pysdif/_pysdif.pyx":1217
 *         if self.this == NULL:
 *             return "SdifFile(NULL)"
 *         l = []             # <<<<<<<<<<<<<<
 *         l.append("SdifFile(name={name}, mode={mode})".format(name=self.name, mode=self.mode))
 *         if self.mode == 'r' or self.mode == 'rw':
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_l = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":1218
 *             return "SdifFile(NULL)"
 *         l = []
 *         l.append("SdifFile(name={name}, mode={mode})".format(name=self.name, mode=self.mode))             # <<<<<<<<<<<<<<
 *         if self.mode == 'r' or self.mode == 'rw':
 *             l.append("Status: Frame: {frame}  | MatrixIdx: {midx} | Matrix: {matrix}".format(
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_SdifFile_name_name_mode_mode, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_t_4) < 0) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_mode, __pyx_t_4) < 0) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_l, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysdif/_pysdif.pyx":1219
 *         l = []
 *         l.append("SdifFile(name={name}, mode={mode})".format(name=self.name, mode=self.mode))
 *         if self.mode == 'r' or self.mode == 'rw':             # <<<<<<<<<<<<<<
 *             l.append("Status: Frame: {frame}  | MatrixIdx: {midx} | Matrix: {matrix}".format(
 *                 frame=framestatus2str(self.frame_status),
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_r, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_rw, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __pyx_t_6;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1220
 *         l.append("SdifFile(name={name}, mode={mode})".format(name=self.name, mode=self.mode))
 *         if self.mode == 'r' or self.mode == 'rw':
 *             l.append("Status: Frame: {frame}  | MatrixIdx: {midx} | Matrix: {matrix}".format(             # <<<<<<<<<<<<<<
 *                 frame=framestatus2str(self.frame_status),
 *                 midx=self.matrix_idx,
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Status_Frame_frame_MatrixIdx_mid, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "pysdif/_pysdif.pyx":1221
 *         if self.mode == 'r' or self.mode == 'rw':
 *             l.append("Status: Frame: {frame}  | MatrixIdx: {midx} | Matrix: {matrix}".format(
 *                 frame=framestatus2str(self.frame_status),             # <<<<<<<<<<<<<<
 *                 midx=self.matrix_idx,
 *                 matrix=matrixstatus2str(self.matrix_status))
 */
    __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_framestatus2str); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyInt_From_enum____pyx_t_6pysdif_7_pysdif_FrameStatusE(__pyx_v_self->frame_status); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_8};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1221, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_frame, __pyx_t_2) < 0) __PYX_ERR(0, 1221, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysdif/_pysdif.pyx":1222
 *             l.append("Status: Frame: {frame}  | MatrixIdx: {midx} | Matrix: {matrix}".format(
 *                 frame=framestatus2str(self.frame_status),
 *                 midx=self.matrix_idx,             # <<<<<<<<<<<<<<
 *                 matrix=matrixstatus2str(self.matrix_status))
 *             )
 */
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->matrix_idx); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_midx, __pyx_t_2) < 0) __PYX_ERR(0, 1221, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysdif/_pysdif.pyx":1223
 *                 frame=framestatus2str(self.frame_status),
 *                 midx=self.matrix_idx,
 *                 matrix=matrixstatus2str(self.matrix_status))             # <<<<<<<<<<<<<<
 *             )
 *         return "\n".join(l)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_matrixstatus2str); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyInt_From_enum____pyx_t_6pysdif_7_pysdif_MatrixStatusE(__pyx_v_self->matrix_status); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_8};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1223, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_matrix, __pyx_t_2) < 0) __PYX_ERR(0, 1221, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysdif/_pysdif.pyx":1220
 *         l.append("SdifFile(name={name}, mode={mode})".format(name=self.name, mode=self.mode))
 *         if self.mode == 'r' or self.mode == 'rw':
 *             l.append("Status: Frame: {frame}  | MatrixIdx: {midx} | Matrix: {matrix}".format(             # <<<<<<<<<<<<<<
 *                 frame=framestatus2str(self.frame_status),
 *                 midx=self.matrix_idx,
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_l, __pyx_t_2); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1220, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysdif/_pysdif.pyx":1219
 *         l = []
 *         l.append("SdifFile(name={name}, mode={mode})".format(name=self.name, mode=self.mode))
 *         if self.mode == 'r' or self.mode == 'rw':             # <<<<<<<<<<<<<<
 *             l.append("Status: Frame: {frame}  | MatrixIdx: {midx} | Matrix: {matrix}".format(
 *                 frame=framestatus2str(self.frame_status),
 */
  }

  /* "pysdif/_pysdif.pyx":1225
 *                 matrix=matrixstatus2str(self.matrix_status))
 *             )
 *         return "\n".join(l)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__14, __pyx_v_l); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1214
 *             self.init_write()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self.this == NULL:
 *             return "SdifFile(NULL)"
 */

  /* 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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1228
 * 
 * 
 *     cdef void init_read(self):             # <<<<<<<<<<<<<<
 *         SdifFReadGeneralHeader (self.this)
 *         SdifFReadAllASCIIChunks(self.this)
 */

static void __pyx_f_6pysdif_7_pysdif_8SdifFile_init_read(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pysdif/_pysdif.pyx":1229
 * 
 *     cdef void init_read(self):
 *         SdifFReadGeneralHeader (self.this)             # <<<<<<<<<<<<<<
 *         SdifFReadAllASCIIChunks(self.this)
 *         self.eof = (self.this.CurrSignature == eEof)
 */
  (void)(SdifFReadGeneralHeader(__pyx_v_self->this));

  /* "pysdif/_pysdif.pyx":1230
 *     cdef void init_read(self):
 *         SdifFReadGeneralHeader (self.this)
 *         SdifFReadAllASCIIChunks(self.this)             # <<<<<<<<<<<<<<
 *         self.eof = (self.this.CurrSignature == eEof)
 *         self.this.TextStream = stdout  # this is needed by the print functions
 */
  (void)(SdifFReadAllASCIIChunks(__pyx_v_self->this));

  /* "pysdif/_pysdif.pyx":1231
 *         SdifFReadGeneralHeader (self.this)
 *         SdifFReadAllASCIIChunks(self.this)
 *         self.eof = (self.this.CurrSignature == eEof)             # <<<<<<<<<<<<<<
 *         self.this.TextStream = stdout  # this is needed by the print functions
 *         self.init_containers()
 */
  __pyx_v_self->eof = (__pyx_v_self->this->CurrSignature == eEof);

  /* "pysdif/_pysdif.pyx":1232
 *         SdifFReadAllASCIIChunks(self.this)
 *         self.eof = (self.this.CurrSignature == eEof)
 *         self.this.TextStream = stdout  # this is needed by the print functions             # <<<<<<<<<<<<<<
 *         self.init_containers()
 *         self.frame_status = eFrameNothingRead
 */
  __pyx_v_self->this->TextStream = stdout;

  /* "pysdif/_pysdif.pyx":1233
 *         self.eof = (self.this.CurrSignature == eEof)
 *         self.this.TextStream = stdout  # this is needed by the print functions
 *         self.init_containers()             # <<<<<<<<<<<<<<
 *         self.frame_status = eFrameNothingRead
 *         self.matrix_idx = 0
 */
  ((struct __pyx_vtabstruct_6pysdif_7_pysdif_SdifFile *)__pyx_v_self->__pyx_vtab)->init_containers(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1233, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1234
 *         self.this.TextStream = stdout  # this is needed by the print functions
 *         self.init_containers()
 *         self.frame_status = eFrameNothingRead             # <<<<<<<<<<<<<<
 *         self.matrix_idx = 0
 *         self.matrix_status = eMatrixNothingRead
 */
  __pyx_v_self->frame_status = __pyx_e_6pysdif_7_pysdif_eFrameNothingRead;

  /* "pysdif/_pysdif.pyx":1235
 *         self.init_containers()
 *         self.frame_status = eFrameNothingRead
 *         self.matrix_idx = 0             # <<<<<<<<<<<<<<
 *         self.matrix_status = eMatrixNothingRead
 * 
 */
  __pyx_v_self->matrix_idx = 0;

  /* "pysdif/_pysdif.pyx":1236
 *         self.frame_status = eFrameNothingRead
 *         self.matrix_idx = 0
 *         self.matrix_status = eMatrixNothingRead             # <<<<<<<<<<<<<<
 * 
 *     cdef void init_containers(self):
 */
  __pyx_v_self->matrix_status = __pyx_e_6pysdif_7_pysdif_eMatrixNothingRead;

  /* "pysdif/_pysdif.pyx":1228
 * 
 * 
 *     cdef void init_read(self):             # <<<<<<<<<<<<<<
 *         SdifFReadGeneralHeader (self.this)
 *         SdifFReadAllASCIIChunks(self.this)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.init_read", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "pysdif/_pysdif.pyx":1238
 *         self.matrix_status = eMatrixNothingRead
 * 
 *     cdef void init_containers(self):             # <<<<<<<<<<<<<<
 *         self.frame = FrameR(self)
 *         self.matrix = Matrix(self)
 */

static void __pyx_f_6pysdif_7_pysdif_8SdifFile_init_containers(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("init_containers", 1);

  /* "pysdif/_pysdif.pyx":1239
 * 
 *     cdef void init_containers(self):
 *         self.frame = FrameR(self)             # <<<<<<<<<<<<<<
 *         self.matrix = Matrix(self)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pysdif_7_pysdif_FrameR), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->frame);
  __Pyx_DECREF((PyObject *)__pyx_v_self->frame);
  __pyx_v_self->frame = ((struct __pyx_obj_6pysdif_7_pysdif_FrameR *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":1240
 *     cdef void init_containers(self):
 *         self.frame = FrameR(self)
 *         self.matrix = Matrix(self)             # <<<<<<<<<<<<<<
 * 
 *     cdef void init_write(self):
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pysdif_7_pysdif_Matrix), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->matrix);
  __Pyx_DECREF((PyObject *)__pyx_v_self->matrix);
  __pyx_v_self->matrix = ((struct __pyx_obj_6pysdif_7_pysdif_Matrix *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":1238
 *         self.matrix_status = eMatrixNothingRead
 * 
 *     cdef void init_containers(self):             # <<<<<<<<<<<<<<
 *         self.frame = FrameR(self)
 *         self.matrix = Matrix(self)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.init_containers", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "pysdif/_pysdif.pyx":1242
 *         self.matrix = Matrix(self)
 * 
 *     cdef void init_write(self):             # <<<<<<<<<<<<<<
 *         SdifFWriteGeneralHeader(self.this)
 *         self.write_status = eSdifGeneralHeader
 */

static void __pyx_f_6pysdif_7_pysdif_8SdifFile_init_write(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("init_write", 1);

  /* "pysdif/_pysdif.pyx":1243
 * 
 *     cdef void init_write(self):
 *         SdifFWriteGeneralHeader(self.this)             # <<<<<<<<<<<<<<
 *         self.write_status = eSdifGeneralHeader
 *         self._frametypes_defined = set()
 */
  (void)(SdifFWriteGeneralHeader(__pyx_v_self->this));

  /* "pysdif/_pysdif.pyx":1244
 *     cdef void init_write(self):
 *         SdifFWriteGeneralHeader(self.this)
 *         self.write_status = eSdifGeneralHeader             # <<<<<<<<<<<<<<
 *         self._frametypes_defined = set()
 *         self._matrixtypes_defined = set()
 */
  __pyx_v_self->write_status = __pyx_e_6pysdif_7_pysdif_eSdifGeneralHeader;

  /* "pysdif/_pysdif.pyx":1245
 *         SdifFWriteGeneralHeader(self.this)
 *         self.write_status = eSdifGeneralHeader
 *         self._frametypes_defined = set()             # <<<<<<<<<<<<<<
 *         self._matrixtypes_defined = set()
 * 
 */
  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_frametypes_defined);
  __Pyx_DECREF(__pyx_v_self->_frametypes_defined);
  __pyx_v_self->_frametypes_defined = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":1246
 *         self.write_status = eSdifGeneralHeader
 *         self._frametypes_defined = set()
 *         self._matrixtypes_defined = set()             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_matrixtypes_defined);
  __Pyx_DECREF(__pyx_v_self->_matrixtypes_defined);
  __pyx_v_self->_matrixtypes_defined = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":1242
 *         self.matrix = Matrix(self)
 * 
 *     cdef void init_write(self):             # <<<<<<<<<<<<<<
 *         SdifFWriteGeneralHeader(self.this)
 *         self.write_status = eSdifGeneralHeader
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.init_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "pysdif/_pysdif.pyx":1248
 *         self._matrixtypes_defined = set()
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         logger.debug("SdifFile: dealloc")
 *         self.frame = None
 */

/* Python wrapper */
static void __pyx_pw_6pysdif_7_pysdif_8SdifFile_7__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_6pysdif_7_pysdif_8SdifFile_7__dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_6pysdif_7_pysdif_8SdifFile_6__dealloc__(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static void __pyx_pf_6pysdif_7_pysdif_8SdifFile_6__dealloc__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 1);

  /* "pysdif/_pysdif.pyx":1249
 * 
 *     def __dealloc__(self):
 *         logger.debug("SdifFile: dealloc")             # <<<<<<<<<<<<<<
 *         self.frame = None
 *         self.matrix = None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_s_SdifFile_dealloc};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":1250
 *     def __dealloc__(self):
 *         logger.debug("SdifFile: dealloc")
 *         self.frame = None             # <<<<<<<<<<<<<<
 *         self.matrix = None
 *         self.close()  # fails silently if already closed
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->frame);
  __Pyx_DECREF((PyObject *)__pyx_v_self->frame);
  __pyx_v_self->frame = ((struct __pyx_obj_6pysdif_7_pysdif_FrameR *)Py_None);

  /* "pysdif/_pysdif.pyx":1251
 *         logger.debug("SdifFile: dealloc")
 *         self.frame = None
 *         self.matrix = None             # <<<<<<<<<<<<<<
 *         self.close()  # fails silently if already closed
 * 
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->matrix);
  __Pyx_DECREF((PyObject *)__pyx_v_self->matrix);
  __pyx_v_self->matrix = ((struct __pyx_obj_6pysdif_7_pysdif_Matrix *)Py_None);

  /* "pysdif/_pysdif.pyx":1252
 *         self.frame = None
 *         self.matrix = None
 *         self.close()  # fails silently if already closed             # <<<<<<<<<<<<<<
 * 
 *     def close(self):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":1248
 *         self._matrixtypes_defined = set()
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         logger.debug("SdifFile: dealloc")
 *         self.frame = None
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("pysdif._pysdif.SdifFile.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "pysdif/_pysdif.pyx":1254
 *         self.close()  # fails silently if already closed
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         """
 *         Close this SdifFile
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_9close(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_8close, "SdifFile.close(self)\n\n        Close this SdifFile\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_9close = {"close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_9close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_8close};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_9close(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("close (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("close", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "close", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_8close(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_8close(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("close", 1);

  /* "pysdif/_pysdif.pyx":1258
 *         Close this SdifFile
 *         """
 *         if self.eof == SDIF_CLOSED:             # <<<<<<<<<<<<<<
 *             logger.debug("close: can't close SdifFile, since it was already closed")
 *             return
 */
  __pyx_t_1 = (__pyx_v_self->eof == __pyx_v_6pysdif_7_pysdif_SDIF_CLOSED);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1259
 *         """
 *         if self.eof == SDIF_CLOSED:
 *             logger.debug("close: can't close SdifFile, since it was already closed")             # <<<<<<<<<<<<<<
 *             return
 *         elif self.this == NULL:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_s_close_can_t_close_SdifFile_since};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1259, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysdif/_pysdif.pyx":1260
 *         if self.eof == SDIF_CLOSED:
 *             logger.debug("close: can't close SdifFile, since it was already closed")
 *             return             # <<<<<<<<<<<<<<
 *         elif self.this == NULL:
 *             logger.debug("close: can't close SdifFile: it is NULL")
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1258
 *         Close this SdifFile
 *         """
 *         if self.eof == SDIF_CLOSED:             # <<<<<<<<<<<<<<
 *             logger.debug("close: can't close SdifFile, since it was already closed")
 *             return
 */
  }

  /* "pysdif/_pysdif.pyx":1261
 *             logger.debug("close: can't close SdifFile, since it was already closed")
 *             return
 *         elif self.this == NULL:             # <<<<<<<<<<<<<<
 *             logger.debug("close: can't close SdifFile: it is NULL")
 *         # make sure we write the global header even if no
 */
  __pyx_t_1 = (__pyx_v_self->this == NULL);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1262
 *             return
 *         elif self.this == NULL:
 *             logger.debug("close: can't close SdifFile: it is NULL")             # <<<<<<<<<<<<<<
 *         # make sure we write the global header even if no
 *         # new frames are written (the global chunks are automatically
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_close_can_t_close_SdifFile_it_is};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1262, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysdif/_pysdif.pyx":1261
 *             logger.debug("close: can't close SdifFile, since it was already closed")
 *             return
 *         elif self.this == NULL:             # <<<<<<<<<<<<<<
 *             logger.debug("close: can't close SdifFile: it is NULL")
 *         # make sure we write the global header even if no
 */
  }

  /* "pysdif/_pysdif.pyx":1266
 *         # new frames are written (the global chunks are automatically
 *         # written when a new frame is added to the sdiffile)
 *         if self.this.Mode == eWriteFile:             # <<<<<<<<<<<<<<
 *             if self.write_status == eSdifGeneralHeader:
 *                 self.write_all_ascii_chunks()
 */
  __pyx_t_1 = (__pyx_v_self->this->Mode == eWriteFile);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1267
 *         # written when a new frame is added to the sdiffile)
 *         if self.this.Mode == eWriteFile:
 *             if self.write_status == eSdifGeneralHeader:             # <<<<<<<<<<<<<<
 *                 self.write_all_ascii_chunks()
 *         SdifFClose(self.this)
 */
    __pyx_t_1 = (__pyx_v_self->write_status == __pyx_e_6pysdif_7_pysdif_eSdifGeneralHeader);
    if (__pyx_t_1) {

      /* "pysdif/_pysdif.pyx":1268
 *         if self.this.Mode == eWriteFile:
 *             if self.write_status == eSdifGeneralHeader:
 *                 self.write_all_ascii_chunks()             # <<<<<<<<<<<<<<
 *         SdifFClose(self.this)
 *         self.eof = SDIF_CLOSED
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_all_ascii_chunks); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1268, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1268, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pysdif/_pysdif.pyx":1267
 *         # written when a new frame is added to the sdiffile)
 *         if self.this.Mode == eWriteFile:
 *             if self.write_status == eSdifGeneralHeader:             # <<<<<<<<<<<<<<
 *                 self.write_all_ascii_chunks()
 *         SdifFClose(self.this)
 */
    }

    /* "pysdif/_pysdif.pyx":1266
 *         # new frames are written (the global chunks are automatically
 *         # written when a new frame is added to the sdiffile)
 *         if self.this.Mode == eWriteFile:             # <<<<<<<<<<<<<<
 *             if self.write_status == eSdifGeneralHeader:
 *                 self.write_all_ascii_chunks()
 */
  }

  /* "pysdif/_pysdif.pyx":1269
 *             if self.write_status == eSdifGeneralHeader:
 *                 self.write_all_ascii_chunks()
 *         SdifFClose(self.this)             # <<<<<<<<<<<<<<
 *         self.eof = SDIF_CLOSED
 * 
 */
  SdifFClose(__pyx_v_self->this);

  /* "pysdif/_pysdif.pyx":1270
 *                 self.write_all_ascii_chunks()
 *         SdifFClose(self.this)
 *         self.eof = SDIF_CLOSED             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->eof = __pyx_v_6pysdif_7_pysdif_SDIF_CLOSED;

  /* "pysdif/_pysdif.pyx":1254
 *         self.close()  # fails silently if already closed
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         """
 *         Close this SdifFile
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1272
 *         self.eof = SDIF_CLOSED
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def name(self):
 *         """(str) The name of this sdif file"""
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_4name_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_4name___get__(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

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

  /* "pysdif/_pysdif.pyx":1275
 *     def name(self):
 *         """(str) The name of this sdif file"""
 *         return self.this.Name             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->this->Name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1272
 *         self.eof = SDIF_CLOSED
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def name(self):
 *         """(str) The name of this sdif file"""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1277
 *         return self.this.Name
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mode(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_4mode_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_4mode_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_4mode___get__(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_4mode___get__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__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("__get__", 1);

  /* "pysdif/_pysdif.pyx":1282
 *         (str) The mode in which this sdif file was opened ('r', 'w')
 *         """
 *         return FILEMODE_MODE2STR[self.this.Mode]             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(__pyx_v_6pysdif_7_pysdif_FILEMODE_MODE2STR == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 1282, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyInt_From_enum__SdifFileModeE(__pyx_v_self->this->Mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_6pysdif_7_pysdif_FILEMODE_MODE2STR, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1282, __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;

  /* "pysdif/_pysdif.pyx":1277
 *         return self.this.Name
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def mode(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.mode.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1284
 *         return FILEMODE_MODE2STR[self.this.Mode]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_seekable(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_11is_seekable_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_11is_seekable_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_11is_seekable___get__(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

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

  /* "pysdif/_pysdif.pyx":1289
 *         (bool) Is this SdifFile seekable?
 *         """
 *         return self.this.isSeekable             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->this->isSeekable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1284
 *         return FILEMODE_MODE2STR[self.this.Mode]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_seekable(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.is_seekable.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1291
 *         return self.this.isSeekable
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def numerical_signature(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_19numerical_signature_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_19numerical_signature_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_19numerical_signature___get__(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

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

  /* "pysdif/_pysdif.pyx":1296
 *         (int) Current signature as numerical signature
 *         """
 *         return self.this.CurrSignature             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_SdifUInt4(__pyx_v_self->this->CurrSignature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1291
 *         return self.this.isSeekable
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def numerical_signature(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.numerical_signature.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1298
 *         return self.this.CurrSignature
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def signature(self):
 *         """(str) Current signature as 4-byte string """
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_9signature_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_9signature_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_9signature___get__(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

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

  /* "pysdif/_pysdif.pyx":1301
 *     def signature(self):
 *         """(str) Current signature as 4-byte string """
 *         return sig2str(self.this.CurrSignature)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_sig2str(__pyx_v_self->this->CurrSignature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1298
 *         return self.this.CurrSignature
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def signature(self):
 *         """(str) Current signature as 4-byte string """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.signature.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1303
 *         return sig2str(self.this.CurrSignature)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def prev_time(self):
 *         """(float) The previous time"""
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_9prev_time_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_9prev_time_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_9prev_time___get__(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

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

  /* "pysdif/_pysdif.pyx":1306
 *     def prev_time(self):
 *         """(float) The previous time"""
 *         return self.this.PrevTime             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->this->PrevTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1303
 *         return sig2str(self.this.CurrSignature)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def prev_time(self):
 *         """(float) The previous time"""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.prev_time.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1308
 *         return self.this.PrevTime
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def frame_pos(self):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_9frame_pos_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_9frame_pos_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_9frame_pos___get__(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

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

  /* "pysdif/_pysdif.pyx":1313
 *         (int) The current frame position
 *         """
 *         return self.this.CurrFramPos             # <<<<<<<<<<<<<<
 * 
 *     def curr_matrix_size(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_SdiffPosT(__pyx_v_self->this->CurrFramPos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1308
 *         return self.this.PrevTime
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def frame_pos(self):
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.frame_pos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1315
 *         return self.this.CurrFramPos
 * 
 *     def curr_matrix_size(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the number of rows and number of columns in the current matrix
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_11curr_matrix_size(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_10curr_matrix_size, "SdifFile.curr_matrix_size(self)\n\n        Returns the number of rows and number of columns in the current matrix\n\n        This method can be called after reading the matrix header. It does \n        not read the data itself\n\n        Returns:\n            (tuple[int, int]) A tuple (num_rows, num_columns)\n        \n        !!! note \n\n            raises `NoMatrix` if the matrix header has not been read\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_11curr_matrix_size = {"curr_matrix_size", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_11curr_matrix_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_10curr_matrix_size};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_11curr_matrix_size(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("curr_matrix_size (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("curr_matrix_size", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "curr_matrix_size", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_10curr_matrix_size(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_10curr_matrix_size(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  SdifMatrixHeaderT *__pyx_v_m;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SdifMatrixHeaderT *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("curr_matrix_size", 1);

  /* "pysdif/_pysdif.pyx":1329
 *             raises `NoMatrix` if the matrix header has not been read
 *         """
 *         cdef SdifMatrixHeaderT* m = self.this.CurrMtrxH             # <<<<<<<<<<<<<<
 *         if m == NULL:
 *             raise NoMatrix("No current matrix")
 */
  __pyx_t_1 = __pyx_v_self->this->CurrMtrxH;
  __pyx_v_m = __pyx_t_1;

  /* "pysdif/_pysdif.pyx":1330
 *         """
 *         cdef SdifMatrixHeaderT* m = self.this.CurrMtrxH
 *         if m == NULL:             # <<<<<<<<<<<<<<
 *             raise NoMatrix("No current matrix")
 *         return (m.NbRow, m.NbCol)
 */
  __pyx_t_2 = (__pyx_v_m == NULL);
  if (unlikely(__pyx_t_2)) {

    /* "pysdif/_pysdif.pyx":1331
 *         cdef SdifMatrixHeaderT* m = self.this.CurrMtrxH
 *         if m == NULL:
 *             raise NoMatrix("No current matrix")             # <<<<<<<<<<<<<<
 *         return (m.NbRow, m.NbCol)
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_NoMatrix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_s_No_current_matrix};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1331, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1331, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1330
 *         """
 *         cdef SdifMatrixHeaderT* m = self.this.CurrMtrxH
 *         if m == NULL:             # <<<<<<<<<<<<<<
 *             raise NoMatrix("No current matrix")
 *         return (m.NbRow, m.NbCol)
 */
  }

  /* "pysdif/_pysdif.pyx":1332
 *         if m == NULL:
 *             raise NoMatrix("No current matrix")
 *         return (m.NbRow, m.NbCol)             # <<<<<<<<<<<<<<
 * 
 *     def curr_matrix_datatype(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_SdifUInt4(__pyx_v_m->NbRow); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_SdifUInt4(__pyx_v_m->NbCol); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1332, __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)) __PYX_ERR(0, 1332, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 1332, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1315
 *         return self.this.CurrFramPos
 * 
 *     def curr_matrix_size(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the number of rows and number of columns in the current matrix
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.curr_matrix_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1334
 *         return (m.NbRow, m.NbCol)
 * 
 *     def curr_matrix_datatype(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the datatype code (an int) or 0 if go current matrix
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_13curr_matrix_datatype(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_12curr_matrix_datatype, "SdifFile.curr_matrix_datatype(self)\n\n        Returns the datatype code (an int) or 0 if go current matrix\n\n        Returns:\n            (int) the datatype of the current matrix as an int code\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_13curr_matrix_datatype = {"curr_matrix_datatype", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_13curr_matrix_datatype, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_12curr_matrix_datatype};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_13curr_matrix_datatype(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("curr_matrix_datatype (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("curr_matrix_datatype", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "curr_matrix_datatype", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_12curr_matrix_datatype(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_12curr_matrix_datatype(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  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("curr_matrix_datatype", 1);

  /* "pysdif/_pysdif.pyx":1341
 *             (int) the datatype of the current matrix as an int code
 *         """
 *         if self.this.CurrMtrxH == NULL:             # <<<<<<<<<<<<<<
 *             return 0
 *         return self.this.CurrMtrxH.DataType
 */
  __pyx_t_1 = (__pyx_v_self->this->CurrMtrxH == NULL);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1342
 *         """
 *         if self.this.CurrMtrxH == NULL:
 *             return 0             # <<<<<<<<<<<<<<
 *         return self.this.CurrMtrxH.DataType
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_0);
    __pyx_r = __pyx_int_0;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1341
 *             (int) the datatype of the current matrix as an int code
 *         """
 *         if self.this.CurrMtrxH == NULL:             # <<<<<<<<<<<<<<
 *             return 0
 *         return self.this.CurrMtrxH.DataType
 */
  }

  /* "pysdif/_pysdif.pyx":1343
 *         if self.this.CurrMtrxH == NULL:
 *             return 0
 *         return self.this.CurrMtrxH.DataType             # <<<<<<<<<<<<<<
 * 
 *     def curr_signature(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_enum__SdifDataTypeE(__pyx_v_self->this->CurrMtrxH->DataType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1334
 *         return (m.NbRow, m.NbCol)
 * 
 *     def curr_matrix_datatype(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the datatype code (an int) or 0 if go current matrix
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.curr_matrix_datatype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1345
 *         return self.this.CurrMtrxH.DataType
 * 
 *     def curr_signature(self):             # <<<<<<<<<<<<<<
 *         """
 *         **Low-level interface** - Return the current frame's numerical signature
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_15curr_signature(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_14curr_signature, "SdifFile.curr_signature(self)\n\n        **Low-level interface** - Return the current frame's numerical signature\n\n        Returns:\n            (int) The current numerical signature\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_15curr_signature = {"curr_signature", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_15curr_signature, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_14curr_signature};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_15curr_signature(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("curr_signature (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("curr_signature", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "curr_signature", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_14curr_signature(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_14curr_signature(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("curr_signature", 1);

  /* "pysdif/_pysdif.pyx":1352
 *             (int) The current numerical signature
 *         """
 *         return SdifFCurrSignature(self.this)             # <<<<<<<<<<<<<<
 * 
 *     cdef int curr_matrix_numerical_signature(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_SdifUInt4(SdifFCurrSignature(__pyx_v_self->this)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1345
 *         return self.this.CurrMtrxH.DataType
 * 
 *     def curr_signature(self):             # <<<<<<<<<<<<<<
 *         """
 *         **Low-level interface** - Return the current frame's numerical signature
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.curr_signature", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1354
 *         return SdifFCurrSignature(self.this)
 * 
 *     cdef int curr_matrix_numerical_signature(self):             # <<<<<<<<<<<<<<
 *         if self.this.CurrMtrxH == NULL:
 *             return -1
 */

static int __pyx_f_6pysdif_7_pysdif_8SdifFile_curr_matrix_numerical_signature(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  int __pyx_r;
  int __pyx_t_1;

  /* "pysdif/_pysdif.pyx":1355
 * 
 *     cdef int curr_matrix_numerical_signature(self):
 *         if self.this.CurrMtrxH == NULL:             # <<<<<<<<<<<<<<
 *             return -1
 *         return self.this.CurrMtrxH.Signature
 */
  __pyx_t_1 = (__pyx_v_self->this->CurrMtrxH == NULL);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1356
 *     cdef int curr_matrix_numerical_signature(self):
 *         if self.this.CurrMtrxH == NULL:
 *             return -1             # <<<<<<<<<<<<<<
 *         return self.this.CurrMtrxH.Signature
 * 
 */
    __pyx_r = -1;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1355
 * 
 *     cdef int curr_matrix_numerical_signature(self):
 *         if self.this.CurrMtrxH == NULL:             # <<<<<<<<<<<<<<
 *             return -1
 *         return self.this.CurrMtrxH.Signature
 */
  }

  /* "pysdif/_pysdif.pyx":1357
 *         if self.this.CurrMtrxH == NULL:
 *             return -1
 *         return self.this.CurrMtrxH.Signature             # <<<<<<<<<<<<<<
 * 
 *     def curr_matrix_signature(self):
 */
  __pyx_r = __pyx_v_self->this->CurrMtrxH->Signature;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1354
 *         return SdifFCurrSignature(self.this)
 * 
 *     cdef int curr_matrix_numerical_signature(self):             # <<<<<<<<<<<<<<
 *         if self.this.CurrMtrxH == NULL:
 *             return -1
 */

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

/* "pysdif/_pysdif.pyx":1359
 *         return self.this.CurrMtrxH.Signature
 * 
 *     def curr_matrix_signature(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get the string signature of the current matrix, or None if no current matrix
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_17curr_matrix_signature(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_16curr_matrix_signature, "SdifFile.curr_matrix_signature(self)\n\n        Get the string signature of the current matrix, or None if no current matrix\n\n        Returns:\n            (str | None) The 4-byte string signature of the current matrix, \n            or None if no matrix\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_17curr_matrix_signature = {"curr_matrix_signature", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_17curr_matrix_signature, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_16curr_matrix_signature};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_17curr_matrix_signature(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("curr_matrix_signature (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("curr_matrix_signature", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "curr_matrix_signature", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_16curr_matrix_signature(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_16curr_matrix_signature(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  int __pyx_v_sig;
  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("curr_matrix_signature", 1);

  /* "pysdif/_pysdif.pyx":1368
 *         """
 * 
 *         cdef int sig = self.curr_matrix_numerical_signature()             # <<<<<<<<<<<<<<
 *         if sig >= 0:
 *             return sig2str(sig)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pysdif_7_pysdif_SdifFile *)__pyx_v_self->__pyx_vtab)->curr_matrix_numerical_signature(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1368, __pyx_L1_error)
  __pyx_v_sig = __pyx_t_1;

  /* "pysdif/_pysdif.pyx":1369
 * 
 *         cdef int sig = self.curr_matrix_numerical_signature()
 *         if sig >= 0:             # <<<<<<<<<<<<<<
 *             return sig2str(sig)
 *         return None
 */
  __pyx_t_2 = (__pyx_v_sig >= 0);
  if (__pyx_t_2) {

    /* "pysdif/_pysdif.pyx":1370
 *         cdef int sig = self.curr_matrix_numerical_signature()
 *         if sig >= 0:
 *             return sig2str(sig)             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __pyx_f_6pysdif_7_pysdif_sig2str(__pyx_v_sig); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1369
 * 
 *         cdef int sig = self.curr_matrix_numerical_signature()
 *         if sig >= 0:             # <<<<<<<<<<<<<<
 *             return sig2str(sig)
 *         return None
 */
  }

  /* "pysdif/_pysdif.pyx":1371
 *         if sig >= 0:
 *             return sig2str(sig)
 *         return None             # <<<<<<<<<<<<<<
 * 
 *     def frame_num_matrix(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1359
 *         return self.this.CurrMtrxH.Signature
 * 
 *     def curr_matrix_signature(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get the string signature of the current matrix, or None if no current matrix
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.curr_matrix_signature", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1373
 *         return None
 * 
 *     def frame_num_matrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get the number of matrices in current frame.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_19frame_num_matrix(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_18frame_num_matrix, "SdifFile.frame_num_matrix(self)\n\n        Get the number of matrices in current frame.    \n\n        Returns:\n            (int) The number of matrices in the current frame, or -1\n            if no current frame\n\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_19frame_num_matrix = {"frame_num_matrix", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_19frame_num_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_18frame_num_matrix};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_19frame_num_matrix(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("frame_num_matrix (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("frame_num_matrix", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "frame_num_matrix", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_18frame_num_matrix(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_18frame_num_matrix(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  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("frame_num_matrix", 1);

  /* "pysdif/_pysdif.pyx":1382
 * 
 *         """
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             return -1
 *         return self.this.CurrFramH.NbMatrix
 */
  __pyx_t_1 = (__pyx_v_self->this->CurrFramH == NULL);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1383
 *         """
 *         if self.this.CurrFramH == NULL:
 *             return -1             # <<<<<<<<<<<<<<
 *         return self.this.CurrFramH.NbMatrix
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_neg_1);
    __pyx_r = __pyx_int_neg_1;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1382
 * 
 *         """
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             return -1
 *         return self.this.CurrFramH.NbMatrix
 */
  }

  /* "pysdif/_pysdif.pyx":1384
 *         if self.this.CurrFramH == NULL:
 *             return -1
 *         return self.this.CurrFramH.NbMatrix             # <<<<<<<<<<<<<<
 * 
 *     def frame_id(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_SdifUInt4(__pyx_v_self->this->CurrFramH->NbMatrix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1373
 *         return None
 * 
 *     def frame_num_matrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get the number of matrices in current frame.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.frame_num_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1386
 *         return self.this.CurrFramH.NbMatrix
 * 
 *     def frame_id(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get the id of the current frame, or -1 if no current frame
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_21frame_id(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_20frame_id, "SdifFile.frame_id(self)\n\n        Get the id of the current frame, or -1 if no current frame\n\n        Returns:\n            (int) The id of the current frame\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_21frame_id = {"frame_id", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_21frame_id, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_20frame_id};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_21frame_id(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("frame_id (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("frame_id", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "frame_id", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_20frame_id(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_20frame_id(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  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("frame_id", 1);

  /* "pysdif/_pysdif.pyx":1393
 *             (int) The id of the current frame
 *         """
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             return -1
 *         return self.this.CurrFramH.NumID
 */
  __pyx_t_1 = (__pyx_v_self->this->CurrFramH == NULL);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1394
 *         """
 *         if self.this.CurrFramH == NULL:
 *             return -1             # <<<<<<<<<<<<<<
 *         return self.this.CurrFramH.NumID
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_neg_1);
    __pyx_r = __pyx_int_neg_1;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1393
 *             (int) The id of the current frame
 *         """
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             return -1
 *         return self.this.CurrFramH.NumID
 */
  }

  /* "pysdif/_pysdif.pyx":1395
 *         if self.this.CurrFramH == NULL:
 *             return -1
 *         return self.this.CurrFramH.NumID             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_SdifUInt4(__pyx_v_self->this->CurrFramH->NumID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1386
 *         return self.this.CurrFramH.NbMatrix
 * 
 *     def frame_id(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get the id of the current frame, or -1 if no current frame
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.frame_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1397
 *         return self.this.CurrFramH.NumID
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def pos(self):
 *         """The last position read"""
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_3pos_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_3pos_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_3pos___get__(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_3pos___get__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  SdiffPosT __pyx_v__pos;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);

  /* "pysdif/_pysdif.pyx":1401
 *         """The last position read"""
 *         cdef SdiffPosT _pos
 *         SdifFGetPos(self.this, &_pos)             # <<<<<<<<<<<<<<
 *         return _pos
 * 
 */
  (void)(SdifFGetPos(__pyx_v_self->this, (&__pyx_v__pos)));

  /* "pysdif/_pysdif.pyx":1402
 *         cdef SdiffPosT _pos
 *         SdifFGetPos(self.this, &_pos)
 *         return _pos             # <<<<<<<<<<<<<<
 * 
 *     @pos.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_SdiffPosT(__pyx_v__pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1397
 *         return self.this.CurrFramH.NumID
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def pos(self):
 *         """The last position read"""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.pos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1404
 *         return _pos
 * 
 *     @pos.setter             # <<<<<<<<<<<<<<
 *     def pos(self, long pos):
 *         """
 */

/* Python wrapper */
static int __pyx_pw_6pysdif_7_pysdif_8SdifFile_3pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_pos); /*proto*/
static int __pyx_pw_6pysdif_7_pysdif_8SdifFile_3pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_pos) {
  long __pyx_v_pos;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  assert(__pyx_arg_pos); {
    __pyx_v_pos = __Pyx_PyInt_As_long(__pyx_arg_pos); if (unlikely((__pyx_v_pos == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1405, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.pos.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_3pos_2__set__(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self), ((long)__pyx_v_pos));

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

static int __pyx_pf_6pysdif_7_pysdif_8SdifFile_3pos_2__set__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, long __pyx_v_pos) {
  int __pyx_r;

  /* "pysdif/_pysdif.pyx":1409
 *         The position in the file
 *         """
 *         SdifFSetPos(self.this, &pos)             # <<<<<<<<<<<<<<
 * 
 *     def frame_numerical_signature(self):
 */
  (void)(SdifFSetPos(__pyx_v_self->this, (&__pyx_v_pos)));

  /* "pysdif/_pysdif.pyx":1404
 *         return _pos
 * 
 *     @pos.setter             # <<<<<<<<<<<<<<
 *     def pos(self, long pos):
 *         """
 */

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1411
 *         SdifFSetPos(self.this, &pos)
 * 
 *     def frame_numerical_signature(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the num. signature of current frame, or -1 if no current frame
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_23frame_numerical_signature(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_22frame_numerical_signature, "SdifFile.frame_numerical_signature(self)\n\n        Return the num. signature of current frame, or -1 if no current frame\n\n        Returns:\n            (int) The numerical signature of the current frame, or -1 \n            if no current frame\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_23frame_numerical_signature = {"frame_numerical_signature", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_23frame_numerical_signature, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_22frame_numerical_signature};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_23frame_numerical_signature(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("frame_numerical_signature (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("frame_numerical_signature", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "frame_numerical_signature", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_22frame_numerical_signature(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_22frame_numerical_signature(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  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("frame_numerical_signature", 1);

  /* "pysdif/_pysdif.pyx":1419
 *             if no current frame
 *         """
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             return -1
 *         return self.this.CurrFramH.Signature
 */
  __pyx_t_1 = (__pyx_v_self->this->CurrFramH == NULL);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1420
 *         """
 *         if self.this.CurrFramH == NULL:
 *             return -1             # <<<<<<<<<<<<<<
 *         return self.this.CurrFramH.Signature
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_neg_1);
    __pyx_r = __pyx_int_neg_1;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1419
 *             if no current frame
 *         """
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             return -1
 *         return self.this.CurrFramH.Signature
 */
  }

  /* "pysdif/_pysdif.pyx":1421
 *         if self.this.CurrFramH == NULL:
 *             return -1
 *         return self.this.CurrFramH.Signature             # <<<<<<<<<<<<<<
 * 
 *     def frame_signature(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_SdifUInt4(__pyx_v_self->this->CurrFramH->Signature); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1411
 *         SdifFSetPos(self.this, &pos)
 * 
 *     def frame_numerical_signature(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the num. signature of current frame, or -1 if no current frame
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.frame_numerical_signature", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1423
 *         return self.this.CurrFramH.Signature
 * 
 *     def frame_signature(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the str. signature of the current frame, or None if no current frame
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_25frame_signature(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_24frame_signature, "SdifFile.frame_signature(self)\n\n        Return the str. signature of the current frame, or None if no current frame\n\n        Returns:\n            (str|None) The current frame signature (4-char string)\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_25frame_signature = {"frame_signature", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_25frame_signature, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_24frame_signature};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_25frame_signature(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("frame_signature (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("frame_signature", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "frame_signature", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_24frame_signature(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_24frame_signature(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  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("frame_signature", 1);

  /* "pysdif/_pysdif.pyx":1430
 *             (str|None) The current frame signature (4-char string)
 *         """
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             return None
 *         return sig2str(self.this.CurrFramH.Signature)
 */
  __pyx_t_1 = (__pyx_v_self->this->CurrFramH == NULL);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1431
 *         """
 *         if self.this.CurrFramH == NULL:
 *             return None             # <<<<<<<<<<<<<<
 *         return sig2str(self.this.CurrFramH.Signature)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1430
 *             (str|None) The current frame signature (4-char string)
 *         """
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             return None
 *         return sig2str(self.this.CurrFramH.Signature)
 */
  }

  /* "pysdif/_pysdif.pyx":1432
 *         if self.this.CurrFramH == NULL:
 *             return None
 *         return sig2str(self.this.CurrFramH.Signature)             # <<<<<<<<<<<<<<
 * 
 *     def frame_time(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_6pysdif_7_pysdif_sig2str(__pyx_v_self->this->CurrFramH->Signature); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1423
 *         return self.this.CurrFramH.Signature
 * 
 *     def frame_signature(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the str. signature of the current frame, or None if no current frame
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.frame_signature", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1434
 *         return sig2str(self.this.CurrFramH.Signature)
 * 
 *     def frame_time(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get the time of the current frame, or -1 if no current frame
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_27frame_time(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_26frame_time, "SdifFile.frame_time(self)\n\n        Get the time of the current frame, or -1 if no current frame\n\n        Returns:\n            (float) The time of the current frame\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_27frame_time = {"frame_time", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_27frame_time, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_26frame_time};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_27frame_time(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("frame_time (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("frame_time", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "frame_time", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_26frame_time(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_26frame_time(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  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("frame_time", 1);

  /* "pysdif/_pysdif.pyx":1441
 *             (float) The time of the current frame
 *         """
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             return -1
 *         return self.this.CurrFramH.Time
 */
  __pyx_t_1 = (__pyx_v_self->this->CurrFramH == NULL);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1442
 *         """
 *         if self.this.CurrFramH == NULL:
 *             return -1             # <<<<<<<<<<<<<<
 *         return self.this.CurrFramH.Time
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_neg_1);
    __pyx_r = __pyx_int_neg_1;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1441
 *             (float) The time of the current frame
 *         """
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             return -1
 *         return self.this.CurrFramH.Time
 */
  }

  /* "pysdif/_pysdif.pyx":1443
 *         if self.this.CurrFramH == NULL:
 *             return -1
 *         return self.this.CurrFramH.Time             # <<<<<<<<<<<<<<
 * 
 *     def last_error(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->this->CurrFramH->Time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1434
 *         return sig2str(self.this.CurrFramH.Signature)
 * 
 *     def frame_time(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get the time of the current frame, or -1 if no current frame
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.frame_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1445
 *         return self.this.CurrFramH.Time
 * 
 *     def last_error(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns (error_tag, error_level) or None if there is no last error
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_29last_error(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_28last_error, "SdifFile.last_error(self)\n\n        Returns (error_tag, error_level) or None if there is no last error\n\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_29last_error = {"last_error", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_29last_error, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_28last_error};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_29last_error(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("last_error (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("last_error", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "last_error", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_28last_error(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_28last_error(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  SdifErrorT *__pyx_v_error;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("last_error", 1);

  /* "pysdif/_pysdif.pyx":1450
 * 
 *         """
 *         cdef SdifErrorT* error = SdifFLastError(self.this)             # <<<<<<<<<<<<<<
 *         if error == NULL:
 *             return None
 */
  __pyx_v_error = SdifFLastError(__pyx_v_self->this);

  /* "pysdif/_pysdif.pyx":1451
 *         """
 *         cdef SdifErrorT* error = SdifFLastError(self.this)
 *         if error == NULL:             # <<<<<<<<<<<<<<
 *             return None
 *         return (error.Tag, error.Level)
 */
  __pyx_t_1 = (__pyx_v_error == NULL);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1452
 *         cdef SdifErrorT* error = SdifFLastError(self.this)
 *         if error == NULL:
 *             return None             # <<<<<<<<<<<<<<
 *         return (error.Tag, error.Level)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1451
 *         """
 *         cdef SdifErrorT* error = SdifFLastError(self.this)
 *         if error == NULL:             # <<<<<<<<<<<<<<
 *             return None
 *         return (error.Tag, error.Level)
 */
  }

  /* "pysdif/_pysdif.pyx":1453
 *         if error == NULL:
 *             return None
 *         return (error.Tag, error.Level)             # <<<<<<<<<<<<<<
 * 
 *     def curr_frame_is_selected(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_enum__SdifErrorTagE(__pyx_v_error->Tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__SdifErrorLevelE(__pyx_v_error->Level); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1453, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 1453, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1445
 *         return self.this.CurrFramH.Time
 * 
 *     def last_error(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns (error_tag, error_level) or None if there is no last error
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.last_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1455
 *         return (error.Tag, error.Level)
 * 
 *     def curr_frame_is_selected(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the current frame is selected.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_31curr_frame_is_selected(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_30curr_frame_is_selected, "SdifFile.curr_frame_is_selected(self)\n\n        Return whether the current frame is selected. \n\n        Can only be called after reading the frame header. \n\n        !!! note\n\n            Raises `NoFrame` if no header was read\n\n        Returns:\n            (bool) True if current frame is selected\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_31curr_frame_is_selected = {"curr_frame_is_selected", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_31curr_frame_is_selected, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_30curr_frame_is_selected};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_31curr_frame_is_selected(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("curr_frame_is_selected (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("curr_frame_is_selected", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "curr_frame_is_selected", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_30curr_frame_is_selected(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_30curr_frame_is_selected(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("curr_frame_is_selected", 1);

  /* "pysdif/_pysdif.pyx":1468
 *             (bool) True if current frame is selected
 *         """
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             raise NoFrame("No current matrix!")
 *         return bool(SdifFCurrFrameIsSelected(self.this))
 */
  __pyx_t_1 = (__pyx_v_self->this->CurrFramH == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":1469
 *         """
 *         if self.this.CurrFramH == NULL:
 *             raise NoFrame("No current matrix!")             # <<<<<<<<<<<<<<
 *         return bool(SdifFCurrFrameIsSelected(self.this))
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NoFrame); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_No_current_matrix_2};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1469, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1469, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1468
 *             (bool) True if current frame is selected
 *         """
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             raise NoFrame("No current matrix!")
 *         return bool(SdifFCurrFrameIsSelected(self.this))
 */
  }

  /* "pysdif/_pysdif.pyx":1470
 *         if self.this.CurrFramH == NULL:
 *             raise NoFrame("No current matrix!")
 *         return bool(SdifFCurrFrameIsSelected(self.this))             # <<<<<<<<<<<<<<
 * 
 *     def curr_matrix_is_selected(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_int(SdifFCurrFrameIsSelected(__pyx_v_self->this)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1470, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1455
 *         return (error.Tag, error.Level)
 * 
 *     def curr_frame_is_selected(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the current frame is selected.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.curr_frame_is_selected", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1472
 *         return bool(SdifFCurrFrameIsSelected(self.this))
 * 
 *     def curr_matrix_is_selected(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the current matrix is selected.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_33curr_matrix_is_selected(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_32curr_matrix_is_selected, "SdifFile.curr_matrix_is_selected(self)\n\n        Return whether the current matrix is selected. \n\n        !!! note\n\n            Raises `NoMatrix` if the matrix header was not read.\n\n        Returns:\n            (bool) True if current matrix is selected\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_33curr_matrix_is_selected = {"curr_matrix_is_selected", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_33curr_matrix_is_selected, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_32curr_matrix_is_selected};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_33curr_matrix_is_selected(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("curr_matrix_is_selected (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("curr_matrix_is_selected", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "curr_matrix_is_selected", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_32curr_matrix_is_selected(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_32curr_matrix_is_selected(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("curr_matrix_is_selected", 1);

  /* "pysdif/_pysdif.pyx":1483
 *             (bool) True if current matrix is selected
 *         """
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             raise NoMatrix("No current matrix!")
 *         return bool(SdifFCurrMatrixIsSelected(self.this))
 */
  __pyx_t_1 = (__pyx_v_self->this->CurrFramH == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":1484
 *         """
 *         if self.this.CurrFramH == NULL:
 *             raise NoMatrix("No current matrix!")             # <<<<<<<<<<<<<<
 *         return bool(SdifFCurrMatrixIsSelected(self.this))
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NoMatrix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_No_current_matrix_2};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1484, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1484, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1483
 *             (bool) True if current matrix is selected
 *         """
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             raise NoMatrix("No current matrix!")
 *         return bool(SdifFCurrMatrixIsSelected(self.this))
 */
  }

  /* "pysdif/_pysdif.pyx":1485
 *         if self.this.CurrFramH == NULL:
 *             raise NoMatrix("No current matrix!")
 *         return bool(SdifFCurrMatrixIsSelected(self.this))             # <<<<<<<<<<<<<<
 * 
 *     def get_num_NVTs(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_int(SdifFCurrMatrixIsSelected(__pyx_v_self->this)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1485, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1472
 *         return bool(SdifFCurrFrameIsSelected(self.this))
 * 
 *     def curr_matrix_is_selected(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the current matrix is selected.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.curr_matrix_is_selected", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1487
 *         return bool(SdifFCurrMatrixIsSelected(self.this))
 * 
 *     def get_num_NVTs(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get the number of NameValueTables defined in this sdif
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_35get_num_NVTs(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_34get_num_NVTs, "SdifFile.get_num_NVTs(self)\n\n        Get the number of NameValueTables defined in this sdif\n\n        Returns:\n            (int) The number of nvts in this sdiffile\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_35get_num_NVTs = {"get_num_NVTs", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_35get_num_NVTs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_34get_num_NVTs};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_35get_num_NVTs(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_num_NVTs (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("get_num_NVTs", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_num_NVTs", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_34get_num_NVTs(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_34get_num_NVTs(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  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_num_NVTs", 1);

  /* "pysdif/_pysdif.pyx":1494
 *             (int) The number of nvts in this sdiffile
 *         """
 *         if SdifNameValuesLIsNotEmpty(self.this.NameValues):             # <<<<<<<<<<<<<<
 *             return SdifFNameValueNum(self.this)
 *         else:
 */
  __pyx_t_1 = (SdifNameValuesLIsNotEmpty(__pyx_v_self->this->NameValues) != 0);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1495
 *         """
 *         if SdifNameValuesLIsNotEmpty(self.this.NameValues):
 *             return SdifFNameValueNum(self.this)             # <<<<<<<<<<<<<<
 *         else:
 *             return 0
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_int(SdifFNameValueNum(__pyx_v_self->this)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1494
 *             (int) The number of nvts in this sdiffile
 *         """
 *         if SdifNameValuesLIsNotEmpty(self.this.NameValues):             # <<<<<<<<<<<<<<
 *             return SdifFNameValueNum(self.this)
 *         else:
 */
  }

  /* "pysdif/_pysdif.pyx":1497
 *             return SdifFNameValueNum(self.this)
 *         else:
 *             return 0             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_0);
    __pyx_r = __pyx_int_0;
    goto __pyx_L0;
  }

  /* "pysdif/_pysdif.pyx":1487
 *         return bool(SdifFCurrMatrixIsSelected(self.this))
 * 
 *     def get_num_NVTs(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get the number of NameValueTables defined in this sdif
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.get_num_NVTs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1500
 * 
 * 
 *     cdef int _frame_read_header(self):             # <<<<<<<<<<<<<<
 *         """
 *         Internal function.
 */

static int __pyx_f_6pysdif_7_pysdif_8SdifFile__frame_read_header(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  int __pyx_v_status;
  int __pyx_v_bytes_read;
  int __pyx_r;
  int __pyx_t_1;
  enum __pyx_t_6pysdif_7_pysdif_FrameStatusE __pyx_t_2;

  /* "pysdif/_pysdif.pyx":1508
 *         If eof is reached, returns 0
 *         """
 *         if self.eof == 1:             # <<<<<<<<<<<<<<
 *             return 0
 *         cdef int status = self.frame_status
 */
  __pyx_t_1 = (__pyx_v_self->eof == 1);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1509
 *         """
 *         if self.eof == 1:
 *             return 0             # <<<<<<<<<<<<<<
 *         cdef int status = self.frame_status
 *         if status == eFrameHeaderRead or status == eFrameSomeDataRead or status == eFrameAllDataRead:
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1508
 *         If eof is reached, returns 0
 *         """
 *         if self.eof == 1:             # <<<<<<<<<<<<<<
 *             return 0
 *         cdef int status = self.frame_status
 */
  }

  /* "pysdif/_pysdif.pyx":1510
 *         if self.eof == 1:
 *             return 0
 *         cdef int status = self.frame_status             # <<<<<<<<<<<<<<
 *         if status == eFrameHeaderRead or status == eFrameSomeDataRead or status == eFrameAllDataRead:
 *             return -1
 */
  __pyx_t_2 = __pyx_v_self->frame_status;
  __pyx_v_status = __pyx_t_2;

  /* "pysdif/_pysdif.pyx":1511
 *             return 0
 *         cdef int status = self.frame_status
 *         if status == eFrameHeaderRead or status == eFrameSomeDataRead or status == eFrameAllDataRead:             # <<<<<<<<<<<<<<
 *             return -1
 *         cdef int bytes_read = SdifFReadFrameHeader(self.this)
 */
  switch (__pyx_v_status) {
    case __pyx_e_6pysdif_7_pysdif_eFrameHeaderRead:
    case __pyx_e_6pysdif_7_pysdif_eFrameSomeDataRead:
    case __pyx_e_6pysdif_7_pysdif_eFrameAllDataRead:

    /* "pysdif/_pysdif.pyx":1512
 *         cdef int status = self.frame_status
 *         if status == eFrameHeaderRead or status == eFrameSomeDataRead or status == eFrameAllDataRead:
 *             return -1             # <<<<<<<<<<<<<<
 *         cdef int bytes_read = SdifFReadFrameHeader(self.this)
 *         # bytes_read += self._read_signature()
 */
    __pyx_r = -1;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1511
 *             return 0
 *         cdef int status = self.frame_status
 *         if status == eFrameHeaderRead or status == eFrameSomeDataRead or status == eFrameAllDataRead:             # <<<<<<<<<<<<<<
 *             return -1
 *         cdef int bytes_read = SdifFReadFrameHeader(self.this)
 */
    break;
    default: break;
  }

  /* "pysdif/_pysdif.pyx":1513
 *         if status == eFrameHeaderRead or status == eFrameSomeDataRead or status == eFrameAllDataRead:
 *             return -1
 *         cdef int bytes_read = SdifFReadFrameHeader(self.this)             # <<<<<<<<<<<<<<
 *         # bytes_read += self._read_signature()
 *         self.frame_status = eFrameHeaderRead
 */
  __pyx_v_bytes_read = SdifFReadFrameHeader(__pyx_v_self->this);

  /* "pysdif/_pysdif.pyx":1515
 *         cdef int bytes_read = SdifFReadFrameHeader(self.this)
 *         # bytes_read += self._read_signature()
 *         self.frame_status = eFrameHeaderRead             # <<<<<<<<<<<<<<
 *         self.matrix_idx = 0
 *         self.matrix_status = eMatrixNothingRead
 */
  __pyx_v_self->frame_status = __pyx_e_6pysdif_7_pysdif_eFrameHeaderRead;

  /* "pysdif/_pysdif.pyx":1516
 *         # bytes_read += self._read_signature()
 *         self.frame_status = eFrameHeaderRead
 *         self.matrix_idx = 0             # <<<<<<<<<<<<<<
 *         self.matrix_status = eMatrixNothingRead
 *         return bytes_read
 */
  __pyx_v_self->matrix_idx = 0;

  /* "pysdif/_pysdif.pyx":1517
 *         self.frame_status = eFrameHeaderRead
 *         self.matrix_idx = 0
 *         self.matrix_status = eMatrixNothingRead             # <<<<<<<<<<<<<<
 *         return bytes_read
 * 
 */
  __pyx_v_self->matrix_status = __pyx_e_6pysdif_7_pysdif_eMatrixNothingRead;

  /* "pysdif/_pysdif.pyx":1518
 *         self.matrix_idx = 0
 *         self.matrix_status = eMatrixNothingRead
 *         return bytes_read             # <<<<<<<<<<<<<<
 * 
 *     def frame_read_header(self):
 */
  __pyx_r = __pyx_v_bytes_read;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1500
 * 
 * 
 *     cdef int _frame_read_header(self):             # <<<<<<<<<<<<<<
 *         """
 *         Internal function.
 */

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

/* "pysdif/_pysdif.pyx":1520
 *         return bytes_read
 * 
 *     def frame_read_header(self):             # <<<<<<<<<<<<<<
 *         """
 *         Low level interface - Read the frame header.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_37frame_read_header(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_36frame_read_header, "SdifFile.frame_read_header(self)\n\n        Low level interface - Read the frame header.\n\n        Returns the number of bytes read. If it reaches the\n        end of file, self.eof is 1 and this function returns 0\n\n        Raises SdifOrderError if the header or some of the data\n        were already read from this frame.\n        \n        Returns:\n            (int) The bytes read\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_37frame_read_header = {"frame_read_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_37frame_read_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_36frame_read_header};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_37frame_read_header(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("frame_read_header (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("frame_read_header", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "frame_read_header", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_36frame_read_header(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_36frame_read_header(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  int __pyx_v_error;
  int __pyx_v_bytesread;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("frame_read_header", 1);

  /* "pysdif/_pysdif.pyx":1534
 *         """
 *         cdef int error
 *         if self.frame_status == eFrameAllDataRead:             # <<<<<<<<<<<<<<
 *             # we are at the end of the last frame.
 *             logger.debug("frame_read_header: finalizing last frame")
 */
  __pyx_t_1 = (__pyx_v_self->frame_status == __pyx_e_6pysdif_7_pysdif_eFrameAllDataRead);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1536
 *         if self.frame_status == eFrameAllDataRead:
 *             # we are at the end of the last frame.
 *             logger.debug("frame_read_header: finalizing last frame")             # <<<<<<<<<<<<<<
 *             error = self._finalize_frame()
 *             if error:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_s_frame_read_header_finalizing_las};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1536, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysdif/_pysdif.pyx":1537
 *             # we are at the end of the last frame.
 *             logger.debug("frame_read_header: finalizing last frame")
 *             error = self._finalize_frame()             # <<<<<<<<<<<<<<
 *             if error:
 *                 raise SdifOrderError("Error finalizing Frame")
 */
    __pyx_t_5 = __pyx_f_6pysdif_7_pysdif_8SdifFile__finalize_frame(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1537, __pyx_L1_error)
    __pyx_v_error = __pyx_t_5;

    /* "pysdif/_pysdif.pyx":1538
 *             logger.debug("frame_read_header: finalizing last frame")
 *             error = self._finalize_frame()
 *             if error:             # <<<<<<<<<<<<<<
 *                 raise SdifOrderError("Error finalizing Frame")
 *         cdef int bytesread = self._frame_read_header()
 */
    __pyx_t_1 = (__pyx_v_error != 0);
    if (unlikely(__pyx_t_1)) {

      /* "pysdif/_pysdif.pyx":1539
 *             error = self._finalize_frame()
 *             if error:
 *                 raise SdifOrderError("Error finalizing Frame")             # <<<<<<<<<<<<<<
 *         cdef int bytesread = self._frame_read_header()
 *         if bytesread >= 0:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_SdifOrderError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1539, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_s_Error_finalizing_Frame};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1539, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 1539, __pyx_L1_error)

      /* "pysdif/_pysdif.pyx":1538
 *             logger.debug("frame_read_header: finalizing last frame")
 *             error = self._finalize_frame()
 *             if error:             # <<<<<<<<<<<<<<
 *                 raise SdifOrderError("Error finalizing Frame")
 *         cdef int bytesread = self._frame_read_header()
 */
    }

    /* "pysdif/_pysdif.pyx":1534
 *         """
 *         cdef int error
 *         if self.frame_status == eFrameAllDataRead:             # <<<<<<<<<<<<<<
 *             # we are at the end of the last frame.
 *             logger.debug("frame_read_header: finalizing last frame")
 */
  }

  /* "pysdif/_pysdif.pyx":1540
 *             if error:
 *                 raise SdifOrderError("Error finalizing Frame")
 *         cdef int bytesread = self._frame_read_header()             # <<<<<<<<<<<<<<
 *         if bytesread >= 0:
 *             return bytesread
 */
  __pyx_t_5 = ((struct __pyx_vtabstruct_6pysdif_7_pysdif_SdifFile *)__pyx_v_self->__pyx_vtab)->_frame_read_header(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1540, __pyx_L1_error)
  __pyx_v_bytesread = __pyx_t_5;

  /* "pysdif/_pysdif.pyx":1541
 *                 raise SdifOrderError("Error finalizing Frame")
 *         cdef int bytesread = self._frame_read_header()
 *         if bytesread >= 0:             # <<<<<<<<<<<<<<
 *             return bytesread
 *         else:
 */
  __pyx_t_1 = (__pyx_v_bytesread >= 0);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1542
 *         cdef int bytesread = self._frame_read_header()
 *         if bytesread >= 0:
 *             return bytesread             # <<<<<<<<<<<<<<
 *         else:
 *             if self.frame_status == eFrameHeaderRead:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_bytesread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1541
 *                 raise SdifOrderError("Error finalizing Frame")
 *         cdef int bytesread = self._frame_read_header()
 *         if bytesread >= 0:             # <<<<<<<<<<<<<<
 *             return bytesread
 *         else:
 */
  }

  /* "pysdif/_pysdif.pyx":1544
 *             return bytesread
 *         else:
 *             if self.frame_status == eFrameHeaderRead:             # <<<<<<<<<<<<<<
 *                 raise SdifOrderError("The header was already read")
 *             else:
 */
  /*else*/ {
    __pyx_t_1 = (__pyx_v_self->frame_status == __pyx_e_6pysdif_7_pysdif_eFrameHeaderRead);
    if (unlikely(__pyx_t_1)) {

      /* "pysdif/_pysdif.pyx":1545
 *         else:
 *             if self.frame_status == eFrameHeaderRead:
 *                 raise SdifOrderError("The header was already read")             # <<<<<<<<<<<<<<
 *             else:
 *                 raise SdifOrderError("The frame should be read or skipped before a new header is read")
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_SdifOrderError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1545, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_s_The_header_was_already_read};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1545, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 1545, __pyx_L1_error)

      /* "pysdif/_pysdif.pyx":1544
 *             return bytesread
 *         else:
 *             if self.frame_status == eFrameHeaderRead:             # <<<<<<<<<<<<<<
 *                 raise SdifOrderError("The header was already read")
 *             else:
 */
    }

    /* "pysdif/_pysdif.pyx":1547
 *                 raise SdifOrderError("The header was already read")
 *             else:
 *                 raise SdifOrderError("The frame should be read or skipped before a new header is read")             # <<<<<<<<<<<<<<
 * 
 *     def frame_skip_data(self):
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_SdifOrderError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1547, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_s_The_frame_should_be_read_or_skip};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1547, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 1547, __pyx_L1_error)
    }
  }

  /* "pysdif/_pysdif.pyx":1520
 *         return bytes_read
 * 
 *     def frame_read_header(self):             # <<<<<<<<<<<<<<
 *         """
 *         Low level interface - Read the frame header.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.frame_read_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1549
 *                 raise SdifOrderError("The frame should be read or skipped before a new header is read")
 * 
 *     def frame_skip_data(self):             # <<<<<<<<<<<<<<
 *         """
 *         Low level interface - Skip frame and all its matrices
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_39frame_skip_data(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_38frame_skip_data, "SdifFile.frame_skip_data(self)\n\n        Low level interface - Skip frame and all its matrices\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_39frame_skip_data = {"frame_skip_data", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_39frame_skip_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_38frame_skip_data};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_39frame_skip_data(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("frame_skip_data (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("frame_skip_data", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "frame_skip_data", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_38frame_skip_data(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_38frame_skip_data(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  size_t __pyx_v_bytes_read;
  int __pyx_v_error;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("frame_skip_data", 1);

  /* "pysdif/_pysdif.pyx":1553
 *         Low level interface - Skip frame and all its matrices
 *         """
 *         cdef size_t bytes_read = SdifFSkipFrameData (self.this)             # <<<<<<<<<<<<<<
 *         logger.debug("frame_skip_data: calling finalize_frame")
 *         cdef int error = self._finalize_frame()
 */
  __pyx_v_bytes_read = SdifFSkipFrameData(__pyx_v_self->this);

  /* "pysdif/_pysdif.pyx":1554
 *         """
 *         cdef size_t bytes_read = SdifFSkipFrameData (self.this)
 *         logger.debug("frame_skip_data: calling finalize_frame")             # <<<<<<<<<<<<<<
 *         cdef int error = self._finalize_frame()
 *         if error:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_s_frame_skip_data_calling_finalize};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":1555
 *         cdef size_t bytes_read = SdifFSkipFrameData (self.this)
 *         logger.debug("frame_skip_data: calling finalize_frame")
 *         cdef int error = self._finalize_frame()             # <<<<<<<<<<<<<<
 *         if error:
 *             raise SdifOrderError("Error finalizing Frame")
 */
  __pyx_t_4 = __pyx_f_6pysdif_7_pysdif_8SdifFile__finalize_frame(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1555, __pyx_L1_error)
  __pyx_v_error = __pyx_t_4;

  /* "pysdif/_pysdif.pyx":1556
 *         logger.debug("frame_skip_data: calling finalize_frame")
 *         cdef int error = self._finalize_frame()
 *         if error:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("Error finalizing Frame")
 *         return bytes_read
 */
  __pyx_t_5 = (__pyx_v_error != 0);
  if (unlikely(__pyx_t_5)) {

    /* "pysdif/_pysdif.pyx":1557
 *         cdef int error = self._finalize_frame()
 *         if error:
 *             raise SdifOrderError("Error finalizing Frame")             # <<<<<<<<<<<<<<
 *         return bytes_read
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SdifOrderError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_s_Error_finalizing_Frame};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1557, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1557, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1556
 *         logger.debug("frame_skip_data: calling finalize_frame")
 *         cdef int error = self._finalize_frame()
 *         if error:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("Error finalizing Frame")
 *         return bytes_read
 */
  }

  /* "pysdif/_pysdif.pyx":1558
 *         if error:
 *             raise SdifOrderError("Error finalizing Frame")
 *         return bytes_read             # <<<<<<<<<<<<<<
 * 
 *     cpdef int _read_signature(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_bytes_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1549
 *                 raise SdifOrderError("The frame should be read or skipped before a new header is read")
 * 
 *     def frame_skip_data(self):             # <<<<<<<<<<<<<<
 *         """
 *         Low level interface - Skip frame and all its matrices
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.frame_skip_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1560
 *         return bytes_read
 * 
 *     cpdef int _read_signature(self):             # <<<<<<<<<<<<<<
 *         cdef size_t NbCharRead
 *         self.eof = SdifFGetSignature(self.this, &NbCharRead) == eEof
 */

static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_41_read_signature(PyObject *__pyx_v_self, 
#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 int __pyx_f_6pysdif_7_pysdif_8SdifFile__read_signature(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, int __pyx_skip_dispatch) {
  size_t __pyx_v_NbCharRead;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_read_signature", 1);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read_signature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6pysdif_7_pysdif_8SdifFile_41_read_signature)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1560, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1560, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pysdif/_pysdif.pyx":1562
 *     cpdef int _read_signature(self):
 *         cdef size_t NbCharRead
 *         self.eof = SdifFGetSignature(self.this, &NbCharRead) == eEof             # <<<<<<<<<<<<<<
 *         self.frame_status = eFrameSignatureRead
 *         return NbCharRead
 */
  __pyx_v_self->eof = (SdifFGetSignature(__pyx_v_self->this, (&__pyx_v_NbCharRead)) == eEof);

  /* "pysdif/_pysdif.pyx":1563
 *         cdef size_t NbCharRead
 *         self.eof = SdifFGetSignature(self.this, &NbCharRead) == eEof
 *         self.frame_status = eFrameSignatureRead             # <<<<<<<<<<<<<<
 *         return NbCharRead
 * 
 */
  __pyx_v_self->frame_status = __pyx_e_6pysdif_7_pysdif_eFrameSignatureRead;

  /* "pysdif/_pysdif.pyx":1564
 *         self.eof = SdifFGetSignature(self.this, &NbCharRead) == eEof
 *         self.frame_status = eFrameSignatureRead
 *         return NbCharRead             # <<<<<<<<<<<<<<
 * 
 *     cdef inline size_t _read_matrix_header(self):
 */
  __pyx_r = __pyx_v_NbCharRead;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1560
 *         return bytes_read
 * 
 *     cpdef int _read_signature(self):             # <<<<<<<<<<<<<<
 *         cdef size_t NbCharRead
 *         self.eof = SdifFGetSignature(self.this, &NbCharRead) == eEof
 */

  /* 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("pysdif._pysdif.SdifFile._read_signature", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_41_read_signature(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_40_read_signature, "SdifFile._read_signature(self) -> int");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_41_read_signature = {"_read_signature", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_41_read_signature, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_40_read_signature};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_41_read_signature(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_read_signature (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("_read_signature", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_read_signature", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_40_read_signature(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_40_read_signature(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  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("_read_signature", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_8SdifFile__read_signature(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1560, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1560, __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("pysdif._pysdif.SdifFile._read_signature", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1566
 *         return NbCharRead
 * 
 *     cdef inline size_t _read_matrix_header(self):             # <<<<<<<<<<<<<<
 *         """
 *         Internal
 */

static CYTHON_INLINE size_t __pyx_f_6pysdif_7_pysdif_8SdifFile__read_matrix_header(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  size_t __pyx_r;
  int __pyx_t_1;

  /* "pysdif/_pysdif.pyx":1573
 *         Return the number of bytes read or 0 if no more matrices.
 *         """
 *         if self.matrix_idx >= self.this.CurrFramH.NbMatrix:             # <<<<<<<<<<<<<<
 *             return 0
 *         self.frame_status = eFrameSomeDataRead
 */
  __pyx_t_1 = (__pyx_v_self->matrix_idx >= __pyx_v_self->this->CurrFramH->NbMatrix);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1574
 *         """
 *         if self.matrix_idx >= self.this.CurrFramH.NbMatrix:
 *             return 0             # <<<<<<<<<<<<<<
 *         self.frame_status = eFrameSomeDataRead
 *         self.matrix_status = eMatrixHeaderRead
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1573
 *         Return the number of bytes read or 0 if no more matrices.
 *         """
 *         if self.matrix_idx >= self.this.CurrFramH.NbMatrix:             # <<<<<<<<<<<<<<
 *             return 0
 *         self.frame_status = eFrameSomeDataRead
 */
  }

  /* "pysdif/_pysdif.pyx":1575
 *         if self.matrix_idx >= self.this.CurrFramH.NbMatrix:
 *             return 0
 *         self.frame_status = eFrameSomeDataRead             # <<<<<<<<<<<<<<
 *         self.matrix_status = eMatrixHeaderRead
 *         return SdifFReadMatrixHeader(self.this)
 */
  __pyx_v_self->frame_status = __pyx_e_6pysdif_7_pysdif_eFrameSomeDataRead;

  /* "pysdif/_pysdif.pyx":1576
 *             return 0
 *         self.frame_status = eFrameSomeDataRead
 *         self.matrix_status = eMatrixHeaderRead             # <<<<<<<<<<<<<<
 *         return SdifFReadMatrixHeader(self.this)
 * 
 */
  __pyx_v_self->matrix_status = __pyx_e_6pysdif_7_pysdif_eMatrixHeaderRead;

  /* "pysdif/_pysdif.pyx":1577
 *         self.frame_status = eFrameSomeDataRead
 *         self.matrix_status = eMatrixHeaderRead
 *         return SdifFReadMatrixHeader(self.this)             # <<<<<<<<<<<<<<
 * 
 *     def matrix_read_header(self):
 */
  __pyx_r = SdifFReadMatrixHeader(__pyx_v_self->this);
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1566
 *         return NbCharRead
 * 
 *     cdef inline size_t _read_matrix_header(self):             # <<<<<<<<<<<<<<
 *         """
 *         Internal
 */

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

/* "pysdif/_pysdif.pyx":1579
 *         return SdifFReadMatrixHeader(self.this)
 * 
 *     def matrix_read_header(self):             # <<<<<<<<<<<<<<
 *         """
 *         Low level interface - Read the matrix header
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_43matrix_read_header(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_42matrix_read_header, "SdifFile.matrix_read_header(self)\n\n        Low level interface - Read the matrix header\n\n        Reads the matrix header (signature, number of rows and columns, etc.)\n        Return the number of bytes read or 0 if no more matrices,\n        or if eof is reached\n\n        !!! note\n\n            Raises `NoFrame` if no current frame\n\n        Returns:\n            (int) The bytes read\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_43matrix_read_header = {"matrix_read_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_43matrix_read_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_42matrix_read_header};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_43matrix_read_header(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("matrix_read_header (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("matrix_read_header", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "matrix_read_header", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_42matrix_read_header(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_42matrix_read_header(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  size_t __pyx_v_bytesread;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("matrix_read_header", 1);

  /* "pysdif/_pysdif.pyx":1594
 *             (int) The bytes read
 *         """
 *         if self.frame_status == eFrameNothingRead:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("Frame header has not been read")
 *         if self.this.CurrFramH == NULL:
 */
  __pyx_t_1 = (__pyx_v_self->frame_status == __pyx_e_6pysdif_7_pysdif_eFrameNothingRead);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":1595
 *         """
 *         if self.frame_status == eFrameNothingRead:
 *             raise SdifOrderError("Frame header has not been read")             # <<<<<<<<<<<<<<
 *         if self.this.CurrFramH == NULL:
 *             raise NoFrame("no current frame")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SdifOrderError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_Frame_header_has_not_been_read};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1595, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1594
 *             (int) The bytes read
 *         """
 *         if self.frame_status == eFrameNothingRead:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("Frame header has not been read")
 *         if self.this.CurrFramH == NULL:
 */
  }

  /* "pysdif/_pysdif.pyx":1596
 *         if self.frame_status == eFrameNothingRead:
 *             raise SdifOrderError("Frame header has not been read")
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             raise NoFrame("no current frame")
 *         if self.matrix_status == eMatrixHeaderRead:
 */
  __pyx_t_1 = (__pyx_v_self->this->CurrFramH == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":1597
 *             raise SdifOrderError("Frame header has not been read")
 *         if self.this.CurrFramH == NULL:
 *             raise NoFrame("no current frame")             # <<<<<<<<<<<<<<
 *         if self.matrix_status == eMatrixHeaderRead:
 *             raise SdifOrderError("Matrix header was already read")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NoFrame); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_no_current_frame};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1597, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1596
 *         if self.frame_status == eFrameNothingRead:
 *             raise SdifOrderError("Frame header has not been read")
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             raise NoFrame("no current frame")
 *         if self.matrix_status == eMatrixHeaderRead:
 */
  }

  /* "pysdif/_pysdif.pyx":1598
 *         if self.this.CurrFramH == NULL:
 *             raise NoFrame("no current frame")
 *         if self.matrix_status == eMatrixHeaderRead:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("Matrix header was already read")
 *         if self.eof:
 */
  __pyx_t_1 = (__pyx_v_self->matrix_status == __pyx_e_6pysdif_7_pysdif_eMatrixHeaderRead);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":1599
 *             raise NoFrame("no current frame")
 *         if self.matrix_status == eMatrixHeaderRead:
 *             raise SdifOrderError("Matrix header was already read")             # <<<<<<<<<<<<<<
 *         if self.eof:
 *             logger.error("Attempted to read past end of file")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SdifOrderError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_Matrix_header_was_already_read};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1599, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1599, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1598
 *         if self.this.CurrFramH == NULL:
 *             raise NoFrame("no current frame")
 *         if self.matrix_status == eMatrixHeaderRead:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("Matrix header was already read")
 *         if self.eof:
 */
  }

  /* "pysdif/_pysdif.pyx":1600
 *         if self.matrix_status == eMatrixHeaderRead:
 *             raise SdifOrderError("Matrix header was already read")
 *         if self.eof:             # <<<<<<<<<<<<<<
 *             logger.error("Attempted to read past end of file")
 *             return 0
 */
  __pyx_t_1 = (__pyx_v_self->eof != 0);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1601
 *             raise SdifOrderError("Matrix header was already read")
 *         if self.eof:
 *             logger.error("Attempted to read past end of file")             # <<<<<<<<<<<<<<
 *             return 0
 *         cdef size_t bytesread = self._read_matrix_header()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_s_Attempted_to_read_past_end_of_fi};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1601, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysdif/_pysdif.pyx":1602
 *         if self.eof:
 *             logger.error("Attempted to read past end of file")
 *             return 0             # <<<<<<<<<<<<<<
 *         cdef size_t bytesread = self._read_matrix_header()
 *         return bytesread
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_0);
    __pyx_r = __pyx_int_0;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1600
 *         if self.matrix_status == eMatrixHeaderRead:
 *             raise SdifOrderError("Matrix header was already read")
 *         if self.eof:             # <<<<<<<<<<<<<<
 *             logger.error("Attempted to read past end of file")
 *             return 0
 */
  }

  /* "pysdif/_pysdif.pyx":1603
 *             logger.error("Attempted to read past end of file")
 *             return 0
 *         cdef size_t bytesread = self._read_matrix_header()             # <<<<<<<<<<<<<<
 *         return bytesread
 * 
 */
  __pyx_t_6 = __pyx_f_6pysdif_7_pysdif_8SdifFile__read_matrix_header(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1603, __pyx_L1_error)
  __pyx_v_bytesread = __pyx_t_6;

  /* "pysdif/_pysdif.pyx":1604
 *             return 0
 *         cdef size_t bytesread = self._read_matrix_header()
 *         return bytesread             # <<<<<<<<<<<<<<
 * 
 *     def curr_frame_available(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_bytesread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1579
 *         return SdifFReadMatrixHeader(self.this)
 * 
 *     def matrix_read_header(self):             # <<<<<<<<<<<<<<
 *         """
 *         Low level interface - Read the matrix header
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.matrix_read_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1606
 *         return bytesread
 * 
 *     def curr_frame_available(self):             # <<<<<<<<<<<<<<
 *        return self.this.CurrFramH != NULL
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_45curr_frame_available(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_44curr_frame_available, "SdifFile.curr_frame_available(self)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_45curr_frame_available = {"curr_frame_available", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_45curr_frame_available, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_44curr_frame_available};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_45curr_frame_available(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("curr_frame_available (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("curr_frame_available", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "curr_frame_available", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_44curr_frame_available(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_44curr_frame_available(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("curr_frame_available", 1);

  /* "pysdif/_pysdif.pyx":1607
 * 
 *     def curr_frame_available(self):
 *        return self.this.CurrFramH != NULL             # <<<<<<<<<<<<<<
 * 
 *     def curr_matrix_available(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->this->CurrFramH != NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1606
 *         return bytesread
 * 
 *     def curr_frame_available(self):             # <<<<<<<<<<<<<<
 *        return self.this.CurrFramH != NULL
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.curr_frame_available", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1609
 *        return self.this.CurrFramH != NULL
 * 
 *     def curr_matrix_available(self):             # <<<<<<<<<<<<<<
 *        return self.this.CurrMtrxH != NULL
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_47curr_matrix_available(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_46curr_matrix_available, "SdifFile.curr_matrix_available(self)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_47curr_matrix_available = {"curr_matrix_available", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_47curr_matrix_available, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_46curr_matrix_available};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_47curr_matrix_available(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("curr_matrix_available (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("curr_matrix_available", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "curr_matrix_available", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_46curr_matrix_available(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_46curr_matrix_available(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("curr_matrix_available", 1);

  /* "pysdif/_pysdif.pyx":1610
 * 
 *     def curr_matrix_available(self):
 *        return self.this.CurrMtrxH != NULL             # <<<<<<<<<<<<<<
 * 
 *     def matrix_skip_data(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->this->CurrMtrxH != NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1609
 *        return self.this.CurrFramH != NULL
 * 
 *     def curr_matrix_available(self):             # <<<<<<<<<<<<<<
 *        return self.this.CurrMtrxH != NULL
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.curr_matrix_available", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1612
 *        return self.this.CurrMtrxH != NULL
 * 
 *     def matrix_skip_data(self):             # <<<<<<<<<<<<<<
 *         """
 *         Low-level Interface - Skip the matrix data without reading it.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_49matrix_skip_data(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_48matrix_skip_data, "SdifFile.matrix_skip_data(self)\n\n        Low-level Interface - Skip the matrix data without reading it.\n\n        !!! note\n\n            Raises NoFrame if no current frame\n\n        Returns:\n            (int) The bytes read. \n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_49matrix_skip_data = {"matrix_skip_data", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_49matrix_skip_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_48matrix_skip_data};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_49matrix_skip_data(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("matrix_skip_data (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("matrix_skip_data", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "matrix_skip_data", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_48matrix_skip_data(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_48matrix_skip_data(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  size_t __pyx_v_bytes_read;
  int __pyx_v_error;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("matrix_skip_data", 1);

  /* "pysdif/_pysdif.pyx":1623
 *             (int) The bytes read.
 *         """
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             raise NoFrame("matrix_skip_data: no current frame")
 *         if self.matrix_status != eMatrixHeaderRead:
 */
  __pyx_t_1 = (__pyx_v_self->this->CurrFramH == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":1624
 *         """
 *         if self.this.CurrFramH == NULL:
 *             raise NoFrame("matrix_skip_data: no current frame")             # <<<<<<<<<<<<<<
 *         if self.matrix_status != eMatrixHeaderRead:
 *             raise SdifOrderError("Matrix data can only be skipped after reading the matrix header")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NoFrame); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_matrix_skip_data_no_current_fram};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1624, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1624, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1623
 *             (int) The bytes read.
 *         """
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             raise NoFrame("matrix_skip_data: no current frame")
 *         if self.matrix_status != eMatrixHeaderRead:
 */
  }

  /* "pysdif/_pysdif.pyx":1625
 *         if self.this.CurrFramH == NULL:
 *             raise NoFrame("matrix_skip_data: no current frame")
 *         if self.matrix_status != eMatrixHeaderRead:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("Matrix data can only be skipped after reading the matrix header")
 *         cdef size_t bytes_read = SdifFSkipMatrixData(self.this)
 */
  __pyx_t_1 = (__pyx_v_self->matrix_status != __pyx_e_6pysdif_7_pysdif_eMatrixHeaderRead);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":1626
 *             raise NoFrame("matrix_skip_data: no current frame")
 *         if self.matrix_status != eMatrixHeaderRead:
 *             raise SdifOrderError("Matrix data can only be skipped after reading the matrix header")             # <<<<<<<<<<<<<<
 *         cdef size_t bytes_read = SdifFSkipMatrixData(self.this)
 *         self.matrix_status = eMatrixDataSkipped
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SdifOrderError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1626, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_Matrix_data_can_only_be_skipped};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1626, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1626, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1625
 *         if self.this.CurrFramH == NULL:
 *             raise NoFrame("matrix_skip_data: no current frame")
 *         if self.matrix_status != eMatrixHeaderRead:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("Matrix data can only be skipped after reading the matrix header")
 *         cdef size_t bytes_read = SdifFSkipMatrixData(self.this)
 */
  }

  /* "pysdif/_pysdif.pyx":1627
 *         if self.matrix_status != eMatrixHeaderRead:
 *             raise SdifOrderError("Matrix data can only be skipped after reading the matrix header")
 *         cdef size_t bytes_read = SdifFSkipMatrixData(self.this)             # <<<<<<<<<<<<<<
 *         self.matrix_status = eMatrixDataSkipped
 *         cdef int error = self._finalize_matrix()
 */
  __pyx_v_bytes_read = SdifFSkipMatrixData(__pyx_v_self->this);

  /* "pysdif/_pysdif.pyx":1628
 *             raise SdifOrderError("Matrix data can only be skipped after reading the matrix header")
 *         cdef size_t bytes_read = SdifFSkipMatrixData(self.this)
 *         self.matrix_status = eMatrixDataSkipped             # <<<<<<<<<<<<<<
 *         cdef int error = self._finalize_matrix()
 *         if error:
 */
  __pyx_v_self->matrix_status = __pyx_e_6pysdif_7_pysdif_eMatrixDataSkipped;

  /* "pysdif/_pysdif.pyx":1629
 *         cdef size_t bytes_read = SdifFSkipMatrixData(self.this)
 *         self.matrix_status = eMatrixDataSkipped
 *         cdef int error = self._finalize_matrix()             # <<<<<<<<<<<<<<
 *         if error:
 *             raise SdifOrderError("error finishing matrix")
 */
  __pyx_t_5 = __pyx_f_6pysdif_7_pysdif_8SdifFile__finalize_matrix(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1629, __pyx_L1_error)
  __pyx_v_error = __pyx_t_5;

  /* "pysdif/_pysdif.pyx":1630
 *         self.matrix_status = eMatrixDataSkipped
 *         cdef int error = self._finalize_matrix()
 *         if error:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("error finishing matrix")
 *         return bytes_read
 */
  __pyx_t_1 = (__pyx_v_error != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":1631
 *         cdef int error = self._finalize_matrix()
 *         if error:
 *             raise SdifOrderError("error finishing matrix")             # <<<<<<<<<<<<<<
 *         return bytes_read
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SdifOrderError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_error_finishing_matrix};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1631, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1631, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1630
 *         self.matrix_status = eMatrixDataSkipped
 *         cdef int error = self._finalize_matrix()
 *         if error:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("error finishing matrix")
 *         return bytes_read
 */
  }

  /* "pysdif/_pysdif.pyx":1632
 *         if error:
 *             raise SdifOrderError("error finishing matrix")
 *         return bytes_read             # <<<<<<<<<<<<<<
 * 
 *     cdef inline int _matrix_read_data(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_bytes_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1612
 *        return self.this.CurrMtrxH != NULL
 * 
 *     def matrix_skip_data(self):             # <<<<<<<<<<<<<<
 *         """
 *         Low-level Interface - Skip the matrix data without reading it.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.matrix_skip_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1634
 *         return bytes_read
 * 
 *     cdef inline int _matrix_read_data(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read the matrix data.
 */

static CYTHON_INLINE int __pyx_f_6pysdif_7_pysdif_8SdifFile__matrix_read_data(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  int __pyx_v_bytesread;
  int __pyx_v_error;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "pysdif/_pysdif.pyx":1641
 *             (int) The number of bytes read, 0 if error
 *         """
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             return 0
 *         cdef int bytesread = SdifFReadMatrixData(self.this)
 */
  __pyx_t_1 = (__pyx_v_self->this->CurrFramH == NULL);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1642
 *         """
 *         if self.this.CurrFramH == NULL:
 *             return 0             # <<<<<<<<<<<<<<
 *         cdef int bytesread = SdifFReadMatrixData(self.this)
 *         self.matrix_status = eMatrixDataRead
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1641
 *             (int) The number of bytes read, 0 if error
 *         """
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             return 0
 *         cdef int bytesread = SdifFReadMatrixData(self.this)
 */
  }

  /* "pysdif/_pysdif.pyx":1643
 *         if self.this.CurrFramH == NULL:
 *             return 0
 *         cdef int bytesread = SdifFReadMatrixData(self.this)             # <<<<<<<<<<<<<<
 *         self.matrix_status = eMatrixDataRead
 *         cdef int error = self._finalize_matrix()
 */
  __pyx_v_bytesread = SdifFReadMatrixData(__pyx_v_self->this);

  /* "pysdif/_pysdif.pyx":1644
 *             return 0
 *         cdef int bytesread = SdifFReadMatrixData(self.this)
 *         self.matrix_status = eMatrixDataRead             # <<<<<<<<<<<<<<
 *         cdef int error = self._finalize_matrix()
 *         if error:
 */
  __pyx_v_self->matrix_status = __pyx_e_6pysdif_7_pysdif_eMatrixDataRead;

  /* "pysdif/_pysdif.pyx":1645
 *         cdef int bytesread = SdifFReadMatrixData(self.this)
 *         self.matrix_status = eMatrixDataRead
 *         cdef int error = self._finalize_matrix()             # <<<<<<<<<<<<<<
 *         if error:
 *             return 0
 */
  __pyx_t_2 = __pyx_f_6pysdif_7_pysdif_8SdifFile__finalize_matrix(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1645, __pyx_L1_error)
  __pyx_v_error = __pyx_t_2;

  /* "pysdif/_pysdif.pyx":1646
 *         self.matrix_status = eMatrixDataRead
 *         cdef int error = self._finalize_matrix()
 *         if error:             # <<<<<<<<<<<<<<
 *             return 0
 *         return bytesread
 */
  __pyx_t_1 = (__pyx_v_error != 0);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1647
 *         cdef int error = self._finalize_matrix()
 *         if error:
 *             return 0             # <<<<<<<<<<<<<<
 *         return bytesread
 * 
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1646
 *         self.matrix_status = eMatrixDataRead
 *         cdef int error = self._finalize_matrix()
 *         if error:             # <<<<<<<<<<<<<<
 *             return 0
 *         return bytesread
 */
  }

  /* "pysdif/_pysdif.pyx":1648
 *         if error:
 *             return 0
 *         return bytesread             # <<<<<<<<<<<<<<
 * 
 *     def matrix_read_data(self, copy=False):
 */
  __pyx_r = __pyx_v_bytesread;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1634
 *         return bytes_read
 * 
 *     cdef inline int _matrix_read_data(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read the matrix data.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile._matrix_read_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1650
 *         return bytesread
 * 
 *     def matrix_read_data(self, copy=False):             # <<<<<<<<<<<<<<
 *         """
 *         Read the data of the current matrix as a numpy array
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_51matrix_read_data(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_50matrix_read_data, "SdifFile.matrix_read_data(self, copy=False)\n\n        Read the data of the current matrix as a numpy array\n\n        Args:\n            copy: if True, copy the matrix data. Otherwise, the data is only\n                valid until the next matrix is read.\n\n        Returns:\n            a numpy array representing the matrix\n        \n        If the matrix-header was not read, it is read here\n        The matrix signature cam be retrieved via sdiffile.curr_matrix_signature()\n        \n        If data was already read, it is wrapped as a numpy array and returned.\n        \n        If copy is False, the array is referencing the data read and \n        is only valid as long as no new matrix is read.\n        To keep the array for longer, use `copy=True` or call `.copy()` on the array:\n\n        ```python\n        tmparray = sdiffile.matrix_read_data()\n        myarray = tmparray.copy() \n        ```\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_51matrix_read_data = {"matrix_read_data", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_51matrix_read_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_50matrix_read_data};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_51matrix_read_data(PyObject *__pyx_v_self, 
#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_copy = 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("matrix_read_data (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_copy,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_copy);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1650, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "matrix_read_data") < 0)) __PYX_ERR(0, 1650, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_copy = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("matrix_read_data", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 1650, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.matrix_read_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_50matrix_read_data(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self), __pyx_v_copy);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_50matrix_read_data(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, PyObject *__pyx_v_copy) {
  int __pyx_v_status;
  size_t __pyx_v_bytesread;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  enum __pyx_t_6pysdif_7_pysdif_MatrixStatusE __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("matrix_read_data", 1);

  /* "pysdif/_pysdif.pyx":1675
 *         ```
 *         """
 *         cdef int status = self.matrix_status             # <<<<<<<<<<<<<<
 *         cdef size_t bytesread
 *         if status == eMatrixDataSkipped:
 */
  __pyx_t_1 = __pyx_v_self->matrix_status;
  __pyx_v_status = __pyx_t_1;

  /* "pysdif/_pysdif.pyx":1677
 *         cdef int status = self.matrix_status
 *         cdef size_t bytesread
 *         if status == eMatrixDataSkipped:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("Can't get the data, since it was already skipped")
 *         if status == eMatrixNothingRead:
 */
  __pyx_t_2 = (__pyx_v_status == __pyx_e_6pysdif_7_pysdif_eMatrixDataSkipped);
  if (unlikely(__pyx_t_2)) {

    /* "pysdif/_pysdif.pyx":1678
 *         cdef size_t bytesread
 *         if status == eMatrixDataSkipped:
 *             raise SdifOrderError("Can't get the data, since it was already skipped")             # <<<<<<<<<<<<<<
 *         if status == eMatrixNothingRead:
 *             if not self.matrix_read_header():
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_SdifOrderError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_s_Can_t_get_the_data_since_it_was};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1678, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1678, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1677
 *         cdef int status = self.matrix_status
 *         cdef size_t bytesread
 *         if status == eMatrixDataSkipped:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("Can't get the data, since it was already skipped")
 *         if status == eMatrixNothingRead:
 */
  }

  /* "pysdif/_pysdif.pyx":1679
 *         if status == eMatrixDataSkipped:
 *             raise SdifOrderError("Can't get the data, since it was already skipped")
 *         if status == eMatrixNothingRead:             # <<<<<<<<<<<<<<
 *             if not self.matrix_read_header():
 *                 if self.matrix_idx >= self.this.CurrFramH.NbMatrix:
 */
  __pyx_t_2 = (__pyx_v_status == __pyx_e_6pysdif_7_pysdif_eMatrixNothingRead);
  if (__pyx_t_2) {

    /* "pysdif/_pysdif.pyx":1680
 *             raise SdifOrderError("Can't get the data, since it was already skipped")
 *         if status == eMatrixNothingRead:
 *             if not self.matrix_read_header():             # <<<<<<<<<<<<<<
 *                 if self.matrix_idx >= self.this.CurrFramH.NbMatrix:
 *                     raise SdifOrderError("Attempted to read matrix header, but there are no more matrices in this frame")
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_matrix_read_header); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1680, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1680, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = (!__pyx_t_2);
    if (__pyx_t_7) {

      /* "pysdif/_pysdif.pyx":1681
 *         if status == eMatrixNothingRead:
 *             if not self.matrix_read_header():
 *                 if self.matrix_idx >= self.this.CurrFramH.NbMatrix:             # <<<<<<<<<<<<<<
 *                     raise SdifOrderError("Attempted to read matrix header, but there are no more matrices in this frame")
 *                 else:
 */
      __pyx_t_7 = (__pyx_v_self->matrix_idx >= __pyx_v_self->this->CurrFramH->NbMatrix);
      if (unlikely(__pyx_t_7)) {

        /* "pysdif/_pysdif.pyx":1682
 *             if not self.matrix_read_header():
 *                 if self.matrix_idx >= self.this.CurrFramH.NbMatrix:
 *                     raise SdifOrderError("Attempted to read matrix header, but there are no more matrices in this frame")             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise IOError("Could not read matrix header. ")
 */
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_SdifOrderError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1682, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = NULL;
        __pyx_t_6 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_6 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_s_Attempted_to_read_matrix_header};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1682, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 1682, __pyx_L1_error)

        /* "pysdif/_pysdif.pyx":1681
 *         if status == eMatrixNothingRead:
 *             if not self.matrix_read_header():
 *                 if self.matrix_idx >= self.this.CurrFramH.NbMatrix:             # <<<<<<<<<<<<<<
 *                     raise SdifOrderError("Attempted to read matrix header, but there are no more matrices in this frame")
 *                 else:
 */
      }

      /* "pysdif/_pysdif.pyx":1684
 *                     raise SdifOrderError("Attempted to read matrix header, but there are no more matrices in this frame")
 *                 else:
 *                     raise IOError("Could not read matrix header. ")             # <<<<<<<<<<<<<<
 *             status = eMatrixHeaderRead
 *         if status == eMatrixHeaderRead:
 */
      /*else*/ {
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1684, __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(0, 1684, __pyx_L1_error)
      }

      /* "pysdif/_pysdif.pyx":1680
 *             raise SdifOrderError("Can't get the data, since it was already skipped")
 *         if status == eMatrixNothingRead:
 *             if not self.matrix_read_header():             # <<<<<<<<<<<<<<
 *                 if self.matrix_idx >= self.this.CurrFramH.NbMatrix:
 *                     raise SdifOrderError("Attempted to read matrix header, but there are no more matrices in this frame")
 */
    }

    /* "pysdif/_pysdif.pyx":1685
 *                 else:
 *                     raise IOError("Could not read matrix header. ")
 *             status = eMatrixHeaderRead             # <<<<<<<<<<<<<<
 *         if status == eMatrixHeaderRead:
 *             bytesread = self._matrix_read_data()
 */
    __pyx_v_status = __pyx_e_6pysdif_7_pysdif_eMatrixHeaderRead;

    /* "pysdif/_pysdif.pyx":1679
 *         if status == eMatrixDataSkipped:
 *             raise SdifOrderError("Can't get the data, since it was already skipped")
 *         if status == eMatrixNothingRead:             # <<<<<<<<<<<<<<
 *             if not self.matrix_read_header():
 *                 if self.matrix_idx >= self.this.CurrFramH.NbMatrix:
 */
  }

  /* "pysdif/_pysdif.pyx":1686
 *                     raise IOError("Could not read matrix header. ")
 *             status = eMatrixHeaderRead
 *         if status == eMatrixHeaderRead:             # <<<<<<<<<<<<<<
 *             bytesread = self._matrix_read_data()
 *             if not bytesread:
 */
  __pyx_t_7 = (__pyx_v_status == __pyx_e_6pysdif_7_pysdif_eMatrixHeaderRead);
  if (__pyx_t_7) {

    /* "pysdif/_pysdif.pyx":1687
 *             status = eMatrixHeaderRead
 *         if status == eMatrixHeaderRead:
 *             bytesread = self._matrix_read_data()             # <<<<<<<<<<<<<<
 *             if not bytesread:
 *                 raise IOError("matrix empty or could not read matrix data")
 */
    __pyx_t_6 = __pyx_f_6pysdif_7_pysdif_8SdifFile__matrix_read_data(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1687, __pyx_L1_error)
    __pyx_v_bytesread = __pyx_t_6;

    /* "pysdif/_pysdif.pyx":1688
 *         if status == eMatrixHeaderRead:
 *             bytesread = self._matrix_read_data()
 *             if not bytesread:             # <<<<<<<<<<<<<<
 *                 raise IOError("matrix empty or could not read matrix data")
 *         if copy:
 */
    __pyx_t_7 = (!(__pyx_v_bytesread != 0));
    if (unlikely(__pyx_t_7)) {

      /* "pysdif/_pysdif.pyx":1689
 *             bytesread = self._matrix_read_data()
 *             if not bytesread:
 *                 raise IOError("matrix empty or could not read matrix data")             # <<<<<<<<<<<<<<
 *         if copy:
 *             return _array_from_matrix_data_copy(self.this.CurrMtrxData)
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1689, __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(0, 1689, __pyx_L1_error)

      /* "pysdif/_pysdif.pyx":1688
 *         if status == eMatrixHeaderRead:
 *             bytesread = self._matrix_read_data()
 *             if not bytesread:             # <<<<<<<<<<<<<<
 *                 raise IOError("matrix empty or could not read matrix data")
 *         if copy:
 */
    }

    /* "pysdif/_pysdif.pyx":1686
 *                     raise IOError("Could not read matrix header. ")
 *             status = eMatrixHeaderRead
 *         if status == eMatrixHeaderRead:             # <<<<<<<<<<<<<<
 *             bytesread = self._matrix_read_data()
 *             if not bytesread:
 */
  }

  /* "pysdif/_pysdif.pyx":1690
 *             if not bytesread:
 *                 raise IOError("matrix empty or could not read matrix data")
 *         if copy:             # <<<<<<<<<<<<<<
 *             return _array_from_matrix_data_copy(self.this.CurrMtrxData)
 *         return _array_from_matrix_data_no_copy(self.this.CurrMtrxData)
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_copy); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1690, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "pysdif/_pysdif.pyx":1691
 *                 raise IOError("matrix empty or could not read matrix data")
 *         if copy:
 *             return _array_from_matrix_data_copy(self.this.CurrMtrxData)             # <<<<<<<<<<<<<<
 *         return _array_from_matrix_data_no_copy(self.this.CurrMtrxData)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = ((PyObject *)__pyx_f_6pysdif_7_pysdif__array_from_matrix_data_copy(__pyx_v_self->this->CurrMtrxData)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1691, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1690
 *             if not bytesread:
 *                 raise IOError("matrix empty or could not read matrix data")
 *         if copy:             # <<<<<<<<<<<<<<
 *             return _array_from_matrix_data_copy(self.this.CurrMtrxData)
 *         return _array_from_matrix_data_no_copy(self.this.CurrMtrxData)
 */
  }

  /* "pysdif/_pysdif.pyx":1692
 *         if copy:
 *             return _array_from_matrix_data_copy(self.this.CurrMtrxData)
 *         return _array_from_matrix_data_no_copy(self.this.CurrMtrxData)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline int _finalize_matrix(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = ((PyObject *)__pyx_f_6pysdif_7_pysdif__array_from_matrix_data_no_copy(__pyx_v_self->this->CurrMtrxData)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1650
 *         return bytesread
 * 
 *     def matrix_read_data(self, copy=False):             # <<<<<<<<<<<<<<
 *         """
 *         Read the data of the current matrix as a numpy array
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.matrix_read_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1694
 *         return _array_from_matrix_data_no_copy(self.this.CurrMtrxData)
 * 
 *     cdef inline int _finalize_matrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return 0 if OK, -1 if error
 */

static CYTHON_INLINE int __pyx_f_6pysdif_7_pysdif_8SdifFile__finalize_matrix(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  int __pyx_v_st;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  enum __pyx_t_6pysdif_7_pysdif_MatrixStatusE __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_finalize_matrix", 1);

  /* "pysdif/_pysdif.pyx":1698
 *         Return 0 if OK, -1 if error
 *         """
 *         logger.debug("finalize_matrix")             # <<<<<<<<<<<<<<
 *         cdef int st = self.matrix_status
 *         if not (st == eMatrixDataRead or st == eMatrixDataSkipped):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_n_s_finalize_matrix};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":1699
 *         """
 *         logger.debug("finalize_matrix")
 *         cdef int st = self.matrix_status             # <<<<<<<<<<<<<<
 *         if not (st == eMatrixDataRead or st == eMatrixDataSkipped):
 *             logger.debug("tried to finalize matrix, but status is %s" % matrixstatus2str(st))
 */
  __pyx_t_5 = __pyx_v_self->matrix_status;
  __pyx_v_st = __pyx_t_5;

  /* "pysdif/_pysdif.pyx":1700
 *         logger.debug("finalize_matrix")
 *         cdef int st = self.matrix_status
 *         if not (st == eMatrixDataRead or st == eMatrixDataSkipped):             # <<<<<<<<<<<<<<
 *             logger.debug("tried to finalize matrix, but status is %s" % matrixstatus2str(st))
 *             return -1
 */
  switch (__pyx_v_st) {
    case __pyx_e_6pysdif_7_pysdif_eMatrixDataRead:
    case __pyx_e_6pysdif_7_pysdif_eMatrixDataSkipped:
    __pyx_t_6 = 1;
    break;
    default:
    __pyx_t_6 = 0;
    break;
  }
  __pyx_t_7 = (!__pyx_t_6);
  if (__pyx_t_7) {

    /* "pysdif/_pysdif.pyx":1701
 *         cdef int st = self.matrix_status
 *         if not (st == eMatrixDataRead or st == eMatrixDataSkipped):
 *             logger.debug("tried to finalize matrix, but status is %s" % matrixstatus2str(st))             # <<<<<<<<<<<<<<
 *             return -1
 *         self.matrix_idx += 1
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_debug); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_matrixstatus2str); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_st); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_9};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __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(0, 1701, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_t_8 = __Pyx_PyString_FormatSafe(__pyx_kp_s_tried_to_finalize_matrix_but_sta, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_8};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1701, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysdif/_pysdif.pyx":1702
 *         if not (st == eMatrixDataRead or st == eMatrixDataSkipped):
 *             logger.debug("tried to finalize matrix, but status is %s" % matrixstatus2str(st))
 *             return -1             # <<<<<<<<<<<<<<
 *         self.matrix_idx += 1
 *         self.matrix_status = eMatrixNothingRead
 */
    __pyx_r = -1;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1700
 *         logger.debug("finalize_matrix")
 *         cdef int st = self.matrix_status
 *         if not (st == eMatrixDataRead or st == eMatrixDataSkipped):             # <<<<<<<<<<<<<<
 *             logger.debug("tried to finalize matrix, but status is %s" % matrixstatus2str(st))
 *             return -1
 */
  }

  /* "pysdif/_pysdif.pyx":1703
 *             logger.debug("tried to finalize matrix, but status is %s" % matrixstatus2str(st))
 *             return -1
 *         self.matrix_idx += 1             # <<<<<<<<<<<<<<
 *         self.matrix_status = eMatrixNothingRead
 *         if self.matrix_idx >= self.this.CurrFramH.NbMatrix:
 */
  __pyx_v_self->matrix_idx = (__pyx_v_self->matrix_idx + 1);

  /* "pysdif/_pysdif.pyx":1704
 *             return -1
 *         self.matrix_idx += 1
 *         self.matrix_status = eMatrixNothingRead             # <<<<<<<<<<<<<<
 *         if self.matrix_idx >= self.this.CurrFramH.NbMatrix:
 *             self.frame_status = eFrameAllDataRead
 */
  __pyx_v_self->matrix_status = __pyx_e_6pysdif_7_pysdif_eMatrixNothingRead;

  /* "pysdif/_pysdif.pyx":1705
 *         self.matrix_idx += 1
 *         self.matrix_status = eMatrixNothingRead
 *         if self.matrix_idx >= self.this.CurrFramH.NbMatrix:             # <<<<<<<<<<<<<<
 *             self.frame_status = eFrameAllDataRead
 *             self._finalize_frame()
 */
  __pyx_t_7 = (__pyx_v_self->matrix_idx >= __pyx_v_self->this->CurrFramH->NbMatrix);
  if (__pyx_t_7) {

    /* "pysdif/_pysdif.pyx":1706
 *         self.matrix_status = eMatrixNothingRead
 *         if self.matrix_idx >= self.this.CurrFramH.NbMatrix:
 *             self.frame_status = eFrameAllDataRead             # <<<<<<<<<<<<<<
 *             self._finalize_frame()
 *         else:
 */
    __pyx_v_self->frame_status = __pyx_e_6pysdif_7_pysdif_eFrameAllDataRead;

    /* "pysdif/_pysdif.pyx":1707
 *         if self.matrix_idx >= self.this.CurrFramH.NbMatrix:
 *             self.frame_status = eFrameAllDataRead
 *             self._finalize_frame()             # <<<<<<<<<<<<<<
 *         else:
 *             self.frame_status = eFrameSomeDataRead
 */
    __pyx_f_6pysdif_7_pysdif_8SdifFile__finalize_frame(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1707, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1705
 *         self.matrix_idx += 1
 *         self.matrix_status = eMatrixNothingRead
 *         if self.matrix_idx >= self.this.CurrFramH.NbMatrix:             # <<<<<<<<<<<<<<
 *             self.frame_status = eFrameAllDataRead
 *             self._finalize_frame()
 */
    goto __pyx_L4;
  }

  /* "pysdif/_pysdif.pyx":1709
 *             self._finalize_frame()
 *         else:
 *             self.frame_status = eFrameSomeDataRead             # <<<<<<<<<<<<<<
 *         return 0
 * 
 */
  /*else*/ {
    __pyx_v_self->frame_status = __pyx_e_6pysdif_7_pysdif_eFrameSomeDataRead;
  }
  __pyx_L4:;

  /* "pysdif/_pysdif.pyx":1710
 *         else:
 *             self.frame_status = eFrameSomeDataRead
 *         return 0             # <<<<<<<<<<<<<<
 * 
 *     def matrix_skip(self):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1694
 *         return _array_from_matrix_data_no_copy(self.this.CurrMtrxData)
 * 
 *     cdef inline int _finalize_matrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return 0 if OK, -1 if error
 */

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile._finalize_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1712
 *         return 0
 * 
 *     def matrix_skip(self):             # <<<<<<<<<<<<<<
 *         """
 *         Low level Interface. Skip the matrix altogether.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_53matrix_skip(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_52matrix_skip, "SdifFile.matrix_skip(self)\n\n        Low level Interface. Skip the matrix altogether. \n\n        !!! note\n\n            this CAN be called after having read the header, in which\n            case only the data is skipped, otherwise the matrix is\n            skipped altogether\n        \n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_53matrix_skip = {"matrix_skip", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_53matrix_skip, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_52matrix_skip};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_53matrix_skip(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("matrix_skip (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("matrix_skip", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "matrix_skip", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_52matrix_skip(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_52matrix_skip(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  int __pyx_v_matrix_status;
  size_t __pyx_v_bytes_read;
  int __pyx_v_error;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  enum __pyx_t_6pysdif_7_pysdif_MatrixStatusE __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("matrix_skip", 1);

  /* "pysdif/_pysdif.pyx":1723
 * 
 *         """
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             raise NoFrame("matrix_skip: no current frame")
 *         cdef int matrix_status = self.matrix_status
 */
  __pyx_t_1 = (__pyx_v_self->this->CurrFramH == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":1724
 *         """
 *         if self.this.CurrFramH == NULL:
 *             raise NoFrame("matrix_skip: no current frame")             # <<<<<<<<<<<<<<
 *         cdef int matrix_status = self.matrix_status
 *         cdef size_t bytes_read
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NoFrame); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1724, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_matrix_skip_no_current_frame};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1724, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1724, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1723
 * 
 *         """
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             raise NoFrame("matrix_skip: no current frame")
 *         cdef int matrix_status = self.matrix_status
 */
  }

  /* "pysdif/_pysdif.pyx":1725
 *         if self.this.CurrFramH == NULL:
 *             raise NoFrame("matrix_skip: no current frame")
 *         cdef int matrix_status = self.matrix_status             # <<<<<<<<<<<<<<
 *         cdef size_t bytes_read
 *         if matrix_status == eMatrixHeaderRead:
 */
  __pyx_t_6 = __pyx_v_self->matrix_status;
  __pyx_v_matrix_status = __pyx_t_6;

  /* "pysdif/_pysdif.pyx":1727
 *         cdef int matrix_status = self.matrix_status
 *         cdef size_t bytes_read
 *         if matrix_status == eMatrixHeaderRead:             # <<<<<<<<<<<<<<
 *             bytes_read = SdifFSkipMatrixData(self.this)
 *         elif matrix_status == eMatrixNothingRead:
 */
  switch (__pyx_v_matrix_status) {
    case __pyx_e_6pysdif_7_pysdif_eMatrixHeaderRead:

    /* "pysdif/_pysdif.pyx":1728
 *         cdef size_t bytes_read
 *         if matrix_status == eMatrixHeaderRead:
 *             bytes_read = SdifFSkipMatrixData(self.this)             # <<<<<<<<<<<<<<
 *         elif matrix_status == eMatrixNothingRead:
 *             bytes_read = SdifFSkipMatrix(self.this)
 */
    __pyx_v_bytes_read = SdifFSkipMatrixData(__pyx_v_self->this);

    /* "pysdif/_pysdif.pyx":1727
 *         cdef int matrix_status = self.matrix_status
 *         cdef size_t bytes_read
 *         if matrix_status == eMatrixHeaderRead:             # <<<<<<<<<<<<<<
 *             bytes_read = SdifFSkipMatrixData(self.this)
 *         elif matrix_status == eMatrixNothingRead:
 */
    break;
    case __pyx_e_6pysdif_7_pysdif_eMatrixNothingRead:

    /* "pysdif/_pysdif.pyx":1730
 *             bytes_read = SdifFSkipMatrixData(self.this)
 *         elif matrix_status == eMatrixNothingRead:
 *             bytes_read = SdifFSkipMatrix(self.this)             # <<<<<<<<<<<<<<
 *         else:
 *             raise SdifOrderError("Matrix can only be skipped if data has not been already read or skipped")
 */
    __pyx_v_bytes_read = SdifFSkipMatrix(__pyx_v_self->this);

    /* "pysdif/_pysdif.pyx":1729
 *         if matrix_status == eMatrixHeaderRead:
 *             bytes_read = SdifFSkipMatrixData(self.this)
 *         elif matrix_status == eMatrixNothingRead:             # <<<<<<<<<<<<<<
 *             bytes_read = SdifFSkipMatrix(self.this)
 *         else:
 */
    break;
    default:

    /* "pysdif/_pysdif.pyx":1732
 *             bytes_read = SdifFSkipMatrix(self.this)
 *         else:
 *             raise SdifOrderError("Matrix can only be skipped if data has not been already read or skipped")             # <<<<<<<<<<<<<<
 *         self.matrix_status = eMatrixDataSkipped
 *         cdef int error = self._finalize_matrix()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SdifOrderError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_Matrix_can_only_be_skipped_if_da};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1732, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1732, __pyx_L1_error)
    break;
  }

  /* "pysdif/_pysdif.pyx":1733
 *         else:
 *             raise SdifOrderError("Matrix can only be skipped if data has not been already read or skipped")
 *         self.matrix_status = eMatrixDataSkipped             # <<<<<<<<<<<<<<
 *         cdef int error = self._finalize_matrix()
 *         if error:
 */
  __pyx_v_self->matrix_status = __pyx_e_6pysdif_7_pysdif_eMatrixDataSkipped;

  /* "pysdif/_pysdif.pyx":1734
 *             raise SdifOrderError("Matrix can only be skipped if data has not been already read or skipped")
 *         self.matrix_status = eMatrixDataSkipped
 *         cdef int error = self._finalize_matrix()             # <<<<<<<<<<<<<<
 *         if error:
 *             raise SdifOrderError("Error finalizing matrix")
 */
  __pyx_t_5 = __pyx_f_6pysdif_7_pysdif_8SdifFile__finalize_matrix(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1734, __pyx_L1_error)
  __pyx_v_error = __pyx_t_5;

  /* "pysdif/_pysdif.pyx":1735
 *         self.matrix_status = eMatrixDataSkipped
 *         cdef int error = self._finalize_matrix()
 *         if error:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("Error finalizing matrix")
 *         return bytes_read
 */
  __pyx_t_1 = (__pyx_v_error != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":1736
 *         cdef int error = self._finalize_matrix()
 *         if error:
 *             raise SdifOrderError("Error finalizing matrix")             # <<<<<<<<<<<<<<
 *         return bytes_read
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SdifOrderError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_Error_finalizing_matrix};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1736, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1736, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1735
 *         self.matrix_status = eMatrixDataSkipped
 *         cdef int error = self._finalize_matrix()
 *         if error:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("Error finalizing matrix")
 *         return bytes_read
 */
  }

  /* "pysdif/_pysdif.pyx":1737
 *         if error:
 *             raise SdifOrderError("Error finalizing matrix")
 *         return bytes_read             # <<<<<<<<<<<<<<
 * 
 *     def status(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_bytes_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1712
 *         return 0
 * 
 *     def matrix_skip(self):             # <<<<<<<<<<<<<<
 *         """
 *         Low level Interface. Skip the matrix altogether.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.matrix_skip", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1739
 *         return bytes_read
 * 
 *     def status(self):             # <<<<<<<<<<<<<<
 *         """
 *         The status of this sdiffile
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_55status(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_54status, "SdifFile.status(self)\n\n        The status of this sdiffile\n\n        Returns:\n            (tuple[int, int, int]) A tuple (curr_frame_status, curr_matrix_index, curr_matrix_status)\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_55status = {"status", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_55status, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_54status};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_55status(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("status (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("status", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "status", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_54status(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_54status(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("status", 1);

  /* "pysdif/_pysdif.pyx":1746
 *             (tuple[int, int, int]) A tuple (curr_frame_status, curr_matrix_index, curr_matrix_status)
 *         """
 *         return self.frame_status, self.matrix_idx, self.matrix_status             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_enum____pyx_t_6pysdif_7_pysdif_FrameStatusE(__pyx_v_self->frame_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->matrix_idx); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum____pyx_t_6pysdif_7_pysdif_MatrixStatusE(__pyx_v_self->matrix_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 1746, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 1746, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3)) __PYX_ERR(0, 1746, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1739
 *         return bytes_read
 * 
 *     def status(self):             # <<<<<<<<<<<<<<
 *         """
 *         The status of this sdiffile
 */

  /* 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("pysdif._pysdif.SdifFile.status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1748
 *         return self.frame_status, self.matrix_idx, self.matrix_status
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_57__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_57__iter__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_56__iter__(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_56__iter__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 1);

  /* "pysdif/_pysdif.pyx":1749
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1748
 *         return self.frame_status, self.matrix_idx, self.matrix_status
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "pysdif/_pysdif.pyx":1751
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         self._next_frame()
 *         if self.eof == 1:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_59__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_59__next__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_58__next__(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_58__next__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_error_without_exception = 0; /* StopIteration */
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 1);

  /* "pysdif/_pysdif.pyx":1752
 * 
 *     def __next__(self):
 *         self._next_frame()             # <<<<<<<<<<<<<<
 *         if self.eof == 1:
 *             raise StopIteration
 */
  __pyx_f_6pysdif_7_pysdif_8SdifFile__next_frame(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1752, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1753
 *     def __next__(self):
 *         self._next_frame()
 *         if self.eof == 1:             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         return self.frame
 */
  __pyx_t_1 = (__pyx_v_self->eof == 1);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":1754
 *         self._next_frame()
 *         if self.eof == 1:
 *             raise StopIteration             # <<<<<<<<<<<<<<
 *         return self.frame
 * 
 */
    __pyx_error_without_exception = 1;
    goto __pyx_L1_error;;

    /* "pysdif/_pysdif.pyx":1753
 *     def __next__(self):
 *         self._next_frame()
 *         if self.eof == 1:             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         return self.frame
 */
  }

  /* "pysdif/_pysdif.pyx":1755
 *         if self.eof == 1:
 *             raise StopIteration
 *         return self.frame             # <<<<<<<<<<<<<<
 * 
 *     cdef inline void _next_frame(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->frame);
  __pyx_r = ((PyObject *)__pyx_v_self->frame);
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1751
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         self._next_frame()
 *         if self.eof == 1:
 */

  /* function exit code */
  __pyx_L1_error:;
  if (!__pyx_error_without_exception) {
    __Pyx_AddTraceback("pysdif._pysdif.SdifFile.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  }
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1757
 *         return self.frame
 * 
 *     cdef inline void _next_frame(self):             # <<<<<<<<<<<<<<
 *         if self.eof == 1:
 *             return
 */

static CYTHON_INLINE void __pyx_f_6pysdif_7_pysdif_8SdifFile__next_frame(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  int __pyx_v_frame_status;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  enum __pyx_t_6pysdif_7_pysdif_FrameStatusE __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_next_frame", 1);

  /* "pysdif/_pysdif.pyx":1758
 * 
 *     cdef inline void _next_frame(self):
 *         if self.eof == 1:             # <<<<<<<<<<<<<<
 *             return
 *         cdef int frame_status = self.frame_status
 */
  __pyx_t_1 = (__pyx_v_self->eof == 1);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1759
 *     cdef inline void _next_frame(self):
 *         if self.eof == 1:
 *             return             # <<<<<<<<<<<<<<
 *         cdef int frame_status = self.frame_status
 *         if frame_status == eFrameSomeDataRead or frame_status == eFrameHeaderRead:
 */
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1758
 * 
 *     cdef inline void _next_frame(self):
 *         if self.eof == 1:             # <<<<<<<<<<<<<<
 *             return
 *         cdef int frame_status = self.frame_status
 */
  }

  /* "pysdif/_pysdif.pyx":1760
 *         if self.eof == 1:
 *             return
 *         cdef int frame_status = self.frame_status             # <<<<<<<<<<<<<<
 *         if frame_status == eFrameSomeDataRead or frame_status == eFrameHeaderRead:
 *             self.frame_skip_rest()
 */
  __pyx_t_2 = __pyx_v_self->frame_status;
  __pyx_v_frame_status = __pyx_t_2;

  /* "pysdif/_pysdif.pyx":1761
 *             return
 *         cdef int frame_status = self.frame_status
 *         if frame_status == eFrameSomeDataRead or frame_status == eFrameHeaderRead:             # <<<<<<<<<<<<<<
 *             self.frame_skip_rest()
 *         self.frame_read_header()
 */
  switch (__pyx_v_frame_status) {
    case __pyx_e_6pysdif_7_pysdif_eFrameSomeDataRead:
    case __pyx_e_6pysdif_7_pysdif_eFrameHeaderRead:

    /* "pysdif/_pysdif.pyx":1762
 *         cdef int frame_status = self.frame_status
 *         if frame_status == eFrameSomeDataRead or frame_status == eFrameHeaderRead:
 *             self.frame_skip_rest()             # <<<<<<<<<<<<<<
 *         self.frame_read_header()
 *         if self.eof == 1:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_frame_skip_rest); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1762, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pysdif/_pysdif.pyx":1761
 *             return
 *         cdef int frame_status = self.frame_status
 *         if frame_status == eFrameSomeDataRead or frame_status == eFrameHeaderRead:             # <<<<<<<<<<<<<<
 *             self.frame_skip_rest()
 *         self.frame_read_header()
 */
    break;
    default: break;
  }

  /* "pysdif/_pysdif.pyx":1763
 *         if frame_status == eFrameSomeDataRead or frame_status == eFrameHeaderRead:
 *             self.frame_skip_rest()
 *         self.frame_read_header()             # <<<<<<<<<<<<<<
 *         if self.eof == 1:
 *             return
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_frame_read_header); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysdif/_pysdif.pyx":1764
 *             self.frame_skip_rest()
 *         self.frame_read_header()
 *         if self.eof == 1:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_1 = (__pyx_v_self->eof == 1);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1765
 *         self.frame_read_header()
 *         if self.eof == 1:
 *             return             # <<<<<<<<<<<<<<
 * 
 *     def next_frame(self):
 */
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1764
 *             self.frame_skip_rest()
 *         self.frame_read_header()
 *         if self.eof == 1:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "pysdif/_pysdif.pyx":1757
 *         return self.frame
 * 
 *     cdef inline void _next_frame(self):             # <<<<<<<<<<<<<<
 *         if self.eof == 1:
 *             return
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile._next_frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "pysdif/_pysdif.pyx":1767
 *             return
 * 
 *     def next_frame(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read the next frame, returns a Frame or None if no more frames left.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_61next_frame(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_60next_frame, "SdifFile.next_frame(self)\n\n        Read the next frame, returns a Frame or None if no more frames left.\n        \n        Returns:\n            (Frame | None) Returns the next Frame, or None if no more frames\n\n        ## Example\n\n        ```python\n\n        sdif = SdifFile(\"mysdif.sdif\")\n\n        while True:\n            frame = sdif.next_frame()\n            if frame is None: break\n            print(frame.time)\n\n        ```\n\n        This is the same as:\n\n        ```python\n        for frame in sdif:\n            print(frame.time)\n        ```\n\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_61next_frame = {"next_frame", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_61next_frame, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_60next_frame};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_61next_frame(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("next_frame (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("next_frame", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "next_frame", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_60next_frame(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_60next_frame(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__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("next_frame", 1);

  /* "pysdif/_pysdif.pyx":1795
 * 
 *         """
 *         self._next_frame()             # <<<<<<<<<<<<<<
 *         return self.frame if self.eof == 0 else None
 * 
 */
  __pyx_f_6pysdif_7_pysdif_8SdifFile__next_frame(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1795, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1796
 *         """
 *         self._next_frame()
 *         return self.frame if self.eof == 0 else None             # <<<<<<<<<<<<<<
 * 
 *     def __enter__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = (__pyx_v_self->eof == 0);
  if (__pyx_t_2) {
    __Pyx_INCREF((PyObject *)__pyx_v_self->frame);
    __pyx_t_1 = ((PyObject *)__pyx_v_self->frame);
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1767
 *             return
 * 
 *     def next_frame(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read the next frame, returns a Frame or None if no more frames left.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.next_frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1798
 *         return self.frame if self.eof == 0 else None
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_63__enter__(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_62__enter__, "SdifFile.__enter__(self)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_63__enter__ = {"__enter__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_63__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_62__enter__};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_63__enter__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__enter__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__enter__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_62__enter__(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_62__enter__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__enter__", 1);

  /* "pysdif/_pysdif.pyx":1799
 * 
 *     def __enter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __exit__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1798
 *         return self.frame if self.eof == 0 else None
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "pysdif/_pysdif.pyx":1801
 *         return self
 * 
 *     def __exit__(self):             # <<<<<<<<<<<<<<
 *         self.close()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_65__exit__(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_64__exit__, "SdifFile.__exit__(self)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_65__exit__ = {"__exit__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_65__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_64__exit__};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_65__exit__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__exit__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__exit__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_64__exit__(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_64__exit__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__exit__", 1);

  /* "pysdif/_pysdif.pyx":1802
 * 
 *     def __exit__(self):
 *         self.close()             # <<<<<<<<<<<<<<
 * 
 *     def frame_skip_rest(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":1801
 *         return self
 * 
 *     def __exit__(self):             # <<<<<<<<<<<<<<
 *         self.close()
 * 
 */

  /* 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_3);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1804
 *         self.close()
 * 
 *     def frame_skip_rest(self):             # <<<<<<<<<<<<<<
 *         """
 *         Skipts the rest of the frame, so that a new frame can be read.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_67frame_skip_rest(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_66frame_skip_rest, "SdifFile.frame_skip_rest(self)\n\n        Skipts the rest of the frame, so that a new frame can be read.\n\n        Returns:\n            (bool) True if anything was skipped, False otherwise\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_67frame_skip_rest = {"frame_skip_rest", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_67frame_skip_rest, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_66frame_skip_rest};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_67frame_skip_rest(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("frame_skip_rest (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("frame_skip_rest", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "frame_skip_rest", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_66frame_skip_rest(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_66frame_skip_rest(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  int __pyx_v_error;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("frame_skip_rest", 1);

  /* "pysdif/_pysdif.pyx":1811
 *             (bool) True if anything was skipped, False otherwise
 *         """
 *         logger.debug("frame_skip_rest")             # <<<<<<<<<<<<<<
 *         if self.eof:
 *             raise EOFError("Attempted to read past end of file")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_n_s_frame_skip_rest};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":1812
 *         """
 *         logger.debug("frame_skip_rest")
 *         if self.eof:             # <<<<<<<<<<<<<<
 *             raise EOFError("Attempted to read past end of file")
 *         cdef int error = self._frame_skip_rest()
 */
  __pyx_t_5 = (__pyx_v_self->eof != 0);
  if (unlikely(__pyx_t_5)) {

    /* "pysdif/_pysdif.pyx":1813
 *         logger.debug("frame_skip_rest")
 *         if self.eof:
 *             raise EOFError("Attempted to read past end of file")             # <<<<<<<<<<<<<<
 *         cdef int error = self._frame_skip_rest()
 *         return False if error else True
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_EOFError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1813, __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(0, 1813, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1812
 *         """
 *         logger.debug("frame_skip_rest")
 *         if self.eof:             # <<<<<<<<<<<<<<
 *             raise EOFError("Attempted to read past end of file")
 *         cdef int error = self._frame_skip_rest()
 */
  }

  /* "pysdif/_pysdif.pyx":1814
 *         if self.eof:
 *             raise EOFError("Attempted to read past end of file")
 *         cdef int error = self._frame_skip_rest()             # <<<<<<<<<<<<<<
 *         return False if error else True
 * 
 */
  __pyx_t_4 = ((struct __pyx_vtabstruct_6pysdif_7_pysdif_SdifFile *)__pyx_v_self->__pyx_vtab)->_frame_skip_rest(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1814, __pyx_L1_error)
  __pyx_v_error = __pyx_t_4;

  /* "pysdif/_pysdif.pyx":1815
 *             raise EOFError("Attempted to read past end of file")
 *         cdef int error = self._frame_skip_rest()
 *         return False if error else True             # <<<<<<<<<<<<<<
 * 
 *     cdef int _frame_skip_rest(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = (__pyx_v_error != 0);
  if (__pyx_t_5) {
    __Pyx_INCREF(Py_False);
    __pyx_t_1 = Py_False;
  } else {
    __Pyx_INCREF(Py_True);
    __pyx_t_1 = Py_True;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1804
 *         self.close()
 * 
 *     def frame_skip_rest(self):             # <<<<<<<<<<<<<<
 *         """
 *         Skipts the rest of the frame, so that a new frame can be read.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.frame_skip_rest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1817
 *         return False if error else True
 * 
 *     cdef int _frame_skip_rest(self):             # <<<<<<<<<<<<<<
 *         """
 *         Skipts the rest of the frame, so that a new frame can be read.
 */

static int __pyx_f_6pysdif_7_pysdif_8SdifFile__frame_skip_rest(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  int __pyx_v_status;
  CYTHON_UNUSED int __pyx_v_i;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  enum __pyx_t_6pysdif_7_pysdif_FrameStatusE __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  long __pyx_t_6;
  long __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_frame_skip_rest", 1);

  /* "pysdif/_pysdif.pyx":1821
 *         Skipts the rest of the frame, so that a new frame can be read.
 *         """
 *         cdef int status = self.frame_status             # <<<<<<<<<<<<<<
 *         cdef int num_matrix
 *         cdef int i
 */
  __pyx_t_1 = __pyx_v_self->frame_status;
  __pyx_v_status = __pyx_t_1;

  /* "pysdif/_pysdif.pyx":1824
 *         cdef int num_matrix
 *         cdef int i
 *         if status == eFrameSignatureRead or status == eFrameNothingRead:             # <<<<<<<<<<<<<<
 *             self.frame_read_header()
 *             status = eFrameHeaderRead
 */
  switch (__pyx_v_status) {
    case __pyx_e_6pysdif_7_pysdif_eFrameSignatureRead:
    case __pyx_e_6pysdif_7_pysdif_eFrameNothingRead:

    /* "pysdif/_pysdif.pyx":1825
 *         cdef int i
 *         if status == eFrameSignatureRead or status == eFrameNothingRead:
 *             self.frame_read_header()             # <<<<<<<<<<<<<<
 *             status = eFrameHeaderRead
 *         if status == eFrameHeaderRead or status == eFrameSomeDataRead:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_frame_read_header); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1825, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1825, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysdif/_pysdif.pyx":1826
 *         if status == eFrameSignatureRead or status == eFrameNothingRead:
 *             self.frame_read_header()
 *             status = eFrameHeaderRead             # <<<<<<<<<<<<<<
 *         if status == eFrameHeaderRead or status == eFrameSomeDataRead:
 *             for i in range(self.matrix_idx, self.frame_num_matrix()):
 */
    __pyx_v_status = __pyx_e_6pysdif_7_pysdif_eFrameHeaderRead;

    /* "pysdif/_pysdif.pyx":1824
 *         cdef int num_matrix
 *         cdef int i
 *         if status == eFrameSignatureRead or status == eFrameNothingRead:             # <<<<<<<<<<<<<<
 *             self.frame_read_header()
 *             status = eFrameHeaderRead
 */
    break;
    default: break;
  }

  /* "pysdif/_pysdif.pyx":1827
 *             self.frame_read_header()
 *             status = eFrameHeaderRead
 *         if status == eFrameHeaderRead or status == eFrameSomeDataRead:             # <<<<<<<<<<<<<<
 *             for i in range(self.matrix_idx, self.frame_num_matrix()):
 *                 self.matrix_skip()
 */
  switch (__pyx_v_status) {
    case __pyx_e_6pysdif_7_pysdif_eFrameHeaderRead:
    case __pyx_e_6pysdif_7_pysdif_eFrameSomeDataRead:

    /* "pysdif/_pysdif.pyx":1828
 *             status = eFrameHeaderRead
 *         if status == eFrameHeaderRead or status == eFrameSomeDataRead:
 *             for i in range(self.matrix_idx, self.frame_num_matrix()):             # <<<<<<<<<<<<<<
 *                 self.matrix_skip()
 *             return 0
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_frame_num_matrix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1828, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1828, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1828, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __pyx_t_6;
    for (__pyx_t_5 = __pyx_v_self->matrix_idx; __pyx_t_5 < __pyx_t_7; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "pysdif/_pysdif.pyx":1829
 *         if status == eFrameHeaderRead or status == eFrameSomeDataRead:
 *             for i in range(self.matrix_idx, self.frame_num_matrix()):
 *                 self.matrix_skip()             # <<<<<<<<<<<<<<
 *             return 0
 *         else:
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_matrix_skip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1829, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1829, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }

    /* "pysdif/_pysdif.pyx":1830
 *             for i in range(self.matrix_idx, self.frame_num_matrix()):
 *                 self.matrix_skip()
 *             return 0             # <<<<<<<<<<<<<<
 *         else:
 *             logger.debug("_frame_skip_rest: Attempted to skip, but everything was read already")
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1827
 *             self.frame_read_header()
 *             status = eFrameHeaderRead
 *         if status == eFrameHeaderRead or status == eFrameSomeDataRead:             # <<<<<<<<<<<<<<
 *             for i in range(self.matrix_idx, self.frame_num_matrix()):
 *                 self.matrix_skip()
 */
    break;
    default:

    /* "pysdif/_pysdif.pyx":1832
 *             return 0
 *         else:
 *             logger.debug("_frame_skip_rest: Attempted to skip, but everything was read already")             # <<<<<<<<<<<<<<
 *             return -1
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_s_frame_skip_rest_Attempted_to_sk};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysdif/_pysdif.pyx":1833
 *         else:
 *             logger.debug("_frame_skip_rest: Attempted to skip, but everything was read already")
 *             return -1             # <<<<<<<<<<<<<<
 * 
 *     cdef inline int _finalize_frame(self):
 */
    __pyx_r = -1;
    goto __pyx_L0;
    break;
  }

  /* "pysdif/_pysdif.pyx":1817
 *         return False if error else True
 * 
 *     cdef int _frame_skip_rest(self):             # <<<<<<<<<<<<<<
 *         """
 *         Skipts the rest of the frame, so that a new frame can be read.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile._frame_skip_rest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1835
 *             return -1
 * 
 *     cdef inline int _finalize_frame(self):             # <<<<<<<<<<<<<<
 *         logger.debug("_finalize_frame")
 *         cdef int status = self.frame_status
 */

static CYTHON_INLINE int __pyx_f_6pysdif_7_pysdif_8SdifFile__finalize_frame(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  int __pyx_v_status;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  enum __pyx_t_6pysdif_7_pysdif_FrameStatusE __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_finalize_frame", 1);

  /* "pysdif/_pysdif.pyx":1836
 * 
 *     cdef inline int _finalize_frame(self):
 *         logger.debug("_finalize_frame")             # <<<<<<<<<<<<<<
 *         cdef int status = self.frame_status
 *         if self.frame_status == eFrameSignatureRead:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_n_s_finalize_frame};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1836, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":1837
 *     cdef inline int _finalize_frame(self):
 *         logger.debug("_finalize_frame")
 *         cdef int status = self.frame_status             # <<<<<<<<<<<<<<
 *         if self.frame_status == eFrameSignatureRead:
 *             logger.debug("_finalize_frame called, but header was not even read")
 */
  __pyx_t_5 = __pyx_v_self->frame_status;
  __pyx_v_status = __pyx_t_5;

  /* "pysdif/_pysdif.pyx":1838
 *         logger.debug("_finalize_frame")
 *         cdef int status = self.frame_status
 *         if self.frame_status == eFrameSignatureRead:             # <<<<<<<<<<<<<<
 *             logger.debug("_finalize_frame called, but header was not even read")
 *             return -1
 */
  __pyx_t_6 = (__pyx_v_self->frame_status == __pyx_e_6pysdif_7_pysdif_eFrameSignatureRead);
  if (__pyx_t_6) {

    /* "pysdif/_pysdif.pyx":1839
 *         cdef int status = self.frame_status
 *         if self.frame_status == eFrameSignatureRead:
 *             logger.debug("_finalize_frame called, but header was not even read")             # <<<<<<<<<<<<<<
 *             return -1
 *         elif status == eFrameSomeDataRead or status == eFrameHeaderRead:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_debug); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_s_finalize_frame_called_but_heade};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1839, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysdif/_pysdif.pyx":1840
 *         if self.frame_status == eFrameSignatureRead:
 *             logger.debug("_finalize_frame called, but header was not even read")
 *             return -1             # <<<<<<<<<<<<<<
 *         elif status == eFrameSomeDataRead or status == eFrameHeaderRead:
 *             logger.debug("_finalize_frame without having read everything")
 */
    __pyx_r = -1;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1838
 *         logger.debug("_finalize_frame")
 *         cdef int status = self.frame_status
 *         if self.frame_status == eFrameSignatureRead:             # <<<<<<<<<<<<<<
 *             logger.debug("_finalize_frame called, but header was not even read")
 *             return -1
 */
  }

  /* "pysdif/_pysdif.pyx":1841
 *             logger.debug("_finalize_frame called, but header was not even read")
 *             return -1
 *         elif status == eFrameSomeDataRead or status == eFrameHeaderRead:             # <<<<<<<<<<<<<<
 *             logger.debug("_finalize_frame without having read everything")
 *             return -1
 */
  switch (__pyx_v_status) {
    case __pyx_e_6pysdif_7_pysdif_eFrameSomeDataRead:
    case __pyx_e_6pysdif_7_pysdif_eFrameHeaderRead:
    __pyx_t_6 = 1;
    break;
    default:
    __pyx_t_6 = 0;
    break;
  }
  if (__pyx_t_6) {

    /* "pysdif/_pysdif.pyx":1842
 *             return -1
 *         elif status == eFrameSomeDataRead or status == eFrameHeaderRead:
 *             logger.debug("_finalize_frame without having read everything")             # <<<<<<<<<<<<<<
 *             return -1
 *         # self.matrix_idx = 0
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_s_finalize_frame_without_having_r};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1842, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysdif/_pysdif.pyx":1843
 *         elif status == eFrameSomeDataRead or status == eFrameHeaderRead:
 *             logger.debug("_finalize_frame without having read everything")
 *             return -1             # <<<<<<<<<<<<<<
 *         # self.matrix_idx = 0
 *         self.matrix_status = eMatrixNothingRead
 */
    __pyx_r = -1;
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1841
 *             logger.debug("_finalize_frame called, but header was not even read")
 *             return -1
 *         elif status == eFrameSomeDataRead or status == eFrameHeaderRead:             # <<<<<<<<<<<<<<
 *             logger.debug("_finalize_frame without having read everything")
 *             return -1
 */
  }

  /* "pysdif/_pysdif.pyx":1845
 *             return -1
 *         # self.matrix_idx = 0
 *         self.matrix_status = eMatrixNothingRead             # <<<<<<<<<<<<<<
 *         self._read_signature()
 *         return 0
 */
  __pyx_v_self->matrix_status = __pyx_e_6pysdif_7_pysdif_eMatrixNothingRead;

  /* "pysdif/_pysdif.pyx":1846
 *         # self.matrix_idx = 0
 *         self.matrix_status = eMatrixNothingRead
 *         self._read_signature()             # <<<<<<<<<<<<<<
 *         return 0
 * 
 */
  ((struct __pyx_vtabstruct_6pysdif_7_pysdif_SdifFile *)__pyx_v_self->__pyx_vtab)->_read_signature(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1846, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1847
 *         self.matrix_status = eMatrixNothingRead
 *         self._read_signature()
 *         return 0             # <<<<<<<<<<<<<<
 * 
 *     def next_matrix(self):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1835
 *             return -1
 * 
 *     cdef inline int _finalize_frame(self):             # <<<<<<<<<<<<<<
 *         logger.debug("_finalize_frame")
 *         cdef int status = self.frame_status
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile._finalize_frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1849
 *         return 0
 * 
 *     def next_matrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read the next matrix header and return a Matrix with its data **still not read**.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_69next_matrix(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_68next_matrix, "SdifFile.next_matrix(self)\n\n        Read the next matrix header and return a Matrix with its data **still not read**. \n\n        If the previous matrix was not read fully, its data is skipped. This is the\n        same as calling `next(frame)`\n\n        Returns:\n            (Matrix|None) The next Matrix or None if no more matrices available\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_69next_matrix = {"next_matrix", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_69next_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_68next_matrix};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_69next_matrix(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("next_matrix (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("next_matrix", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "next_matrix", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_68next_matrix(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_68next_matrix(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  int __pyx_v_matrix_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  enum __pyx_t_6pysdif_7_pysdif_MatrixStatusE __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("next_matrix", 1);

  /* "pysdif/_pysdif.pyx":1859
 *             (Matrix|None) The next Matrix or None if no more matrices available
 *         """
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             raise NoFrame("no current frame")
 *         cdef int matrix_status = self.matrix_status
 */
  __pyx_t_1 = (__pyx_v_self->this->CurrFramH == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":1860
 *         """
 *         if self.this.CurrFramH == NULL:
 *             raise NoFrame("no current frame")             # <<<<<<<<<<<<<<
 *         cdef int matrix_status = self.matrix_status
 *         if matrix_status == eMatrixHeaderRead:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NoFrame); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1860, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_no_current_frame};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1860, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1860, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1859
 *             (Matrix|None) The next Matrix or None if no more matrices available
 *         """
 *         if self.this.CurrFramH == NULL:             # <<<<<<<<<<<<<<
 *             raise NoFrame("no current frame")
 *         cdef int matrix_status = self.matrix_status
 */
  }

  /* "pysdif/_pysdif.pyx":1861
 *         if self.this.CurrFramH == NULL:
 *             raise NoFrame("no current frame")
 *         cdef int matrix_status = self.matrix_status             # <<<<<<<<<<<<<<
 *         if matrix_status == eMatrixHeaderRead:
 *             # SdifFSkipMatrixData(self.this)
 */
  __pyx_t_6 = __pyx_v_self->matrix_status;
  __pyx_v_matrix_status = __pyx_t_6;

  /* "pysdif/_pysdif.pyx":1862
 *             raise NoFrame("no current frame")
 *         cdef int matrix_status = self.matrix_status
 *         if matrix_status == eMatrixHeaderRead:             # <<<<<<<<<<<<<<
 *             # SdifFSkipMatrixData(self.this)
 *             self.matrix_skip_data()
 */
  __pyx_t_1 = (__pyx_v_matrix_status == __pyx_e_6pysdif_7_pysdif_eMatrixHeaderRead);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1864
 *         if matrix_status == eMatrixHeaderRead:
 *             # SdifFSkipMatrixData(self.this)
 *             self.matrix_skip_data()             # <<<<<<<<<<<<<<
 *         elif matrix_status != eMatrixNothingRead:
 *             raise SdifOrderError("Some data of the matrix has been read (%s)" % matrixstatus2str(matrix_status))
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_matrix_skip_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1864, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1864, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pysdif/_pysdif.pyx":1862
 *             raise NoFrame("no current frame")
 *         cdef int matrix_status = self.matrix_status
 *         if matrix_status == eMatrixHeaderRead:             # <<<<<<<<<<<<<<
 *             # SdifFSkipMatrixData(self.this)
 *             self.matrix_skip_data()
 */
    goto __pyx_L4;
  }

  /* "pysdif/_pysdif.pyx":1865
 *             # SdifFSkipMatrixData(self.this)
 *             self.matrix_skip_data()
 *         elif matrix_status != eMatrixNothingRead:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("Some data of the matrix has been read (%s)" % matrixstatus2str(matrix_status))
 *         if self.matrix_idx >= self.this.CurrFramH.NbMatrix:
 */
  __pyx_t_1 = (__pyx_v_matrix_status != __pyx_e_6pysdif_7_pysdif_eMatrixNothingRead);
  if (unlikely(__pyx_t_1)) {

    /* "pysdif/_pysdif.pyx":1866
 *             self.matrix_skip_data()
 *         elif matrix_status != eMatrixNothingRead:
 *             raise SdifOrderError("Some data of the matrix has been read (%s)" % matrixstatus2str(matrix_status))             # <<<<<<<<<<<<<<
 *         if self.matrix_idx >= self.this.CurrFramH.NbMatrix:
 *             return None
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SdifOrderError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1866, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_matrixstatus2str); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1866, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_matrix_status); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1866, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_8};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1866, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_t_7 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Some_data_of_the_matrix_has_been, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1866, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1866, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1866, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1865
 *             # SdifFSkipMatrixData(self.this)
 *             self.matrix_skip_data()
 *         elif matrix_status != eMatrixNothingRead:             # <<<<<<<<<<<<<<
 *             raise SdifOrderError("Some data of the matrix has been read (%s)" % matrixstatus2str(matrix_status))
 *         if self.matrix_idx >= self.this.CurrFramH.NbMatrix:
 */
  }
  __pyx_L4:;

  /* "pysdif/_pysdif.pyx":1867
 *         elif matrix_status != eMatrixNothingRead:
 *             raise SdifOrderError("Some data of the matrix has been read (%s)" % matrixstatus2str(matrix_status))
 *         if self.matrix_idx >= self.this.CurrFramH.NbMatrix:             # <<<<<<<<<<<<<<
 *             return None
 *         if not self.matrix_read_header():
 */
  __pyx_t_1 = (__pyx_v_self->matrix_idx >= __pyx_v_self->this->CurrFramH->NbMatrix);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1868
 *             raise SdifOrderError("Some data of the matrix has been read (%s)" % matrixstatus2str(matrix_status))
 *         if self.matrix_idx >= self.this.CurrFramH.NbMatrix:
 *             return None             # <<<<<<<<<<<<<<
 *         if not self.matrix_read_header():
 *             raise IOError("Could not read matrix header. ")
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":1867
 *         elif matrix_status != eMatrixNothingRead:
 *             raise SdifOrderError("Some data of the matrix has been read (%s)" % matrixstatus2str(matrix_status))
 *         if self.matrix_idx >= self.this.CurrFramH.NbMatrix:             # <<<<<<<<<<<<<<
 *             return None
 *         if not self.matrix_read_header():
 */
  }

  /* "pysdif/_pysdif.pyx":1869
 *         if self.matrix_idx >= self.this.CurrFramH.NbMatrix:
 *             return None
 *         if not self.matrix_read_header():             # <<<<<<<<<<<<<<
 *             raise IOError("Could not read matrix header. ")
 *         return self.matrix
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_matrix_read_header); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1869, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1869, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_10 = (!__pyx_t_1);
  if (unlikely(__pyx_t_10)) {

    /* "pysdif/_pysdif.pyx":1870
 *             return None
 *         if not self.matrix_read_header():
 *             raise IOError("Could not read matrix header. ")             # <<<<<<<<<<<<<<
 *         return self.matrix
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1870, __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(0, 1870, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1869
 *         if self.matrix_idx >= self.this.CurrFramH.NbMatrix:
 *             return None
 *         if not self.matrix_read_header():             # <<<<<<<<<<<<<<
 *             raise IOError("Could not read matrix header. ")
 *         return self.matrix
 */
  }

  /* "pysdif/_pysdif.pyx":1871
 *         if not self.matrix_read_header():
 *             raise IOError("Could not read matrix header. ")
 *         return self.matrix             # <<<<<<<<<<<<<<
 * 
 *     def rewind(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->matrix);
  __pyx_r = ((PyObject *)__pyx_v_self->matrix);
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":1849
 *         return 0
 * 
 *     def next_matrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read the next matrix header and return a Matrix with its data **still not read**.
 */

  /* 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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.next_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1873
 *         return self.matrix
 * 
 *     def rewind(self):             # <<<<<<<<<<<<<<
 *         """
 *         Rewind the SdifFile.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_71rewind(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_70rewind, "SdifFile.rewind(self)\n\n        Rewind the SdifFile. \n\n        After this function is called, the file is in its starting frame \n        (as if the file had been just open)\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_71rewind = {"rewind", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_71rewind, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_70rewind};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_71rewind(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rewind (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("rewind", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "rewind", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_70rewind(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_70rewind(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rewind", 1);

  /* "pysdif/_pysdif.pyx":1880
 *         (as if the file had been just open)
 *         """
 *         SdifFRewind(self.this)             # <<<<<<<<<<<<<<
 *         self.reinit()
 * 
 */
  (void)(SdifFRewind(__pyx_v_self->this));

  /* "pysdif/_pysdif.pyx":1881
 *         """
 *         SdifFRewind(self.this)
 *         self.reinit()             # <<<<<<<<<<<<<<
 * 
 *     def _rewind(self):
 */
  ((struct __pyx_vtabstruct_6pysdif_7_pysdif_SdifFile *)__pyx_v_self->__pyx_vtab)->reinit(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1881, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1873
 *         return self.matrix
 * 
 *     def rewind(self):             # <<<<<<<<<<<<<<
 *         """
 *         Rewind the SdifFile.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.rewind", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1883
 *         self.reinit()
 * 
 *     def _rewind(self):             # <<<<<<<<<<<<<<
 *         SdifFRewind(self.this)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_73_rewind(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_72_rewind, "SdifFile._rewind(self)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_73_rewind = {"_rewind", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_73_rewind, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_72_rewind};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_73_rewind(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_rewind (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("_rewind", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_rewind", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_72_rewind(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_72_rewind(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_rewind", 1);

  /* "pysdif/_pysdif.pyx":1884
 * 
 *     def _rewind(self):
 *         SdifFRewind(self.this)             # <<<<<<<<<<<<<<
 * 
 *     cdef void reinit(self):
 */
  (void)(SdifFRewind(__pyx_v_self->this));

  /* "pysdif/_pysdif.pyx":1883
 *         self.reinit()
 * 
 *     def _rewind(self):             # <<<<<<<<<<<<<<
 *         SdifFRewind(self.this)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1886
 *         SdifFRewind(self.this)
 * 
 *     cdef void reinit(self):             # <<<<<<<<<<<<<<
 *         if self.mode == 'r' or self.mode == 'rw':
 *             self.init_read()
 */

static void __pyx_f_6pysdif_7_pysdif_8SdifFile_reinit(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reinit", 1);

  /* "pysdif/_pysdif.pyx":1887
 * 
 *     cdef void reinit(self):
 *         if self.mode == 'r' or self.mode == 'rw':             # <<<<<<<<<<<<<<
 *             self.init_read()
 *         if self.mode == 'w':
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_r, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1887, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_rw, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1887, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1888
 *     cdef void reinit(self):
 *         if self.mode == 'r' or self.mode == 'rw':
 *             self.init_read()             # <<<<<<<<<<<<<<
 *         if self.mode == 'w':
 *             self.init_write()
 */
    ((struct __pyx_vtabstruct_6pysdif_7_pysdif_SdifFile *)__pyx_v_self->__pyx_vtab)->init_read(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1888, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1887
 * 
 *     cdef void reinit(self):
 *         if self.mode == 'r' or self.mode == 'rw':             # <<<<<<<<<<<<<<
 *             self.init_read()
 *         if self.mode == 'w':
 */
  }

  /* "pysdif/_pysdif.pyx":1889
 *         if self.mode == 'r' or self.mode == 'rw':
 *             self.init_read()
 *         if self.mode == 'w':             # <<<<<<<<<<<<<<
 *             self.init_write()
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_w, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1889, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":1890
 *             self.init_read()
 *         if self.mode == 'w':
 *             self.init_write()             # <<<<<<<<<<<<<<
 * 
 *     def _read_padding(self):
 */
    ((struct __pyx_vtabstruct_6pysdif_7_pysdif_SdifFile *)__pyx_v_self->__pyx_vtab)->init_write(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1890, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1889
 *         if self.mode == 'r' or self.mode == 'rw':
 *             self.init_read()
 *         if self.mode == 'w':             # <<<<<<<<<<<<<<
 *             self.init_write()
 * 
 */
  }

  /* "pysdif/_pysdif.pyx":1886
 *         SdifFRewind(self.this)
 * 
 *     cdef void reinit(self):             # <<<<<<<<<<<<<<
 *         if self.mode == 'r' or self.mode == 'rw':
 *             self.init_read()
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.reinit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "pysdif/_pysdif.pyx":1892
 *             self.init_write()
 * 
 *     def _read_padding(self):             # <<<<<<<<<<<<<<
 *         return SdifFReadPadding(self.this, SdifFPaddingCalculate(self.this.Stream, self.this.Pos))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_75_read_padding(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_74_read_padding, "SdifFile._read_padding(self)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_75_read_padding = {"_read_padding", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_75_read_padding, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_74_read_padding};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_75_read_padding(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_read_padding (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("_read_padding", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_read_padding", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_74_read_padding(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_74_read_padding(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_read_padding", 1);

  /* "pysdif/_pysdif.pyx":1893
 * 
 *     def _read_padding(self):
 *         return SdifFReadPadding(self.this, SdifFPaddingCalculate(self.this.Stream, self.this.Pos))             # <<<<<<<<<<<<<<
 * 
 *     # ------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t(SdifFReadPadding(__pyx_v_self->this, SdifFPaddingCalculate(__pyx_v_self->this->Stream, __pyx_v_self->this->Pos))); 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;

  /* "pysdif/_pysdif.pyx":1892
 *             self.init_write()
 * 
 *     def _read_padding(self):             # <<<<<<<<<<<<<<
 *         return SdifFReadPadding(self.this, SdifFPaddingCalculate(self.this.Stream, self.this.Pos))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile._read_padding", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1899
 *     # ------------------------------------------------
 * 
 *     def add_NVT(self, dict d):             # <<<<<<<<<<<<<<
 *         """
 *         The NVT (Name Value Table) is a place to put metadata about the file.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_77add_NVT(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_76add_NVT, "SdifFile.add_NVT(self, dict d)\n\n        The NVT (Name Value Table) is a place to put metadata about the file.\n        \n        The NVT is a hash table (key: value) where both key and value are a bytes \n        string.\n\n        Args:\n            d (dict): A python dictionary which is translated to a NVT \n        \n        ## Example\n\n        ```python\n\n        import pysdif\n        f = pysdif.SdifFile(\"foo.sdif\", \"w\")\n        f.add_NVT({'Author': 'pysdif3', 'SampleRate': '44100'})\n        \n        ```\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_77add_NVT = {"add_NVT", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_77add_NVT, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_76add_NVT};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_77add_NVT(PyObject *__pyx_v_self, 
#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_d = 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("add_NVT (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_d,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_d)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1899, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_NVT") < 0)) __PYX_ERR(0, 1899, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_d = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_NVT", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1899, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.add_NVT", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_d), (&PyDict_Type), 1, "d", 1))) __PYX_ERR(0, 1899, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_76add_NVT(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self), __pyx_v_d);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_76add_NVT(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, PyObject *__pyx_v_d) {
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  const char* __pyx_t_10;
  const char* __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_NVT", 1);

  /* "pysdif/_pysdif.pyx":1919
 *         ```
 *         """
 *         SdifNameValuesLNewTable(self.this.NameValues, _SdifNVTStreamID)             # <<<<<<<<<<<<<<
 *         for name, value in d.iteritems():
 *             if not isinstance(name, (str, bytes)):
 */
  (void)(SdifNameValuesLNewTable(__pyx_v_self->this->NameValues, __pyx_v_6pysdif_7_pysdif__SdifNVTStreamID));

  /* "pysdif/_pysdif.pyx":1920
 *         """
 *         SdifNameValuesLNewTable(self.this.NameValues, _SdifNVTStreamID)
 *         for name, value in d.iteritems():             # <<<<<<<<<<<<<<
 *             if not isinstance(name, (str, bytes)):
 *                 raise TypeError("Only strings or bytestrings are allowed, but found %s of type %s" % (name, type(name)))
 */
  __pyx_t_2 = 0;
  if (unlikely(__pyx_v_d == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems");
    __PYX_ERR(0, 1920, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_d, 1, __pyx_n_s_iteritems, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_5;
  __pyx_t_5 = 0;
  while (1) {
    __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4);
    if (unlikely(__pyx_t_7 == 0)) break;
    if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 1920, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "pysdif/_pysdif.pyx":1921
 *         SdifNameValuesLNewTable(self.this.NameValues, _SdifNVTStreamID)
 *         for name, value in d.iteritems():
 *             if not isinstance(name, (str, bytes)):             # <<<<<<<<<<<<<<
 *                 raise TypeError("Only strings or bytestrings are allowed, but found %s of type %s" % (name, type(name)))
 *             if not isinstance(value, (str, bytes)):
 */
    __pyx_t_9 = PyString_Check(__pyx_v_name); 
    if (!__pyx_t_9) {
    } else {
      __pyx_t_8 = __pyx_t_9;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_9 = PyBytes_Check(__pyx_v_name); 
    __pyx_t_8 = __pyx_t_9;
    __pyx_L6_bool_binop_done:;
    __pyx_t_9 = (!__pyx_t_8);
    if (unlikely(__pyx_t_9)) {

      /* "pysdif/_pysdif.pyx":1922
 *         for name, value in d.iteritems():
 *             if not isinstance(name, (str, bytes)):
 *                 raise TypeError("Only strings or bytestrings are allowed, but found %s of type %s" % (name, type(name)))             # <<<<<<<<<<<<<<
 *             if not isinstance(value, (str, bytes)):
 *                 raise TypeError("Only strings or bytestrings are allowed, but found %s of type %s" % (value, type(value)))
 */
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1922, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_name);
      __Pyx_GIVEREF(__pyx_v_name);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_name)) __PYX_ERR(0, 1922, __pyx_L1_error);
      __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_name)));
      __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_name)));
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)Py_TYPE(__pyx_v_name)))) __PYX_ERR(0, 1922, __pyx_L1_error);
      __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Only_strings_or_bytestrings_are, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1922, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1922, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(0, 1922, __pyx_L1_error)

      /* "pysdif/_pysdif.pyx":1921
 *         SdifNameValuesLNewTable(self.this.NameValues, _SdifNVTStreamID)
 *         for name, value in d.iteritems():
 *             if not isinstance(name, (str, bytes)):             # <<<<<<<<<<<<<<
 *                 raise TypeError("Only strings or bytestrings are allowed, but found %s of type %s" % (name, type(name)))
 *             if not isinstance(value, (str, bytes)):
 */
    }

    /* "pysdif/_pysdif.pyx":1923
 *             if not isinstance(name, (str, bytes)):
 *                 raise TypeError("Only strings or bytestrings are allowed, but found %s of type %s" % (name, type(name)))
 *             if not isinstance(value, (str, bytes)):             # <<<<<<<<<<<<<<
 *                 raise TypeError("Only strings or bytestrings are allowed, but found %s of type %s" % (value, type(value)))
 *             SdifNameValuesLPutCurrNVT(self.this.NameValues, asbytes(name), asbytes(value))
 */
    __pyx_t_8 = PyString_Check(__pyx_v_value); 
    if (!__pyx_t_8) {
    } else {
      __pyx_t_9 = __pyx_t_8;
      goto __pyx_L9_bool_binop_done;
    }
    __pyx_t_8 = PyBytes_Check(__pyx_v_value); 
    __pyx_t_9 = __pyx_t_8;
    __pyx_L9_bool_binop_done:;
    __pyx_t_8 = (!__pyx_t_9);
    if (unlikely(__pyx_t_8)) {

      /* "pysdif/_pysdif.pyx":1924
 *                 raise TypeError("Only strings or bytestrings are allowed, but found %s of type %s" % (name, type(name)))
 *             if not isinstance(value, (str, bytes)):
 *                 raise TypeError("Only strings or bytestrings are allowed, but found %s of type %s" % (value, type(value)))             # <<<<<<<<<<<<<<
 *             SdifNameValuesLPutCurrNVT(self.this.NameValues, asbytes(name), asbytes(value))
 * 
 */
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1924, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_value)) __PYX_ERR(0, 1924, __pyx_L1_error);
      __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value)));
      __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_value)));
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)Py_TYPE(__pyx_v_value)))) __PYX_ERR(0, 1924, __pyx_L1_error);
      __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Only_strings_or_bytestrings_are, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1924, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1924, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(0, 1924, __pyx_L1_error)

      /* "pysdif/_pysdif.pyx":1923
 *             if not isinstance(name, (str, bytes)):
 *                 raise TypeError("Only strings or bytestrings are allowed, but found %s of type %s" % (name, type(name)))
 *             if not isinstance(value, (str, bytes)):             # <<<<<<<<<<<<<<
 *                 raise TypeError("Only strings or bytestrings are allowed, but found %s of type %s" % (value, type(value)))
 *             SdifNameValuesLPutCurrNVT(self.this.NameValues, asbytes(name), asbytes(value))
 */
    }

    /* "pysdif/_pysdif.pyx":1925
 *             if not isinstance(value, (str, bytes)):
 *                 raise TypeError("Only strings or bytestrings are allowed, but found %s of type %s" % (value, type(value)))
 *             SdifNameValuesLPutCurrNVT(self.this.NameValues, asbytes(name), asbytes(value))             # <<<<<<<<<<<<<<
 * 
 *     def add_matrix_type(self, signature, column_names):
 */
    __pyx_t_6 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(__pyx_t_6 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
      __PYX_ERR(0, 1925, __pyx_L1_error)
    }
    __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_t_6); if (unlikely((__pyx_t_10 == ((const char*)NULL)) && PyErr_Occurred())) __PYX_ERR(0, 1925, __pyx_L1_error)
    __pyx_t_5 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(__pyx_t_5 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
      __PYX_ERR(0, 1925, __pyx_L1_error)
    }
    __pyx_t_11 = __Pyx_PyBytes_AsWritableString(__pyx_t_5); if (unlikely((__pyx_t_11 == ((const char*)NULL)) && PyErr_Occurred())) __PYX_ERR(0, 1925, __pyx_L1_error)
    (void)(SdifNameValuesLPutCurrNVT(__pyx_v_self->this->NameValues, __pyx_t_10, __pyx_t_11));
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":1899
 *     # ------------------------------------------------
 * 
 *     def add_NVT(self, dict d):             # <<<<<<<<<<<<<<
 *         """
 *         The NVT (Name Value Table) is a place to put metadata about the file.
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.add_NVT", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1927
 *             SdifNameValuesLPutCurrNVT(self.this.NameValues, asbytes(name), asbytes(value))
 * 
 *     def add_matrix_type(self, signature, column_names):             # <<<<<<<<<<<<<<
 *         """
 *         Adds a matrix type to this Sdif
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_79add_matrix_type(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_78add_matrix_type, "SdifFile.add_matrix_type(self, signature, column_names)\n\n        Adds a matrix type to this Sdif\n\n        Args:\n            signature (str): The signature as 4-byte string\n            column_names (list[str]): The names of the columns of this matrix\n\n        There are two possible formats for the column names:\n            \n        * `sdiff.add_matrix_type(\"1ABC\", \"Column1, Column2\")` or\n        * `sdiff.add_matrix_type(\"1ABC\", [\"Column1\", \"Column2\"])`\n        \n        See also: add_frame_type\n        \n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_79add_matrix_type = {"add_matrix_type", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_79add_matrix_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_78add_matrix_type};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_79add_matrix_type(PyObject *__pyx_v_self, 
#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_signature = 0;
  PyObject *__pyx_v_column_names = 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("add_matrix_type (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_signature,&__pyx_n_s_column_names,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_signature)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1927, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_column_names)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1927, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("add_matrix_type", 1, 2, 2, 1); __PYX_ERR(0, 1927, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_matrix_type") < 0)) __PYX_ERR(0, 1927, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_signature = values[0];
    __pyx_v_column_names = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_matrix_type", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1927, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.add_matrix_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_78add_matrix_type(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self), __pyx_v_signature, __pyx_v_column_names);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_78add_matrix_type(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, PyObject *__pyx_v_signature, PyObject *__pyx_v_column_names) {
  CYTHON_UNUSED PyObject *__pyx_v_sig = NULL;
  SdifMatrixTypeT *__pyx_v_mt;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  SdifMatrixTypeT *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_matrix_type", 0);
  __Pyx_INCREF(__pyx_v_column_names);

  /* "pysdif/_pysdif.pyx":1943
 * 
 *         """
 *         sig = asbytes(signature)             # <<<<<<<<<<<<<<
 *         if isinstance(column_names, (str, bytes)):
 *             column_names = asbytes(column_names).replace(b",", b" ").split()
 */
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_signature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sig = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":1944
 *         """
 *         sig = asbytes(signature)
 *         if isinstance(column_names, (str, bytes)):             # <<<<<<<<<<<<<<
 *             column_names = asbytes(column_names).replace(b",", b" ").split()
 *         cdef SdifMatrixTypeT *mt = MatrixType_create(signature, column_names)
 */
  __pyx_t_3 = PyString_Check(__pyx_v_column_names); 
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = PyBytes_Check(__pyx_v_column_names); 
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "pysdif/_pysdif.pyx":1945
 *         sig = asbytes(signature)
 *         if isinstance(column_names, (str, bytes)):
 *             column_names = asbytes(column_names).replace(b",", b" ").split()             # <<<<<<<<<<<<<<
 *         cdef SdifMatrixTypeT *mt = MatrixType_create(signature, column_names)
 *         if mt == NULL:
 */
    __pyx_t_4 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_column_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1945, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_replace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1945, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1945, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1945, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1945, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_column_names, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pysdif/_pysdif.pyx":1944
 *         """
 *         sig = asbytes(signature)
 *         if isinstance(column_names, (str, bytes)):             # <<<<<<<<<<<<<<
 *             column_names = asbytes(column_names).replace(b",", b" ").split()
 *         cdef SdifMatrixTypeT *mt = MatrixType_create(signature, column_names)
 */
  }

  /* "pysdif/_pysdif.pyx":1946
 *         if isinstance(column_names, (str, bytes)):
 *             column_names = asbytes(column_names).replace(b",", b" ").split()
 *         cdef SdifMatrixTypeT *mt = MatrixType_create(signature, column_names)             # <<<<<<<<<<<<<<
 *         if mt == NULL:
 *             raise RuntimeError("Could not create matrixtype")
 */
  __pyx_t_7 = __pyx_f_6pysdif_7_pysdif_MatrixType_create(__pyx_v_signature, __pyx_v_column_names); if (unlikely(__pyx_t_7 == ((SdifMatrixTypeT *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1946, __pyx_L1_error)
  __pyx_v_mt = __pyx_t_7;

  /* "pysdif/_pysdif.pyx":1947
 *             column_names = asbytes(column_names).replace(b",", b" ").split()
 *         cdef SdifMatrixTypeT *mt = MatrixType_create(signature, column_names)
 *         if mt == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Could not create matrixtype")
 *         SdifPutMatrixType(self.this.MatrixTypesTable, mt)
 */
  __pyx_t_2 = (__pyx_v_mt == NULL);
  if (unlikely(__pyx_t_2)) {

    /* "pysdif/_pysdif.pyx":1948
 *         cdef SdifMatrixTypeT *mt = MatrixType_create(signature, column_names)
 *         if mt == NULL:
 *             raise RuntimeError("Could not create matrixtype")             # <<<<<<<<<<<<<<
 *         SdifPutMatrixType(self.this.MatrixTypesTable, mt)
 *         # TODO: is this a memory leak? who destroys the MatrixType?
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1948, __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(0, 1948, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1947
 *             column_names = asbytes(column_names).replace(b",", b" ").split()
 *         cdef SdifMatrixTypeT *mt = MatrixType_create(signature, column_names)
 *         if mt == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Could not create matrixtype")
 *         SdifPutMatrixType(self.this.MatrixTypesTable, mt)
 */
  }

  /* "pysdif/_pysdif.pyx":1949
 *         if mt == NULL:
 *             raise RuntimeError("Could not create matrixtype")
 *         SdifPutMatrixType(self.this.MatrixTypesTable, mt)             # <<<<<<<<<<<<<<
 *         # TODO: is this a memory leak? who destroys the MatrixType?
 *         #self.frame_status = eFrameInvalid
 */
  SdifPutMatrixType(__pyx_v_self->this->MatrixTypesTable, __pyx_v_mt);

  /* "pysdif/_pysdif.pyx":1927
 *             SdifNameValuesLPutCurrNVT(self.this.NameValues, asbytes(name), asbytes(value))
 * 
 *     def add_matrix_type(self, signature, column_names):             # <<<<<<<<<<<<<<
 *         """
 *         Adds a matrix type to this Sdif
 */

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.add_matrix_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sig);
  __Pyx_XDECREF(__pyx_v_column_names);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1953
 *         #self.frame_status = eFrameInvalid
 * 
 *     def add_frame_type(self, signature, list components):             # <<<<<<<<<<<<<<
 *         """
 *         Adds a frame type to this sdif.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_81add_frame_type(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_80add_frame_type, "SdifFile.add_frame_type(self, signature, list components)\n\n        Adds a frame type to this sdif. \n\n        A frame is defined by a signature and a list of possible matrices. \n\n        Args:\n            signature (str):A 4-char string\n            components (list[str]): A list of components, where each component is a string\n                of the sort `\"{Signature} {Name}\"`, like `[\"1NEW NewMatrix\", \"1FQ0 New1FQ0\"]`    \n\n        A frame type defines which matrix types are allowed in it.\n        The matrices mentioned in the frame type MUST be defined\n        via `add_matrix_type`.\n\n        !!! note\n\n            A frame can have multiple matrices in it, so when defining\n            a frame-type, you need to pass a sequence of possible\n            matrices.\n\n        \n        ## Example\n\n        Add a new frame type 1NEW, with a 1NEW matrix type\n        \n        ```python\n\n        sdiffile.add_frame_type(\"1NEW\", [\"1NEW NewMatrix\"])\n        sdiffile.add_matrix_type(\"1NEW\", \"Column1, Column2\")\n        \n        ```\n\n        **See also**: `add_matrix_type`\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_81add_frame_type = {"add_frame_type", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_81add_frame_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_80add_frame_type};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_81add_frame_type(PyObject *__pyx_v_self, 
#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_signature = 0;
  PyObject *__pyx_v_components = 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("add_frame_type (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_signature,&__pyx_n_s_components,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_signature)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1953, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_components)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1953, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("add_frame_type", 1, 2, 2, 1); __PYX_ERR(0, 1953, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_frame_type") < 0)) __PYX_ERR(0, 1953, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_signature = values[0];
    __pyx_v_components = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_frame_type", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1953, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.add_frame_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_components), (&PyList_Type), 1, "components", 1))) __PYX_ERR(0, 1953, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_80add_frame_type(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self), __pyx_v_signature, __pyx_v_components);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_80add_frame_type(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, PyObject *__pyx_v_signature, PyObject *__pyx_v_components) {
  SdifFrameTypeT *__pyx_v_ft;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SdifFrameTypeT *__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("add_frame_type", 1);

  /* "pysdif/_pysdif.pyx":1988
 *         **See also**: `add_matrix_type`
 *         """
 *         cdef SdifFrameTypeT *ft = FrameType_create(signature, components)             # <<<<<<<<<<<<<<
 *         if ft == NULL:
 *             raise RuntimeError("Could not create frametype")
 */
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_FrameType_create(__pyx_v_signature, __pyx_v_components); if (unlikely(__pyx_t_1 == ((SdifFrameTypeT *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1988, __pyx_L1_error)
  __pyx_v_ft = __pyx_t_1;

  /* "pysdif/_pysdif.pyx":1989
 *         """
 *         cdef SdifFrameTypeT *ft = FrameType_create(signature, components)
 *         if ft == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Could not create frametype")
 *         SdifPutFrameType(self.this.FrameTypesTable, ft)
 */
  __pyx_t_2 = (__pyx_v_ft == NULL);
  if (unlikely(__pyx_t_2)) {

    /* "pysdif/_pysdif.pyx":1990
 *         cdef SdifFrameTypeT *ft = FrameType_create(signature, components)
 *         if ft == NULL:
 *             raise RuntimeError("Could not create frametype")             # <<<<<<<<<<<<<<
 *         SdifPutFrameType(self.this.FrameTypesTable, ft)
 *         # TODO: is this a memory leak? who destroys the FrameType?
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1990, __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(0, 1990, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":1989
 *         """
 *         cdef SdifFrameTypeT *ft = FrameType_create(signature, components)
 *         if ft == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Could not create frametype")
 *         SdifPutFrameType(self.this.FrameTypesTable, ft)
 */
  }

  /* "pysdif/_pysdif.pyx":1991
 *         if ft == NULL:
 *             raise RuntimeError("Could not create frametype")
 *         SdifPutFrameType(self.this.FrameTypesTable, ft)             # <<<<<<<<<<<<<<
 *         # TODO: is this a memory leak? who destroys the FrameType?
 * 
 */
  SdifPutFrameType(__pyx_v_self->this->FrameTypesTable, __pyx_v_ft);

  /* "pysdif/_pysdif.pyx":1953
 *         #self.frame_status = eFrameInvalid
 * 
 *     def add_frame_type(self, signature, list components):             # <<<<<<<<<<<<<<
 *         """
 *         Adds a frame type to this sdif.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.add_frame_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1994
 *         # TODO: is this a memory leak? who destroys the FrameType?
 * 
 *     def clone_type_definitions(self, SdifFile source):             # <<<<<<<<<<<<<<
 *         """
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_83clone_type_definitions(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_82clone_type_definitions, "SdifFile.clone_type_definitions(self, SdifFile source)\n\n        \n        Clone the frame and matrix type definitions of source_sdiffile\n        \n        !!! note\n\n            Only for writing mode. This function must be called before \n            any frame has been written\n\n        Args:\n            source (SdifFile): The sourc file to clone type definitions from\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_83clone_type_definitions = {"clone_type_definitions", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_83clone_type_definitions, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_82clone_type_definitions};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_83clone_type_definitions(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_source = 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("clone_type_definitions (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_source,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_source)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1994, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "clone_type_definitions") < 0)) __PYX_ERR(0, 1994, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_source = ((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("clone_type_definitions", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1994, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.clone_type_definitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_source), __pyx_ptype_6pysdif_7_pysdif_SdifFile, 1, "source", 0))) __PYX_ERR(0, 1994, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_82clone_type_definitions(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self), __pyx_v_source);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_82clone_type_definitions(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_source) {
  PyObject *__pyx_v_frametypes = NULL;
  PyObject *__pyx_v_matrixtypes = NULL;
  PyObject *__pyx_v_frametype = NULL;
  PyObject *__pyx_v_matrixtype = 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;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("clone_type_definitions", 1);

  /* "pysdif/_pysdif.pyx":2007
 *             source (SdifFile): The sourc file to clone type definitions from
 *         """
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):             # <<<<<<<<<<<<<<
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 *         frametypes = source.get_frame_types()
 */
  switch (__pyx_v_self->this->Mode) {
    case eWriteFile:
    case eReadWriteFile:
    __pyx_t_1 = 1;
    break;
    default:
    __pyx_t_1 = 0;
    break;
  }
  __pyx_t_2 = (!__pyx_t_1);
  if (unlikely(__pyx_t_2)) {

    /* "pysdif/_pysdif.pyx":2008
 *         """
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")             # <<<<<<<<<<<<<<
 *         frametypes = source.get_frame_types()
 *         matrixtypes = source.get_matrix_types()
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2008, __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(0, 2008, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":2007
 *             source (SdifFile): The sourc file to clone type definitions from
 *         """
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):             # <<<<<<<<<<<<<<
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 *         frametypes = source.get_frame_types()
 */
  }

  /* "pysdif/_pysdif.pyx":2009
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 *         frametypes = source.get_frame_types()             # <<<<<<<<<<<<<<
 *         matrixtypes = source.get_matrix_types()
 *         for frametype in frametypes:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_source), __pyx_n_s_get_frame_types); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_frametypes = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pysdif/_pysdif.pyx":2010
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 *         frametypes = source.get_frame_types()
 *         matrixtypes = source.get_matrix_types()             # <<<<<<<<<<<<<<
 *         for frametype in frametypes:
 *             self.add_frame_type(frametype.signature, frametype.components)
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_source), __pyx_n_s_get_matrix_types); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2010, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_matrixtypes = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pysdif/_pysdif.pyx":2011
 *         frametypes = source.get_frame_types()
 *         matrixtypes = source.get_matrix_types()
 *         for frametype in frametypes:             # <<<<<<<<<<<<<<
 *             self.add_frame_type(frametype.signature, frametype.components)
 *         for matrixtype in matrixtypes:
 */
  if (likely(PyList_CheckExact(__pyx_v_frametypes)) || PyTuple_CheckExact(__pyx_v_frametypes)) {
    __pyx_t_3 = __pyx_v_frametypes; __Pyx_INCREF(__pyx_t_3);
    __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_frametypes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2011, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2011, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2011, __pyx_L1_error)
          #endif
          if (__pyx_t_7 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 2011, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2011, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2011, __pyx_L1_error)
          #endif
          if (__pyx_t_7 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 2011, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2011, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_8(__pyx_t_3);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2011, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_frametype, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pysdif/_pysdif.pyx":2012
 *         matrixtypes = source.get_matrix_types()
 *         for frametype in frametypes:
 *             self.add_frame_type(frametype.signature, frametype.components)             # <<<<<<<<<<<<<<
 *         for matrixtype in matrixtypes:
 *             self.add_matrix_type(matrixtype.signature, matrixtype.column_names)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_frame_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_frametype, __pyx_n_s_signature); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_frametype, __pyx_n_s_components); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_11, __pyx_t_9, __pyx_t_10};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2012, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pysdif/_pysdif.pyx":2011
 *         frametypes = source.get_frame_types()
 *         matrixtypes = source.get_matrix_types()
 *         for frametype in frametypes:             # <<<<<<<<<<<<<<
 *             self.add_frame_type(frametype.signature, frametype.components)
 *         for matrixtype in matrixtypes:
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysdif/_pysdif.pyx":2013
 *         for frametype in frametypes:
 *             self.add_frame_type(frametype.signature, frametype.components)
 *         for matrixtype in matrixtypes:             # <<<<<<<<<<<<<<
 *             self.add_matrix_type(matrixtype.signature, matrixtype.column_names)
 * 
 */
  if (likely(PyList_CheckExact(__pyx_v_matrixtypes)) || PyTuple_CheckExact(__pyx_v_matrixtypes)) {
    __pyx_t_3 = __pyx_v_matrixtypes; __Pyx_INCREF(__pyx_t_3);
    __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_matrixtypes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2013, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2013, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2013, __pyx_L1_error)
          #endif
          if (__pyx_t_7 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 2013, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2013, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2013, __pyx_L1_error)
          #endif
          if (__pyx_t_7 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 2013, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2013, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_8(__pyx_t_3);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2013, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_matrixtype, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pysdif/_pysdif.pyx":2014
 *             self.add_frame_type(frametype.signature, frametype.components)
 *         for matrixtype in matrixtypes:
 *             self.add_matrix_type(matrixtype.signature, matrixtype.column_names)             # <<<<<<<<<<<<<<
 * 
 *     def clone_NVTs(self, SdifFile source):
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_matrix_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_matrixtype, __pyx_n_s_signature); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_matrixtype, __pyx_n_s_column_names); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_11 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_11, __pyx_t_10, __pyx_t_9};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
      __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;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2014, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pysdif/_pysdif.pyx":2013
 *         for frametype in frametypes:
 *             self.add_frame_type(frametype.signature, frametype.components)
 *         for matrixtype in matrixtypes:             # <<<<<<<<<<<<<<
 *             self.add_matrix_type(matrixtype.signature, matrixtype.column_names)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysdif/_pysdif.pyx":1994
 *         # TODO: is this a memory leak? who destroys the FrameType?
 * 
 *     def clone_type_definitions(self, SdifFile source):             # <<<<<<<<<<<<<<
 *         """
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.clone_type_definitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_frametypes);
  __Pyx_XDECREF(__pyx_v_matrixtypes);
  __Pyx_XDECREF(__pyx_v_frametype);
  __Pyx_XDECREF(__pyx_v_matrixtype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":2016
 *             self.add_matrix_type(matrixtype.signature, matrixtype.column_names)
 * 
 *     def clone_NVTs(self, SdifFile source):             # <<<<<<<<<<<<<<
 *         """
 *         Clone the NVT (name:value table) from source (an open SdifFile)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_85clone_NVTs(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_84clone_NVTs, "SdifFile.clone_NVTs(self, SdifFile source)\n\n        Clone the NVT (name:value table) from source (an open SdifFile)\n        \n        !!! note\n\n            Only for writing mode. If you do not plan to midify the type \n            definitions included in the source file, it's better to call \n            `clone_definitions`, which clones everything but the data\n            (see example)\n\n        Args:\n            source (SdifFile): The source SdifFile to clone the NVTs from\n        \n        ## Example\n\n        ```python    \n        source_sdif = SdifFile(\"in.sdif\")\n        new_sdif = SdifFile(\"out.sdif\", \"w\")\n        new_sdif.clone_definitions(source_sdif)\n        for frame in old_sdif:\n            new_frame = new_sdif.new_frame(frame.signature, frame.time)\n            # ... etc ...\n\n        ```\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_85clone_NVTs = {"clone_NVTs", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_85clone_NVTs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_84clone_NVTs};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_85clone_NVTs(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_source = 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("clone_NVTs (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_source,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_source)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2016, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "clone_NVTs") < 0)) __PYX_ERR(0, 2016, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_source = ((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("clone_NVTs", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2016, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.clone_NVTs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_source), __pyx_ptype_6pysdif_7_pysdif_SdifFile, 1, "source", 0))) __PYX_ERR(0, 2016, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_84clone_NVTs(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self), __pyx_v_source);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_84clone_NVTs(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_source) {
  PyObject *__pyx_v_nvt = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("clone_NVTs", 1);

  /* "pysdif/_pysdif.pyx":2042
 *         ```
 *         """
 *         for nvt in source.get_NVTs():             # <<<<<<<<<<<<<<
 *             self.add_NVT(nvt)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_source), __pyx_n_s_get_NVTs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2042, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2042, __pyx_L1_error)
          #endif
          if (__pyx_t_5 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 2042, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2042, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2042, __pyx_L1_error)
          #endif
          if (__pyx_t_5 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 2042, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2042, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_6(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2042, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_nvt, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pysdif/_pysdif.pyx":2043
 *         """
 *         for nvt in source.get_NVTs():
 *             self.add_NVT(nvt)             # <<<<<<<<<<<<<<
 * 
 *     def clone_definitions(self, SdifFile source):
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_NVT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_nvt};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2043, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pysdif/_pysdif.pyx":2042
 *         ```
 *         """
 *         for nvt in source.get_NVTs():             # <<<<<<<<<<<<<<
 *             self.add_NVT(nvt)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":2016
 *             self.add_matrix_type(matrixtype.signature, matrixtype.column_names)
 * 
 *     def clone_NVTs(self, SdifFile source):             # <<<<<<<<<<<<<<
 *         """
 *         Clone the NVT (name:value table) from source (an open SdifFile)
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.clone_NVTs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_nvt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":2045
 *             self.add_NVT(nvt)
 * 
 *     def clone_definitions(self, SdifFile source):             # <<<<<<<<<<<<<<
 *         """
 *         Only for writing mode - Clone both NVT(s), frame and matrix definitions
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_87clone_definitions(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_86clone_definitions, "SdifFile.clone_definitions(self, SdifFile source)\n\n        Only for writing mode - Clone both NVT(s), frame and matrix definitions \n\n        Clone NVT, frame and matrix definitions from source, so after calling \n        this function you can start creating frames\n\n        Args:\n            source (SdifFile): The sdiffile to clone definitions from\n        \n        ## Example\n\n        ```python\n\n        infile = SdifFile(\"myfile.sdif\")\n        outfile = SdifFile(\"outfile.sdif\", \"w\")\n        outfile.clone_definitions(infile)\n        for inframe in infile:\n            with outfile.new_frame(inframe.signature) as outframe:\n                matrixsig, data = inframe.get_one_matrix_data()\n                outframe.add_matrix(matrixsig, data)\n        \n        ```\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_87clone_definitions = {"clone_definitions", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_87clone_definitions, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_86clone_definitions};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_87clone_definitions(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_source = 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("clone_definitions (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_source,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_source)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2045, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "clone_definitions") < 0)) __PYX_ERR(0, 2045, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_source = ((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("clone_definitions", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2045, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.clone_definitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_source), __pyx_ptype_6pysdif_7_pysdif_SdifFile, 1, "source", 0))) __PYX_ERR(0, 2045, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_86clone_definitions(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self), __pyx_v_source);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_86clone_definitions(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_source) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("clone_definitions", 1);

  /* "pysdif/_pysdif.pyx":2069
 *         ```
 *         """
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):             # <<<<<<<<<<<<<<
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 *         self.clone_NVTs(source)
 */
  switch (__pyx_v_self->this->Mode) {
    case eWriteFile:
    case eReadWriteFile:
    __pyx_t_1 = 1;
    break;
    default:
    __pyx_t_1 = 0;
    break;
  }
  __pyx_t_2 = (!__pyx_t_1);
  if (unlikely(__pyx_t_2)) {

    /* "pysdif/_pysdif.pyx":2070
 *         """
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")             # <<<<<<<<<<<<<<
 *         self.clone_NVTs(source)
 *         self.clone_type_definitions(source)
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2070, __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(0, 2070, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":2069
 *         ```
 *         """
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):             # <<<<<<<<<<<<<<
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 *         self.clone_NVTs(source)
 */
  }

  /* "pysdif/_pysdif.pyx":2071
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 *         self.clone_NVTs(source)             # <<<<<<<<<<<<<<
 *         self.clone_type_definitions(source)
 *         return self
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_clone_NVTs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, ((PyObject *)__pyx_v_source)};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysdif/_pysdif.pyx":2072
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 *         self.clone_NVTs(source)
 *         self.clone_type_definitions(source)             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_clone_type_definitions); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, ((PyObject *)__pyx_v_source)};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2072, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysdif/_pysdif.pyx":2073
 *         self.clone_NVTs(source)
 *         self.clone_type_definitions(source)
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def clone_frames(self, SdifFile source, signatures_to_clone=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":2045
 *             self.add_NVT(nvt)
 * 
 *     def clone_definitions(self, SdifFile source):             # <<<<<<<<<<<<<<
 *         """
 *         Only for writing mode - Clone both NVT(s), frame and matrix definitions
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.clone_definitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":2075
 *         return self
 * 
 *     def clone_frames(self, SdifFile source, signatures_to_clone=None):             # <<<<<<<<<<<<<<
 *         """
 *         Clone all the frames in source which are included in
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_89clone_frames(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_88clone_frames, "SdifFile.clone_frames(self, SdifFile source, signatures_to_clone=None)\n\n        Clone all the frames in source which are included in \n        \n        Args:\n            source (SdifFile): The SdifFile to clone from\n            signatures_to_clone (list[str]): A seq. of signature, or None to clone all\n        \n        Returns:\n            None\n\n        !!! note\n\n            the use case for this function is when you want to\n            modify some of the metadata but leave the data itself\n            unmodified\n        \n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_89clone_frames = {"clone_frames", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_89clone_frames, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_88clone_frames};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_89clone_frames(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_source = 0;
  PyObject *__pyx_v_signatures_to_clone = 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("clone_frames (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_source,&__pyx_n_s_signatures_to_clone,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_source)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2075, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_signatures_to_clone);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2075, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "clone_frames") < 0)) __PYX_ERR(0, 2075, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_source = ((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)values[0]);
    __pyx_v_signatures_to_clone = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("clone_frames", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2075, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.clone_frames", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_source), __pyx_ptype_6pysdif_7_pysdif_SdifFile, 1, "source", 0))) __PYX_ERR(0, 2075, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_88clone_frames(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self), __pyx_v_source, __pyx_v_signatures_to_clone);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6pysdif_7_pysdif_8SdifFile_12clone_frames_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pysdif/_pysdif.pyx":2097
 * 
 *         if signatures_to_clone is not None:
 *             sigs = set(asbytes(sig) for sig in signatures_to_clone)             # <<<<<<<<<<<<<<
 *         for frame0 in source:
 *             if signatures_to_clone is None or frame0.signature in sigs:
 */

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_12clone_frames_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
  struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr *)__pyx_tp_new_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr(__pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2097, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6pysdif_7_pysdif_8SdifFile_12clone_frames_2generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_clone_frames_locals_genexpr, __pyx_n_s_pysdif__pysdif); if (unlikely(!gen)) __PYX_ERR(0, 2097, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.clone_frames.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_6pysdif_7_pysdif_8SdifFile_12clone_frames_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2097, __pyx_L1_error)
  __pyx_r = PySet_New(NULL); if (unlikely(!__pyx_r)) __PYX_ERR(0, 2097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 2097, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2097, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2097, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2097, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2097, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2097, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2097, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2097, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2097, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2097, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_sig);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_sig, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_cur_scope->__pyx_v_sig); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2097, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(PySet_Add(__pyx_r, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 2097, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __Pyx_Generator_Replace_StopIteration(0);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":2075
 *         return self
 * 
 *     def clone_frames(self, SdifFile source, signatures_to_clone=None):             # <<<<<<<<<<<<<<
 *         """
 *         Clone all the frames in source which are included in
 */

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_88clone_frames(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_source, PyObject *__pyx_v_signatures_to_clone) {
  PyObject *__pyx_v_sigs = NULL;
  PyObject *__pyx_v_frame0 = NULL;
  PyObject *__pyx_v_frame1 = NULL;
  PyObject *__pyx_v_matrix = NULL;
  PyObject *__pyx_gb_6pysdif_7_pysdif_8SdifFile_12clone_frames_2generator1 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  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("clone_frames", 1);

  /* "pysdif/_pysdif.pyx":2093
 * 
 *         """
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):             # <<<<<<<<<<<<<<
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 * 
 */
  switch (__pyx_v_self->this->Mode) {
    case eWriteFile:
    case eReadWriteFile:
    __pyx_t_1 = 1;
    break;
    default:
    __pyx_t_1 = 0;
    break;
  }
  __pyx_t_2 = (!__pyx_t_1);
  if (unlikely(__pyx_t_2)) {

    /* "pysdif/_pysdif.pyx":2094
 *         """
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")             # <<<<<<<<<<<<<<
 * 
 *         if signatures_to_clone is not None:
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2094, __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(0, 2094, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":2093
 * 
 *         """
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):             # <<<<<<<<<<<<<<
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 * 
 */
  }

  /* "pysdif/_pysdif.pyx":2096
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 * 
 *         if signatures_to_clone is not None:             # <<<<<<<<<<<<<<
 *             sigs = set(asbytes(sig) for sig in signatures_to_clone)
 *         for frame0 in source:
 */
  __pyx_t_2 = (__pyx_v_signatures_to_clone != Py_None);
  if (__pyx_t_2) {

    /* "pysdif/_pysdif.pyx":2097
 * 
 *         if signatures_to_clone is not None:
 *             sigs = set(asbytes(sig) for sig in signatures_to_clone)             # <<<<<<<<<<<<<<
 *         for frame0 in source:
 *             if signatures_to_clone is None or frame0.signature in sigs:
 */
    __pyx_t_3 = __pyx_pf_6pysdif_7_pysdif_8SdifFile_12clone_frames_genexpr(NULL, __pyx_v_signatures_to_clone); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2097, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2097, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_sigs = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pysdif/_pysdif.pyx":2096
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 * 
 *         if signatures_to_clone is not None:             # <<<<<<<<<<<<<<
 *             sigs = set(asbytes(sig) for sig in signatures_to_clone)
 *         for frame0 in source:
 */
  }

  /* "pysdif/_pysdif.pyx":2098
 *         if signatures_to_clone is not None:
 *             sigs = set(asbytes(sig) for sig in signatures_to_clone)
 *         for frame0 in source:             # <<<<<<<<<<<<<<
 *             if signatures_to_clone is None or frame0.signature in sigs:
 *                 frame1 = self.new_frame(frame0.signature, frame0.time)
 */
  if (likely(PyList_CheckExact(((PyObject *)__pyx_v_source))) || PyTuple_CheckExact(((PyObject *)__pyx_v_source))) {
    __pyx_t_4 = ((PyObject *)__pyx_v_source); __Pyx_INCREF(__pyx_t_4);
    __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(((PyObject *)__pyx_v_source)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2098, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2098, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2098, __pyx_L1_error)
          #endif
          if (__pyx_t_5 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 2098, __pyx_L1_error)
        #else
        __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2098, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2098, __pyx_L1_error)
          #endif
          if (__pyx_t_5 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 2098, __pyx_L1_error)
        #else
        __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2098, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2098, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_frame0, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pysdif/_pysdif.pyx":2099
 *             sigs = set(asbytes(sig) for sig in signatures_to_clone)
 *         for frame0 in source:
 *             if signatures_to_clone is None or frame0.signature in sigs:             # <<<<<<<<<<<<<<
 *                 frame1 = self.new_frame(frame0.signature, frame0.time)
 *                 for matrix in frame0:
 */
    __pyx_t_1 = (__pyx_v_signatures_to_clone == Py_None);
    if (!__pyx_t_1) {
    } else {
      __pyx_t_2 = __pyx_t_1;
      goto __pyx_L8_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame0, __pyx_n_s_signature); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2099, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(!__pyx_v_sigs)) { __Pyx_RaiseUnboundLocalError("sigs"); __PYX_ERR(0, 2099, __pyx_L1_error) }
    if (unlikely(__pyx_v_sigs == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 2099, __pyx_L1_error)
    }
    __pyx_t_1 = (__Pyx_PySet_ContainsTF(__pyx_t_3, __pyx_v_sigs, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2099, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __pyx_t_1;
    __pyx_L8_bool_binop_done:;
    if (__pyx_t_2) {

      /* "pysdif/_pysdif.pyx":2100
 *         for frame0 in source:
 *             if signatures_to_clone is None or frame0.signature in sigs:
 *                 frame1 = self.new_frame(frame0.signature, frame0.time)             # <<<<<<<<<<<<<<
 *                 for matrix in frame0:
 *                     frame1.add_matrix(matrix.signature, matrix.get_data())
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_new_frame); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2100, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame0, __pyx_n_s_signature); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2100, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame0, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2100, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      __pyx_t_11 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_11 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_t_8, __pyx_t_9};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11);
        __Pyx_XDECREF(__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_3)) __PYX_ERR(0, 2100, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_frame1, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "pysdif/_pysdif.pyx":2101
 *             if signatures_to_clone is None or frame0.signature in sigs:
 *                 frame1 = self.new_frame(frame0.signature, frame0.time)
 *                 for matrix in frame0:             # <<<<<<<<<<<<<<
 *                     frame1.add_matrix(matrix.signature, matrix.get_data())
 *                 frame1.write()
 */
      if (likely(PyList_CheckExact(__pyx_v_frame0)) || PyTuple_CheckExact(__pyx_v_frame0)) {
        __pyx_t_3 = __pyx_v_frame0; __Pyx_INCREF(__pyx_t_3);
        __pyx_t_12 = 0;
        __pyx_t_13 = NULL;
      } else {
        __pyx_t_12 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_frame0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2101, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_13)) {
          if (likely(PyList_CheckExact(__pyx_t_3))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2101, __pyx_L1_error)
              #endif
              if (__pyx_t_12 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_12); __Pyx_INCREF(__pyx_t_7); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(0, 2101, __pyx_L1_error)
            #else
            __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2101, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2101, __pyx_L1_error)
              #endif
              if (__pyx_t_12 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_12); __Pyx_INCREF(__pyx_t_7); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(0, 2101, __pyx_L1_error)
            #else
            __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2101, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            #endif
          }
        } else {
          __pyx_t_7 = __pyx_t_13(__pyx_t_3);
          if (unlikely(!__pyx_t_7)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 2101, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_7);
        }
        __Pyx_XDECREF_SET(__pyx_v_matrix, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "pysdif/_pysdif.pyx":2102
 *                 frame1 = self.new_frame(frame0.signature, frame0.time)
 *                 for matrix in frame0:
 *                     frame1.add_matrix(matrix.signature, matrix.get_data())             # <<<<<<<<<<<<<<
 *                 frame1.write()
 * 
 */
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame1, __pyx_n_s_add_matrix); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2102, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_matrix, __pyx_n_s_signature); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2102, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_matrix, __pyx_n_s_get_data); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2102, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_15 = NULL;
        __pyx_t_11 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_14))) {
          __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14);
          if (likely(__pyx_t_15)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
            __Pyx_INCREF(__pyx_t_15);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_14, function);
            __pyx_t_11 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_15, NULL};
          __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11);
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2102, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        }
        __pyx_t_14 = NULL;
        __pyx_t_11 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_14)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_14);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
            __pyx_t_11 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_14, __pyx_t_8, __pyx_t_10};
          __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11);
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 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, 2102, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "pysdif/_pysdif.pyx":2101
 *             if signatures_to_clone is None or frame0.signature in sigs:
 *                 frame1 = self.new_frame(frame0.signature, frame0.time)
 *                 for matrix in frame0:             # <<<<<<<<<<<<<<
 *                     frame1.add_matrix(matrix.signature, matrix.get_data())
 *                 frame1.write()
 */
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pysdif/_pysdif.pyx":2103
 *                 for matrix in frame0:
 *                     frame1.add_matrix(matrix.signature, matrix.get_data())
 *                 frame1.write()             # <<<<<<<<<<<<<<
 * 
 *     def add_streamID(self, unsigned int numid, char *source, char *treeway):
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame1, __pyx_n_s_write); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = NULL;
      __pyx_t_11 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_11 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2103, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pysdif/_pysdif.pyx":2099
 *             sigs = set(asbytes(sig) for sig in signatures_to_clone)
 *         for frame0 in source:
 *             if signatures_to_clone is None or frame0.signature in sigs:             # <<<<<<<<<<<<<<
 *                 frame1 = self.new_frame(frame0.signature, frame0.time)
 *                 for matrix in frame0:
 */
    }

    /* "pysdif/_pysdif.pyx":2098
 *         if signatures_to_clone is not None:
 *             sigs = set(asbytes(sig) for sig in signatures_to_clone)
 *         for frame0 in source:             # <<<<<<<<<<<<<<
 *             if signatures_to_clone is None or frame0.signature in sigs:
 *                 frame1 = self.new_frame(frame0.signature, frame0.time)
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysdif/_pysdif.pyx":2075
 *         return self
 * 
 *     def clone_frames(self, SdifFile source, signatures_to_clone=None):             # <<<<<<<<<<<<<<
 *         """
 *         Clone all the frames in source which are included in
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.clone_frames", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sigs);
  __Pyx_XDECREF(__pyx_v_frame0);
  __Pyx_XDECREF(__pyx_v_frame1);
  __Pyx_XDECREF(__pyx_v_matrix);
  __Pyx_XDECREF(__pyx_gb_6pysdif_7_pysdif_8SdifFile_12clone_frames_2generator1);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":2105
 *                 frame1.write()
 * 
 *     def add_streamID(self, unsigned int numid, char *source, char *treeway):             # <<<<<<<<<<<<<<
 *         """
 *         This method is only there for completion.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_91add_streamID(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_90add_streamID, "SdifFile.add_streamID(self, unsigned int numid, char *source, char *treeway)\n\n        This method is only there for completion. \n\n        It seems to be only used in old sdif types\n\n        Args:\n            numid (int): The numerical ID of the new stream\n            source (str): \077\077 \n            treeway (str): \077\077\n\n        Returns:\n            None \n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_91add_streamID = {"add_streamID", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_91add_streamID, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_90add_streamID};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_91add_streamID(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  unsigned int __pyx_v_numid;
  char *__pyx_v_source;
  char *__pyx_v_treeway;
  #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("add_streamID (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_numid,&__pyx_n_s_source,&__pyx_n_s_treeway,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_numid)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2105, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_source)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2105, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("add_streamID", 1, 3, 3, 1); __PYX_ERR(0, 2105, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_treeway)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2105, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("add_streamID", 1, 3, 3, 2); __PYX_ERR(0, 2105, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_streamID") < 0)) __PYX_ERR(0, 2105, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_numid = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_numid == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2105, __pyx_L3_error)
    __pyx_v_source = __Pyx_PyObject_AsWritableString(values[1]); if (unlikely((!__pyx_v_source) && PyErr_Occurred())) __PYX_ERR(0, 2105, __pyx_L3_error)
    __pyx_v_treeway = __Pyx_PyObject_AsWritableString(values[2]); if (unlikely((!__pyx_v_treeway) && PyErr_Occurred())) __PYX_ERR(0, 2105, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_streamID", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 2105, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.add_streamID", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_90add_streamID(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self), __pyx_v_numid, __pyx_v_source, __pyx_v_treeway);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_90add_streamID(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, unsigned int __pyx_v_numid, char *__pyx_v_source, char *__pyx_v_treeway) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_streamID", 1);

  /* "pysdif/_pysdif.pyx":2119
 *             None
 *         """
 *         SdifStreamIDTablePutSID(self.this.StreamIDsTable,             # <<<<<<<<<<<<<<
 *             numid, source, treeway)
 * 
 */
  (void)(SdifStreamIDTablePutSID(__pyx_v_self->this->StreamIDsTable, __pyx_v_numid, __pyx_v_source, __pyx_v_treeway));

  /* "pysdif/_pysdif.pyx":2105
 *                 frame1.write()
 * 
 *     def add_streamID(self, unsigned int numid, char *source, char *treeway):             # <<<<<<<<<<<<<<
 *         """
 *         This method is only there for completion.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":2122
 *             numid, source, treeway)
 * 
 *     def add_predefined_frametype(self, signature):             # <<<<<<<<<<<<<<
 *         """
 *         Add a predefined frame type with corresponding matrix definitions
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_93add_predefined_frametype(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_92add_predefined_frametype, "SdifFile.add_predefined_frametype(self, signature)\n\n        Add a predefined frame type with corresponding matrix definitions\n\n        This type must be already defined globally. If not already defined, add \n        your definitions via `frametypes_set` and `matrixtypes_set`\n\n        Args:\n            signature (str): the 4-char string signature\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_93add_predefined_frametype = {"add_predefined_frametype", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_93add_predefined_frametype, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_92add_predefined_frametype};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_93add_predefined_frametype(PyObject *__pyx_v_self, 
#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_signature = 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("add_predefined_frametype (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_signature,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_signature)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2122, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_predefined_frametype") < 0)) __PYX_ERR(0, 2122, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_signature = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_predefined_frametype", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2122, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.add_predefined_frametype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_92add_predefined_frametype(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self), __pyx_v_signature);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_92add_predefined_frametype(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, PyObject *__pyx_v_signature) {
  PyObject *__pyx_v_sig = NULL;
  PyObject *__pyx_v_components = NULL;
  PyObject *__pyx_v_comp = NULL;
  PyObject *__pyx_v_matrixsig = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_matrixrole = NULL;
  PyObject *__pyx_v_column_names = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_predefined_frametype", 1);

  /* "pysdif/_pysdif.pyx":2132
 *             signature (str): the 4-char string signature
 *         """
 *         sig = asbytes(signature)             # <<<<<<<<<<<<<<
 *         components = predefined_frametypes().get(sig)
 *         # a component is a strings '{Signature} {Description}'
 */
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_signature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sig = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":2133
 *         """
 *         sig = asbytes(signature)
 *         components = predefined_frametypes().get(sig)             # <<<<<<<<<<<<<<
 *         # a component is a strings '{Signature} {Description}'
 *         if not components:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_predefined_frametypes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_sig};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_components = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":2135
 *         components = predefined_frametypes().get(sig)
 *         # a component is a strings '{Signature} {Description}'
 *         if not components:             # <<<<<<<<<<<<<<
 *             raise KeyError("signature not found")
 *         self.add_frame_type(sig, components)
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_components); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2135, __pyx_L1_error)
  __pyx_t_7 = (!__pyx_t_6);
  if (unlikely(__pyx_t_7)) {

    /* "pysdif/_pysdif.pyx":2136
 *         # a component is a strings '{Signature} {Description}'
 *         if not components:
 *             raise KeyError("signature not found")             # <<<<<<<<<<<<<<
 *         self.add_frame_type(sig, components)
 *         for comp in components:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2136, __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(0, 2136, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":2135
 *         components = predefined_frametypes().get(sig)
 *         # a component is a strings '{Signature} {Description}'
 *         if not components:             # <<<<<<<<<<<<<<
 *             raise KeyError("signature not found")
 *         self.add_frame_type(sig, components)
 */
  }

  /* "pysdif/_pysdif.pyx":2137
 *         if not components:
 *             raise KeyError("signature not found")
 *         self.add_frame_type(sig, components)             # <<<<<<<<<<<<<<
 *         for comp in components:
 *             matrixsig, matrixrole = comp.split()
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_frame_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_sig, __pyx_v_components};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":2138
 *             raise KeyError("signature not found")
 *         self.add_frame_type(sig, components)
 *         for comp in components:             # <<<<<<<<<<<<<<
 *             matrixsig, matrixrole = comp.split()
 *             column_names = SDIF_PREDEFINEDTYPES['matrixtypes'].get(asbytes(matrixsig))
 */
  if (likely(PyList_CheckExact(__pyx_v_components)) || PyTuple_CheckExact(__pyx_v_components)) {
    __pyx_t_1 = __pyx_v_components; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_8 = 0;
    __pyx_t_9 = NULL;
  } else {
    __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2138, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_9)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2138, __pyx_L1_error)
          #endif
          if (__pyx_t_8 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 2138, __pyx_L1_error)
        #else
        __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2138, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2138, __pyx_L1_error)
          #endif
          if (__pyx_t_8 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 2138, __pyx_L1_error)
        #else
        __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2138, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_9(__pyx_t_1);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2138, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_comp, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pysdif/_pysdif.pyx":2139
 *         self.add_frame_type(sig, components)
 *         for comp in components:
 *             matrixsig, matrixrole = comp.split()             # <<<<<<<<<<<<<<
 *             column_names = SDIF_PREDEFINEDTYPES['matrixtypes'].get(asbytes(matrixsig))
 *             if not column_names:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_comp, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2139, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
      PyObject* sequence = __pyx_t_3;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2139, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2139, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2139, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_10 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2139, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_10);
      index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_4 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 2139, __pyx_L1_error)
      __pyx_t_11 = NULL;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_11 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2139, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_matrixsig, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_matrixrole, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pysdif/_pysdif.pyx":2140
 *         for comp in components:
 *             matrixsig, matrixrole = comp.split()
 *             column_names = SDIF_PREDEFINEDTYPES['matrixtypes'].get(asbytes(matrixsig))             # <<<<<<<<<<<<<<
 *             if not column_names:
 *                 raise KeyError("Failed to fetch the column names for {sig}".format(sig=matrixsig))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_SDIF_PREDEFINEDTYPES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_s_matrixtypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_matrixsig); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_10 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_2};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_column_names, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "pysdif/_pysdif.pyx":2141
 *             matrixsig, matrixrole = comp.split()
 *             column_names = SDIF_PREDEFINEDTYPES['matrixtypes'].get(asbytes(matrixsig))
 *             if not column_names:             # <<<<<<<<<<<<<<
 *                 raise KeyError("Failed to fetch the column names for {sig}".format(sig=matrixsig))
 *             if isinstance(column_names, str):
 */
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_column_names); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2141, __pyx_L1_error)
    __pyx_t_6 = (!__pyx_t_7);
    if (unlikely(__pyx_t_6)) {

      /* "pysdif/_pysdif.pyx":2142
 *             column_names = SDIF_PREDEFINEDTYPES['matrixtypes'].get(asbytes(matrixsig))
 *             if not column_names:
 *                 raise KeyError("Failed to fetch the column names for {sig}".format(sig=matrixsig))             # <<<<<<<<<<<<<<
 *             if isinstance(column_names, str):
 *                 column_names = bytes(column_names)
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Failed_to_fetch_the_column_names, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2142, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2142, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_sig, __pyx_v_matrixsig) < 0) __PYX_ERR(0, 2142, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2142, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2142, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(0, 2142, __pyx_L1_error)

      /* "pysdif/_pysdif.pyx":2141
 *             matrixsig, matrixrole = comp.split()
 *             column_names = SDIF_PREDEFINEDTYPES['matrixtypes'].get(asbytes(matrixsig))
 *             if not column_names:             # <<<<<<<<<<<<<<
 *                 raise KeyError("Failed to fetch the column names for {sig}".format(sig=matrixsig))
 *             if isinstance(column_names, str):
 */
    }

    /* "pysdif/_pysdif.pyx":2143
 *             if not column_names:
 *                 raise KeyError("Failed to fetch the column names for {sig}".format(sig=matrixsig))
 *             if isinstance(column_names, str):             # <<<<<<<<<<<<<<
 *                 column_names = bytes(column_names)
 *             self.add_matrix_type(matrixsig, column_names)
 */
    __pyx_t_6 = PyString_Check(__pyx_v_column_names); 
    if (__pyx_t_6) {

      /* "pysdif/_pysdif.pyx":2144
 *                 raise KeyError("Failed to fetch the column names for {sig}".format(sig=matrixsig))
 *             if isinstance(column_names, str):
 *                 column_names = bytes(column_names)             # <<<<<<<<<<<<<<
 *             self.add_matrix_type(matrixsig, column_names)
 * 
 */
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_column_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF_SET(__pyx_v_column_names, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "pysdif/_pysdif.pyx":2143
 *             if not column_names:
 *                 raise KeyError("Failed to fetch the column names for {sig}".format(sig=matrixsig))
 *             if isinstance(column_names, str):             # <<<<<<<<<<<<<<
 *                 column_names = bytes(column_names)
 *             self.add_matrix_type(matrixsig, column_names)
 */
    }

    /* "pysdif/_pysdif.pyx":2145
 *             if isinstance(column_names, str):
 *                 column_names = bytes(column_names)
 *             self.add_matrix_type(matrixsig, column_names)             # <<<<<<<<<<<<<<
 * 
 *     def write_all_ascii_chunks(self):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_matrix_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_matrixsig, __pyx_v_column_names};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pysdif/_pysdif.pyx":2138
 *             raise KeyError("signature not found")
 *         self.add_frame_type(sig, components)
 *         for comp in components:             # <<<<<<<<<<<<<<
 *             matrixsig, matrixrole = comp.split()
 *             column_names = SDIF_PREDEFINEDTYPES['matrixtypes'].get(asbytes(matrixsig))
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pysdif/_pysdif.pyx":2122
 *             numid, source, treeway)
 * 
 *     def add_predefined_frametype(self, signature):             # <<<<<<<<<<<<<<
 *         """
 *         Add a predefined frame type with corresponding matrix definitions
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.add_predefined_frametype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sig);
  __Pyx_XDECREF(__pyx_v_components);
  __Pyx_XDECREF(__pyx_v_comp);
  __Pyx_XDECREF(__pyx_v_matrixsig);
  __Pyx_XDECREF(__pyx_v_matrixrole);
  __Pyx_XDECREF(__pyx_v_column_names);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":2147
 *             self.add_matrix_type(matrixsig, column_names)
 * 
 *     def write_all_ascii_chunks(self):             # <<<<<<<<<<<<<<
 *         """
 *         **Low-level Interface**
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_95write_all_ascii_chunks(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_94write_all_ascii_chunks, "SdifFile.write_all_ascii_chunks(self)\n\n        **Low-level Interface** \n\n        Once the NVTs and matrix and frame definitions have been added to the SdifFile,\n        this methods writes them all together to disk and the SdifFile is ready to accept\n        new frames.\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_95write_all_ascii_chunks = {"write_all_ascii_chunks", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_95write_all_ascii_chunks, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_94write_all_ascii_chunks};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_95write_all_ascii_chunks(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write_all_ascii_chunks (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("write_all_ascii_chunks", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "write_all_ascii_chunks", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_94write_all_ascii_chunks(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_94write_all_ascii_chunks(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  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("write_all_ascii_chunks", 1);

  /* "pysdif/_pysdif.pyx":2155
 *         new frames.
 *         """
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):             # <<<<<<<<<<<<<<
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 *         if self.write_status != eSdifGeneralHeader:
 */
  switch (__pyx_v_self->this->Mode) {
    case eWriteFile:
    case eReadWriteFile:
    __pyx_t_1 = 1;
    break;
    default:
    __pyx_t_1 = 0;
    break;
  }
  __pyx_t_2 = (!__pyx_t_1);
  if (unlikely(__pyx_t_2)) {

    /* "pysdif/_pysdif.pyx":2156
 *         """
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")             # <<<<<<<<<<<<<<
 *         if self.write_status != eSdifGeneralHeader:
 *             return
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2156, __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(0, 2156, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":2155
 *         new frames.
 *         """
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):             # <<<<<<<<<<<<<<
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 *         if self.write_status != eSdifGeneralHeader:
 */
  }

  /* "pysdif/_pysdif.pyx":2157
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 *         if self.write_status != eSdifGeneralHeader:             # <<<<<<<<<<<<<<
 *             return
 *         SdifFWriteAllASCIIChunks(self.this)
 */
  __pyx_t_2 = (__pyx_v_self->write_status != __pyx_e_6pysdif_7_pysdif_eSdifGeneralHeader);
  if (__pyx_t_2) {

    /* "pysdif/_pysdif.pyx":2158
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 *         if self.write_status != eSdifGeneralHeader:
 *             return             # <<<<<<<<<<<<<<
 *         SdifFWriteAllASCIIChunks(self.this)
 *         self.write_status = eSdifAllASCIIChunks
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "pysdif/_pysdif.pyx":2157
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 *         if self.write_status != eSdifGeneralHeader:             # <<<<<<<<<<<<<<
 *             return
 *         SdifFWriteAllASCIIChunks(self.this)
 */
  }

  /* "pysdif/_pysdif.pyx":2159
 *         if self.write_status != eSdifGeneralHeader:
 *             return
 *         SdifFWriteAllASCIIChunks(self.this)             # <<<<<<<<<<<<<<
 *         self.write_status = eSdifAllASCIIChunks
 * 
 */
  (void)(SdifFWriteAllASCIIChunks(__pyx_v_self->this));

  /* "pysdif/_pysdif.pyx":2160
 *             return
 *         SdifFWriteAllASCIIChunks(self.this)
 *         self.write_status = eSdifAllASCIIChunks             # <<<<<<<<<<<<<<
 * 
 *     def new_frame(self, signature, SdifFloat8 time, SdifUInt4 streamID=0):
 */
  __pyx_v_self->write_status = __pyx_e_6pysdif_7_pysdif_eSdifAllASCIIChunks;

  /* "pysdif/_pysdif.pyx":2147
 *             self.add_matrix_type(matrixsig, column_names)
 * 
 *     def write_all_ascii_chunks(self):             # <<<<<<<<<<<<<<
 *         """
 *         **Low-level Interface**
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.write_all_ascii_chunks", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":2162
 *         self.write_status = eSdifAllASCIIChunks
 * 
 *     def new_frame(self, signature, SdifFloat8 time, SdifUInt4 streamID=0):             # <<<<<<<<<<<<<<
 *         """
 *         Create a new frame with given signature and at given time
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_97new_frame(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_96new_frame, "SdifFile.new_frame(self, signature, SdifFloat8 time, SdifUInt4 streamID=0)\n\n        Create a new frame with given signature and at given time\n\n        !!! note \"Stream/Frame/Matrix\"\n\n            A SDIF file can have 1 or more streams. Each stream has multiple\n            frames. A frame is a collection of matrixes at a given time.\n\n        Args:\n            signature (str): The signature of the new Frame\n            time (float): The time of the new frame\n            streamID (int): The ID of the stream\n    \n        Returns:\n            (FrameW) A FrameW, used to write a set of matrices (see example)\n        \n        ## Example\n        \n        ```python\n        new_frame = sdiffile.new_frame('1SIG', time_now)\n        new_frame.add_matrix(...)\n        new_frame.write()\n        ```\n\n        if you know that you will write only one matrix, you can call:\n\n        ```python\n        \n        sdiffile.new_frame_one_matrix(frame_sig, time_now, matrix_sig, data)\n        \n        ```\n        \n        This will do the same as the three method calls above\n\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_97new_frame = {"new_frame", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_97new_frame, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_96new_frame};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_97new_frame(PyObject *__pyx_v_self, 
#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_signature = 0;
  SdifFloat8 __pyx_v_time;
  SdifUInt4 __pyx_v_streamID;
  #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("new_frame (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_signature,&__pyx_n_s_time,&__pyx_n_s_streamID,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_signature)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2162, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_time)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2162, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("new_frame", 0, 2, 3, 1); __PYX_ERR(0, 2162, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_streamID);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2162, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "new_frame") < 0)) __PYX_ERR(0, 2162, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_signature = values[0];
    __pyx_v_time = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_time == ((SdifFloat8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2162, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_streamID = __Pyx_PyInt_As_SdifUInt4(values[2]); if (unlikely((__pyx_v_streamID == ((SdifUInt4)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2162, __pyx_L3_error)
    } else {
      __pyx_v_streamID = ((SdifUInt4)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("new_frame", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 2162, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.new_frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_96new_frame(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self), __pyx_v_signature, __pyx_v_time, __pyx_v_streamID);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_96new_frame(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, PyObject *__pyx_v_signature, SdifFloat8 __pyx_v_time, SdifUInt4 __pyx_v_streamID) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  char *__pyx_t_7;
  unsigned int __pyx_t_8;
  struct __pyx_opt_args_6pysdif_7_pysdif_FrameW_new __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("new_frame", 1);

  /* "pysdif/_pysdif.pyx":2201
 *         # defining the global header (ascii chunks) so verify that
 *         # we have written it
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):             # <<<<<<<<<<<<<<
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 *         if self.write_status == eSdifGeneralHeader:
 */
  switch (__pyx_v_self->this->Mode) {
    case eWriteFile:
    case eReadWriteFile:
    __pyx_t_1 = 1;
    break;
    default:
    __pyx_t_1 = 0;
    break;
  }
  __pyx_t_2 = (!__pyx_t_1);
  if (unlikely(__pyx_t_2)) {

    /* "pysdif/_pysdif.pyx":2202
 *         # we have written it
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")             # <<<<<<<<<<<<<<
 *         if self.write_status == eSdifGeneralHeader:
 *             self.write_all_ascii_chunks()
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2202, __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(0, 2202, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":2201
 *         # defining the global header (ascii chunks) so verify that
 *         # we have written it
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):             # <<<<<<<<<<<<<<
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 *         if self.write_status == eSdifGeneralHeader:
 */
  }

  /* "pysdif/_pysdif.pyx":2203
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 *         if self.write_status == eSdifGeneralHeader:             # <<<<<<<<<<<<<<
 *             self.write_all_ascii_chunks()
 *         return FrameW_new(self, str2sig(asbytes(signature)), time, streamID)
 */
  __pyx_t_2 = (__pyx_v_self->write_status == __pyx_e_6pysdif_7_pysdif_eSdifGeneralHeader);
  if (__pyx_t_2) {

    /* "pysdif/_pysdif.pyx":2204
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 *         if self.write_status == eSdifGeneralHeader:
 *             self.write_all_ascii_chunks()             # <<<<<<<<<<<<<<
 *         return FrameW_new(self, str2sig(asbytes(signature)), time, streamID)
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_all_ascii_chunks); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pysdif/_pysdif.pyx":2203
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 *         if self.write_status == eSdifGeneralHeader:             # <<<<<<<<<<<<<<
 *             self.write_all_ascii_chunks()
 *         return FrameW_new(self, str2sig(asbytes(signature)), time, streamID)
 */
  }

  /* "pysdif/_pysdif.pyx":2205
 *         if self.write_status == eSdifGeneralHeader:
 *             self.write_all_ascii_chunks()
 *         return FrameW_new(self, str2sig(asbytes(signature)), time, streamID)             # <<<<<<<<<<<<<<
 * 
 *     def new_frame_one_matrix(self, frame_sig, SdifFloat8 time, matrix_sig,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_signature); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(__pyx_t_3 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2205, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_t_3); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 2205, __pyx_L1_error)
  __pyx_t_8 = __pyx_f_6pysdif_7_pysdif_str2sig(__pyx_t_7); if (unlikely(__pyx_t_8 == ((unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2205, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.streamID = __pyx_v_streamID;
  __pyx_t_3 = ((PyObject *)__pyx_f_6pysdif_7_pysdif_FrameW_new(__pyx_v_self, __pyx_t_8, __pyx_v_time, &__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":2162
 *         self.write_status = eSdifAllASCIIChunks
 * 
 *     def new_frame(self, signature, SdifFloat8 time, SdifUInt4 streamID=0):             # <<<<<<<<<<<<<<
 *         """
 *         Create a new frame with given signature and at given time
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.new_frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":2207
 *         return FrameW_new(self, str2sig(asbytes(signature)), time, streamID)
 * 
 *     def new_frame_one_matrix(self, frame_sig, SdifFloat8 time, matrix_sig,             # <<<<<<<<<<<<<<
 *                              c_numpy.ndarray matrixdata, SdifUInt4 streamID=0):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_99new_frame_one_matrix(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_98new_frame_one_matrix, "SdifFile.new_frame_one_matrix(self, frame_sig, SdifFloat8 time, matrix_sig, ndarray matrixdata, SdifUInt4 streamID=0)\n\n        Create a frame containing only one matrix and write it\n        \n        This method creates the frame, creates a new matrix\n        in the frame and writes it to disk, all at once\n\n        Args:\n            frame_sig (str): The frame signature\n            time (float): The time of the frame\n            matrix_sig (str): The matrix signature\n            matrixdata (numpy.array): The data of the matrix, a 2D array\n            streamID (int): The ID of the stream to add this frame/matrix to\n\n        Returns:\n            None\n        \n        !!! note\n\n            use this method when you want to create a frame which\n            contains only one matrix, like a 1TRC frame. It is more efficient\n            than calling new_frame, add_matrix, write (see method 'new_frame')\n        \n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_99new_frame_one_matrix = {"new_frame_one_matrix", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_99new_frame_one_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_98new_frame_one_matrix};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_99new_frame_one_matrix(PyObject *__pyx_v_self, 
#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_frame_sig = 0;
  SdifFloat8 __pyx_v_time;
  PyObject *__pyx_v_matrix_sig = 0;
  PyArrayObject *__pyx_v_matrixdata = 0;
  SdifUInt4 __pyx_v_streamID;
  #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("new_frame_one_matrix (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_frame_sig,&__pyx_n_s_time,&__pyx_n_s_matrix_sig,&__pyx_n_s_matrixdata,&__pyx_n_s_streamID,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame_sig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2207, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_time)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2207, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("new_frame_one_matrix", 0, 4, 5, 1); __PYX_ERR(0, 2207, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_matrix_sig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2207, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("new_frame_one_matrix", 0, 4, 5, 2); __PYX_ERR(0, 2207, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_matrixdata)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2207, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("new_frame_one_matrix", 0, 4, 5, 3); __PYX_ERR(0, 2207, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_streamID);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2207, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "new_frame_one_matrix") < 0)) __PYX_ERR(0, 2207, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_frame_sig = values[0];
    __pyx_v_time = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_time == ((SdifFloat8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2207, __pyx_L3_error)
    __pyx_v_matrix_sig = values[2];
    __pyx_v_matrixdata = ((PyArrayObject *)values[3]);
    if (values[4]) {
      __pyx_v_streamID = __Pyx_PyInt_As_SdifUInt4(values[4]); if (unlikely((__pyx_v_streamID == ((SdifUInt4)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2208, __pyx_L3_error)
    } else {
      __pyx_v_streamID = ((SdifUInt4)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("new_frame_one_matrix", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 2207, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.new_frame_one_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_matrixdata), __pyx_ptype_5numpy_ndarray, 1, "matrixdata", 0))) __PYX_ERR(0, 2208, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_98new_frame_one_matrix(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self), __pyx_v_frame_sig, __pyx_v_time, __pyx_v_matrix_sig, __pyx_v_matrixdata, __pyx_v_streamID);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_98new_frame_one_matrix(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, PyObject *__pyx_v_frame_sig, SdifFloat8 __pyx_v_time, PyObject *__pyx_v_matrix_sig, PyArrayObject *__pyx_v_matrixdata, SdifUInt4 __pyx_v_streamID) {
  size_t __pyx_v_frame_size;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  npy_intp *__pyx_t_7;
  npy_intp *__pyx_t_8;
  char *__pyx_t_9;
  unsigned int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("new_frame_one_matrix", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_matrixdata);

  /* "pysdif/_pysdif.pyx":2232
 * 
 *         """
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):             # <<<<<<<<<<<<<<
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 *         if self.write_status == eSdifGeneralHeader:
 */
  switch (__pyx_v_self->this->Mode) {
    case eWriteFile:
    case eReadWriteFile:
    __pyx_t_1 = 1;
    break;
    default:
    __pyx_t_1 = 0;
    break;
  }
  __pyx_t_2 = (!__pyx_t_1);
  if (unlikely(__pyx_t_2)) {

    /* "pysdif/_pysdif.pyx":2233
 *         """
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")             # <<<<<<<<<<<<<<
 *         if self.write_status == eSdifGeneralHeader:
 *             self.write_all_ascii_chunks()
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2233, __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(0, 2233, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":2232
 * 
 *         """
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):             # <<<<<<<<<<<<<<
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 *         if self.write_status == eSdifGeneralHeader:
 */
  }

  /* "pysdif/_pysdif.pyx":2234
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 *         if self.write_status == eSdifGeneralHeader:             # <<<<<<<<<<<<<<
 *             self.write_all_ascii_chunks()
 * 
 */
  __pyx_t_2 = (__pyx_v_self->write_status == __pyx_e_6pysdif_7_pysdif_eSdifGeneralHeader);
  if (__pyx_t_2) {

    /* "pysdif/_pysdif.pyx":2235
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 *         if self.write_status == eSdifGeneralHeader:
 *             self.write_all_ascii_chunks()             # <<<<<<<<<<<<<<
 * 
 *         if matrixdata.ndim != 2:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_all_ascii_chunks); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2235, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pysdif/_pysdif.pyx":2234
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")
 *         if self.write_status == eSdifGeneralHeader:             # <<<<<<<<<<<<<<
 *             self.write_all_ascii_chunks()
 * 
 */
  }

  /* "pysdif/_pysdif.pyx":2237
 *             self.write_all_ascii_chunks()
 * 
 *         if matrixdata.ndim != 2:             # <<<<<<<<<<<<<<
 *             raise ValueError("Expected a 2D array, got shape %d dimensions" % matrixdata.ndim)
 * 
 */
  __pyx_t_6 = __pyx_f_5numpy_7ndarray_4ndim_ndim(__pyx_v_matrixdata); if (unlikely(__pyx_t_6 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2237, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_6 != 2);
  if (unlikely(__pyx_t_2)) {

    /* "pysdif/_pysdif.pyx":2238
 * 
 *         if matrixdata.ndim != 2:
 *             raise ValueError("Expected a 2D array, got shape %d dimensions" % matrixdata.ndim)             # <<<<<<<<<<<<<<
 * 
 *         cdef size_t frame_size = SdifSizeOfFrameHeader() + SdifSizeOfMatrix(
 */
    __pyx_t_6 = __pyx_f_5numpy_7ndarray_4ndim_ndim(__pyx_v_matrixdata); if (unlikely(__pyx_t_6 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2238, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Expected_a_2D_array_got_shape_d, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 2238, __pyx_L1_error)

    /* "pysdif/_pysdif.pyx":2237
 *             self.write_all_ascii_chunks()
 * 
 *         if matrixdata.ndim != 2:             # <<<<<<<<<<<<<<
 *             raise ValueError("Expected a 2D array, got shape %d dimensions" % matrixdata.ndim)
 * 
 */
  }

  /* "pysdif/_pysdif.pyx":2241
 * 
 *         cdef size_t frame_size = SdifSizeOfFrameHeader() + SdifSizeOfMatrix(
 *             <SdifDataTypeET>(dtype_numpy2sdif(matrixdata.descr.type_num)),             # <<<<<<<<<<<<<<
 *             matrixdata.shape[0], matrixdata.shape[1] # rows, cols
 *         )
 */
  __pyx_t_3 = ((PyObject *)__pyx_f_5numpy_7ndarray_5descr_descr(__pyx_v_matrixdata)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __pyx_f_6pysdif_7_pysdif_dtype_numpy2sdif(((PyArray_Descr *)__pyx_t_3)->type_num); if (unlikely(__pyx_t_6 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2241, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysdif/_pysdif.pyx":2242
 *         cdef size_t frame_size = SdifSizeOfFrameHeader() + SdifSizeOfMatrix(
 *             <SdifDataTypeET>(dtype_numpy2sdif(matrixdata.descr.type_num)),
 *             matrixdata.shape[0], matrixdata.shape[1] # rows, cols             # <<<<<<<<<<<<<<
 *         )
 *         SdifFSetCurrFrameHeader(self.this, str2sig(asbytes(frame_sig)), frame_size, 1, streamID, time)
 */
  __pyx_t_7 = __pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_matrixdata); if (unlikely(__pyx_t_7 == ((npy_intp *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 2242, __pyx_L1_error)
  __pyx_t_8 = __pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_matrixdata); if (unlikely(__pyx_t_8 == ((npy_intp *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 2242, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2240
 *             raise ValueError("Expected a 2D array, got shape %d dimensions" % matrixdata.ndim)
 * 
 *         cdef size_t frame_size = SdifSizeOfFrameHeader() + SdifSizeOfMatrix(             # <<<<<<<<<<<<<<
 *             <SdifDataTypeET>(dtype_numpy2sdif(matrixdata.descr.type_num)),
 *             matrixdata.shape[0], matrixdata.shape[1] # rows, cols
 */
  __pyx_v_frame_size = (SdifSizeOfFrameHeader() + SdifSizeOfMatrix(((SdifDataTypeET)__pyx_t_6), (__pyx_t_7[0]), (__pyx_t_8[1])));

  /* "pysdif/_pysdif.pyx":2244
 *             matrixdata.shape[0], matrixdata.shape[1] # rows, cols
 *         )
 *         SdifFSetCurrFrameHeader(self.this, str2sig(asbytes(frame_sig)), frame_size, 1, streamID, time)             # <<<<<<<<<<<<<<
 *         SdifFWriteFrameHeader(self.this)
 *         if not matrixdata.flags.c_contiguous:
 */
  __pyx_t_3 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_frame_sig); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(__pyx_t_3 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2244, __pyx_L1_error)
  }
  __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_t_3); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 2244, __pyx_L1_error)
  __pyx_t_10 = __pyx_f_6pysdif_7_pysdif_str2sig(__pyx_t_9); if (unlikely(__pyx_t_10 == ((unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2244, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  (void)(SdifFSetCurrFrameHeader(__pyx_v_self->this, __pyx_t_10, __pyx_v_frame_size, 1, __pyx_v_streamID, __pyx_v_time));

  /* "pysdif/_pysdif.pyx":2245
 *         )
 *         SdifFSetCurrFrameHeader(self.this, str2sig(asbytes(frame_sig)), frame_size, 1, streamID, time)
 *         SdifFWriteFrameHeader(self.this)             # <<<<<<<<<<<<<<
 *         if not matrixdata.flags.c_contiguous:
 *             matrixdata = np.ascontiguousarray(matrixdata)
 */
  (void)(SdifFWriteFrameHeader(__pyx_v_self->this));

  /* "pysdif/_pysdif.pyx":2246
 *         SdifFSetCurrFrameHeader(self.this, str2sig(asbytes(frame_sig)), frame_size, 1, streamID, time)
 *         SdifFWriteFrameHeader(self.this)
 *         if not matrixdata.flags.c_contiguous:             # <<<<<<<<<<<<<<
 *             matrixdata = np.ascontiguousarray(matrixdata)
 *         SdifFWriteMatrix(self.this, str2sig(asbytes(matrix_sig)),
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_matrixdata), __pyx_n_s_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_c_contiguous); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (!__pyx_t_2);
  if (__pyx_t_1) {

    /* "pysdif/_pysdif.pyx":2247
 *         SdifFWriteFrameHeader(self.this)
 *         if not matrixdata.flags.c_contiguous:
 *             matrixdata = np.ascontiguousarray(matrixdata)             # <<<<<<<<<<<<<<
 *         SdifFWriteMatrix(self.this, str2sig(asbytes(matrix_sig)),
 *                          <SdifDataTypeET>dtype_numpy2sdif(matrixdata.descr.type_num),
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_matrixdata)};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2247, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2247, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_matrixdata, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pysdif/_pysdif.pyx":2246
 *         SdifFSetCurrFrameHeader(self.this, str2sig(asbytes(frame_sig)), frame_size, 1, streamID, time)
 *         SdifFWriteFrameHeader(self.this)
 *         if not matrixdata.flags.c_contiguous:             # <<<<<<<<<<<<<<
 *             matrixdata = np.ascontiguousarray(matrixdata)
 *         SdifFWriteMatrix(self.this, str2sig(asbytes(matrix_sig)),
 */
  }

  /* "pysdif/_pysdif.pyx":2248
 *         if not matrixdata.flags.c_contiguous:
 *             matrixdata = np.ascontiguousarray(matrixdata)
 *         SdifFWriteMatrix(self.this, str2sig(asbytes(matrix_sig)),             # <<<<<<<<<<<<<<
 *                          <SdifDataTypeET>dtype_numpy2sdif(matrixdata.descr.type_num),
 *                          matrixdata.shape[0], matrixdata.shape[1],   # rows, cols
 */
  __pyx_t_4 = __pyx_f_6pysdif_7_pysdif_asbytes(__pyx_v_matrix_sig); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(__pyx_t_4 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2248, __pyx_L1_error)
  }
  __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_t_4); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 2248, __pyx_L1_error)
  __pyx_t_10 = __pyx_f_6pysdif_7_pysdif_str2sig(__pyx_t_9); if (unlikely(__pyx_t_10 == ((unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysdif/_pysdif.pyx":2249
 *             matrixdata = np.ascontiguousarray(matrixdata)
 *         SdifFWriteMatrix(self.this, str2sig(asbytes(matrix_sig)),
 *                          <SdifDataTypeET>dtype_numpy2sdif(matrixdata.descr.type_num),             # <<<<<<<<<<<<<<
 *                          matrixdata.shape[0], matrixdata.shape[1],   # rows, cols
 *                          matrixdata.data)
 */
  __pyx_t_4 = ((PyObject *)__pyx_f_5numpy_7ndarray_5descr_descr(__pyx_v_matrixdata)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __pyx_f_6pysdif_7_pysdif_dtype_numpy2sdif(((PyArray_Descr *)__pyx_t_4)->type_num); if (unlikely(__pyx_t_6 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2249, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pysdif/_pysdif.pyx":2250
 *         SdifFWriteMatrix(self.this, str2sig(asbytes(matrix_sig)),
 *                          <SdifDataTypeET>dtype_numpy2sdif(matrixdata.descr.type_num),
 *                          matrixdata.shape[0], matrixdata.shape[1],   # rows, cols             # <<<<<<<<<<<<<<
 *                          matrixdata.data)
 *         self.write_status = eSdifMatrixData
 */
  __pyx_t_8 = __pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_matrixdata); if (unlikely(__pyx_t_8 == ((npy_intp *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 2250, __pyx_L1_error)
  __pyx_t_7 = __pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_matrixdata); if (unlikely(__pyx_t_7 == ((npy_intp *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 2250, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2251
 *                          <SdifDataTypeET>dtype_numpy2sdif(matrixdata.descr.type_num),
 *                          matrixdata.shape[0], matrixdata.shape[1],   # rows, cols
 *                          matrixdata.data)             # <<<<<<<<<<<<<<
 *         self.write_status = eSdifMatrixData
 * 
 */
  __pyx_t_9 = __pyx_f_5numpy_7ndarray_4data_data(__pyx_v_matrixdata); if (unlikely(__pyx_t_9 == ((char *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 2251, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2248
 *         if not matrixdata.flags.c_contiguous:
 *             matrixdata = np.ascontiguousarray(matrixdata)
 *         SdifFWriteMatrix(self.this, str2sig(asbytes(matrix_sig)),             # <<<<<<<<<<<<<<
 *                          <SdifDataTypeET>dtype_numpy2sdif(matrixdata.descr.type_num),
 *                          matrixdata.shape[0], matrixdata.shape[1],   # rows, cols
 */
  (void)(SdifFWriteMatrix(__pyx_v_self->this, __pyx_t_10, ((SdifDataTypeET)__pyx_t_6), (__pyx_t_8[0]), (__pyx_t_7[1]), __pyx_t_9));

  /* "pysdif/_pysdif.pyx":2252
 *                          matrixdata.shape[0], matrixdata.shape[1],   # rows, cols
 *                          matrixdata.data)
 *         self.write_status = eSdifMatrixData             # <<<<<<<<<<<<<<
 * 
 *     # low level functions to print info
 */
  __pyx_v_self->write_status = __pyx_e_6pysdif_7_pysdif_eSdifMatrixData;

  /* "pysdif/_pysdif.pyx":2207
 *         return FrameW_new(self, str2sig(asbytes(signature)), time, streamID)
 * 
 *     def new_frame_one_matrix(self, frame_sig, SdifFloat8 time, matrix_sig,             # <<<<<<<<<<<<<<
 *                              c_numpy.ndarray matrixdata, SdifUInt4 streamID=0):
 *         """
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.new_frame_one_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_matrixdata);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":2255
 * 
 *     # low level functions to print info
 *     def print_NVT(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - Print the name value table """
 *         SdifFPrintAllNameValueNVT(self.this)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_101print_NVT(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_100print_NVT, "SdifFile.print_NVT(self)\nLow-Level Interface - Print the name value table ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_101print_NVT = {"print_NVT", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_101print_NVT, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_100print_NVT};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_101print_NVT(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("print_NVT (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("print_NVT", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "print_NVT", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_100print_NVT(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_100print_NVT(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("print_NVT", 1);

  /* "pysdif/_pysdif.pyx":2257
 *     def print_NVT(self):
 *         """Low-Level Interface - Print the name value table """
 *         SdifFPrintAllNameValueNVT(self.this)             # <<<<<<<<<<<<<<
 * 
 *     def print_general_header(self):
 */
  (void)(SdifFPrintAllNameValueNVT(__pyx_v_self->this));

  /* "pysdif/_pysdif.pyx":2255
 * 
 *     # low level functions to print info
 *     def print_NVT(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - Print the name value table """
 *         SdifFPrintAllNameValueNVT(self.this)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":2259
 *         SdifFPrintAllNameValueNVT(self.this)
 * 
 *     def print_general_header(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - Print the general header """
 *         cdef size_t n = SdifFPrintGeneralHeader(self.this)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_103print_general_header(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_102print_general_header, "SdifFile.print_general_header(self)\nLow-Level Interface - Print the general header ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_103print_general_header = {"print_general_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_103print_general_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_102print_general_header};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_103print_general_header(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("print_general_header (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("print_general_header", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "print_general_header", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_102print_general_header(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_102print_general_header(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  CYTHON_UNUSED size_t __pyx_v_n;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("print_general_header", 1);

  /* "pysdif/_pysdif.pyx":2261
 *     def print_general_header(self):
 *         """Low-Level Interface - Print the general header """
 *         cdef size_t n = SdifFPrintGeneralHeader(self.this)             # <<<<<<<<<<<<<<
 * 
 *     def print_all_ascii_chunks(self):
 */
  __pyx_v_n = SdifFPrintGeneralHeader(__pyx_v_self->this);

  /* "pysdif/_pysdif.pyx":2259
 *         SdifFPrintAllNameValueNVT(self.this)
 * 
 *     def print_general_header(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - Print the general header """
 *         cdef size_t n = SdifFPrintGeneralHeader(self.this)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":2263
 *         cdef size_t n = SdifFPrintGeneralHeader(self.this)
 * 
 *     def print_all_ascii_chunks(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - print all text chunks """
 *         SdifFPrintAllASCIIChunks(self.this)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_105print_all_ascii_chunks(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_104print_all_ascii_chunks, "SdifFile.print_all_ascii_chunks(self)\nLow-Level Interface - print all text chunks ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_105print_all_ascii_chunks = {"print_all_ascii_chunks", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_105print_all_ascii_chunks, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_104print_all_ascii_chunks};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_105print_all_ascii_chunks(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("print_all_ascii_chunks (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("print_all_ascii_chunks", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "print_all_ascii_chunks", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_104print_all_ascii_chunks(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_104print_all_ascii_chunks(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("print_all_ascii_chunks", 1);

  /* "pysdif/_pysdif.pyx":2265
 *     def print_all_ascii_chunks(self):
 *         """Low-Level Interface - print all text chunks """
 *         SdifFPrintAllASCIIChunks(self.this)             # <<<<<<<<<<<<<<
 * 
 *     def print_all_types(self):
 */
  (void)(SdifFPrintAllASCIIChunks(__pyx_v_self->this));

  /* "pysdif/_pysdif.pyx":2263
 *         cdef size_t n = SdifFPrintGeneralHeader(self.this)
 * 
 *     def print_all_ascii_chunks(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - print all text chunks """
 *         SdifFPrintAllASCIIChunks(self.this)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":2267
 *         SdifFPrintAllASCIIChunks(self.this)
 * 
 *     def print_all_types(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - Print all types defined in this sdif file"""
 *         SdifFPrintAllType(self.this)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_107print_all_types(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_106print_all_types, "SdifFile.print_all_types(self)\nLow-Level Interface - Print all types defined in this sdif file");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_107print_all_types = {"print_all_types", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_107print_all_types, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_106print_all_types};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_107print_all_types(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("print_all_types (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("print_all_types", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "print_all_types", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_106print_all_types(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_106print_all_types(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("print_all_types", 1);

  /* "pysdif/_pysdif.pyx":2269
 *     def print_all_types(self):
 *         """Low-Level Interface - Print all types defined in this sdif file"""
 *         SdifFPrintAllType(self.this)             # <<<<<<<<<<<<<<
 * 
 *     def print_matrix_header(self):
 */
  (void)(SdifFPrintAllType(__pyx_v_self->this));

  /* "pysdif/_pysdif.pyx":2267
 *         SdifFPrintAllASCIIChunks(self.this)
 * 
 *     def print_all_types(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - Print all types defined in this sdif file"""
 *         SdifFPrintAllType(self.this)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":2271
 *         SdifFPrintAllType(self.this)
 * 
 *     def print_matrix_header(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - Print the matrix header"""
 *         SdifFPrintMatrixHeader(self.this)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_109print_matrix_header(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_108print_matrix_header, "SdifFile.print_matrix_header(self)\nLow-Level Interface - Print the matrix header");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_109print_matrix_header = {"print_matrix_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_109print_matrix_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_108print_matrix_header};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_109print_matrix_header(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("print_matrix_header (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("print_matrix_header", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "print_matrix_header", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_108print_matrix_header(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_108print_matrix_header(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("print_matrix_header", 1);

  /* "pysdif/_pysdif.pyx":2273
 *     def print_matrix_header(self):
 *         """Low-Level Interface - Print the matrix header"""
 *         SdifFPrintMatrixHeader(self.this)             # <<<<<<<<<<<<<<
 * 
 *     def print_one_row(self):
 */
  (void)(SdifFPrintMatrixHeader(__pyx_v_self->this));

  /* "pysdif/_pysdif.pyx":2271
 *         SdifFPrintAllType(self.this)
 * 
 *     def print_matrix_header(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - Print the matrix header"""
 *         SdifFPrintMatrixHeader(self.this)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":2275
 *         SdifFPrintMatrixHeader(self.this)
 * 
 *     def print_one_row(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - print one row of the current matrix"""
 *         SdifFPrintOneRow(self.this)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_111print_one_row(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_110print_one_row, "SdifFile.print_one_row(self)\nLow-Level Interface - print one row of the current matrix");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_111print_one_row = {"print_one_row", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_111print_one_row, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_110print_one_row};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_111print_one_row(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("print_one_row (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("print_one_row", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "print_one_row", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_110print_one_row(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_110print_one_row(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("print_one_row", 1);

  /* "pysdif/_pysdif.pyx":2277
 *     def print_one_row(self):
 *         """Low-Level Interface - print one row of the current matrix"""
 *         SdifFPrintOneRow(self.this)             # <<<<<<<<<<<<<<
 * 
 *     def print_frame_header(self):
 */
  (void)(SdifFPrintOneRow(__pyx_v_self->this));

  /* "pysdif/_pysdif.pyx":2275
 *         SdifFPrintMatrixHeader(self.this)
 * 
 *     def print_one_row(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - print one row of the current matrix"""
 *         SdifFPrintOneRow(self.this)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":2279
 *         SdifFPrintOneRow(self.this)
 * 
 *     def print_frame_header(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface- Print the frame header """
 *         SdifFPrintFrameHeader(self.this)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_113print_frame_header(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_112print_frame_header, "SdifFile.print_frame_header(self)\nLow-Level Interface- Print the frame header ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_113print_frame_header = {"print_frame_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_113print_frame_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_112print_frame_header};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_113print_frame_header(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("print_frame_header (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("print_frame_header", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "print_frame_header", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_112print_frame_header(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_112print_frame_header(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("print_frame_header", 1);

  /* "pysdif/_pysdif.pyx":2281
 *     def print_frame_header(self):
 *         """Low-Level Interface- Print the frame header """
 *         SdifFPrintFrameHeader(self.this)             # <<<<<<<<<<<<<<
 * 
 *     def print_all_stream_ID(self):
 */
  (void)(SdifFPrintFrameHeader(__pyx_v_self->this));

  /* "pysdif/_pysdif.pyx":2279
 *         SdifFPrintOneRow(self.this)
 * 
 *     def print_frame_header(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface- Print the frame header """
 *         SdifFPrintFrameHeader(self.this)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":2283
 *         SdifFPrintFrameHeader(self.this)
 * 
 *     def print_all_stream_ID(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - Print the ID of all streams """
 *         SdifFPrintAllStreamID(self.this)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_115print_all_stream_ID(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_114print_all_stream_ID, "SdifFile.print_all_stream_ID(self)\nLow-Level Interface - Print the ID of all streams ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_115print_all_stream_ID = {"print_all_stream_ID", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_115print_all_stream_ID, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_114print_all_stream_ID};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_115print_all_stream_ID(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("print_all_stream_ID (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("print_all_stream_ID", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "print_all_stream_ID", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_114print_all_stream_ID(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_114print_all_stream_ID(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("print_all_stream_ID", 1);

  /* "pysdif/_pysdif.pyx":2285
 *     def print_all_stream_ID(self):
 *         """Low-Level Interface - Print the ID of all streams """
 *         SdifFPrintAllStreamID(self.this)             # <<<<<<<<<<<<<<
 * 
 *     def frame_types_to_string(self):
 */
  (void)(SdifFPrintAllStreamID(__pyx_v_self->this));

  /* "pysdif/_pysdif.pyx":2283
 *         SdifFPrintFrameHeader(self.this)
 * 
 *     def print_all_stream_ID(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - Print the ID of all streams """
 *         SdifFPrintAllStreamID(self.this)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":2287
 *         SdifFPrintAllStreamID(self.this)
 * 
 *     def frame_types_to_string(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a string with all frame types
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_117frame_types_to_string(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_116frame_types_to_string, "SdifFile.frame_types_to_string(self)\n\n        Returns a string with all frame types\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_117frame_types_to_string = {"frame_types_to_string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_117frame_types_to_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_116frame_types_to_string};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_117frame_types_to_string(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("frame_types_to_string (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("frame_types_to_string", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "frame_types_to_string", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_116frame_types_to_string(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_116frame_types_to_string(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  SdifStringT *__pyx_v_sdifstr;
  PyObject *__pyx_v_out = NULL;
  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("frame_types_to_string", 1);

  /* "pysdif/_pysdif.pyx":2292
 *         """
 *         cdef SdifStringT *sdifstr
 *         sdifstr = SdifStringNew()             # <<<<<<<<<<<<<<
 *         SdifFAllFrameTypeToSdifString(self.this, sdifstr)
 *         # out = PyString_from_SdifString(sdifstr)
 */
  __pyx_v_sdifstr = SdifStringNew();

  /* "pysdif/_pysdif.pyx":2293
 *         cdef SdifStringT *sdifstr
 *         sdifstr = SdifStringNew()
 *         SdifFAllFrameTypeToSdifString(self.this, sdifstr)             # <<<<<<<<<<<<<<
 *         # out = PyString_from_SdifString(sdifstr)
 *         out = bytes_from_sdifstring(sdifstr).decode("ascii")
 */
  (void)(SdifFAllFrameTypeToSdifString(__pyx_v_self->this, __pyx_v_sdifstr));

  /* "pysdif/_pysdif.pyx":2295
 *         SdifFAllFrameTypeToSdifString(self.this, sdifstr)
 *         # out = PyString_from_SdifString(sdifstr)
 *         out = bytes_from_sdifstring(sdifstr).decode("ascii")             # <<<<<<<<<<<<<<
 *         SdifStringFree(sdifstr)
 *         return out
 */
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_bytes_from_sdifstring(__pyx_v_sdifstr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode");
    __PYX_ERR(0, 2295, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_decode_bytes(__pyx_t_1, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_out = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":2296
 *         # out = PyString_from_SdifString(sdifstr)
 *         out = bytes_from_sdifstring(sdifstr).decode("ascii")
 *         SdifStringFree(sdifstr)             # <<<<<<<<<<<<<<
 *         return out
 * 
 */
  SdifStringFree(__pyx_v_sdifstr);

  /* "pysdif/_pysdif.pyx":2297
 *         out = bytes_from_sdifstring(sdifstr).decode("ascii")
 *         SdifStringFree(sdifstr)
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def get_frame_types(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":2287
 *         SdifFPrintAllStreamID(self.this)
 * 
 *     def frame_types_to_string(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a string with all frame types
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.frame_types_to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":2299
 *         return out
 * 
 *     def get_frame_types(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a list of Frame Type Definitions (1FTD)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_119get_frame_types(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_118get_frame_types, "SdifFile.get_frame_types(self)\n\n        Returns a list of Frame Type Definitions (1FTD)\n\n        Each FrameTypeDefinition is a FrameTypeDefinition(signature:bytes, components:list[Component])\n        (a Component has the attributes signature:bytes, name:bytes, num:int)\n\n        Returns:\n            (list[FrameTypeDefinition]) A list of FrameTypeDefinition\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_119get_frame_types = {"get_frame_types", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_119get_frame_types, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_118get_frame_types};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_119get_frame_types(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_frame_types (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("get_frame_types", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_frame_types", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_118get_frame_types(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_118get_frame_types(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_frame_types", 1);

  /* "pysdif/_pysdif.pyx":2309
 *             (list[FrameTypeDefinition]) A list of FrameTypeDefinition
 *         """
 *         return FrameTypesTable_to_list(self.this.FrameTypesTable)             # <<<<<<<<<<<<<<
 * 
 *     def matrix_types_to_string(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_FrameTypesTable_to_list(__pyx_v_self->this->FrameTypesTable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":2299
 *         return out
 * 
 *     def get_frame_types(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a list of Frame Type Definitions (1FTD)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.get_frame_types", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":2311
 *         return FrameTypesTable_to_list(self.this.FrameTypesTable)
 * 
 *     def matrix_types_to_string(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a string with all matrix types
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_121matrix_types_to_string(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_120matrix_types_to_string, "SdifFile.matrix_types_to_string(self)\n \n        Returns a string with all matrix types\n\n        Returns:\n            (str) A string with all matrix types\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_121matrix_types_to_string = {"matrix_types_to_string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_121matrix_types_to_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_120matrix_types_to_string};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_121matrix_types_to_string(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("matrix_types_to_string (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("matrix_types_to_string", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "matrix_types_to_string", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_120matrix_types_to_string(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_120matrix_types_to_string(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  SdifStringT *__pyx_v_sdifstr;
  PyObject *__pyx_v_out = NULL;
  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("matrix_types_to_string", 1);

  /* "pysdif/_pysdif.pyx":2319
 *         """
 *         cdef SdifStringT *sdifstr
 *         sdifstr = SdifStringNew()             # <<<<<<<<<<<<<<
 *         SdifFAllMatrixTypeToSdifString(self.this, sdifstr)
 *         out = bytes_from_sdifstring(sdifstr).decode("ascii")
 */
  __pyx_v_sdifstr = SdifStringNew();

  /* "pysdif/_pysdif.pyx":2320
 *         cdef SdifStringT *sdifstr
 *         sdifstr = SdifStringNew()
 *         SdifFAllMatrixTypeToSdifString(self.this, sdifstr)             # <<<<<<<<<<<<<<
 *         out = bytes_from_sdifstring(sdifstr).decode("ascii")
 *         SdifStringFree(sdifstr)
 */
  (void)(SdifFAllMatrixTypeToSdifString(__pyx_v_self->this, __pyx_v_sdifstr));

  /* "pysdif/_pysdif.pyx":2321
 *         sdifstr = SdifStringNew()
 *         SdifFAllMatrixTypeToSdifString(self.this, sdifstr)
 *         out = bytes_from_sdifstring(sdifstr).decode("ascii")             # <<<<<<<<<<<<<<
 *         SdifStringFree(sdifstr)
 *         return out
 */
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_bytes_from_sdifstring(__pyx_v_sdifstr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode");
    __PYX_ERR(0, 2321, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_decode_bytes(__pyx_t_1, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_out = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":2322
 *         SdifFAllMatrixTypeToSdifString(self.this, sdifstr)
 *         out = bytes_from_sdifstring(sdifstr).decode("ascii")
 *         SdifStringFree(sdifstr)             # <<<<<<<<<<<<<<
 *         return out
 * 
 */
  SdifStringFree(__pyx_v_sdifstr);

  /* "pysdif/_pysdif.pyx":2323
 *         out = bytes_from_sdifstring(sdifstr).decode("ascii")
 *         SdifStringFree(sdifstr)
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def get_matrix_types(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":2311
 *         return FrameTypesTable_to_list(self.this.FrameTypesTable)
 * 
 *     def matrix_types_to_string(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a string with all matrix types
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.matrix_types_to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":2325
 *         return out
 * 
 *     def get_matrix_types(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get a list of matrix type definitions (1MTD)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_123get_matrix_types(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_122get_matrix_types, "SdifFile.get_matrix_types(self)\n\n        Get a list of matrix type definitions (1MTD)\n\n        Returns:\n            (list[str]) A list of matrix types, where each item is \n            a MatrixTypeDefinition\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_123get_matrix_types = {"get_matrix_types", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_123get_matrix_types, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_122get_matrix_types};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_123get_matrix_types(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_matrix_types (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("get_matrix_types", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_matrix_types", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_122get_matrix_types(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_122get_matrix_types(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_matrix_types", 1);

  /* "pysdif/_pysdif.pyx":2333
 *             a MatrixTypeDefinition
 *         """
 *         return MatrixTypesTable_to_list(self.this.MatrixTypesTable)             # <<<<<<<<<<<<<<
 * 
 *     def get_NVTs(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_MatrixTypesTable_to_list(__pyx_v_self->this->MatrixTypesTable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":2325
 *         return out
 * 
 *     def get_matrix_types(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get a list of matrix type definitions (1MTD)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.get_matrix_types", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":2335
 *         return MatrixTypesTable_to_list(self.this.MatrixTypesTable)
 * 
 *     def get_NVTs(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list with all defined NameValueTables
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_125get_NVTs(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_124get_NVTs, "SdifFile.get_NVTs(self)\n\n        Return a list with all defined NameValueTables \n        \n        Each NVT is converted to a python dict\n\n        Returns:\n            (list[dict[str, str]]) A list of NVTs, where each NVT is a\n            dictionary with string keys and string values\n        ");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_125get_NVTs = {"get_NVTs", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_125get_NVTs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_124get_NVTs};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_125get_NVTs(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_NVTs (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("get_NVTs", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_NVTs", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_124get_NVTs(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_124get_NVTs(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_NVTs", 1);

  /* "pysdif/_pysdif.pyx":2345
 *             dictionary with string keys and string values
 *         """
 *         return valuetables_to_dicts(self.this.NameValues)             # <<<<<<<<<<<<<<
 * 
 *     def get_stream_IDs(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_valuetables_to_dicts(__pyx_v_self->this->NameValues); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":2335
 *         return MatrixTypesTable_to_list(self.this.MatrixTypesTable)
 * 
 *     def get_NVTs(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list with all defined NameValueTables
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.get_NVTs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":2347
 *         return valuetables_to_dicts(self.this.NameValues)
 * 
 *     def get_stream_IDs(self):             # <<<<<<<<<<<<<<
 *         return streamidtable_to_list(self.this.StreamIDsTable)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_127get_stream_IDs(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_126get_stream_IDs, "SdifFile.get_stream_IDs(self)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_127get_stream_IDs = {"get_stream_IDs", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_127get_stream_IDs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_126get_stream_IDs};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_127get_stream_IDs(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_stream_IDs (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("get_stream_IDs", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_stream_IDs", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_126get_stream_IDs(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_126get_stream_IDs(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_stream_IDs", 1);

  /* "pysdif/_pysdif.pyx":2348
 * 
 *     def get_stream_IDs(self):
 *         return streamidtable_to_list(self.this.StreamIDsTable)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pysdif_7_pysdif_streamidtable_to_list(__pyx_v_self->this->StreamIDsTable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pysdif/_pysdif.pyx":2347
 *         return valuetables_to_dicts(self.this.NameValues)
 * 
 *     def get_stream_IDs(self):             # <<<<<<<<<<<<<<
 *         return streamidtable_to_list(self.this.StreamIDsTable)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.get_stream_IDs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pysdif/_pysdif.pyx":1156
 *     """
 *     cdef SdifFileT *this
 *     cdef readonly int eof             # <<<<<<<<<<<<<<
 *     cdef FrameR frame
 *     cdef Matrix matrix
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_3eof_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_3eof_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_3eof___get__(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_3eof___get__(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->eof); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.eof.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_129__reduce_cython__(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_128__reduce_cython__, "SdifFile.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_129__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_129__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_128__reduce_cython__};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_129__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_128__reduce_cython__(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_128__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 1);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_131__setstate_cython__(PyObject *__pyx_v_self, 
#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_6pysdif_7_pysdif_8SdifFile_130__setstate_cython__, "SdifFile.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_8SdifFile_131__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_131__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_130__setstate_cython__};
static PyObject *__pyx_pw_6pysdif_7_pysdif_8SdifFile_131__setstate_cython__(PyObject *__pyx_v_self, 
#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___pyx_state = 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("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_8SdifFile_130__setstate_cython__(((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_8SdifFile_130__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pysdif_7_pysdif_SdifFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 1);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pysdif._pysdif.SdifFile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_MatrixTypeDefinition(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_23__pyx_unpickle_MatrixTypeDefinition(PyObject *__pyx_self, 
#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_6pysdif_7_pysdif_22__pyx_unpickle_MatrixTypeDefinition, "__pyx_unpickle_MatrixTypeDefinition(__pyx_type, long __pyx_checksum, __pyx_state)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_23__pyx_unpickle_MatrixTypeDefinition = {"__pyx_unpickle_MatrixTypeDefinition", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_23__pyx_unpickle_MatrixTypeDefinition, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_22__pyx_unpickle_MatrixTypeDefinition};
static PyObject *__pyx_pw_6pysdif_7_pysdif_23__pyx_unpickle_MatrixTypeDefinition(PyObject *__pyx_self, 
#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___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 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("__pyx_unpickle_MatrixTypeDefinition (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MatrixTypeDefinition", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MatrixTypeDefinition", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_MatrixTypeDefinition") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MatrixTypeDefinition", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.__pyx_unpickle_MatrixTypeDefinition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_22__pyx_unpickle_MatrixTypeDefinition(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_22__pyx_unpickle_MatrixTypeDefinition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_MatrixTypeDefinition", 1);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x8e7a8c2, 0xec235b2, 0x3fbaffb):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x8e7a8c2, 0xec235b2, 0x3fbaffb) = (column_names, signature))" % __pyx_checksum
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__24, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x8e7a8c2, 0xec235b2, 0x3fbaffb):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x8e7a8c2, 0xec235b2, 0x3fbaffb) = (column_names, signature))" % __pyx_checksum
 *     __pyx_result = MatrixTypeDefinition.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x8e7a8c2, 0xec235b2, 0x3fbaffb):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x8e7a8c2, 0xec235b2, 0x3fbaffb) = (column_names, signature))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = MatrixTypeDefinition.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x8e7a8c2, 0xec235b2, 0x3fbaffb):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x8e7a8c2, 0xec235b2, 0x3fbaffb) = (column_names, signature))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x8e7a8c2, 0xec235b2, 0x3fbaffb) = (column_names, signature))" % __pyx_checksum
 *     __pyx_result = MatrixTypeDefinition.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_MatrixTypeDefinition__set_state(<MatrixTypeDefinition> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x8e7a8c2, 0xec235b2, 0x3fbaffb) = (column_names, signature))" % __pyx_checksum
 *     __pyx_result = MatrixTypeDefinition.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_MatrixTypeDefinition__set_state(<MatrixTypeDefinition> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = MatrixTypeDefinition.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_MatrixTypeDefinition__set_state(<MatrixTypeDefinition> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_MatrixTypeDefinition__set_state(MatrixTypeDefinition __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_1 = __pyx_f_6pysdif_7_pysdif___pyx_unpickle_MatrixTypeDefinition__set_state(((struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x8e7a8c2, 0xec235b2, 0x3fbaffb) = (column_names, signature))" % __pyx_checksum
 *     __pyx_result = MatrixTypeDefinition.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_MatrixTypeDefinition__set_state(<MatrixTypeDefinition> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_MatrixTypeDefinition__set_state(<MatrixTypeDefinition> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_MatrixTypeDefinition__set_state(MatrixTypeDefinition __pyx_result, tuple __pyx_state):
 *     __pyx_result.column_names = __pyx_state[0]; __pyx_result.signature = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_MatrixTypeDefinition(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysdif._pysdif.__pyx_unpickle_MatrixTypeDefinition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_MatrixTypeDefinition__set_state(<MatrixTypeDefinition> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_MatrixTypeDefinition__set_state(MatrixTypeDefinition __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.column_names = __pyx_state[0]; __pyx_result.signature = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_6pysdif_7_pysdif___pyx_unpickle_MatrixTypeDefinition__set_state(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_MatrixTypeDefinition__set_state", 1);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_MatrixTypeDefinition__set_state(MatrixTypeDefinition __pyx_result, tuple __pyx_state):
 *     __pyx_result.column_names = __pyx_state[0]; __pyx_result.signature = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->column_names);
  __Pyx_DECREF(__pyx_v___pyx_result->column_names);
  __pyx_v___pyx_result->column_names = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->signature);
  __Pyx_DECREF(__pyx_v___pyx_result->signature);
  __pyx_v___pyx_result->signature = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_MatrixTypeDefinition__set_state(MatrixTypeDefinition __pyx_result, tuple __pyx_state):
 *     __pyx_result.column_names = __pyx_state[0]; __pyx_result.signature = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 > 2);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result.column_names = __pyx_state[0]; __pyx_result.signature = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_MatrixTypeDefinition__set_state(MatrixTypeDefinition __pyx_result, tuple __pyx_state):
 *     __pyx_result.column_names = __pyx_state[0]; __pyx_result.signature = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_MatrixTypeDefinition__set_state(<MatrixTypeDefinition> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_MatrixTypeDefinition__set_state(MatrixTypeDefinition __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.column_names = __pyx_state[0]; __pyx_result.signature = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pysdif._pysdif.__pyx_unpickle_MatrixTypeDefinition__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_Component(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_25__pyx_unpickle_Component(PyObject *__pyx_self, 
#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_6pysdif_7_pysdif_24__pyx_unpickle_Component, "__pyx_unpickle_Component(__pyx_type, long __pyx_checksum, __pyx_state)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_25__pyx_unpickle_Component = {"__pyx_unpickle_Component", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_25__pyx_unpickle_Component, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_24__pyx_unpickle_Component};
static PyObject *__pyx_pw_6pysdif_7_pysdif_25__pyx_unpickle_Component(PyObject *__pyx_self, 
#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___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 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("__pyx_unpickle_Component (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Component", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Component", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Component") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Component", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.__pyx_unpickle_Component", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_24__pyx_unpickle_Component(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_24__pyx_unpickle_Component(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Component", 1);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xdb4a2e1, 0xce7ce05, 0x13edf36):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xdb4a2e1, 0xce7ce05, 0x13edf36) = (name, num, signature))" % __pyx_checksum
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__25, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xdb4a2e1, 0xce7ce05, 0x13edf36):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xdb4a2e1, 0xce7ce05, 0x13edf36) = (name, num, signature))" % __pyx_checksum
 *     __pyx_result = Component.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xdb4a2e1, 0xce7ce05, 0x13edf36):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xdb4a2e1, 0xce7ce05, 0x13edf36) = (name, num, signature))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = Component.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xdb4a2e1, 0xce7ce05, 0x13edf36):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xdb4a2e1, 0xce7ce05, 0x13edf36) = (name, num, signature))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xdb4a2e1, 0xce7ce05, 0x13edf36) = (name, num, signature))" % __pyx_checksum
 *     __pyx_result = Component.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Component__set_state(<Component> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pysdif_7_pysdif_Component), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xdb4a2e1, 0xce7ce05, 0x13edf36) = (name, num, signature))" % __pyx_checksum
 *     __pyx_result = Component.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Component__set_state(<Component> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = Component.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Component__set_state(<Component> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Component__set_state(Component __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_1 = __pyx_f_6pysdif_7_pysdif___pyx_unpickle_Component__set_state(((struct __pyx_obj_6pysdif_7_pysdif_Component *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xdb4a2e1, 0xce7ce05, 0x13edf36) = (name, num, signature))" % __pyx_checksum
 *     __pyx_result = Component.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Component__set_state(<Component> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Component__set_state(<Component> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Component__set_state(Component __pyx_result, tuple __pyx_state):
 *     __pyx_result.name = __pyx_state[0]; __pyx_result.num = __pyx_state[1]; __pyx_result.signature = __pyx_state[2]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Component(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysdif._pysdif.__pyx_unpickle_Component", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Component__set_state(<Component> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Component__set_state(Component __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.name = __pyx_state[0]; __pyx_result.num = __pyx_state[1]; __pyx_result.signature = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_6pysdif_7_pysdif___pyx_unpickle_Component__set_state(struct __pyx_obj_6pysdif_7_pysdif_Component *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  unsigned int __pyx_t_2;
  int __pyx_t_3;
  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;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Component__set_state", 1);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Component__set_state(Component __pyx_result, tuple __pyx_state):
 *     __pyx_result.name = __pyx_state[0]; __pyx_result.num = __pyx_state[1]; __pyx_result.signature = __pyx_state[2]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->name);
  __Pyx_DECREF(__pyx_v___pyx_result->name);
  __pyx_v___pyx_result->name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->num = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->signature);
  __Pyx_DECREF(__pyx_v___pyx_result->signature);
  __pyx_v___pyx_result->signature = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Component__set_state(Component __pyx_result, tuple __pyx_state):
 *     __pyx_result.name = __pyx_state[0]; __pyx_result.num = __pyx_state[1]; __pyx_result.signature = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 > 3);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_3 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result.name = __pyx_state[0]; __pyx_result.num = __pyx_state[1]; __pyx_result.signature = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_Component__set_state(Component __pyx_result, tuple __pyx_state):
 *     __pyx_result.name = __pyx_state[0]; __pyx_result.num = __pyx_state[1]; __pyx_result.signature = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_Component__set_state(<Component> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Component__set_state(Component __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.name = __pyx_state[0]; __pyx_result.num = __pyx_state[1]; __pyx_result.signature = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pysdif._pysdif.__pyx_unpickle_Component__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_FrameTypeDefinition(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_27__pyx_unpickle_FrameTypeDefinition(PyObject *__pyx_self, 
#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_6pysdif_7_pysdif_26__pyx_unpickle_FrameTypeDefinition, "__pyx_unpickle_FrameTypeDefinition(__pyx_type, long __pyx_checksum, __pyx_state)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_27__pyx_unpickle_FrameTypeDefinition = {"__pyx_unpickle_FrameTypeDefinition", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_27__pyx_unpickle_FrameTypeDefinition, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_26__pyx_unpickle_FrameTypeDefinition};
static PyObject *__pyx_pw_6pysdif_7_pysdif_27__pyx_unpickle_FrameTypeDefinition(PyObject *__pyx_self, 
#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___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 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("__pyx_unpickle_FrameTypeDefinition (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FrameTypeDefinition", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FrameTypeDefinition", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_FrameTypeDefinition") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FrameTypeDefinition", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.__pyx_unpickle_FrameTypeDefinition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_26__pyx_unpickle_FrameTypeDefinition(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_26__pyx_unpickle_FrameTypeDefinition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_FrameTypeDefinition", 1);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x10e6e84, 0xf4f6592, 0x3698374):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x10e6e84, 0xf4f6592, 0x3698374) = (components, signature))" % __pyx_checksum
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__26, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x10e6e84, 0xf4f6592, 0x3698374):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x10e6e84, 0xf4f6592, 0x3698374) = (components, signature))" % __pyx_checksum
 *     __pyx_result = FrameTypeDefinition.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x10e6e84, 0xf4f6592, 0x3698374):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x10e6e84, 0xf4f6592, 0x3698374) = (components, signature))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = FrameTypeDefinition.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x10e6e84, 0xf4f6592, 0x3698374):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x10e6e84, 0xf4f6592, 0x3698374) = (components, signature))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x10e6e84, 0xf4f6592, 0x3698374) = (components, signature))" % __pyx_checksum
 *     __pyx_result = FrameTypeDefinition.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FrameTypeDefinition__set_state(<FrameTypeDefinition> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pysdif_7_pysdif_FrameTypeDefinition), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x10e6e84, 0xf4f6592, 0x3698374) = (components, signature))" % __pyx_checksum
 *     __pyx_result = FrameTypeDefinition.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_FrameTypeDefinition__set_state(<FrameTypeDefinition> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = FrameTypeDefinition.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FrameTypeDefinition__set_state(<FrameTypeDefinition> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_FrameTypeDefinition__set_state(FrameTypeDefinition __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_1 = __pyx_f_6pysdif_7_pysdif___pyx_unpickle_FrameTypeDefinition__set_state(((struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x10e6e84, 0xf4f6592, 0x3698374) = (components, signature))" % __pyx_checksum
 *     __pyx_result = FrameTypeDefinition.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_FrameTypeDefinition__set_state(<FrameTypeDefinition> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FrameTypeDefinition__set_state(<FrameTypeDefinition> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_FrameTypeDefinition__set_state(FrameTypeDefinition __pyx_result, tuple __pyx_state):
 *     __pyx_result.components = __pyx_state[0]; __pyx_result.signature = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_FrameTypeDefinition(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysdif._pysdif.__pyx_unpickle_FrameTypeDefinition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_FrameTypeDefinition__set_state(<FrameTypeDefinition> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_FrameTypeDefinition__set_state(FrameTypeDefinition __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.components = __pyx_state[0]; __pyx_result.signature = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_6pysdif_7_pysdif___pyx_unpickle_FrameTypeDefinition__set_state(struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_FrameTypeDefinition__set_state", 1);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_FrameTypeDefinition__set_state(FrameTypeDefinition __pyx_result, tuple __pyx_state):
 *     __pyx_result.components = __pyx_state[0]; __pyx_result.signature = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->components);
  __Pyx_DECREF(__pyx_v___pyx_result->components);
  __pyx_v___pyx_result->components = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->signature);
  __Pyx_DECREF(__pyx_v___pyx_result->signature);
  __pyx_v___pyx_result->signature = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_FrameTypeDefinition__set_state(FrameTypeDefinition __pyx_result, tuple __pyx_state):
 *     __pyx_result.components = __pyx_state[0]; __pyx_result.signature = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 > 2);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result.components = __pyx_state[0]; __pyx_result.signature = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_FrameTypeDefinition__set_state(FrameTypeDefinition __pyx_result, tuple __pyx_state):
 *     __pyx_result.components = __pyx_state[0]; __pyx_result.signature = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_FrameTypeDefinition__set_state(<FrameTypeDefinition> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_FrameTypeDefinition__set_state(FrameTypeDefinition __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.components = __pyx_state[0]; __pyx_result.signature = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pysdif._pysdif.__pyx_unpickle_FrameTypeDefinition__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_FrameW(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pysdif_7_pysdif_29__pyx_unpickle_FrameW(PyObject *__pyx_self, 
#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_6pysdif_7_pysdif_28__pyx_unpickle_FrameW, "__pyx_unpickle_FrameW(__pyx_type, long __pyx_checksum, __pyx_state)");
static PyMethodDef __pyx_mdef_6pysdif_7_pysdif_29__pyx_unpickle_FrameW = {"__pyx_unpickle_FrameW", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_29__pyx_unpickle_FrameW, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_28__pyx_unpickle_FrameW};
static PyObject *__pyx_pw_6pysdif_7_pysdif_29__pyx_unpickle_FrameW(PyObject *__pyx_self, 
#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___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 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("__pyx_unpickle_FrameW (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __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 **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FrameW", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FrameW", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_FrameW") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FrameW", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("pysdif._pysdif.__pyx_unpickle_FrameW", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pysdif_7_pysdif_28__pyx_unpickle_FrameW(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pysdif_7_pysdif_28__pyx_unpickle_FrameW(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_FrameW", 1);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x703a645, 0x8ed5f60, 0xa0d104a):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x703a645, 0x8ed5f60, 0xa0d104a) = (_written, datatypes, frame_size, matrices, num_matrices, sdiffile, signature, signatures, streamID, time))" % __pyx_checksum
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__27, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x703a645, 0x8ed5f60, 0xa0d104a):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x703a645, 0x8ed5f60, 0xa0d104a) = (_written, datatypes, frame_size, matrices, num_matrices, sdiffile, signature, signatures, streamID, time))" % __pyx_checksum
 *     __pyx_result = FrameW.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x703a645, 0x8ed5f60, 0xa0d104a):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x703a645, 0x8ed5f60, 0xa0d104a) = (_written, datatypes, frame_size, matrices, num_matrices, sdiffile, signature, signatures, streamID, time))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = FrameW.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x703a645, 0x8ed5f60, 0xa0d104a):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x703a645, 0x8ed5f60, 0xa0d104a) = (_written, datatypes, frame_size, matrices, num_matrices, sdiffile, signature, signatures, streamID, time))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x703a645, 0x8ed5f60, 0xa0d104a) = (_written, datatypes, frame_size, matrices, num_matrices, sdiffile, signature, signatures, streamID, time))" % __pyx_checksum
 *     __pyx_result = FrameW.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FrameW__set_state(<FrameW> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pysdif_7_pysdif_FrameW), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x703a645, 0x8ed5f60, 0xa0d104a) = (_written, datatypes, frame_size, matrices, num_matrices, sdiffile, signature, signatures, streamID, time))" % __pyx_checksum
 *     __pyx_result = FrameW.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_FrameW__set_state(<FrameW> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = FrameW.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FrameW__set_state(<FrameW> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_FrameW__set_state(FrameW __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_1 = __pyx_f_6pysdif_7_pysdif___pyx_unpickle_FrameW__set_state(((struct __pyx_obj_6pysdif_7_pysdif_FrameW *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x703a645, 0x8ed5f60, 0xa0d104a) = (_written, datatypes, frame_size, matrices, num_matrices, sdiffile, signature, signatures, streamID, time))" % __pyx_checksum
 *     __pyx_result = FrameW.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_FrameW__set_state(<FrameW> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FrameW__set_state(<FrameW> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_FrameW__set_state(FrameW __pyx_result, tuple __pyx_state):
 *     __pyx_result._written = __pyx_state[0]; __pyx_result.datatypes = __pyx_state[1]; __pyx_result.frame_size = __pyx_state[2]; __pyx_result.matrices = __pyx_state[3]; __pyx_result.num_matrices = __pyx_state[4]; __pyx_result.sdiffile = __pyx_state[5]; __pyx_result.signature = __pyx_state[6]; __pyx_result.signatures = __pyx_state[7]; __pyx_result.streamID = __pyx_state[8]; __pyx_result.time = __pyx_state[9]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_FrameW(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pysdif._pysdif.__pyx_unpickle_FrameW", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_FrameW__set_state(<FrameW> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_FrameW__set_state(FrameW __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._written = __pyx_state[0]; __pyx_result.datatypes = __pyx_state[1]; __pyx_result.frame_size = __pyx_state[2]; __pyx_result.matrices = __pyx_state[3]; __pyx_result.num_matrices = __pyx_state[4]; __pyx_result.sdiffile = __pyx_state[5]; __pyx_result.signature = __pyx_state[6]; __pyx_result.signatures = __pyx_state[7]; __pyx_result.streamID = __pyx_state[8]; __pyx_result.time = __pyx_state[9]
 *     if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_6pysdif_7_pysdif___pyx_unpickle_FrameW__set_state(struct __pyx_obj_6pysdif_7_pysdif_FrameW *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3[0x64];
  SdifUInt4 __pyx_t_4;
  SdifSignature __pyx_t_5;
  SdifSignature __pyx_t_6[0x64];
  SdifFloat8 __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_FrameW__set_state", 1);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_FrameW__set_state(FrameW __pyx_result, tuple __pyx_state):
 *     __pyx_result._written = __pyx_state[0]; __pyx_result.datatypes = __pyx_state[1]; __pyx_result.frame_size = __pyx_state[2]; __pyx_result.matrices = __pyx_state[3]; __pyx_result.num_matrices = __pyx_state[4]; __pyx_result.sdiffile = __pyx_state[5]; __pyx_result.signature = __pyx_state[6]; __pyx_result.signatures = __pyx_state[7]; __pyx_result.streamID = __pyx_state[8]; __pyx_result.time = __pyx_state[9]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[10])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->_written = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely((__Pyx_carray_from_py_int(__pyx_t_1, __pyx_t_3, 0x64) < 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely((0x64) != (0x64))) {
    PyErr_Format(PyExc_ValueError, "Assignment to slice of wrong length, expected %" CYTHON_FORMAT_SSIZE_T "d, got %" CYTHON_FORMAT_SSIZE_T "d", (Py_ssize_t)(0x64), (Py_ssize_t)(0x64));
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  memcpy(&(__pyx_v___pyx_result->datatypes[0]), __pyx_t_3, sizeof(__pyx_v___pyx_result->datatypes[0]) * (0x64));
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_As_SdifUInt4(__pyx_t_1); if (unlikely((__pyx_t_4 == ((SdifUInt4)-1)) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->frame_size = __pyx_t_4;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->matrices);
  __Pyx_DECREF(__pyx_v___pyx_result->matrices);
  __pyx_v___pyx_result->matrices = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_As_SdifUInt4(__pyx_t_1); if (unlikely((__pyx_t_4 == ((SdifUInt4)-1)) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->num_matrices = __pyx_t_4;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pysdif_7_pysdif_SdifFile))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->sdiffile);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->sdiffile);
  __pyx_v___pyx_result->sdiffile = ((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyInt_As_SdifUInt4(__pyx_t_1); if (unlikely((__pyx_t_5 == ((SdifSignature)-1)) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->signature = __pyx_t_5;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely((__Pyx_carray_from_py_SdifSignature(__pyx_t_1, __pyx_t_6, 0x64) < 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely((0x64) != (0x64))) {
    PyErr_Format(PyExc_ValueError, "Assignment to slice of wrong length, expected %" CYTHON_FORMAT_SSIZE_T "d, got %" CYTHON_FORMAT_SSIZE_T "d", (Py_ssize_t)(0x64), (Py_ssize_t)(0x64));
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  memcpy(&(__pyx_v___pyx_result->signatures[0]), __pyx_t_6, sizeof(__pyx_v___pyx_result->signatures[0]) * (0x64));
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_As_SdifUInt4(__pyx_t_1); if (unlikely((__pyx_t_4 == ((SdifUInt4)-1)) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->streamID = __pyx_t_4;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_7 == ((SdifFloat8)-1)) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->time = __pyx_t_7;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_FrameW__set_state(FrameW __pyx_result, tuple __pyx_state):
 *     __pyx_result._written = __pyx_state[0]; __pyx_result.datatypes = __pyx_state[1]; __pyx_result.frame_size = __pyx_state[2]; __pyx_result.matrices = __pyx_state[3]; __pyx_result.num_matrices = __pyx_state[4]; __pyx_result.sdiffile = __pyx_state[5]; __pyx_result.signature = __pyx_state[6]; __pyx_result.signatures = __pyx_state[7]; __pyx_result.streamID = __pyx_state[8]; __pyx_result.time = __pyx_state[9]
 *     if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[10])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_9 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_10 = (__pyx_t_9 > 10);
  if (__pyx_t_10) {
  } else {
    __pyx_t_8 = __pyx_t_10;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_10 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_8 = __pyx_t_10;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_8) {

    /* "(tree fragment)":14
 *     __pyx_result._written = __pyx_state[0]; __pyx_result.datatypes = __pyx_state[1]; __pyx_result.frame_size = __pyx_state[2]; __pyx_result.matrices = __pyx_state[3]; __pyx_result.num_matrices = __pyx_state[4]; __pyx_result.sdiffile = __pyx_state[5]; __pyx_result.signature = __pyx_state[6]; __pyx_result.signatures = __pyx_state[7]; __pyx_result.streamID = __pyx_state[8]; __pyx_result.time = __pyx_state[9]
 *     if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[10])             # <<<<<<<<<<<<<<
 */
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_update); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_11 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_13 = NULL;
    __pyx_t_2 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
      if (likely(__pyx_t_13)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_12, function);
        __pyx_t_2 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_11};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_2, 1+__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_FrameW__set_state(FrameW __pyx_result, tuple __pyx_state):
 *     __pyx_result._written = __pyx_state[0]; __pyx_result.datatypes = __pyx_state[1]; __pyx_result.frame_size = __pyx_state[2]; __pyx_result.matrices = __pyx_state[3]; __pyx_result.num_matrices = __pyx_state[4]; __pyx_result.sdiffile = __pyx_state[5]; __pyx_result.signature = __pyx_state[6]; __pyx_result.signatures = __pyx_state[7]; __pyx_result.streamID = __pyx_state[8]; __pyx_result.time = __pyx_state[9]
 *     if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[10])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_FrameW__set_state(<FrameW> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_FrameW__set_state(FrameW __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._written = __pyx_state[0]; __pyx_result.datatypes = __pyx_state[1]; __pyx_result.frame_size = __pyx_state[2]; __pyx_result.matrices = __pyx_state[3]; __pyx_result.num_matrices = __pyx_state[4]; __pyx_result.sdiffile = __pyx_state[5]; __pyx_result.signature = __pyx_state[6]; __pyx_result.signatures = __pyx_state[7]; __pyx_result.streamID = __pyx_state[8]; __pyx_result.time = __pyx_state[9]
 *     if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'):
 */

  /* 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_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("pysdif._pysdif.__pyx_unpickle_FrameW__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_tp_new_6pysdif_7_pysdif_StreamID(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  if (unlikely(__pyx_pw_6pysdif_7_pysdif_8StreamID_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pysdif_7_pysdif_StreamID(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pysdif_7_pysdif_StreamID) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_6pysdif_7_pysdif_8StreamID_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
  (*Py_TYPE(o)->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_8StreamID_numid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_8StreamID_5numid_1__get__(o);
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_8StreamID_source(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_8StreamID_6source_1__get__(o);
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_8StreamID_treeway(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_8StreamID_7treeway_1__get__(o);
}

static PyObject *__pyx_specialmethod___pyx_pw_6pysdif_7_pysdif_8StreamID_5__repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  return __pyx_pw_6pysdif_7_pysdif_8StreamID_5__repr__(self);
}

static PyMethodDef __pyx_methods_6pysdif_7_pysdif_StreamID[] = {
  {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_6pysdif_7_pysdif_8StreamID_5__repr__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8StreamID_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8StreamID_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8StreamID_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8StreamID_8__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pysdif_7_pysdif_StreamID[] = {
  {(char *)"numid", __pyx_getprop_6pysdif_7_pysdif_8StreamID_numid, 0, (char *)0, 0},
  {(char *)"source", __pyx_getprop_6pysdif_7_pysdif_8StreamID_source, 0, (char *)0, 0},
  {(char *)"treeway", __pyx_getprop_6pysdif_7_pysdif_8StreamID_treeway, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pysdif_7_pysdif_StreamID_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pysdif_7_pysdif_StreamID},
  {Py_tp_repr, (void *)__pyx_pw_6pysdif_7_pysdif_8StreamID_5__repr__},
  {Py_tp_methods, (void *)__pyx_methods_6pysdif_7_pysdif_StreamID},
  {Py_tp_getset, (void *)__pyx_getsets_6pysdif_7_pysdif_StreamID},
  {Py_tp_new, (void *)__pyx_tp_new_6pysdif_7_pysdif_StreamID},
  {0, 0},
};
static PyType_Spec __pyx_type_6pysdif_7_pysdif_StreamID_spec = {
  "pysdif._pysdif.StreamID",
  sizeof(struct __pyx_obj_6pysdif_7_pysdif_StreamID),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_6pysdif_7_pysdif_StreamID_slots,
};
#else

static PyTypeObject __pyx_type_6pysdif_7_pysdif_StreamID = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysdif._pysdif.""StreamID", /*tp_name*/
  sizeof(struct __pyx_obj_6pysdif_7_pysdif_StreamID), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pysdif_7_pysdif_StreamID, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_6pysdif_7_pysdif_8StreamID_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pysdif_7_pysdif_StreamID, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pysdif_7_pysdif_StreamID, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pysdif_7_pysdif_StreamID, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pysdif_7_pysdif_MatrixTypeDefinition __pyx_vtable_6pysdif_7_pysdif_MatrixTypeDefinition;

static PyObject *__pyx_tp_new_6pysdif_7_pysdif_MatrixTypeDefinition(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pysdif_7_pysdif_MatrixTypeDefinition;
  p->signature = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->column_names = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pysdif_7_pysdif_MatrixTypeDefinition(PyObject *o) {
  struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *p = (struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pysdif_7_pysdif_MatrixTypeDefinition) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->signature);
  Py_CLEAR(p->column_names);
  #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
  (*Py_TYPE(o)->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
}

static int __pyx_tp_traverse_6pysdif_7_pysdif_MatrixTypeDefinition(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *p = (struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *)o;
  if (p->column_names) {
    e = (*v)(p->column_names, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pysdif_7_pysdif_MatrixTypeDefinition(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *p = (struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *)o;
  tmp = ((PyObject*)p->column_names);
  p->column_names = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_20MatrixTypeDefinition_signature(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_9signature_1__get__(o);
}

static int __pyx_setprop_6pysdif_7_pysdif_20MatrixTypeDefinition_signature(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_9signature_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_9signature_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_20MatrixTypeDefinition_column_names(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_12column_names_1__get__(o);
}

static int __pyx_setprop_6pysdif_7_pysdif_20MatrixTypeDefinition_column_names(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_12column_names_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_12column_names_5__del__(o);
  }
}

static PyObject *__pyx_specialmethod___pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_3__repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  return __pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_3__repr__(self);
}

static PyMethodDef __pyx_methods_6pysdif_7_pysdif_MatrixTypeDefinition[] = {
  {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_3__repr__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_20MatrixTypeDefinition_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_20MatrixTypeDefinition_6__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pysdif_7_pysdif_MatrixTypeDefinition[] = {
  {(char *)"signature", __pyx_getprop_6pysdif_7_pysdif_20MatrixTypeDefinition_signature, __pyx_setprop_6pysdif_7_pysdif_20MatrixTypeDefinition_signature, (char *)PyDoc_STR("signature: bytes"), 0},
  {(char *)"column_names", __pyx_getprop_6pysdif_7_pysdif_20MatrixTypeDefinition_column_names, __pyx_setprop_6pysdif_7_pysdif_20MatrixTypeDefinition_column_names, (char *)PyDoc_STR("column_names: list"), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pysdif_7_pysdif_MatrixTypeDefinition_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pysdif_7_pysdif_MatrixTypeDefinition},
  {Py_tp_repr, (void *)__pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_3__repr__},
  {Py_tp_doc, (void *)PyDoc_STR("MatrixTypeDefinition(signature, list column_names)")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pysdif_7_pysdif_MatrixTypeDefinition},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pysdif_7_pysdif_MatrixTypeDefinition},
  {Py_tp_methods, (void *)__pyx_methods_6pysdif_7_pysdif_MatrixTypeDefinition},
  {Py_tp_getset, (void *)__pyx_getsets_6pysdif_7_pysdif_MatrixTypeDefinition},
  {Py_tp_init, (void *)__pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pysdif_7_pysdif_MatrixTypeDefinition},
  {0, 0},
};
static PyType_Spec __pyx_type_6pysdif_7_pysdif_MatrixTypeDefinition_spec = {
  "pysdif._pysdif.MatrixTypeDefinition",
  sizeof(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pysdif_7_pysdif_MatrixTypeDefinition_slots,
};
#else

static PyTypeObject __pyx_type_6pysdif_7_pysdif_MatrixTypeDefinition = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysdif._pysdif.""MatrixTypeDefinition", /*tp_name*/
  sizeof(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pysdif_7_pysdif_MatrixTypeDefinition, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_3__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("MatrixTypeDefinition(signature, list column_names)"), /*tp_doc*/
  __pyx_tp_traverse_6pysdif_7_pysdif_MatrixTypeDefinition, /*tp_traverse*/
  __pyx_tp_clear_6pysdif_7_pysdif_MatrixTypeDefinition, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pysdif_7_pysdif_MatrixTypeDefinition, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pysdif_7_pysdif_MatrixTypeDefinition, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pysdif_7_pysdif_20MatrixTypeDefinition_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pysdif_7_pysdif_MatrixTypeDefinition, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_6pysdif_7_pysdif_Component(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pysdif_7_pysdif_Component *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_6pysdif_7_pysdif_Component *)o);
  p->signature = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->name = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pysdif_7_pysdif_Component(PyObject *o) {
  struct __pyx_obj_6pysdif_7_pysdif_Component *p = (struct __pyx_obj_6pysdif_7_pysdif_Component *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pysdif_7_pysdif_Component) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  Py_CLEAR(p->signature);
  Py_CLEAR(p->name);
  #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
  (*Py_TYPE(o)->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_9Component_signature(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_9Component_9signature_1__get__(o);
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_9Component_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_9Component_4name_1__get__(o);
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_9Component_num(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_9Component_3num_1__get__(o);
}

static PyObject *__pyx_specialmethod___pyx_pw_6pysdif_7_pysdif_9Component_3__repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  return __pyx_pw_6pysdif_7_pysdif_9Component_3__repr__(self);
}

static PyMethodDef __pyx_methods_6pysdif_7_pysdif_Component[] = {
  {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_6pysdif_7_pysdif_9Component_3__repr__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_9Component_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_9Component_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_9Component_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_9Component_6__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pysdif_7_pysdif_Component[] = {
  {(char *)"signature", __pyx_getprop_6pysdif_7_pysdif_9Component_signature, 0, (char *)0, 0},
  {(char *)"name", __pyx_getprop_6pysdif_7_pysdif_9Component_name, 0, (char *)0, 0},
  {(char *)"num", __pyx_getprop_6pysdif_7_pysdif_9Component_num, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pysdif_7_pysdif_Component_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pysdif_7_pysdif_Component},
  {Py_tp_repr, (void *)__pyx_pw_6pysdif_7_pysdif_9Component_3__repr__},
  {Py_tp_doc, (void *)PyDoc_STR("Component(signature, name, num=0)")},
  {Py_tp_methods, (void *)__pyx_methods_6pysdif_7_pysdif_Component},
  {Py_tp_getset, (void *)__pyx_getsets_6pysdif_7_pysdif_Component},
  {Py_tp_init, (void *)__pyx_pw_6pysdif_7_pysdif_9Component_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pysdif_7_pysdif_Component},
  {0, 0},
};
static PyType_Spec __pyx_type_6pysdif_7_pysdif_Component_spec = {
  "pysdif._pysdif.Component",
  sizeof(struct __pyx_obj_6pysdif_7_pysdif_Component),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_6pysdif_7_pysdif_Component_slots,
};
#else

static PyTypeObject __pyx_type_6pysdif_7_pysdif_Component = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysdif._pysdif.""Component", /*tp_name*/
  sizeof(struct __pyx_obj_6pysdif_7_pysdif_Component), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pysdif_7_pysdif_Component, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_6pysdif_7_pysdif_9Component_3__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("Component(signature, name, num=0)"), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pysdif_7_pysdif_Component, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pysdif_7_pysdif_Component, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pysdif_7_pysdif_9Component_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pysdif_7_pysdif_Component, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_6pysdif_7_pysdif_FrameTypeDefinition(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *)o);
  p->signature = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->components = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pysdif_7_pysdif_FrameTypeDefinition(PyObject *o) {
  struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *p = (struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pysdif_7_pysdif_FrameTypeDefinition) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->signature);
  Py_CLEAR(p->components);
  #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
  (*Py_TYPE(o)->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
}

static int __pyx_tp_traverse_6pysdif_7_pysdif_FrameTypeDefinition(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *p = (struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *)o;
  if (p->components) {
    e = (*v)(p->components, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pysdif_7_pysdif_FrameTypeDefinition(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *p = (struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition *)o;
  tmp = ((PyObject*)p->components);
  p->components = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_19FrameTypeDefinition_signature(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_9signature_1__get__(o);
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_19FrameTypeDefinition_components(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_10components_1__get__(o);
}

static PyObject *__pyx_specialmethod___pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_3__repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  return __pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_3__repr__(self);
}

static PyMethodDef __pyx_methods_6pysdif_7_pysdif_FrameTypeDefinition[] = {
  {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_3__repr__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_19FrameTypeDefinition_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_19FrameTypeDefinition_6__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pysdif_7_pysdif_FrameTypeDefinition[] = {
  {(char *)"signature", __pyx_getprop_6pysdif_7_pysdif_19FrameTypeDefinition_signature, 0, (char *)0, 0},
  {(char *)"components", __pyx_getprop_6pysdif_7_pysdif_19FrameTypeDefinition_components, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pysdif_7_pysdif_FrameTypeDefinition_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pysdif_7_pysdif_FrameTypeDefinition},
  {Py_tp_repr, (void *)__pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_3__repr__},
  {Py_tp_doc, (void *)PyDoc_STR("FrameTypeDefinition(signature, components)")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pysdif_7_pysdif_FrameTypeDefinition},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pysdif_7_pysdif_FrameTypeDefinition},
  {Py_tp_methods, (void *)__pyx_methods_6pysdif_7_pysdif_FrameTypeDefinition},
  {Py_tp_getset, (void *)__pyx_getsets_6pysdif_7_pysdif_FrameTypeDefinition},
  {Py_tp_init, (void *)__pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pysdif_7_pysdif_FrameTypeDefinition},
  {0, 0},
};
static PyType_Spec __pyx_type_6pysdif_7_pysdif_FrameTypeDefinition_spec = {
  "pysdif._pysdif.FrameTypeDefinition",
  sizeof(struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pysdif_7_pysdif_FrameTypeDefinition_slots,
};
#else

static PyTypeObject __pyx_type_6pysdif_7_pysdif_FrameTypeDefinition = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysdif._pysdif.""FrameTypeDefinition", /*tp_name*/
  sizeof(struct __pyx_obj_6pysdif_7_pysdif_FrameTypeDefinition), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pysdif_7_pysdif_FrameTypeDefinition, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_3__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("FrameTypeDefinition(signature, components)"), /*tp_doc*/
  __pyx_tp_traverse_6pysdif_7_pysdif_FrameTypeDefinition, /*tp_traverse*/
  __pyx_tp_clear_6pysdif_7_pysdif_FrameTypeDefinition, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pysdif_7_pysdif_FrameTypeDefinition, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pysdif_7_pysdif_FrameTypeDefinition, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pysdif_7_pysdif_19FrameTypeDefinition_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pysdif_7_pysdif_FrameTypeDefinition, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_6pysdif_7_pysdif_FrameR(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pysdif_7_pysdif_FrameR *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_6pysdif_7_pysdif_FrameR *)o);
  p->source = ((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6pysdif_7_pysdif_6FrameR_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pysdif_7_pysdif_FrameR(PyObject *o) {
  struct __pyx_obj_6pysdif_7_pysdif_FrameR *p = (struct __pyx_obj_6pysdif_7_pysdif_FrameR *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pysdif_7_pysdif_FrameR) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_6pysdif_7_pysdif_6FrameR_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->source);
  #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
  (*Py_TYPE(o)->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
}

static int __pyx_tp_traverse_6pysdif_7_pysdif_FrameR(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pysdif_7_pysdif_FrameR *p = (struct __pyx_obj_6pysdif_7_pysdif_FrameR *)o;
  if (p->source) {
    e = (*v)(((PyObject *)p->source), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pysdif_7_pysdif_FrameR(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pysdif_7_pysdif_FrameR *p = (struct __pyx_obj_6pysdif_7_pysdif_FrameR *)o;
  tmp = ((PyObject*)p->source);
  p->source = ((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_6FrameR_signature(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_6FrameR_9signature_1__get__(o);
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_6FrameR_numerical_signature(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_6FrameR_19numerical_signature_1__get__(o);
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_6FrameR_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_6FrameR_4size_1__get__(o);
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_6FrameR_num_matrices(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_6FrameR_12num_matrices_1__get__(o);
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_6FrameR_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_6FrameR_2id_1__get__(o);
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_6FrameR_time(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_6FrameR_4time_1__get__(o);
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_6FrameR_matrix_idx(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_6FrameR_10matrix_idx_1__get__(o);
}

static PyObject *__pyx_specialmethod___pyx_pw_6pysdif_7_pysdif_6FrameR_5__repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  return __pyx_pw_6pysdif_7_pysdif_6FrameR_5__repr__(self);
}
static PyObject *__pyx_specialmethod___pyx_pw_6pysdif_7_pysdif_6FrameR_11__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  PyObject *res = __pyx_pw_6pysdif_7_pysdif_6FrameR_11__next__(self);
  if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); }
  return res;
}

static PyMethodDef __pyx_methods_6pysdif_7_pysdif_FrameR[] = {
  {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_6pysdif_7_pysdif_6FrameR_5__repr__, METH_NOARGS|METH_COEXIST, 0},
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_6pysdif_7_pysdif_6FrameR_11__next__, METH_NOARGS|METH_COEXIST, __pyx_doc_6pysdif_7_pysdif_6FrameR_10__next__},
  {"get_matrix", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6FrameR_13get_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6FrameR_12get_matrix},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6FrameR_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6FrameR_14__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6FrameR_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6FrameR_16__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pysdif_7_pysdif_FrameR[] = {
  {(char *)"signature", __pyx_getprop_6pysdif_7_pysdif_6FrameR_signature, 0, (char *)PyDoc_STR(" (str) The string signature of this frame "), 0},
  {(char *)"numerical_signature", __pyx_getprop_6pysdif_7_pysdif_6FrameR_numerical_signature, 0, (char *)0, 0},
  {(char *)"size", __pyx_getprop_6pysdif_7_pysdif_6FrameR_size, 0, (char *)PyDoc_STR("\n        (int) The size of this frame in bytes\n        "), 0},
  {(char *)"num_matrices", __pyx_getprop_6pysdif_7_pysdif_6FrameR_num_matrices, 0, (char *)PyDoc_STR("\n        (int) The number of matrices in this frame\n        "), 0},
  {(char *)"id", __pyx_getprop_6pysdif_7_pysdif_6FrameR_id, 0, (char *)PyDoc_STR(" (int) The id of this frame "), 0},
  {(char *)"time", __pyx_getprop_6pysdif_7_pysdif_6FrameR_time, 0, (char *)PyDoc_STR(" (float) The time of this frame "), 0},
  {(char *)"matrix_idx", __pyx_getprop_6pysdif_7_pysdif_6FrameR_matrix_idx, 0, (char *)PyDoc_STR("The index of the current matrix"), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pysdif_7_pysdif_FrameR_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pysdif_7_pysdif_FrameR},
  {Py_tp_repr, (void *)__pyx_pw_6pysdif_7_pysdif_6FrameR_5__repr__},
  {Py_sq_length, (void *)__pyx_pw_6pysdif_7_pysdif_6FrameR_7__len__},
  {Py_mp_length, (void *)__pyx_pw_6pysdif_7_pysdif_6FrameR_7__len__},
  {Py_tp_doc, (void *)PyDoc_STR("\n    FrameR is an iterator over the matrices of a frame. \n    \n    Access the matrices by iterating on the frame, or calling \n    next(frame). \n\n    !!! note\n\n        A `FrameR` is not created by a user, it is yielded by\n        a SdifFile on iteration.\n\n    Args:\n        source (SdifFile): the sidffile this frame belongs to\n\n    ## Example\n    \n    ```python\n\n    import pysdif\n    sdiffile = pysdif.SdifFile(\"1trc.sdif\")\n    # Iterating over a SdifFile open for reading yields FrameR\n    for frame in sdiffile:\n        print(frame.signature, frame.time)\n        # iterating over a frame yields the matrices present in the frame\n        for matrix in frame:\n            print(matrix.signature, matrix.get_data())\n    \n    ```\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pysdif_7_pysdif_FrameR},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pysdif_7_pysdif_FrameR},
  {Py_tp_iter, (void *)__pyx_pw_6pysdif_7_pysdif_6FrameR_9__iter__},
  {Py_tp_iternext, (void *)__pyx_pw_6pysdif_7_pysdif_6FrameR_11__next__},
  {Py_tp_methods, (void *)__pyx_methods_6pysdif_7_pysdif_FrameR},
  {Py_tp_getset, (void *)__pyx_getsets_6pysdif_7_pysdif_FrameR},
  {Py_tp_new, (void *)__pyx_tp_new_6pysdif_7_pysdif_FrameR},
  {0, 0},
};
static PyType_Spec __pyx_type_6pysdif_7_pysdif_FrameR_spec = {
  "pysdif._pysdif.FrameR",
  sizeof(struct __pyx_obj_6pysdif_7_pysdif_FrameR),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pysdif_7_pysdif_FrameR_slots,
};
#else

static PySequenceMethods __pyx_tp_as_sequence_FrameR = {
  __pyx_pw_6pysdif_7_pysdif_6FrameR_7__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_FrameR = {
  __pyx_pw_6pysdif_7_pysdif_6FrameR_7__len__, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_6pysdif_7_pysdif_FrameR = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysdif._pysdif.""FrameR", /*tp_name*/
  sizeof(struct __pyx_obj_6pysdif_7_pysdif_FrameR), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pysdif_7_pysdif_FrameR, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_6pysdif_7_pysdif_6FrameR_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_FrameR, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_FrameR, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    FrameR is an iterator over the matrices of a frame. \n    \n    Access the matrices by iterating on the frame, or calling \n    next(frame). \n\n    !!! note\n\n        A `FrameR` is not created by a user, it is yielded by\n        a SdifFile on iteration.\n\n    Args:\n        source (SdifFile): the sidffile this frame belongs to\n\n    ## Example\n    \n    ```python\n\n    import pysdif\n    sdiffile = pysdif.SdifFile(\"1trc.sdif\")\n    # Iterating over a SdifFile open for reading yields FrameR\n    for frame in sdiffile:\n        print(frame.signature, frame.time)\n        # iterating over a frame yields the matrices present in the frame\n        for matrix in frame:\n            print(matrix.signature, matrix.get_data())\n    \n    ```\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pysdif_7_pysdif_FrameR, /*tp_traverse*/
  __pyx_tp_clear_6pysdif_7_pysdif_FrameR, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_6pysdif_7_pysdif_6FrameR_9__iter__, /*tp_iter*/
  __pyx_pw_6pysdif_7_pysdif_6FrameR_11__next__, /*tp_iternext*/
  __pyx_methods_6pysdif_7_pysdif_FrameR, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pysdif_7_pysdif_FrameR, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pysdif_7_pysdif_FrameR, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6pysdif_7_pysdif_SdifFile __pyx_vtable_6pysdif_7_pysdif_SdifFile;

static PyObject *__pyx_tp_new_6pysdif_7_pysdif_SdifFile(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pysdif_7_pysdif_SdifFile *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pysdif_7_pysdif_SdifFile;
  p->frame = ((struct __pyx_obj_6pysdif_7_pysdif_FrameR *)Py_None); Py_INCREF(Py_None);
  p->matrix = ((struct __pyx_obj_6pysdif_7_pysdif_Matrix *)Py_None); Py_INCREF(Py_None);
  p->_frametypes_defined = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_matrixtypes_defined = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6pysdif_7_pysdif_8SdifFile_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pysdif_7_pysdif_SdifFile(PyObject *o) {
  struct __pyx_obj_6pysdif_7_pysdif_SdifFile *p = (struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pysdif_7_pysdif_SdifFile) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_6pysdif_7_pysdif_8SdifFile_7__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->frame);
  Py_CLEAR(p->matrix);
  Py_CLEAR(p->_frametypes_defined);
  Py_CLEAR(p->_matrixtypes_defined);
  #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
  (*Py_TYPE(o)->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
}

static int __pyx_tp_traverse_6pysdif_7_pysdif_SdifFile(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pysdif_7_pysdif_SdifFile *p = (struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)o;
  if (p->frame) {
    e = (*v)(((PyObject *)p->frame), a); if (e) return e;
  }
  if (p->matrix) {
    e = (*v)(((PyObject *)p->matrix), a); if (e) return e;
  }
  if (p->_frametypes_defined) {
    e = (*v)(p->_frametypes_defined, a); if (e) return e;
  }
  if (p->_matrixtypes_defined) {
    e = (*v)(p->_matrixtypes_defined, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pysdif_7_pysdif_SdifFile(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pysdif_7_pysdif_SdifFile *p = (struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)o;
  tmp = ((PyObject*)p->frame);
  p->frame = ((struct __pyx_obj_6pysdif_7_pysdif_FrameR *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->matrix);
  p->matrix = ((struct __pyx_obj_6pysdif_7_pysdif_Matrix *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_frametypes_defined);
  p->_frametypes_defined = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_matrixtypes_defined);
  p->_matrixtypes_defined = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_8SdifFile_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_8SdifFile_4name_1__get__(o);
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_8SdifFile_mode(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_8SdifFile_4mode_1__get__(o);
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_8SdifFile_is_seekable(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_8SdifFile_11is_seekable_1__get__(o);
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_8SdifFile_numerical_signature(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_8SdifFile_19numerical_signature_1__get__(o);
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_8SdifFile_signature(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_8SdifFile_9signature_1__get__(o);
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_8SdifFile_prev_time(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_8SdifFile_9prev_time_1__get__(o);
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_8SdifFile_frame_pos(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_8SdifFile_9frame_pos_1__get__(o);
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_8SdifFile_pos(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_8SdifFile_3pos_1__get__(o);
}

static int __pyx_setprop_6pysdif_7_pysdif_8SdifFile_pos(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6pysdif_7_pysdif_8SdifFile_3pos_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_8SdifFile_eof(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_8SdifFile_3eof_1__get__(o);
}

static PyObject *__pyx_specialmethod___pyx_pw_6pysdif_7_pysdif_8SdifFile_5__repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  return __pyx_pw_6pysdif_7_pysdif_8SdifFile_5__repr__(self);
}
static PyObject *__pyx_specialmethod___pyx_pw_6pysdif_7_pysdif_8SdifFile_59__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  PyObject *res = __pyx_pw_6pysdif_7_pysdif_8SdifFile_59__next__(self);
  if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); }
  return res;
}

static PyMethodDef __pyx_methods_6pysdif_7_pysdif_SdifFile[] = {
  {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_6pysdif_7_pysdif_8SdifFile_5__repr__, METH_NOARGS|METH_COEXIST, 0},
  {"close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_9close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_8close},
  {"curr_matrix_size", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_11curr_matrix_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_10curr_matrix_size},
  {"curr_matrix_datatype", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_13curr_matrix_datatype, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_12curr_matrix_datatype},
  {"curr_signature", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_15curr_signature, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_14curr_signature},
  {"curr_matrix_signature", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_17curr_matrix_signature, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_16curr_matrix_signature},
  {"frame_num_matrix", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_19frame_num_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_18frame_num_matrix},
  {"frame_id", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_21frame_id, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_20frame_id},
  {"frame_numerical_signature", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_23frame_numerical_signature, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_22frame_numerical_signature},
  {"frame_signature", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_25frame_signature, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_24frame_signature},
  {"frame_time", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_27frame_time, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_26frame_time},
  {"last_error", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_29last_error, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_28last_error},
  {"curr_frame_is_selected", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_31curr_frame_is_selected, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_30curr_frame_is_selected},
  {"curr_matrix_is_selected", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_33curr_matrix_is_selected, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_32curr_matrix_is_selected},
  {"get_num_NVTs", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_35get_num_NVTs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_34get_num_NVTs},
  {"frame_read_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_37frame_read_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_36frame_read_header},
  {"frame_skip_data", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_39frame_skip_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_38frame_skip_data},
  {"matrix_read_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_43matrix_read_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_42matrix_read_header},
  {"curr_frame_available", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_45curr_frame_available, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_44curr_frame_available},
  {"curr_matrix_available", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_47curr_matrix_available, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_46curr_matrix_available},
  {"matrix_skip_data", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_49matrix_skip_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_48matrix_skip_data},
  {"matrix_read_data", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_51matrix_read_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_50matrix_read_data},
  {"matrix_skip", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_53matrix_skip, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_52matrix_skip},
  {"status", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_55status, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_54status},
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_6pysdif_7_pysdif_8SdifFile_59__next__, METH_NOARGS|METH_COEXIST, 0},
  {"next_frame", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_61next_frame, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_60next_frame},
  {"__enter__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_63__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_62__enter__},
  {"__exit__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_65__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_64__exit__},
  {"frame_skip_rest", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_67frame_skip_rest, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_66frame_skip_rest},
  {"next_matrix", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_69next_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_68next_matrix},
  {"rewind", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_71rewind, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_70rewind},
  {"_rewind", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_73_rewind, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_72_rewind},
  {"_read_padding", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_75_read_padding, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_74_read_padding},
  {"add_NVT", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_77add_NVT, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_76add_NVT},
  {"add_matrix_type", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_79add_matrix_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_78add_matrix_type},
  {"add_frame_type", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_81add_frame_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_80add_frame_type},
  {"clone_type_definitions", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_83clone_type_definitions, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_82clone_type_definitions},
  {"clone_NVTs", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_85clone_NVTs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_84clone_NVTs},
  {"clone_definitions", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_87clone_definitions, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_86clone_definitions},
  {"clone_frames", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_89clone_frames, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_88clone_frames},
  {"add_streamID", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_91add_streamID, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_90add_streamID},
  {"add_predefined_frametype", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_93add_predefined_frametype, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_92add_predefined_frametype},
  {"write_all_ascii_chunks", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_95write_all_ascii_chunks, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_94write_all_ascii_chunks},
  {"new_frame", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_97new_frame, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_96new_frame},
  {"new_frame_one_matrix", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_99new_frame_one_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_98new_frame_one_matrix},
  {"print_NVT", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_101print_NVT, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_100print_NVT},
  {"print_general_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_103print_general_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_102print_general_header},
  {"print_all_ascii_chunks", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_105print_all_ascii_chunks, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_104print_all_ascii_chunks},
  {"print_all_types", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_107print_all_types, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_106print_all_types},
  {"print_matrix_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_109print_matrix_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_108print_matrix_header},
  {"print_one_row", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_111print_one_row, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_110print_one_row},
  {"print_frame_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_113print_frame_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_112print_frame_header},
  {"print_all_stream_ID", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_115print_all_stream_ID, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_114print_all_stream_ID},
  {"frame_types_to_string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_117frame_types_to_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_116frame_types_to_string},
  {"get_frame_types", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_119get_frame_types, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_118get_frame_types},
  {"matrix_types_to_string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_121matrix_types_to_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_120matrix_types_to_string},
  {"get_matrix_types", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_123get_matrix_types, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_122get_matrix_types},
  {"get_NVTs", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_125get_NVTs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_124get_NVTs},
  {"get_stream_IDs", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_127get_stream_IDs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_126get_stream_IDs},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_129__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_128__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_8SdifFile_131__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_8SdifFile_130__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pysdif_7_pysdif_SdifFile[] = {
  {(char *)"name", __pyx_getprop_6pysdif_7_pysdif_8SdifFile_name, 0, (char *)PyDoc_STR("(str) The name of this sdif file"), 0},
  {(char *)"mode", __pyx_getprop_6pysdif_7_pysdif_8SdifFile_mode, 0, (char *)PyDoc_STR("\n        (str) The mode in which this sdif file was opened ('r', 'w')\n        "), 0},
  {(char *)"is_seekable", __pyx_getprop_6pysdif_7_pysdif_8SdifFile_is_seekable, 0, (char *)PyDoc_STR("\n        (bool) Is this SdifFile seekable?\n        "), 0},
  {(char *)"numerical_signature", __pyx_getprop_6pysdif_7_pysdif_8SdifFile_numerical_signature, 0, (char *)PyDoc_STR("\n        (int) Current signature as numerical signature\n        "), 0},
  {(char *)"signature", __pyx_getprop_6pysdif_7_pysdif_8SdifFile_signature, 0, (char *)PyDoc_STR("(str) Current signature as 4-byte string "), 0},
  {(char *)"prev_time", __pyx_getprop_6pysdif_7_pysdif_8SdifFile_prev_time, 0, (char *)PyDoc_STR("(float) The previous time"), 0},
  {(char *)"frame_pos", __pyx_getprop_6pysdif_7_pysdif_8SdifFile_frame_pos, 0, (char *)PyDoc_STR("\n        (int) The current frame position\n        "), 0},
  {(char *)"pos", __pyx_getprop_6pysdif_7_pysdif_8SdifFile_pos, __pyx_setprop_6pysdif_7_pysdif_8SdifFile_pos, (char *)PyDoc_STR("The last position read"), 0},
  {(char *)"eof", __pyx_getprop_6pysdif_7_pysdif_8SdifFile_eof, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pysdif_7_pysdif_SdifFile_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pysdif_7_pysdif_SdifFile},
  {Py_tp_repr, (void *)__pyx_pw_6pysdif_7_pysdif_8SdifFile_5__repr__},
  {Py_tp_doc, (void *)PyDoc_STR("SdifFile(str filename, mode='r')\n\n    This is a wrapper around a SdifFileT c-struct (`sdif.h`)\n    \n    It enables to read and write a SDIF file of any form.\n    It provides **two interfaces**: a **low-level interface**, which\n    reflects the original implementation and requires that the \n    user is acquainted with the internal structure of a SDIF file; and\n    a **high-level interface** which takes care of most of the book-keeping.\n\n    ```python\n    \n    SdifFile(filename: str, mode=\"r\")\n    \n    ```\n\n    Args:\n        filename (str):  path to a sdif file\n        mode (str): \"r\" = read, \"w\" = write, \"rw\" = read+write\n\n\n    ## Example 1: read a sdiffile \n\n    ** High-Level Interface **\n\n    ```python\n\n    s = SdifFile(\"mysdif.sdif\")\n    for frame in s:\n        print(frame.time)\n        for matrix in frame:\n            numpyarray = matrix.get_data()\n            print(numpyarray)\n    ```\n\n    ** Low-Level Interface **\n\n    ```python\n    s = SdifFile(\"mysdif.sdif\")\n    while True:\n        s.frame_read_header()\n        if s.eof:\n            break\n        print(s.frame_time())\n        for idx in range(s.frame_num_matrix()):\n            print(s.matrix_read_data())\n    ```\n\n    ## Example 2: write a sdiffile\n\n    ```python\n\n    insdif = SdifFile(\"mysdif.sdif\")\n    outsdif = SdifFile(\"outsdif.sdif\", \"w\").clone_definitions(insdif)\n    for inframe in insdif:\n        if inframe.signature != b'1SIG':\n            continue\n        with outsdif.new_frame(inframe.signature, inframe.time) as outframe:\n            for m in inframe:\n                outframe.add_matrix(m.signature, m.get_data())\n    outsdif.close()\n    \n    ```\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pysdif_7_pysdif_SdifFile},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pysdif_7_pysdif_SdifFile},
  {Py_tp_iter, (void *)__pyx_pw_6pysdif_7_pysdif_8SdifFile_57__iter__},
  {Py_tp_iternext, (void *)__pyx_pw_6pysdif_7_pysdif_8SdifFile_59__next__},
  {Py_tp_methods, (void *)__pyx_methods_6pysdif_7_pysdif_SdifFile},
  {Py_tp_getset, (void *)__pyx_getsets_6pysdif_7_pysdif_SdifFile},
  {Py_tp_init, (void *)__pyx_pw_6pysdif_7_pysdif_8SdifFile_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pysdif_7_pysdif_SdifFile},
  {0, 0},
};
static PyType_Spec __pyx_type_6pysdif_7_pysdif_SdifFile_spec = {
  "pysdif._pysdif.SdifFile",
  sizeof(struct __pyx_obj_6pysdif_7_pysdif_SdifFile),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pysdif_7_pysdif_SdifFile_slots,
};
#else

static PyTypeObject __pyx_type_6pysdif_7_pysdif_SdifFile = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysdif._pysdif.""SdifFile", /*tp_name*/
  sizeof(struct __pyx_obj_6pysdif_7_pysdif_SdifFile), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pysdif_7_pysdif_SdifFile, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_6pysdif_7_pysdif_8SdifFile_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("SdifFile(str filename, mode='r')\n\n    This is a wrapper around a SdifFileT c-struct (`sdif.h`)\n    \n    It enables to read and write a SDIF file of any form.\n    It provides **two interfaces**: a **low-level interface**, which\n    reflects the original implementation and requires that the \n    user is acquainted with the internal structure of a SDIF file; and\n    a **high-level interface** which takes care of most of the book-keeping.\n\n    ```python\n    \n    SdifFile(filename: str, mode=\"r\")\n    \n    ```\n\n    Args:\n        filename (str):  path to a sdif file\n        mode (str): \"r\" = read, \"w\" = write, \"rw\" = read+write\n\n\n    ## Example 1: read a sdiffile \n\n    ** High-Level Interface **\n\n    ```python\n\n    s = SdifFile(\"mysdif.sdif\")\n    for frame in s:\n        print(frame.time)\n        for matrix in frame:\n            numpyarray = matrix.get_data()\n            print(numpyarray)\n    ```\n\n    ** Low-Level Interface **\n\n    ```python\n    s = SdifFile(\"mysdif.sdif\")\n    while True:\n        s.frame_read_header()\n        if s.eof:\n            break\n        print(s.frame_time())\n        for idx in range(s.frame_num_matrix()):\n            print(s.matrix_read_data())\n    ```\n\n    ## Example 2: write a sdiffile\n\n    ```python\n\n    insdif = SdifFile(\"mysdif.sdif\")\n    outsdif = SdifFile(\"outsdif.sdif\", \"w\").clone_definitions(insdif)\n    for inframe in insdif:\n        if inframe.signature != b'1SIG':\n            continue\n        with outsdif.new_frame(inframe.signature, inframe.time) as outframe:\n            for m in inframe:\n                outframe.add_matrix(m.signature, m.get_data())\n    outsdif.close()\n    \n    ```\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pysdif_7_pysdif_SdifFile, /*tp_traverse*/
  __pyx_tp_clear_6pysdif_7_pysdif_SdifFile, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_6pysdif_7_pysdif_8SdifFile_57__iter__, /*tp_iter*/
  __pyx_pw_6pysdif_7_pysdif_8SdifFile_59__next__, /*tp_iternext*/
  __pyx_methods_6pysdif_7_pysdif_SdifFile, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pysdif_7_pysdif_SdifFile, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pysdif_7_pysdif_8SdifFile_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pysdif_7_pysdif_SdifFile, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_6pysdif_7_pysdif_Matrix(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pysdif_7_pysdif_Matrix *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_6pysdif_7_pysdif_Matrix *)o);
  p->source = ((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)Py_None); Py_INCREF(Py_None);
  p->data = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6pysdif_7_pysdif_6Matrix_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6pysdif_7_pysdif_Matrix(PyObject *o) {
  struct __pyx_obj_6pysdif_7_pysdif_Matrix *p = (struct __pyx_obj_6pysdif_7_pysdif_Matrix *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pysdif_7_pysdif_Matrix) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->source);
  Py_CLEAR(p->data);
  #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
  (*Py_TYPE(o)->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
}

static int __pyx_tp_traverse_6pysdif_7_pysdif_Matrix(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pysdif_7_pysdif_Matrix *p = (struct __pyx_obj_6pysdif_7_pysdif_Matrix *)o;
  if (p->source) {
    e = (*v)(((PyObject *)p->source), a); if (e) return e;
  }
  if (p->data) {
    e = (*v)(((PyObject *)p->data), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pysdif_7_pysdif_Matrix(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pysdif_7_pysdif_Matrix *p = (struct __pyx_obj_6pysdif_7_pysdif_Matrix *)o;
  tmp = ((PyObject*)p->source);
  p->source = ((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->data);
  p->data = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_6Matrix_rows(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_6Matrix_4rows_1__get__(o);
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_6Matrix_cols(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_6Matrix_4cols_1__get__(o);
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_6Matrix_dtype(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_6Matrix_5dtype_1__get__(o);
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_6Matrix_signature(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_6Matrix_9signature_1__get__(o);
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_6Matrix_numerical_signature(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_6Matrix_19numerical_signature_1__get__(o);
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_6Matrix_status(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_6Matrix_6status_1__get__(o);
}

static PyObject *__pyx_specialmethod___pyx_pw_6pysdif_7_pysdif_6Matrix_9__repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  return __pyx_pw_6pysdif_7_pysdif_6Matrix_9__repr__(self);
}

static PyMethodDef __pyx_methods_6pysdif_7_pysdif_Matrix[] = {
  {"get_data", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6Matrix_3get_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6Matrix_2get_data},
  {"column_names", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6Matrix_5column_names, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6Matrix_4column_names},
  {"skip", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6Matrix_7skip, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6Matrix_6skip},
  {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_6pysdif_7_pysdif_6Matrix_9__repr__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6Matrix_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6Matrix_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6Matrix_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6Matrix_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pysdif_7_pysdif_Matrix[] = {
  {(char *)"rows", __pyx_getprop_6pysdif_7_pysdif_6Matrix_rows, 0, (char *)0, 0},
  {(char *)"cols", __pyx_getprop_6pysdif_7_pysdif_6Matrix_cols, 0, (char *)0, 0},
  {(char *)"dtype", __pyx_getprop_6pysdif_7_pysdif_6Matrix_dtype, 0, (char *)0, 0},
  {(char *)"signature", __pyx_getprop_6pysdif_7_pysdif_6Matrix_signature, 0, (char *)0, 0},
  {(char *)"numerical_signature", __pyx_getprop_6pysdif_7_pysdif_6Matrix_numerical_signature, 0, (char *)0, 0},
  {(char *)"status", __pyx_getprop_6pysdif_7_pysdif_6Matrix_status, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pysdif_7_pysdif_Matrix_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pysdif_7_pysdif_Matrix},
  {Py_tp_repr, (void *)__pyx_pw_6pysdif_7_pysdif_6Matrix_9__repr__},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Matrix is a placeholder class to iterate through data while reading a SdifFile\n\n    In particular the default behaviour is that when you are given a Matrix, \n    this is only valid until a new one is read.\n    \n    See the methods `get_data` and `copy` for a better explanation of how to \n    make the data in the Matrix persistent\n\n    Args:\n        source (SdifFile): The source sdiffile this matrix belongs to\n    \n    ## Example\n\n    ```python\n    from pysdif import *\n    sdif = SdifFile(\"1trc.sdif\")\n    for frame in sdif:\n        print(f\"Frame signature: {frame.signature}, time: {frame.time}\")\n        for matrix in frame:\n            print(f\"Matrix shape: {matrix.rows} x {matrix.cols}, \"\n                  f\"dtype={matrix.dtype}, signature: {matrix.signature}\")\n            print(\"Data\", matrix.get_data())\n\n    ```\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pysdif_7_pysdif_Matrix},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pysdif_7_pysdif_Matrix},
  {Py_tp_methods, (void *)__pyx_methods_6pysdif_7_pysdif_Matrix},
  {Py_tp_getset, (void *)__pyx_getsets_6pysdif_7_pysdif_Matrix},
  {Py_tp_new, (void *)__pyx_tp_new_6pysdif_7_pysdif_Matrix},
  {0, 0},
};
static PyType_Spec __pyx_type_6pysdif_7_pysdif_Matrix_spec = {
  "pysdif._pysdif.Matrix",
  sizeof(struct __pyx_obj_6pysdif_7_pysdif_Matrix),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pysdif_7_pysdif_Matrix_slots,
};
#else

static PyTypeObject __pyx_type_6pysdif_7_pysdif_Matrix = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysdif._pysdif.""Matrix", /*tp_name*/
  sizeof(struct __pyx_obj_6pysdif_7_pysdif_Matrix), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pysdif_7_pysdif_Matrix, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_6pysdif_7_pysdif_6Matrix_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    Matrix is a placeholder class to iterate through data while reading a SdifFile\n\n    In particular the default behaviour is that when you are given a Matrix, \n    this is only valid until a new one is read.\n    \n    See the methods `get_data` and `copy` for a better explanation of how to \n    make the data in the Matrix persistent\n\n    Args:\n        source (SdifFile): The source sdiffile this matrix belongs to\n    \n    ## Example\n\n    ```python\n    from pysdif import *\n    sdif = SdifFile(\"1trc.sdif\")\n    for frame in sdif:\n        print(f\"Frame signature: {frame.signature}, time: {frame.time}\")\n        for matrix in frame:\n            print(f\"Matrix shape: {matrix.rows} x {matrix.cols}, \"\n                  f\"dtype={matrix.dtype}, signature: {matrix.signature}\")\n            print(\"Data\", matrix.get_data())\n\n    ```\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pysdif_7_pysdif_Matrix, /*tp_traverse*/
  __pyx_tp_clear_6pysdif_7_pysdif_Matrix, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pysdif_7_pysdif_Matrix, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pysdif_7_pysdif_Matrix, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pysdif_7_pysdif_Matrix, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_6pysdif_7_pysdif_FrameW(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pysdif_7_pysdif_FrameW *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_6pysdif_7_pysdif_FrameW *)o);
  p->sdiffile = ((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)Py_None); Py_INCREF(Py_None);
  p->matrices = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

#if CYTHON_USE_TP_FINALIZE
static void __pyx_tp_finalize_6pysdif_7_pysdif_FrameW(PyObject *o) {
  PyObject *etype, *eval, *etb;
  PyErr_Fetch(&etype, &eval, &etb);
  __pyx_pw_6pysdif_7_pysdif_6FrameW_7__del__(o);
  PyErr_Restore(etype, eval, etb);
}
#endif

static void __pyx_tp_dealloc_6pysdif_7_pysdif_FrameW(PyObject *o) {
  struct __pyx_obj_6pysdif_7_pysdif_FrameW *p = (struct __pyx_obj_6pysdif_7_pysdif_FrameW *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pysdif_7_pysdif_FrameW) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->sdiffile);
  Py_CLEAR(p->matrices);
  #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
  (*Py_TYPE(o)->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
}

static int __pyx_tp_traverse_6pysdif_7_pysdif_FrameW(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pysdif_7_pysdif_FrameW *p = (struct __pyx_obj_6pysdif_7_pysdif_FrameW *)o;
  if (p->sdiffile) {
    e = (*v)(((PyObject *)p->sdiffile), a); if (e) return e;
  }
  if (p->matrices) {
    e = (*v)(p->matrices, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pysdif_7_pysdif_FrameW(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pysdif_7_pysdif_FrameW *p = (struct __pyx_obj_6pysdif_7_pysdif_FrameW *)o;
  tmp = ((PyObject*)p->sdiffile);
  p->sdiffile = ((struct __pyx_obj_6pysdif_7_pysdif_SdifFile *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->matrices);
  p->matrices = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pysdif_7_pysdif_6FrameW_written(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pysdif_7_pysdif_6FrameW_7written_1__get__(o);
}

static PyObject *__pyx_specialmethod___pyx_pw_6pysdif_7_pysdif_6FrameW_1__repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  return __pyx_pw_6pysdif_7_pysdif_6FrameW_1__repr__(self);
}

static PyMethodDef __pyx_methods_6pysdif_7_pysdif_FrameW[] = {
  {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_6pysdif_7_pysdif_6FrameW_1__repr__, METH_NOARGS|METH_COEXIST, 0},
  {"__enter__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6FrameW_3__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6FrameW_2__enter__},
  {"__exit__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6FrameW_5__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6FrameW_4__exit__},
  {"add_matrix", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6FrameW_9add_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6FrameW_8add_matrix},
  {"write", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6FrameW_11write, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6FrameW_10write},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6FrameW_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6FrameW_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pysdif_7_pysdif_6FrameW_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pysdif_7_pysdif_6FrameW_14__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pysdif_7_pysdif_FrameW[] = {
  {(char *)"written", __pyx_getprop_6pysdif_7_pysdif_6FrameW_written, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pysdif_7_pysdif_FrameW_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pysdif_7_pysdif_FrameW},
  {Py_tp_repr, (void *)__pyx_pw_6pysdif_7_pysdif_6FrameW_1__repr__},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Class to write frames to a SdifFile\n    \n    A FrameW is not created directly but is returned by sdiffile.new_frame(...)\n    After creating a new frame, you add matrices via:\n\n    ```python\n\n    framew.add_matrix(signature, numpy_array)\n    \n    ```\n\n    After finishing adding matrices, `.write` must be called:\n    \n    ```python\n    framew.write()\n    ```\n\n    Alternatively you can do:\n\n    ```python\n    with sdiffile.new_frame(sig, time) as frame:\n        frame.add_matrix(matrix_sig, data1) \n        frame.add_matrix(matrix_sig, data2)\n        ...\n    ```\n\n    There is no need to call .write in this case\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pysdif_7_pysdif_FrameW},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pysdif_7_pysdif_FrameW},
  {Py_tp_methods, (void *)__pyx_methods_6pysdif_7_pysdif_FrameW},
  {Py_tp_getset, (void *)__pyx_getsets_6pysdif_7_pysdif_FrameW},
  {Py_tp_new, (void *)__pyx_tp_new_6pysdif_7_pysdif_FrameW},
  #if PY_VERSION_HEX >= 0x030400a1
  {Py_tp_finalize, (void *)__pyx_tp_finalize_6pysdif_7_pysdif_FrameW},
  #endif
  {0, 0},
};
static PyType_Spec __pyx_type_6pysdif_7_pysdif_FrameW_spec = {
  "pysdif._pysdif.FrameW",
  sizeof(struct __pyx_obj_6pysdif_7_pysdif_FrameW),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_6pysdif_7_pysdif_FrameW_slots,
};
#else

static PyTypeObject __pyx_type_6pysdif_7_pysdif_FrameW = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysdif._pysdif.""FrameW", /*tp_name*/
  sizeof(struct __pyx_obj_6pysdif_7_pysdif_FrameW), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pysdif_7_pysdif_FrameW, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_6pysdif_7_pysdif_6FrameW_1__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  PyDoc_STR("\n    Class to write frames to a SdifFile\n    \n    A FrameW is not created directly but is returned by sdiffile.new_frame(...)\n    After creating a new frame, you add matrices via:\n\n    ```python\n\n    framew.add_matrix(signature, numpy_array)\n    \n    ```\n\n    After finishing adding matrices, `.write` must be called:\n    \n    ```python\n    framew.write()\n    ```\n\n    Alternatively you can do:\n\n    ```python\n    with sdiffile.new_frame(sig, time) as frame:\n        frame.add_matrix(matrix_sig, data1) \n        frame.add_matrix(matrix_sig, data2)\n        ...\n    ```\n\n    There is no need to call .write in this case\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pysdif_7_pysdif_FrameW, /*tp_traverse*/
  __pyx_tp_clear_6pysdif_7_pysdif_FrameW, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pysdif_7_pysdif_FrameW, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pysdif_7_pysdif_FrameW, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pysdif_7_pysdif_FrameW, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  __pyx_tp_finalize_6pysdif_7_pysdif_FrameW, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct__genexpr *__pyx_freelist_6pysdif_7_pysdif___pyx_scope_struct__genexpr[8];
static int __pyx_freecount_6pysdif_7_pysdif___pyx_scope_struct__genexpr = 0;

static PyObject *__pyx_tp_new_6pysdif_7_pysdif___pyx_scope_struct__genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_COMPILING_IN_CPYTHON
  if (likely((int)(__pyx_freecount_6pysdif_7_pysdif___pyx_scope_struct__genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct__genexpr)))) {
    o = (PyObject*)__pyx_freelist_6pysdif_7_pysdif___pyx_scope_struct__genexpr[--__pyx_freecount_6pysdif_7_pysdif___pyx_scope_struct__genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct__genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_6pysdif_7_pysdif___pyx_scope_struct__genexpr(PyObject *o) {
  struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct__genexpr *p = (struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct__genexpr *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pysdif_7_pysdif___pyx_scope_struct__genexpr) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_genexpr_arg_0);
  Py_CLEAR(p->__pyx_v_c);
  #if CYTHON_COMPILING_IN_CPYTHON
  if (((int)(__pyx_freecount_6pysdif_7_pysdif___pyx_scope_struct__genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct__genexpr)))) {
    __pyx_freelist_6pysdif_7_pysdif___pyx_scope_struct__genexpr[__pyx_freecount_6pysdif_7_pysdif___pyx_scope_struct__genexpr++] = ((struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct__genexpr *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_6pysdif_7_pysdif___pyx_scope_struct__genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct__genexpr *p = (struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct__genexpr *)o;
  if (p->__pyx_genexpr_arg_0) {
    e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e;
  }
  if (p->__pyx_v_c) {
    e = (*v)(p->__pyx_v_c, a); if (e) return e;
  }
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pysdif_7_pysdif___pyx_scope_struct__genexpr_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pysdif_7_pysdif___pyx_scope_struct__genexpr},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pysdif_7_pysdif___pyx_scope_struct__genexpr},
  {Py_tp_new, (void *)__pyx_tp_new_6pysdif_7_pysdif___pyx_scope_struct__genexpr},
  {0, 0},
};
static PyType_Spec __pyx_type_6pysdif_7_pysdif___pyx_scope_struct__genexpr_spec = {
  "pysdif._pysdif.__pyx_scope_struct__genexpr",
  sizeof(struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct__genexpr),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_6pysdif_7_pysdif___pyx_scope_struct__genexpr_slots,
};
#else

static PyTypeObject __pyx_type_6pysdif_7_pysdif___pyx_scope_struct__genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysdif._pysdif.""__pyx_scope_struct__genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct__genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pysdif_7_pysdif___pyx_scope_struct__genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pysdif_7_pysdif___pyx_scope_struct__genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pysdif_7_pysdif___pyx_scope_struct__genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr *__pyx_freelist_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr[8];
static int __pyx_freecount_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr = 0;

static PyObject *__pyx_tp_new_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_COMPILING_IN_CPYTHON
  if (likely((int)(__pyx_freecount_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr)))) {
    o = (PyObject*)__pyx_freelist_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr[--__pyx_freecount_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr(PyObject *o) {
  struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_genexpr_arg_0);
  Py_CLEAR(p->__pyx_v_sig);
  #if CYTHON_COMPILING_IN_CPYTHON
  if (((int)(__pyx_freecount_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr)))) {
    __pyx_freelist_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr[__pyx_freecount_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr *)o;
  if (p->__pyx_genexpr_arg_0) {
    e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e;
  }
  if (p->__pyx_v_sig) {
    e = (*v)(p->__pyx_v_sig, a); if (e) return e;
  }
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr},
  {Py_tp_new, (void *)__pyx_tp_new_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr},
  {0, 0},
};
static PyType_Spec __pyx_type_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr_spec = {
  "pysdif._pysdif.__pyx_scope_struct_1_genexpr",
  sizeof(struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr_slots,
};
#else

static PyTypeObject __pyx_type_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "pysdif._pysdif.""__pyx_scope_struct_1_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};
#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
/* #### Code section: pystring_table ### */

static int __Pyx_CreateStringTabAndInitStrings(void) {
  __Pyx_StringTabEntry __pyx_string_tab[] = {
    {&__pyx_kp_s_1FTD_signature_s_components_s, __pyx_k_1FTD_signature_s_components_s, sizeof(__pyx_k_1FTD_signature_s_components_s), 0, 0, 1, 0},
    {&__pyx_kp_s_1MTD_signature_s_column_names_s, __pyx_k_1MTD_signature_s_column_names_s, sizeof(__pyx_k_1MTD_signature_s_column_names_s), 0, 0, 1, 0},
    {&__pyx_kp_s_A_Frame_can_only_be_iterated_onc, __pyx_k_A_Frame_can_only_be_iterated_onc, sizeof(__pyx_k_A_Frame_can_only_be_iterated_onc), 0, 0, 1, 0},
    {&__pyx_n_s_AllDataRead, __pyx_k_AllDataRead, sizeof(__pyx_k_AllDataRead), 0, 0, 1, 1},
    {&__pyx_n_s_AssertionError, __pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 0, 1, 1},
    {&__pyx_kp_s_Attempted_to_read_matrix_header, __pyx_k_Attempted_to_read_matrix_header, sizeof(__pyx_k_Attempted_to_read_matrix_header), 0, 0, 1, 0},
    {&__pyx_kp_s_Attempted_to_read_past_end_of_fi, __pyx_k_Attempted_to_read_past_end_of_fi, sizeof(__pyx_k_Attempted_to_read_past_end_of_fi), 0, 0, 1, 0},
    {&__pyx_kp_s_Can_t_get_the_data_since_it_was, __pyx_k_Can_t_get_the_data_since_it_was, sizeof(__pyx_k_Can_t_get_the_data_since_it_was), 0, 0, 1, 0},
    {&__pyx_kp_s_Can_t_skip_the_matrix_status_is, __pyx_k_Can_t_skip_the_matrix_status_is, sizeof(__pyx_k_Can_t_skip_the_matrix_status_is), 0, 0, 1, 0},
    {&__pyx_n_s_Component, __pyx_k_Component, sizeof(__pyx_k_Component), 0, 0, 1, 1},
    {&__pyx_n_s_Component___reduce_cython, __pyx_k_Component___reduce_cython, sizeof(__pyx_k_Component___reduce_cython), 0, 0, 1, 1},
    {&__pyx_n_s_Component___setstate_cython, __pyx_k_Component___setstate_cython, sizeof(__pyx_k_Component___setstate_cython), 0, 0, 1, 1},
    {&__pyx_kp_s_Component_signature_s_name_s_num, __pyx_k_Component_signature_s_name_s_num, sizeof(__pyx_k_Component_signature_s_name_s_num), 0, 0, 1, 0},
    {&__pyx_kp_s_Could_not_create_frametype, __pyx_k_Could_not_create_frametype, sizeof(__pyx_k_Could_not_create_frametype), 0, 0, 1, 0},
    {&__pyx_kp_s_Could_not_create_matrixtype, __pyx_k_Could_not_create_matrixtype, sizeof(__pyx_k_Could_not_create_matrixtype), 0, 0, 1, 0},
    {&__pyx_kp_s_Could_not_open_s, __pyx_k_Could_not_open_s, sizeof(__pyx_k_Could_not_open_s), 0, 0, 1, 0},
    {&__pyx_kp_s_Could_not_read_matrix_header, __pyx_k_Could_not_read_matrix_header, sizeof(__pyx_k_Could_not_read_matrix_header), 0, 0, 1, 0},
    {&__pyx_n_s_Darwin, __pyx_k_Darwin, sizeof(__pyx_k_Darwin), 0, 0, 1, 1},
    {&__pyx_n_s_DataRead, __pyx_k_DataRead, sizeof(__pyx_k_DataRead), 0, 0, 1, 1},
    {&__pyx_n_s_DataSkipped, __pyx_k_DataSkipped, sizeof(__pyx_k_DataSkipped), 0, 0, 1, 1},
    {&__pyx_kp_s_Do_not_call_frame_write_when_usi, __pyx_k_Do_not_call_frame_write_when_usi, sizeof(__pyx_k_Do_not_call_frame_write_when_usi), 0, 0, 1, 0},
    {&__pyx_n_s_EOFError, __pyx_k_EOFError, sizeof(__pyx_k_EOFError), 0, 0, 1, 1},
    {&__pyx_kp_s_Error_finalizing_Frame, __pyx_k_Error_finalizing_Frame, sizeof(__pyx_k_Error_finalizing_Frame), 0, 0, 1, 0},
    {&__pyx_kp_s_Error_finalizing_matrix, __pyx_k_Error_finalizing_matrix, sizeof(__pyx_k_Error_finalizing_matrix), 0, 0, 1, 0},
    {&__pyx_kp_s_Expected_a_2D_array_got_d_dimens, __pyx_k_Expected_a_2D_array_got_d_dimens, sizeof(__pyx_k_Expected_a_2D_array_got_d_dimens), 0, 0, 1, 0},
    {&__pyx_kp_s_Expected_a_2D_array_got_shape_d, __pyx_k_Expected_a_2D_array_got_shape_d, sizeof(__pyx_k_Expected_a_2D_array_got_shape_d), 0, 0, 1, 0},
    {&__pyx_kp_s_Failed_to_fetch_the_column_names, __pyx_k_Failed_to_fetch_the_column_names, sizeof(__pyx_k_Failed_to_fetch_the_column_names), 0, 0, 1, 0},
    {&__pyx_n_s_FrameR, __pyx_k_FrameR, sizeof(__pyx_k_FrameR), 0, 0, 1, 1},
    {&__pyx_n_s_FrameR___reduce_cython, __pyx_k_FrameR___reduce_cython, sizeof(__pyx_k_FrameR___reduce_cython), 0, 0, 1, 1},
    {&__pyx_n_s_FrameR___setstate_cython, __pyx_k_FrameR___setstate_cython, sizeof(__pyx_k_FrameR___setstate_cython), 0, 0, 1, 1},
    {&__pyx_n_s_FrameR_get_matrix, __pyx_k_FrameR_get_matrix, sizeof(__pyx_k_FrameR_get_matrix), 0, 0, 1, 1},
    {&__pyx_kp_s_FrameR_signature_sig_time_t_matr, __pyx_k_FrameR_signature_sig_time_t_matr, sizeof(__pyx_k_FrameR_signature_sig_time_t_matr), 0, 0, 1, 0},
    {&__pyx_n_s_FrameTypeDefinition, __pyx_k_FrameTypeDefinition, sizeof(__pyx_k_FrameTypeDefinition), 0, 0, 1, 1},
    {&__pyx_n_s_FrameTypeDefinition___reduce_cyt, __pyx_k_FrameTypeDefinition___reduce_cyt, sizeof(__pyx_k_FrameTypeDefinition___reduce_cyt), 0, 0, 1, 1},
    {&__pyx_n_s_FrameTypeDefinition___setstate_c, __pyx_k_FrameTypeDefinition___setstate_c, sizeof(__pyx_k_FrameTypeDefinition___setstate_c), 0, 0, 1, 1},
    {&__pyx_n_s_FrameW, __pyx_k_FrameW, sizeof(__pyx_k_FrameW), 0, 0, 1, 1},
    {&__pyx_n_s_FrameW___enter, __pyx_k_FrameW___enter, sizeof(__pyx_k_FrameW___enter), 0, 0, 1, 1},
    {&__pyx_n_s_FrameW___exit, __pyx_k_FrameW___exit, sizeof(__pyx_k_FrameW___exit), 0, 0, 1, 1},
    {&__pyx_n_s_FrameW___reduce_cython, __pyx_k_FrameW___reduce_cython, sizeof(__pyx_k_FrameW___reduce_cython), 0, 0, 1, 1},
    {&__pyx_n_s_FrameW___setstate_cython, __pyx_k_FrameW___setstate_cython, sizeof(__pyx_k_FrameW___setstate_cython), 0, 0, 1, 1},
    {&__pyx_n_s_FrameW_add_matrix, __pyx_k_FrameW_add_matrix, sizeof(__pyx_k_FrameW_add_matrix), 0, 0, 1, 1},
    {&__pyx_kp_s_FrameW_signature_s_time_f_stream, __pyx_k_FrameW_signature_s_time_f_stream, sizeof(__pyx_k_FrameW_signature_s_time_f_stream), 0, 0, 1, 0},
    {&__pyx_n_s_FrameW_write, __pyx_k_FrameW_write, sizeof(__pyx_k_FrameW_write), 0, 0, 1, 1},
    {&__pyx_kp_s_Frame_has_already_been_written, __pyx_k_Frame_has_already_been_written, sizeof(__pyx_k_Frame_has_already_been_written), 0, 0, 1, 0},
    {&__pyx_kp_s_Frame_header_has_not_been_read, __pyx_k_Frame_header_has_not_been_read, sizeof(__pyx_k_Frame_header_has_not_been_read), 0, 0, 1, 0},
    {&__pyx_kp_s_Frame_with_d_matrices_not_writte, __pyx_k_Frame_with_d_matrices_not_writte, sizeof(__pyx_k_Frame_with_d_matrices_not_writte), 0, 0, 1, 0},
    {&__pyx_n_s_HeaderRead, __pyx_k_HeaderRead, sizeof(__pyx_k_HeaderRead), 0, 0, 1, 1},
    {&__pyx_n_s_INFO, __pyx_k_INFO, sizeof(__pyx_k_INFO), 0, 0, 1, 1},
    {&__pyx_n_s_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 0, 0, 1, 1},
    {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
    {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
    {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2, __pyx_k_Incompatible_checksums_0x_x_vs_0_2, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_2), 0, 0, 1, 0},
    {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3, __pyx_k_Incompatible_checksums_0x_x_vs_0_3, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_3), 0, 0, 1, 0},
    {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4, __pyx_k_Incompatible_checksums_0x_x_vs_0_4, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_4), 0, 0, 1, 0},
    {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
    {&__pyx_kp_b_Index_Frequency_Amplitude_Phase, __pyx_k_Index_Frequency_Amplitude_Phase, sizeof(__pyx_k_Index_Frequency_Amplitude_Phase), 0, 0, 0, 0},
    {&__pyx_n_s_Invalid, __pyx_k_Invalid, sizeof(__pyx_k_Invalid), 0, 0, 1, 1},
    {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
    {&__pyx_n_s_Linux, __pyx_k_Linux, sizeof(__pyx_k_Linux), 0, 0, 1, 1},
    {&__pyx_n_s_Matrix, __pyx_k_Matrix, sizeof(__pyx_k_Matrix), 0, 0, 1, 1},
    {&__pyx_n_s_MatrixTypeDefinition, __pyx_k_MatrixTypeDefinition, sizeof(__pyx_k_MatrixTypeDefinition), 0, 0, 1, 1},
    {&__pyx_n_s_MatrixTypeDefinition___reduce_cy, __pyx_k_MatrixTypeDefinition___reduce_cy, sizeof(__pyx_k_MatrixTypeDefinition___reduce_cy), 0, 0, 1, 1},
    {&__pyx_n_s_MatrixTypeDefinition___setstate, __pyx_k_MatrixTypeDefinition___setstate, sizeof(__pyx_k_MatrixTypeDefinition___setstate), 0, 0, 1, 1},
    {&__pyx_n_s_Matrix___reduce_cython, __pyx_k_Matrix___reduce_cython, sizeof(__pyx_k_Matrix___reduce_cython), 0, 0, 1, 1},
    {&__pyx_n_s_Matrix___setstate_cython, __pyx_k_Matrix___setstate_cython, sizeof(__pyx_k_Matrix___setstate_cython), 0, 0, 1, 1},
    {&__pyx_kp_s_Matrix_can_only_be_skipped_if_da, __pyx_k_Matrix_can_only_be_skipped_if_da, sizeof(__pyx_k_Matrix_can_only_be_skipped_if_da), 0, 0, 1, 0},
    {&__pyx_n_s_Matrix_column_names, __pyx_k_Matrix_column_names, sizeof(__pyx_k_Matrix_column_names), 0, 0, 1, 1},
    {&__pyx_kp_s_Matrix_data_can_only_be_skipped, __pyx_k_Matrix_data_can_only_be_skipped, sizeof(__pyx_k_Matrix_data_can_only_be_skipped), 0, 0, 1, 0},
    {&__pyx_n_s_Matrix_get_data, __pyx_k_Matrix_get_data, sizeof(__pyx_k_Matrix_get_data), 0, 0, 1, 1},
    {&__pyx_kp_s_Matrix_header_was_already_read, __pyx_k_Matrix_header_was_already_read, sizeof(__pyx_k_Matrix_header_was_already_read), 0, 0, 1, 0},
    {&__pyx_kp_s_Matrix_sig_s_rows_d_cols_d_dtype, __pyx_k_Matrix_sig_s_rows_d_cols_d_dtype, sizeof(__pyx_k_Matrix_sig_s_rows_d_cols_d_dtype), 0, 0, 1, 0},
    {&__pyx_n_s_Matrix_skip, __pyx_k_Matrix_skip, sizeof(__pyx_k_Matrix_skip), 0, 0, 1, 1},
    {&__pyx_n_s_NameError, __pyx_k_NameError, sizeof(__pyx_k_NameError), 0, 0, 1, 1},
    {&__pyx_n_s_NoFrame, __pyx_k_NoFrame, sizeof(__pyx_k_NoFrame), 0, 0, 1, 1},
    {&__pyx_n_s_NoMatrix, __pyx_k_NoMatrix, sizeof(__pyx_k_NoMatrix), 0, 0, 1, 1},
    {&__pyx_kp_s_No_current_matrix, __pyx_k_No_current_matrix, sizeof(__pyx_k_No_current_matrix), 0, 0, 1, 0},
    {&__pyx_kp_s_No_current_matrix_2, __pyx_k_No_current_matrix_2, sizeof(__pyx_k_No_current_matrix_2), 0, 0, 1, 0},
    {&__pyx_kp_s_No_matrices_were_added_Frame_not, __pyx_k_No_matrices_were_added_Frame_not, sizeof(__pyx_k_No_matrices_were_added_Frame_not), 0, 0, 1, 0},
    {&__pyx_n_s_NothingRead, __pyx_k_NothingRead, sizeof(__pyx_k_NothingRead), 0, 0, 1, 1},
    {&__pyx_n_s_Offline, __pyx_k_Offline, sizeof(__pyx_k_Offline), 0, 0, 1, 1},
    {&__pyx_kp_s_Only_strings_or_bytestrings_are, __pyx_k_Only_strings_or_bytestrings_are, sizeof(__pyx_k_Only_strings_or_bytestrings_are), 0, 0, 1, 0},
    {&__pyx_n_s_OverflowError, __pyx_k_OverflowError, sizeof(__pyx_k_OverflowError), 0, 0, 1, 1},
    {&__pyx_kp_s_Path_s_does_not_exist_can_t_crea, __pyx_k_Path_s_does_not_exist_can_t_crea, sizeof(__pyx_k_Path_s_does_not_exist_can_t_crea), 0, 0, 1, 0},
    {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
    {&__pyx_kp_s_Platform_unknown, __pyx_k_Platform_unknown, sizeof(__pyx_k_Platform_unknown), 0, 0, 1, 0},
    {&__pyx_n_b_RBEP, __pyx_k_RBEP, sizeof(__pyx_k_RBEP), 0, 0, 0, 1},
    {&__pyx_kp_b_RBEP_ReassignedBandEnhancedParti, __pyx_k_RBEP_ReassignedBandEnhancedParti, sizeof(__pyx_k_RBEP_ReassignedBandEnhancedParti), 0, 0, 0, 0},
    {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
    {&__pyx_n_s_SDIF_PREDEFINEDTYPES, __pyx_k_SDIF_PREDEFINEDTYPES, sizeof(__pyx_k_SDIF_PREDEFINEDTYPES), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile, __pyx_k_SdifFile, sizeof(__pyx_k_SdifFile), 0, 0, 1, 1},
    {&__pyx_kp_s_SdifFile_NULL, __pyx_k_SdifFile_NULL, sizeof(__pyx_k_SdifFile_NULL), 0, 0, 1, 0},
    {&__pyx_n_s_SdifFile___enter, __pyx_k_SdifFile___enter, sizeof(__pyx_k_SdifFile___enter), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile___exit, __pyx_k_SdifFile___exit, sizeof(__pyx_k_SdifFile___exit), 0, 0, 1, 1},
    {&__pyx_kp_s_SdifFile___init, __pyx_k_SdifFile___init, sizeof(__pyx_k_SdifFile___init), 0, 0, 1, 0},
    {&__pyx_n_s_SdifFile___reduce_cython, __pyx_k_SdifFile___reduce_cython, sizeof(__pyx_k_SdifFile___reduce_cython), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile___setstate_cython, __pyx_k_SdifFile___setstate_cython, sizeof(__pyx_k_SdifFile___setstate_cython), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile__read_padding, __pyx_k_SdifFile__read_padding, sizeof(__pyx_k_SdifFile__read_padding), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile__read_signature, __pyx_k_SdifFile__read_signature, sizeof(__pyx_k_SdifFile__read_signature), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile__rewind, __pyx_k_SdifFile__rewind, sizeof(__pyx_k_SdifFile__rewind), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_add_NVT, __pyx_k_SdifFile_add_NVT, sizeof(__pyx_k_SdifFile_add_NVT), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_add_frame_type, __pyx_k_SdifFile_add_frame_type, sizeof(__pyx_k_SdifFile_add_frame_type), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_add_matrix_type, __pyx_k_SdifFile_add_matrix_type, sizeof(__pyx_k_SdifFile_add_matrix_type), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_add_predefined_frametyp, __pyx_k_SdifFile_add_predefined_frametyp, sizeof(__pyx_k_SdifFile_add_predefined_frametyp), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_add_streamID, __pyx_k_SdifFile_add_streamID, sizeof(__pyx_k_SdifFile_add_streamID), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_clone_NVTs, __pyx_k_SdifFile_clone_NVTs, sizeof(__pyx_k_SdifFile_clone_NVTs), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_clone_definitions, __pyx_k_SdifFile_clone_definitions, sizeof(__pyx_k_SdifFile_clone_definitions), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_clone_frames, __pyx_k_SdifFile_clone_frames, sizeof(__pyx_k_SdifFile_clone_frames), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_clone_type_definitions, __pyx_k_SdifFile_clone_type_definitions, sizeof(__pyx_k_SdifFile_clone_type_definitions), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_close, __pyx_k_SdifFile_close, sizeof(__pyx_k_SdifFile_close), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_curr_frame_available, __pyx_k_SdifFile_curr_frame_available, sizeof(__pyx_k_SdifFile_curr_frame_available), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_curr_frame_is_selected, __pyx_k_SdifFile_curr_frame_is_selected, sizeof(__pyx_k_SdifFile_curr_frame_is_selected), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_curr_matrix_available, __pyx_k_SdifFile_curr_matrix_available, sizeof(__pyx_k_SdifFile_curr_matrix_available), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_curr_matrix_datatype, __pyx_k_SdifFile_curr_matrix_datatype, sizeof(__pyx_k_SdifFile_curr_matrix_datatype), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_curr_matrix_is_selected, __pyx_k_SdifFile_curr_matrix_is_selected, sizeof(__pyx_k_SdifFile_curr_matrix_is_selected), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_curr_matrix_signature, __pyx_k_SdifFile_curr_matrix_signature, sizeof(__pyx_k_SdifFile_curr_matrix_signature), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_curr_matrix_size, __pyx_k_SdifFile_curr_matrix_size, sizeof(__pyx_k_SdifFile_curr_matrix_size), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_curr_signature, __pyx_k_SdifFile_curr_signature, sizeof(__pyx_k_SdifFile_curr_signature), 0, 0, 1, 1},
    {&__pyx_kp_s_SdifFile_dealloc, __pyx_k_SdifFile_dealloc, sizeof(__pyx_k_SdifFile_dealloc), 0, 0, 1, 0},
    {&__pyx_n_s_SdifFile_frame_id, __pyx_k_SdifFile_frame_id, sizeof(__pyx_k_SdifFile_frame_id), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_frame_num_matrix, __pyx_k_SdifFile_frame_num_matrix, sizeof(__pyx_k_SdifFile_frame_num_matrix), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_frame_numerical_signatu, __pyx_k_SdifFile_frame_numerical_signatu, sizeof(__pyx_k_SdifFile_frame_numerical_signatu), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_frame_read_header, __pyx_k_SdifFile_frame_read_header, sizeof(__pyx_k_SdifFile_frame_read_header), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_frame_signature, __pyx_k_SdifFile_frame_signature, sizeof(__pyx_k_SdifFile_frame_signature), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_frame_skip_data, __pyx_k_SdifFile_frame_skip_data, sizeof(__pyx_k_SdifFile_frame_skip_data), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_frame_skip_rest, __pyx_k_SdifFile_frame_skip_rest, sizeof(__pyx_k_SdifFile_frame_skip_rest), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_frame_time, __pyx_k_SdifFile_frame_time, sizeof(__pyx_k_SdifFile_frame_time), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_frame_types_to_string, __pyx_k_SdifFile_frame_types_to_string, sizeof(__pyx_k_SdifFile_frame_types_to_string), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_get_NVTs, __pyx_k_SdifFile_get_NVTs, sizeof(__pyx_k_SdifFile_get_NVTs), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_get_frame_types, __pyx_k_SdifFile_get_frame_types, sizeof(__pyx_k_SdifFile_get_frame_types), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_get_matrix_types, __pyx_k_SdifFile_get_matrix_types, sizeof(__pyx_k_SdifFile_get_matrix_types), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_get_num_NVTs, __pyx_k_SdifFile_get_num_NVTs, sizeof(__pyx_k_SdifFile_get_num_NVTs), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_get_stream_IDs, __pyx_k_SdifFile_get_stream_IDs, sizeof(__pyx_k_SdifFile_get_stream_IDs), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_last_error, __pyx_k_SdifFile_last_error, sizeof(__pyx_k_SdifFile_last_error), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_matrix_read_data, __pyx_k_SdifFile_matrix_read_data, sizeof(__pyx_k_SdifFile_matrix_read_data), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_matrix_read_header, __pyx_k_SdifFile_matrix_read_header, sizeof(__pyx_k_SdifFile_matrix_read_header), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_matrix_skip, __pyx_k_SdifFile_matrix_skip, sizeof(__pyx_k_SdifFile_matrix_skip), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_matrix_skip_data, __pyx_k_SdifFile_matrix_skip_data, sizeof(__pyx_k_SdifFile_matrix_skip_data), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_matrix_types_to_string, __pyx_k_SdifFile_matrix_types_to_string, sizeof(__pyx_k_SdifFile_matrix_types_to_string), 0, 0, 1, 1},
    {&__pyx_kp_s_SdifFile_name_name_mode_mode, __pyx_k_SdifFile_name_name_mode_mode, sizeof(__pyx_k_SdifFile_name_name_mode_mode), 0, 0, 1, 0},
    {&__pyx_n_s_SdifFile_new_frame, __pyx_k_SdifFile_new_frame, sizeof(__pyx_k_SdifFile_new_frame), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_new_frame_one_matrix, __pyx_k_SdifFile_new_frame_one_matrix, sizeof(__pyx_k_SdifFile_new_frame_one_matrix), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_next_frame, __pyx_k_SdifFile_next_frame, sizeof(__pyx_k_SdifFile_next_frame), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_next_matrix, __pyx_k_SdifFile_next_matrix, sizeof(__pyx_k_SdifFile_next_matrix), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_print_NVT, __pyx_k_SdifFile_print_NVT, sizeof(__pyx_k_SdifFile_print_NVT), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_print_all_ascii_chunks, __pyx_k_SdifFile_print_all_ascii_chunks, sizeof(__pyx_k_SdifFile_print_all_ascii_chunks), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_print_all_stream_ID, __pyx_k_SdifFile_print_all_stream_ID, sizeof(__pyx_k_SdifFile_print_all_stream_ID), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_print_all_types, __pyx_k_SdifFile_print_all_types, sizeof(__pyx_k_SdifFile_print_all_types), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_print_frame_header, __pyx_k_SdifFile_print_frame_header, sizeof(__pyx_k_SdifFile_print_frame_header), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_print_general_header, __pyx_k_SdifFile_print_general_header, sizeof(__pyx_k_SdifFile_print_general_header), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_print_matrix_header, __pyx_k_SdifFile_print_matrix_header, sizeof(__pyx_k_SdifFile_print_matrix_header), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_print_one_row, __pyx_k_SdifFile_print_one_row, sizeof(__pyx_k_SdifFile_print_one_row), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_rewind, __pyx_k_SdifFile_rewind, sizeof(__pyx_k_SdifFile_rewind), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_status, __pyx_k_SdifFile_status, sizeof(__pyx_k_SdifFile_status), 0, 0, 1, 1},
    {&__pyx_n_s_SdifFile_write_all_ascii_chunks, __pyx_k_SdifFile_write_all_ascii_chunks, sizeof(__pyx_k_SdifFile_write_all_ascii_chunks), 0, 0, 1, 1},
    {&__pyx_n_s_SdifOrderError, __pyx_k_SdifOrderError, sizeof(__pyx_k_SdifOrderError), 0, 0, 1, 1},
    {&__pyx_kp_s_SdifTypes_STYP, __pyx_k_SdifTypes_STYP, sizeof(__pyx_k_SdifTypes_STYP), 0, 0, 1, 0},
    {&__pyx_kp_s_Sdif_initialized_using_path_s, __pyx_k_Sdif_initialized_using_path_s, sizeof(__pyx_k_Sdif_initialized_using_path_s), 0, 0, 1, 0},
    {&__pyx_kp_s_Sdif_initialized_without_SdifTyp, __pyx_k_Sdif_initialized_without_SdifTyp, sizeof(__pyx_k_Sdif_initialized_without_SdifTyp), 0, 0, 1, 0},
    {&__pyx_n_s_SignatureRead, __pyx_k_SignatureRead, sizeof(__pyx_k_SignatureRead), 0, 0, 1, 1},
    {&__pyx_n_s_SomeDataRead, __pyx_k_SomeDataRead, sizeof(__pyx_k_SomeDataRead), 0, 0, 1, 1},
    {&__pyx_kp_s_Some_data_of_the_matrix_has_been, __pyx_k_Some_data_of_the_matrix_has_been, sizeof(__pyx_k_Some_data_of_the_matrix_has_been), 0, 0, 1, 0},
    {&__pyx_kp_s_Status_Frame_frame_MatrixIdx_mid, __pyx_k_Status_Frame_frame_MatrixIdx_mid, sizeof(__pyx_k_Status_Frame_frame_MatrixIdx_mid), 0, 0, 1, 0},
    {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1},
    {&__pyx_n_s_StreamID, __pyx_k_StreamID, sizeof(__pyx_k_StreamID), 0, 0, 1, 1},
    {&__pyx_n_s_StreamID___reduce_cython, __pyx_k_StreamID___reduce_cython, sizeof(__pyx_k_StreamID___reduce_cython), 0, 0, 1, 1},
    {&__pyx_n_s_StreamID___setstate_cython, __pyx_k_StreamID___setstate_cython, sizeof(__pyx_k_StreamID___setstate_cython), 0, 0, 1, 1},
    {&__pyx_kp_s_StreamID_numid_d_source_s_treewa, __pyx_k_StreamID_numid_d_source_s_treewa, sizeof(__pyx_k_StreamID_numid_d_source_s_treewa), 0, 0, 1, 0},
    {&__pyx_kp_s_The_frame_should_be_read_or_skip, __pyx_k_The_frame_should_be_read_or_skip, sizeof(__pyx_k_The_frame_should_be_read_or_skip), 0, 0, 1, 0},
    {&__pyx_kp_s_The_header_of_the_current_frame, __pyx_k_The_header_of_the_current_frame, sizeof(__pyx_k_The_header_of_the_current_frame), 0, 0, 1, 0},
    {&__pyx_kp_s_The_header_was_already_read, __pyx_k_The_header_was_already_read, sizeof(__pyx_k_The_header_was_already_read), 0, 0, 1, 0},
    {&__pyx_kp_s_This_function_is_only_possible_f, __pyx_k_This_function_is_only_possible_f, sizeof(__pyx_k_This_function_is_only_possible_f), 0, 0, 1, 0},
    {&__pyx_kp_s_This_matrix_type_sig_does_not_se, __pyx_k_This_matrix_type_sig_does_not_se, sizeof(__pyx_k_This_matrix_type_sig_does_not_se), 0, 0, 1, 0},
    {&__pyx_kp_s_Two_many_matrices_for_one_frame, __pyx_k_Two_many_matrices_for_one_frame, sizeof(__pyx_k_Two_many_matrices_for_one_frame), 0, 0, 1, 0},
    {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
    {&__pyx_kp_s_Undefined_frametype_sig_You_must, __pyx_k_Undefined_frametype_sig_You_must, sizeof(__pyx_k_Undefined_frametype_sig_You_must), 0, 0, 1, 0},
    {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
    {&__pyx_n_s_Windows, __pyx_k_Windows, sizeof(__pyx_k_Windows), 0, 0, 1, 1},
    {&__pyx_kp_s__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 0, 1, 0},
    {&__pyx_kp_s__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 0, 1, 0},
    {&__pyx_n_s__172, __pyx_k__172, sizeof(__pyx_k__172), 0, 0, 1, 1},
    {&__pyx_kp_b__18, __pyx_k__18, sizeof(__pyx_k__18), 0, 0, 0, 0},
    {&__pyx_kp_b__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 0, 0},
    {&__pyx_kp_b__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 0, 0},
    {&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0},
    {&__pyx_kp_u__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 1, 0, 0},
    {&__pyx_n_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 1},
    {&__pyx_n_s_abspath, __pyx_k_abspath, sizeof(__pyx_k_abspath), 0, 0, 1, 1},
    {&__pyx_n_s_add_NVT, __pyx_k_add_NVT, sizeof(__pyx_k_add_NVT), 0, 0, 1, 1},
    {&__pyx_n_s_add_frame_type, __pyx_k_add_frame_type, sizeof(__pyx_k_add_frame_type), 0, 0, 1, 1},
    {&__pyx_n_s_add_matrix, __pyx_k_add_matrix, sizeof(__pyx_k_add_matrix), 0, 0, 1, 1},
    {&__pyx_n_s_add_matrix_type, __pyx_k_add_matrix_type, sizeof(__pyx_k_add_matrix_type), 0, 0, 1, 1},
    {&__pyx_n_s_add_predefined_frametype, __pyx_k_add_predefined_frametype, sizeof(__pyx_k_add_predefined_frametype), 0, 0, 1, 1},
    {&__pyx_n_s_add_streamID, __pyx_k_add_streamID, sizeof(__pyx_k_add_streamID), 0, 0, 1, 1},
    {&__pyx_n_s_allframetypes, __pyx_k_allframetypes, sizeof(__pyx_k_allframetypes), 0, 0, 1, 1},
    {&__pyx_n_s_allmatrixtypes, __pyx_k_allmatrixtypes, sizeof(__pyx_k_allmatrixtypes), 0, 0, 1, 1},
    {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
    {&__pyx_n_s_ascii, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 0, 1, 1},
    {&__pyx_n_s_ascontiguousarray, __pyx_k_ascontiguousarray, sizeof(__pyx_k_ascontiguousarray), 0, 0, 1, 1},
    {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
    {&__pyx_n_s_bytes_read, __pyx_k_bytes_read, sizeof(__pyx_k_bytes_read), 0, 0, 1, 1},
    {&__pyx_n_s_bytesread, __pyx_k_bytesread, sizeof(__pyx_k_bytesread), 0, 0, 1, 1},
    {&__pyx_n_s_c_contiguous, __pyx_k_c_contiguous, sizeof(__pyx_k_c_contiguous), 0, 0, 1, 1},
    {&__pyx_n_s_char, __pyx_k_char, sizeof(__pyx_k_char), 0, 0, 1, 1},
    {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
    {&__pyx_n_s_clone_NVTs, __pyx_k_clone_NVTs, sizeof(__pyx_k_clone_NVTs), 0, 0, 1, 1},
    {&__pyx_n_s_clone_definitions, __pyx_k_clone_definitions, sizeof(__pyx_k_clone_definitions), 0, 0, 1, 1},
    {&__pyx_n_s_clone_frames, __pyx_k_clone_frames, sizeof(__pyx_k_clone_frames), 0, 0, 1, 1},
    {&__pyx_n_s_clone_frames_locals_genexpr, __pyx_k_clone_frames_locals_genexpr, sizeof(__pyx_k_clone_frames_locals_genexpr), 0, 0, 1, 1},
    {&__pyx_n_s_clone_type_definitions, __pyx_k_clone_type_definitions, sizeof(__pyx_k_clone_type_definitions), 0, 0, 1, 1},
    {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
    {&__pyx_kp_s_close_can_t_close_SdifFile_it_is, __pyx_k_close_can_t_close_SdifFile_it_is, sizeof(__pyx_k_close_can_t_close_SdifFile_it_is), 0, 0, 1, 0},
    {&__pyx_kp_s_close_can_t_close_SdifFile_since, __pyx_k_close_can_t_close_SdifFile_since, sizeof(__pyx_k_close_can_t_close_SdifFile_since), 0, 0, 1, 0},
    {&__pyx_n_s_colnames, __pyx_k_colnames, sizeof(__pyx_k_colnames), 0, 0, 1, 1},
    {&__pyx_n_s_cols, __pyx_k_cols, sizeof(__pyx_k_cols), 0, 0, 1, 1},
    {&__pyx_n_s_column_names, __pyx_k_column_names, sizeof(__pyx_k_column_names), 0, 0, 1, 1},
    {&__pyx_n_s_comp, __pyx_k_comp, sizeof(__pyx_k_comp), 0, 0, 1, 1},
    {&__pyx_n_s_components, __pyx_k_components, sizeof(__pyx_k_components), 0, 0, 1, 1},
    {&__pyx_kp_s_components_should_be_a_seq_of_Co, __pyx_k_components_should_be_a_seq_of_Co, sizeof(__pyx_k_components_should_be_a_seq_of_Co), 0, 0, 1, 0},
    {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
    {&__pyx_n_s_curr_frame_available, __pyx_k_curr_frame_available, sizeof(__pyx_k_curr_frame_available), 0, 0, 1, 1},
    {&__pyx_n_s_curr_frame_is_selected, __pyx_k_curr_frame_is_selected, sizeof(__pyx_k_curr_frame_is_selected), 0, 0, 1, 1},
    {&__pyx_n_s_curr_matrix_available, __pyx_k_curr_matrix_available, sizeof(__pyx_k_curr_matrix_available), 0, 0, 1, 1},
    {&__pyx_n_s_curr_matrix_datatype, __pyx_k_curr_matrix_datatype, sizeof(__pyx_k_curr_matrix_datatype), 0, 0, 1, 1},
    {&__pyx_n_s_curr_matrix_is_selected, __pyx_k_curr_matrix_is_selected, sizeof(__pyx_k_curr_matrix_is_selected), 0, 0, 1, 1},
    {&__pyx_n_s_curr_matrix_signature, __pyx_k_curr_matrix_signature, sizeof(__pyx_k_curr_matrix_signature), 0, 0, 1, 1},
    {&__pyx_n_s_curr_matrix_size, __pyx_k_curr_matrix_size, sizeof(__pyx_k_curr_matrix_size), 0, 0, 1, 1},
    {&__pyx_n_s_curr_signature, __pyx_k_curr_signature, sizeof(__pyx_k_curr_signature), 0, 0, 1, 1},
    {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1},
    {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
    {&__pyx_n_s_data_array, __pyx_k_data_array, sizeof(__pyx_k_data_array), 0, 0, 1, 1},
    {&__pyx_n_s_datadir, __pyx_k_datadir, sizeof(__pyx_k_datadir), 0, 0, 1, 1},
    {&__pyx_n_s_debug, __pyx_k_debug, sizeof(__pyx_k_debug), 0, 0, 1, 1},
    {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
    {&__pyx_n_s_dict_2, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1},
    {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
    {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
    {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
    {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
    {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
    {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
    {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
    {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
    {&__pyx_kp_s_error_finishing_matrix, __pyx_k_error_finishing_matrix, sizeof(__pyx_k_error_finishing_matrix), 0, 0, 1, 0},
    {&__pyx_kp_s_error_opening_file, __pyx_k_error_opening_file, sizeof(__pyx_k_error_opening_file), 0, 0, 1, 0},
    {&__pyx_n_s_exception_type, __pyx_k_exception_type, sizeof(__pyx_k_exception_type), 0, 0, 1, 1},
    {&__pyx_n_s_exception_value, __pyx_k_exception_value, sizeof(__pyx_k_exception_value), 0, 0, 1, 1},
    {&__pyx_n_s_exists, __pyx_k_exists, sizeof(__pyx_k_exists), 0, 0, 1, 1},
    {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
    {&__pyx_n_s_expanduser, __pyx_k_expanduser, sizeof(__pyx_k_expanduser), 0, 0, 1, 1},
    {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1},
    {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
    {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1},
    {&__pyx_n_s_finalize_frame, __pyx_k_finalize_frame, sizeof(__pyx_k_finalize_frame), 0, 0, 1, 1},
    {&__pyx_kp_s_finalize_frame_called_but_heade, __pyx_k_finalize_frame_called_but_heade, sizeof(__pyx_k_finalize_frame_called_but_heade), 0, 0, 1, 0},
    {&__pyx_kp_s_finalize_frame_without_having_r, __pyx_k_finalize_frame_without_having_r, sizeof(__pyx_k_finalize_frame_without_having_r), 0, 0, 1, 0},
    {&__pyx_n_s_finalize_matrix, __pyx_k_finalize_matrix, sizeof(__pyx_k_finalize_matrix), 0, 0, 1, 1},
    {&__pyx_n_s_find_sdiftypes, __pyx_k_find_sdiftypes, sizeof(__pyx_k_find_sdiftypes), 0, 0, 1, 1},
    {&__pyx_n_s_find_sdiftypes_locals_get_packa, __pyx_k_find_sdiftypes_locals_get_packa, sizeof(__pyx_k_find_sdiftypes_locals_get_packa), 0, 0, 1, 1},
    {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
    {&__pyx_n_s_float32, __pyx_k_float32, sizeof(__pyx_k_float32), 0, 0, 1, 1},
    {&__pyx_n_s_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 0, 1, 1},
    {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
    {&__pyx_n_s_frame, __pyx_k_frame, sizeof(__pyx_k_frame), 0, 0, 1, 1},
    {&__pyx_n_s_frame0, __pyx_k_frame0, sizeof(__pyx_k_frame0), 0, 0, 1, 1},
    {&__pyx_n_s_frame1, __pyx_k_frame1, sizeof(__pyx_k_frame1), 0, 0, 1, 1},
    {&__pyx_n_s_frame_id, __pyx_k_frame_id, sizeof(__pyx_k_frame_id), 0, 0, 1, 1},
    {&__pyx_n_s_frame_num_matrix, __pyx_k_frame_num_matrix, sizeof(__pyx_k_frame_num_matrix), 0, 0, 1, 1},
    {&__pyx_n_s_frame_numerical_signature, __pyx_k_frame_numerical_signature, sizeof(__pyx_k_frame_numerical_signature), 0, 0, 1, 1},
    {&__pyx_n_s_frame_read_header, __pyx_k_frame_read_header, sizeof(__pyx_k_frame_read_header), 0, 0, 1, 1},
    {&__pyx_kp_s_frame_read_header_finalizing_las, __pyx_k_frame_read_header_finalizing_las, sizeof(__pyx_k_frame_read_header_finalizing_las), 0, 0, 1, 0},
    {&__pyx_n_s_frame_sig, __pyx_k_frame_sig, sizeof(__pyx_k_frame_sig), 0, 0, 1, 1},
    {&__pyx_n_s_frame_signature, __pyx_k_frame_signature, sizeof(__pyx_k_frame_signature), 0, 0, 1, 1},
    {&__pyx_n_s_frame_size, __pyx_k_frame_size, sizeof(__pyx_k_frame_size), 0, 0, 1, 1},
    {&__pyx_n_s_frame_skip_data, __pyx_k_frame_skip_data, sizeof(__pyx_k_frame_skip_data), 0, 0, 1, 1},
    {&__pyx_kp_s_frame_skip_data_calling_finalize, __pyx_k_frame_skip_data_calling_finalize, sizeof(__pyx_k_frame_skip_data_calling_finalize), 0, 0, 1, 0},
    {&__pyx_n_s_frame_skip_rest, __pyx_k_frame_skip_rest, sizeof(__pyx_k_frame_skip_rest), 0, 0, 1, 1},
    {&__pyx_kp_s_frame_skip_rest_Attempted_to_sk, __pyx_k_frame_skip_rest_Attempted_to_sk, sizeof(__pyx_k_frame_skip_rest_Attempted_to_sk), 0, 0, 1, 0},
    {&__pyx_n_s_frame_time, __pyx_k_frame_time, sizeof(__pyx_k_frame_time), 0, 0, 1, 1},
    {&__pyx_n_s_frame_types_to_string, __pyx_k_frame_types_to_string, sizeof(__pyx_k_frame_types_to_string), 0, 0, 1, 1},
    {&__pyx_n_s_framestatus2str, __pyx_k_framestatus2str, sizeof(__pyx_k_framestatus2str), 0, 0, 1, 1},
    {&__pyx_n_s_frametype, __pyx_k_frametype, sizeof(__pyx_k_frametype), 0, 0, 1, 1},
    {&__pyx_n_s_frametypes, __pyx_k_frametypes, sizeof(__pyx_k_frametypes), 0, 0, 1, 1},
    {&__pyx_n_s_frametypes_populate, __pyx_k_frametypes_populate, sizeof(__pyx_k_frametypes_populate), 0, 0, 1, 1},
    {&__pyx_n_s_frametypeslist, __pyx_k_frametypeslist, sizeof(__pyx_k_frametypeslist), 0, 0, 1, 1},
    {&__pyx_n_s_fsz, __pyx_k_fsz, sizeof(__pyx_k_fsz), 0, 0, 1, 1},
    {&__pyx_n_s_ft, __pyx_k_ft, sizeof(__pyx_k_ft), 0, 0, 1, 1},
    {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
    {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1},
    {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
    {&__pyx_n_s_getLogger, __pyx_k_getLogger, sizeof(__pyx_k_getLogger), 0, 0, 1, 1},
    {&__pyx_n_s_get_NVTs, __pyx_k_get_NVTs, sizeof(__pyx_k_get_NVTs), 0, 0, 1, 1},
    {&__pyx_n_s_get_data, __pyx_k_get_data, sizeof(__pyx_k_get_data), 0, 0, 1, 1},
    {&__pyx_n_s_get_frame_types, __pyx_k_get_frame_types, sizeof(__pyx_k_get_frame_types), 0, 0, 1, 1},
    {&__pyx_n_s_get_matrix, __pyx_k_get_matrix, sizeof(__pyx_k_get_matrix), 0, 0, 1, 1},
    {&__pyx_n_s_get_matrix_types, __pyx_k_get_matrix_types, sizeof(__pyx_k_get_matrix_types), 0, 0, 1, 1},
    {&__pyx_n_s_get_num_NVTs, __pyx_k_get_num_NVTs, sizeof(__pyx_k_get_num_NVTs), 0, 0, 1, 1},
    {&__pyx_n_s_get_packaged_sdiftypes, __pyx_k_get_packaged_sdiftypes, sizeof(__pyx_k_get_packaged_sdiftypes), 0, 0, 1, 1},
    {&__pyx_n_s_get_stream_IDs, __pyx_k_get_stream_IDs, sizeof(__pyx_k_get_stream_IDs), 0, 0, 1, 1},
    {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
    {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
    {&__pyx_n_s_idx, __pyx_k_idx, sizeof(__pyx_k_idx), 0, 0, 1, 1},
    {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
    {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1},
    {&__pyx_n_s_init___locals_genexpr, __pyx_k_init___locals_genexpr, sizeof(__pyx_k_init___locals_genexpr), 0, 0, 1, 1},
    {&__pyx_n_s_init_subclass, __pyx_k_init_subclass, sizeof(__pyx_k_init_subclass), 0, 0, 1, 1},
    {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1},
    {&__pyx_n_s_int16, __pyx_k_int16, sizeof(__pyx_k_int16), 0, 0, 1, 1},
    {&__pyx_n_s_int32, __pyx_k_int32, sizeof(__pyx_k_int32), 0, 0, 1, 1},
    {&__pyx_n_s_int64, __pyx_k_int64, sizeof(__pyx_k_int64), 0, 0, 1, 1},
    {&__pyx_n_s_int8, __pyx_k_int8, sizeof(__pyx_k_int8), 0, 0, 1, 1},
    {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
    {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
    {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
    {&__pyx_n_s_iteritems, __pyx_k_iteritems, sizeof(__pyx_k_iteritems), 0, 0, 1, 1},
    {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
    {&__pyx_n_s_last_error, __pyx_k_last_error, sizeof(__pyx_k_last_error), 0, 0, 1, 1},
    {&__pyx_kp_s_local_share, __pyx_k_local_share, sizeof(__pyx_k_local_share), 0, 0, 1, 0},
    {&__pyx_n_s_logger, __pyx_k_logger, sizeof(__pyx_k_logger), 0, 0, 1, 1},
    {&__pyx_n_s_logging, __pyx_k_logging, sizeof(__pyx_k_logging), 0, 0, 1, 1},
    {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
    {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
    {&__pyx_n_s_matrix, __pyx_k_matrix, sizeof(__pyx_k_matrix), 0, 0, 1, 1},
    {&__pyx_kp_s_matrix_empty_or_could_not_read_m, __pyx_k_matrix_empty_or_could_not_read_m, sizeof(__pyx_k_matrix_empty_or_could_not_read_m), 0, 0, 1, 0},
    {&__pyx_n_s_matrix_idx, __pyx_k_matrix_idx, sizeof(__pyx_k_matrix_idx), 0, 0, 1, 1},
    {&__pyx_n_s_matrix_read_data, __pyx_k_matrix_read_data, sizeof(__pyx_k_matrix_read_data), 0, 0, 1, 1},
    {&__pyx_n_s_matrix_read_header, __pyx_k_matrix_read_header, sizeof(__pyx_k_matrix_read_header), 0, 0, 1, 1},
    {&__pyx_n_s_matrix_sig, __pyx_k_matrix_sig, sizeof(__pyx_k_matrix_sig), 0, 0, 1, 1},
    {&__pyx_n_s_matrix_skip, __pyx_k_matrix_skip, sizeof(__pyx_k_matrix_skip), 0, 0, 1, 1},
    {&__pyx_n_s_matrix_skip_data, __pyx_k_matrix_skip_data, sizeof(__pyx_k_matrix_skip_data), 0, 0, 1, 1},
    {&__pyx_kp_s_matrix_skip_data_no_current_fram, __pyx_k_matrix_skip_data_no_current_fram, sizeof(__pyx_k_matrix_skip_data_no_current_fram), 0, 0, 1, 0},
    {&__pyx_kp_s_matrix_skip_no_current_frame, __pyx_k_matrix_skip_no_current_frame, sizeof(__pyx_k_matrix_skip_no_current_frame), 0, 0, 1, 0},
    {&__pyx_n_s_matrix_status, __pyx_k_matrix_status, sizeof(__pyx_k_matrix_status), 0, 0, 1, 1},
    {&__pyx_n_s_matrix_types_to_string, __pyx_k_matrix_types_to_string, sizeof(__pyx_k_matrix_types_to_string), 0, 0, 1, 1},
    {&__pyx_n_s_matrixdata, __pyx_k_matrixdata, sizeof(__pyx_k_matrixdata), 0, 0, 1, 1},
    {&__pyx_n_s_matrixrole, __pyx_k_matrixrole, sizeof(__pyx_k_matrixrole), 0, 0, 1, 1},
    {&__pyx_n_s_matrixsig, __pyx_k_matrixsig, sizeof(__pyx_k_matrixsig), 0, 0, 1, 1},
    {&__pyx_n_s_matrixstatus2str, __pyx_k_matrixstatus2str, sizeof(__pyx_k_matrixstatus2str), 0, 0, 1, 1},
    {&__pyx_n_s_matrixtype, __pyx_k_matrixtype, sizeof(__pyx_k_matrixtype), 0, 0, 1, 1},
    {&__pyx_n_s_matrixtypes, __pyx_k_matrixtypes, sizeof(__pyx_k_matrixtypes), 0, 0, 1, 1},
    {&__pyx_n_s_matrixtypeslist, __pyx_k_matrixtypeslist, sizeof(__pyx_k_matrixtypeslist), 0, 0, 1, 1},
    {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
    {&__pyx_n_s_midx, __pyx_k_midx, sizeof(__pyx_k_midx), 0, 0, 1, 1},
    {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
    {&__pyx_kp_s_mode_should_be_on_of_r_w_rw, __pyx_k_mode_should_be_on_of_r_w_rw, sizeof(__pyx_k_mode_should_be_on_of_r_w_rw), 0, 0, 1, 0},
    {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
    {&__pyx_n_s_mro_entries, __pyx_k_mro_entries, sizeof(__pyx_k_mro_entries), 0, 0, 1, 1},
    {&__pyx_n_s_mt, __pyx_k_mt, sizeof(__pyx_k_mt), 0, 0, 1, 1},
    {&__pyx_n_s_mtd, __pyx_k_mtd, sizeof(__pyx_k_mtd), 0, 0, 1, 1},
    {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
    {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
    {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
    {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
    {&__pyx_n_s_new_frame, __pyx_k_new_frame, sizeof(__pyx_k_new_frame), 0, 0, 1, 1},
    {&__pyx_n_s_new_frame_one_matrix, __pyx_k_new_frame_one_matrix, sizeof(__pyx_k_new_frame_one_matrix), 0, 0, 1, 1},
    {&__pyx_n_s_next, __pyx_k_next, sizeof(__pyx_k_next), 0, 0, 1, 1},
    {&__pyx_n_s_next_frame, __pyx_k_next_frame, sizeof(__pyx_k_next_frame), 0, 0, 1, 1},
    {&__pyx_n_s_next_matrix, __pyx_k_next_matrix, sizeof(__pyx_k_next_matrix), 0, 0, 1, 1},
    {&__pyx_kp_s_no_current_frame, __pyx_k_no_current_frame, sizeof(__pyx_k_no_current_frame), 0, 0, 1, 0},
    {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
    {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
    {&__pyx_n_s_num, __pyx_k_num, sizeof(__pyx_k_num), 0, 0, 1, 1},
    {&__pyx_n_s_num_matrices, __pyx_k_num_matrices, sizeof(__pyx_k_num_matrices), 0, 0, 1, 1},
    {&__pyx_n_s_numid, __pyx_k_numid, sizeof(__pyx_k_numid), 0, 0, 1, 1},
    {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
    {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0},
    {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0},
    {&__pyx_n_s_nvt, __pyx_k_nvt, sizeof(__pyx_k_nvt), 0, 0, 1, 1},
    {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
    {&__pyx_n_s_os_path, __pyx_k_os_path, sizeof(__pyx_k_os_path), 0, 0, 1, 1},
    {&__pyx_n_s_out, __pyx_k_out, sizeof(__pyx_k_out), 0, 0, 1, 1},
    {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
    {&__pyx_n_s_p2, __pyx_k_p2, sizeof(__pyx_k_p2), 0, 0, 1, 1},
    {&__pyx_n_s_packaged_sdiftypes, __pyx_k_packaged_sdiftypes, sizeof(__pyx_k_packaged_sdiftypes), 0, 0, 1, 1},
    {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
    {&__pyx_kp_s_path_not_found_cannot_open_sdif, __pyx_k_path_not_found_cannot_open_sdif, sizeof(__pyx_k_path_not_found_cannot_open_sdif), 0, 0, 1, 0},
    {&__pyx_n_s_paths, __pyx_k_paths, sizeof(__pyx_k_paths), 0, 0, 1, 1},
    {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
    {&__pyx_n_s_pl, __pyx_k_pl, sizeof(__pyx_k_pl), 0, 0, 1, 1},
    {&__pyx_n_s_platform, __pyx_k_platform, sizeof(__pyx_k_platform), 0, 0, 1, 1},
    {&__pyx_n_s_predefined_frametypes, __pyx_k_predefined_frametypes, sizeof(__pyx_k_predefined_frametypes), 0, 0, 1, 1},
    {&__pyx_n_s_predefined_matrixtypes, __pyx_k_predefined_matrixtypes, sizeof(__pyx_k_predefined_matrixtypes), 0, 0, 1, 1},
    {&__pyx_n_s_predefined_type, __pyx_k_predefined_type, sizeof(__pyx_k_predefined_type), 0, 0, 1, 1},
    {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
    {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
    {&__pyx_n_s_print_NVT, __pyx_k_print_NVT, sizeof(__pyx_k_print_NVT), 0, 0, 1, 1},
    {&__pyx_n_s_print_all_ascii_chunks, __pyx_k_print_all_ascii_chunks, sizeof(__pyx_k_print_all_ascii_chunks), 0, 0, 1, 1},
    {&__pyx_n_s_print_all_stream_ID, __pyx_k_print_all_stream_ID, sizeof(__pyx_k_print_all_stream_ID), 0, 0, 1, 1},
    {&__pyx_n_s_print_all_types, __pyx_k_print_all_types, sizeof(__pyx_k_print_all_types), 0, 0, 1, 1},
    {&__pyx_n_s_print_frame_header, __pyx_k_print_frame_header, sizeof(__pyx_k_print_frame_header), 0, 0, 1, 1},
    {&__pyx_n_s_print_general_header, __pyx_k_print_general_header, sizeof(__pyx_k_print_general_header), 0, 0, 1, 1},
    {&__pyx_n_s_print_matrix_header, __pyx_k_print_matrix_header, sizeof(__pyx_k_print_matrix_header), 0, 0, 1, 1},
    {&__pyx_n_s_print_one_row, __pyx_k_print_one_row, sizeof(__pyx_k_print_one_row), 0, 0, 1, 1},
    {&__pyx_n_s_pysdif, __pyx_k_pysdif, sizeof(__pyx_k_pysdif), 0, 0, 1, 1},
    {&__pyx_n_s_pysdif__pysdif, __pyx_k_pysdif__pysdif, sizeof(__pyx_k_pysdif__pysdif), 0, 0, 1, 1},
    {&__pyx_kp_s_pysdif__pysdif_pyx, __pyx_k_pysdif__pysdif_pyx, sizeof(__pyx_k_pysdif__pysdif_pyx), 0, 0, 1, 0},
    {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_unpickle_Component, __pyx_k_pyx_unpickle_Component, sizeof(__pyx_k_pyx_unpickle_Component), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_unpickle_FrameTypeDefiniti, __pyx_k_pyx_unpickle_FrameTypeDefiniti, sizeof(__pyx_k_pyx_unpickle_FrameTypeDefiniti), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_unpickle_FrameW, __pyx_k_pyx_unpickle_FrameW, sizeof(__pyx_k_pyx_unpickle_FrameW), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_unpickle_MatrixTypeDefinit, __pyx_k_pyx_unpickle_MatrixTypeDefinit, sizeof(__pyx_k_pyx_unpickle_MatrixTypeDefinit), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
    {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
    {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
    {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
    {&__pyx_n_s_read_padding, __pyx_k_read_padding, sizeof(__pyx_k_read_padding), 0, 0, 1, 1},
    {&__pyx_n_s_read_sdiftypes, __pyx_k_read_sdiftypes, sizeof(__pyx_k_read_sdiftypes), 0, 0, 1, 1},
    {&__pyx_n_s_read_signature, __pyx_k_read_signature, sizeof(__pyx_k_read_signature), 0, 0, 1, 1},
    {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
    {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
    {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
    {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
    {&__pyx_n_s_rewind, __pyx_k_rewind, sizeof(__pyx_k_rewind), 0, 0, 1, 1},
    {&__pyx_n_s_rewind_2, __pyx_k_rewind_2, sizeof(__pyx_k_rewind_2), 0, 0, 1, 1},
    {&__pyx_n_s_rows, __pyx_k_rows, sizeof(__pyx_k_rows), 0, 0, 1, 1},
    {&__pyx_n_s_rw, __pyx_k_rw, sizeof(__pyx_k_rw), 0, 0, 1, 1},
    {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
    {&__pyx_kp_s_s_should_be_either_a_str_or_byte, __pyx_k_s_should_be_either_a_str_or_byte, sizeof(__pyx_k_s_should_be_either_a_str_or_byte), 0, 0, 1, 0},
    {&__pyx_n_s_sdif_cleanup, __pyx_k_sdif_cleanup, sizeof(__pyx_k_sdif_cleanup), 0, 0, 1, 1},
    {&__pyx_n_s_sdif_init, __pyx_k_sdif_init, sizeof(__pyx_k_sdif_init), 0, 0, 1, 1},
    {&__pyx_n_s_sdifstr, __pyx_k_sdifstr, sizeof(__pyx_k_sdifstr), 0, 0, 1, 1},
    {&__pyx_n_s_sdiftypes_data, __pyx_k_sdiftypes_data, sizeof(__pyx_k_sdiftypes_data), 0, 0, 1, 1},
    {&__pyx_n_s_sdiftypes_path, __pyx_k_sdiftypes_path, sizeof(__pyx_k_sdiftypes_path), 0, 0, 1, 1},
    {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
    {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
    {&__pyx_n_s_setLevel, __pyx_k_setLevel, sizeof(__pyx_k_setLevel), 0, 0, 1, 1},
    {&__pyx_n_s_set_name, __pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 0, 1, 1},
    {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
    {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
    {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
    {&__pyx_n_s_sig, __pyx_k_sig, sizeof(__pyx_k_sig), 0, 0, 1, 1},
    {&__pyx_n_s_signature, __pyx_k_signature, sizeof(__pyx_k_signature), 0, 0, 1, 1},
    {&__pyx_n_s_signature2str, __pyx_k_signature2str, sizeof(__pyx_k_signature2str), 0, 0, 1, 1},
    {&__pyx_kp_s_signature_not_found, __pyx_k_signature_not_found, sizeof(__pyx_k_signature_not_found), 0, 0, 1, 0},
    {&__pyx_n_s_signatures_to_clone, __pyx_k_signatures_to_clone, sizeof(__pyx_k_signatures_to_clone), 0, 0, 1, 1},
    {&__pyx_n_s_signaturesture, __pyx_k_signaturesture, sizeof(__pyx_k_signaturesture), 0, 0, 1, 1},
    {&__pyx_n_s_sigs, __pyx_k_sigs, sizeof(__pyx_k_sigs), 0, 0, 1, 1},
    {&__pyx_n_s_skip, __pyx_k_skip, sizeof(__pyx_k_skip), 0, 0, 1, 1},
    {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1},
    {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
    {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
    {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
    {&__pyx_n_s_status, __pyx_k_status, sizeof(__pyx_k_status), 0, 0, 1, 1},
    {&__pyx_n_s_str2signature, __pyx_k_str2signature, sizeof(__pyx_k_str2signature), 0, 0, 1, 1},
    {&__pyx_n_s_streamID, __pyx_k_streamID, sizeof(__pyx_k_streamID), 0, 0, 1, 1},
    {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
    {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
    {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
    {&__pyx_n_s_system, __pyx_k_system, sizeof(__pyx_k_system), 0, 0, 1, 1},
    {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
    {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
    {&__pyx_n_s_thisfile, __pyx_k_thisfile, sizeof(__pyx_k_thisfile), 0, 0, 1, 1},
    {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
    {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
    {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1},
    {&__pyx_n_s_treeway, __pyx_k_treeway, sizeof(__pyx_k_treeway), 0, 0, 1, 1},
    {&__pyx_kp_s_tried_to_finalize_matrix_but_sta, __pyx_k_tried_to_finalize_matrix_but_sta, sizeof(__pyx_k_tried_to_finalize_matrix_but_sta), 0, 0, 1, 0},
    {&__pyx_n_s_uint16, __pyx_k_uint16, sizeof(__pyx_k_uint16), 0, 0, 1, 1},
    {&__pyx_n_s_uint32, __pyx_k_uint32, sizeof(__pyx_k_uint32), 0, 0, 1, 1},
    {&__pyx_n_s_uint64, __pyx_k_uint64, sizeof(__pyx_k_uint64), 0, 0, 1, 1},
    {&__pyx_n_s_uint8, __pyx_k_uint8, sizeof(__pyx_k_uint8), 0, 0, 1, 1},
    {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
    {&__pyx_n_s_use_setstate, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1},
    {&__pyx_kp_s_usr_local_share, __pyx_k_usr_local_share, sizeof(__pyx_k_usr_local_share), 0, 0, 1, 0},
    {&__pyx_kp_s_usr_share, __pyx_k_usr_share, sizeof(__pyx_k_usr_share), 0, 0, 1, 0},
    {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
    {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
    {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1},
    {&__pyx_n_s_warning, __pyx_k_warning, sizeof(__pyx_k_warning), 0, 0, 1, 1},
    {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
    {&__pyx_n_s_wr, __pyx_k_wr, sizeof(__pyx_k_wr), 0, 0, 1, 1},
    {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
    {&__pyx_n_s_write_all_ascii_chunks, __pyx_k_write_all_ascii_chunks, sizeof(__pyx_k_write_all_ascii_chunks), 0, 0, 1, 1},
    {0, 0, 0, 0, 0, 0, 0}
  };
  return __Pyx_InitStrings(__pyx_string_tab);
}
/* #### Code section: cached_builtins ### */
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 218, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
  __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(0, 426, __pyx_L1_error)
  __pyx_builtin_NameError = __Pyx_GetBuiltinName(__pyx_n_s_NameError); if (!__pyx_builtin_NameError) __PYX_ERR(0, 498, __pyx_L1_error)
  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 762, __pyx_L1_error)
  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 889, __pyx_L1_error)
  __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 907, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 1032, __pyx_L1_error)
  __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 1183, __pyx_L1_error)
  __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) __PYX_ERR(0, 1198, __pyx_L1_error)
  __pyx_builtin_EOFError = __Pyx_GetBuiltinName(__pyx_n_s_EOFError); if (!__pyx_builtin_EOFError) __PYX_ERR(0, 1813, __pyx_L1_error)
  __pyx_builtin_OverflowError = __Pyx_GetBuiltinName(__pyx_n_s_OverflowError); if (!__pyx_builtin_OverflowError) __PYX_ERR(1, 83, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 86, __pyx_L1_error)
  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 96, __pyx_L1_error)
  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 983, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cached_constants ### */

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":983
 *         __pyx_import_array()
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_umath() except -1:
 */
  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple_)) __PYX_ERR(2, 983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "../../../.virtualenvs/em11/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":989
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_ufunc() except -1:
 */
  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(2, 989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "pysdif/_pysdif.pyx":283
 * 
 * cdef StreamID_fromSdifStreadIDT(SdifStreamIDT *this):
 *     cdef StreamID out = StreamID(-1, None, None)  # create a wrapper             # <<<<<<<<<<<<<<
 *     out.this = this
 *     out.own_this = 0
 */
  __pyx_tuple__3 = PyTuple_Pack(3, __pyx_int_neg_1, Py_None, Py_None); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "pysdif/_pysdif.pyx":495
 * def _find_sdiftypes():
 * 
 *     def get_packaged_sdiftypes():             # <<<<<<<<<<<<<<
 *         try:
 *             thisfile = __file__
 */
  __pyx_tuple__6 = PyTuple_Pack(3, __pyx_n_s_thisfile, __pyx_n_s_datadir, __pyx_n_s_sdiftypes_data); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);
  __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__6, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_get_packaged_sdiftypes, 495, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(0, 495, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":889
 *     def __iter__(self):
 *         if self.source.frame_status >= eFrameSomeDataRead:
 *             raise RuntimeError("A Frame can only be iterated once")             # <<<<<<<<<<<<<<
 *         self.source.frame_status = eFrameSomeDataRead
 *         return self
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_A_Frame_can_only_be_iterated_onc); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "pysdif/_pysdif.pyx":998
 *     def __enter__(self):
 *         if self._written:
 *             raise RuntimeError("Frame has already been written!")             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_Frame_has_already_been_written); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "pysdif/_pysdif.pyx":1025
 *         """
 *         if self.num_matrices >= 100:
 *             raise RuntimeError("Two many matrices for one frame")             # <<<<<<<<<<<<<<
 * 
 *         if self._written:
 */
  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_Two_many_matrices_for_one_frame); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 1025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "pysdif/_pysdif.pyx":1684
 *                     raise SdifOrderError("Attempted to read matrix header, but there are no more matrices in this frame")
 *                 else:
 *                     raise IOError("Could not read matrix header. ")             # <<<<<<<<<<<<<<
 *             status = eMatrixHeaderRead
 *         if status == eMatrixHeaderRead:
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_Could_not_read_matrix_header); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 1684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "pysdif/_pysdif.pyx":1689
 *             bytesread = self._matrix_read_data()
 *             if not bytesread:
 *                 raise IOError("matrix empty or could not read matrix data")             # <<<<<<<<<<<<<<
 *         if copy:
 *             return _array_from_matrix_data_copy(self.this.CurrMtrxData)
 */
  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_matrix_empty_or_could_not_read_m); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "pysdif/_pysdif.pyx":1813
 *         logger.debug("frame_skip_rest")
 *         if self.eof:
 *             raise EOFError("Attempted to read past end of file")             # <<<<<<<<<<<<<<
 *         cdef int error = self._frame_skip_rest()
 *         return False if error else True
 */
  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_Attempted_to_read_past_end_of_fi); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 1813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "pysdif/_pysdif.pyx":1945
 *         sig = asbytes(signature)
 *         if isinstance(column_names, (str, bytes)):
 *             column_names = asbytes(column_names).replace(b",", b" ").split()             # <<<<<<<<<<<<<<
 *         cdef SdifMatrixTypeT *mt = MatrixType_create(signature, column_names)
 *         if mt == NULL:
 */
  __pyx_tuple__19 = PyTuple_Pack(2, __pyx_kp_b__18, __pyx_kp_b__4); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 1945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "pysdif/_pysdif.pyx":1948
 *         cdef SdifMatrixTypeT *mt = MatrixType_create(signature, column_names)
 *         if mt == NULL:
 *             raise RuntimeError("Could not create matrixtype")             # <<<<<<<<<<<<<<
 *         SdifPutMatrixType(self.this.MatrixTypesTable, mt)
 *         # TODO: is this a memory leak? who destroys the MatrixType?
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_Could_not_create_matrixtype); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 1948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "pysdif/_pysdif.pyx":1990
 *         cdef SdifFrameTypeT *ft = FrameType_create(signature, components)
 *         if ft == NULL:
 *             raise RuntimeError("Could not create frametype")             # <<<<<<<<<<<<<<
 *         SdifPutFrameType(self.this.FrameTypesTable, ft)
 *         # TODO: is this a memory leak? who destroys the FrameType?
 */
  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_Could_not_create_frametype); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 1990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "pysdif/_pysdif.pyx":2008
 *         """
 *         if not(self.this.Mode == eWriteFile or self.this.Mode == eReadWriteFile):
 *             raise IOError("This function is only possible for SdifFiles opened in write mode")             # <<<<<<<<<<<<<<
 *         frametypes = source.get_frame_types()
 *         matrixtypes = source.get_matrix_types()
 */
  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_This_function_is_only_possible_f); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 2008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "pysdif/_pysdif.pyx":2136
 *         # a component is a strings '{Signature} {Description}'
 *         if not components:
 *             raise KeyError("signature not found")             # <<<<<<<<<<<<<<
 *         self.add_frame_type(sig, components)
 *         for comp in components:
 */
  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_signature_not_found); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 2136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x8e7a8c2, 0xec235b2, 0x3fbaffb):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x8e7a8c2, 0xec235b2, 0x3fbaffb) = (column_names, signature))" % __pyx_checksum
 */
  __pyx_tuple__24 = PyTuple_Pack(3, __pyx_int_149399746, __pyx_int_247608754, __pyx_int_66826235); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);
  __pyx_tuple__25 = PyTuple_Pack(3, __pyx_int_229941985, __pyx_int_216518149, __pyx_int_20897590); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);
  __pyx_tuple__26 = PyTuple_Pack(3, __pyx_int_17723012, __pyx_int_256861586, __pyx_int_57246580); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);
  __pyx_tuple__27 = PyTuple_Pack(3, __pyx_int_117679685, __pyx_int_149774176, __pyx_int_168628298); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "pysdif/_pysdif.pyx":34
 * ctypedef char* charptr
 * 
 * import os.path             # <<<<<<<<<<<<<<
 * import platform
 * import numpy as np
 */
  __pyx_tuple__28 = PyTuple_Pack(2, __pyx_n_s_os, __pyx_n_s_path); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "pysdif/_pysdif.pyx":40
 * from numpy cimport ndarray, npy_intp
 * import logging
 * logger = logging.getLogger("pysdif")             # <<<<<<<<<<<<<<
 * logger.setLevel(logging.INFO)
 * 
 */
  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_n_s_pysdif); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "pysdif/_pysdif.pyx":151
 * 
 * 
 * def signature2str(int sig):             # <<<<<<<<<<<<<<
 *     """
 *     Converts a numeric signature into a string signature
 */
  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_sig); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);
  __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_signature2str, 151, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 151, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":164
 * 
 * 
 * def str2signature(s):             # <<<<<<<<<<<<<<
 *     """
 *     Converts a 4-byte string signature into a numeric signature
 */
  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);
  __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_str2signature, 164, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 164, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);
  __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_tuple__36 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);
  __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__38 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);
  __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_MatrixTypeDefinition, (type(self), 0x8e7a8c2, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_MatrixTypeDefinition__set_state(self, __pyx_state)
 */
  __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Component, (type(self), 0xdb4a2e1, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Component__set_state(self, __pyx_state)
 */
  __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FrameTypeDefinition, (type(self), 0x10e6e84, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FrameTypeDefinition__set_state(self, __pyx_state)
 */
  __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":447
 * }
 * 
 * def read_sdiftypes():             # <<<<<<<<<<<<<<
 *     """
 *     Retrieves predefined types definitions parsed from SdifTypes.STYP
 */
  __pyx_tuple__45 = PyTuple_Pack(2, __pyx_n_s_frametypes, __pyx_n_s_matrixtypes); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);
  __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_read_sdiftypes, 447, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 447, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":459
 *     return frametypes, matrixtypes
 * 
 * def _frametypes_populate():             # <<<<<<<<<<<<<<
 *     frametypeslist, matrixtypeslist = read_sdiftypes()
 *     frametypes = {f.signature: f.components for f in frametypeslist}
 */
  __pyx_tuple__47 = PyTuple_Pack(13, __pyx_n_s_frametypeslist, __pyx_n_s_matrixtypeslist, __pyx_n_s_frametypes, __pyx_n_s_matrixtypes, __pyx_n_s_allframetypes, __pyx_n_s_f, __pyx_n_s_components, __pyx_n_s_allmatrixtypes, __pyx_n_s_matrixsig, __pyx_n_s_column_names, __pyx_n_s_f, __pyx_n_s_m, __pyx_n_s_comp); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);
  __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_frametypes_populate, 459, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 459, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":472
 * 
 * 
 * def predefined_frametypes():             # <<<<<<<<<<<<<<
 *     """
 *     Returns a dict of predefined sdif frame types
 */
  __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_predefined_frametypes, 472, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 472, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":482
 * 
 * 
 * def predefined_matrixtypes():             # <<<<<<<<<<<<<<
 *     """
 *     Returns a list of predefined sdif matrix types
 */
  __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_predefined_matrixtypes, 482, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 482, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":493
 * # ----------------------------------------------------------------------
 * 
 * def _find_sdiftypes():             # <<<<<<<<<<<<<<
 * 
 *     def get_packaged_sdiftypes():
 */
  __pyx_tuple__51 = PyTuple_Pack(9, __pyx_n_s_get_packaged_sdiftypes, __pyx_n_s_get_packaged_sdiftypes, __pyx_n_s_pl, __pyx_n_s_paths, __pyx_n_s_warnings, __pyx_n_s_p, __pyx_n_s_p2, __pyx_n_s_packaged_sdiftypes, __pyx_n_s_p); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);
  __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_find_sdiftypes, 493, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 493, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":529
 * 
 * 
 * def sdif_init(sdiftypes_path=None):             # <<<<<<<<<<<<<<
 *     """
 *     Initialize the sdif library
 */
  __pyx_tuple__53 = PyTuple_Pack(1, __pyx_n_s_sdiftypes_path); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);
  __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_sdif_init, 529, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 529, __pyx_L1_error)
  __pyx_tuple__55 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);

  /* "pysdif/_pysdif.pyx":567
 * 
 * 
 * def sdif_cleanup():             # <<<<<<<<<<<<<<
 *     SdifGenKill()
 * 
 */
  __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_sdif_cleanup, 567, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 567, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":602
 * 
 * cdef tuple _framestatus2str = (
 *     "Invalid",             # <<<<<<<<<<<<<<
 *     "NothingRead",
 *     "HeaderRead",
 */
  __pyx_tuple__57 = PyTuple_Pack(6, __pyx_n_s_Invalid, __pyx_n_s_NothingRead, __pyx_n_s_HeaderRead, __pyx_n_s_SomeDataRead, __pyx_n_s_AllDataRead, __pyx_n_s_SignatureRead); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);

  /* "pysdif/_pysdif.pyx":610
 * )
 * 
 * def framestatus2str(int status):             # <<<<<<<<<<<<<<
 *     if 0 <= status < 6:
 *         return _framestatus2str[status]
 */
  __pyx_tuple__58 = PyTuple_Pack(1, __pyx_n_s_status); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);
  __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_framestatus2str, 610, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 610, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":616
 * 
 * cdef tuple _matrixstatus2str = (
 *     "Invalid",             # <<<<<<<<<<<<<<
 *     "NothingRead",
 *     "HeaderRead",
 */
  __pyx_tuple__60 = PyTuple_Pack(6, __pyx_n_s_Invalid, __pyx_n_s_NothingRead, __pyx_n_s_HeaderRead, __pyx_n_s_DataRead, __pyx_n_s_DataSkipped, __pyx_n_s_Offline); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);

  /* "pysdif/_pysdif.pyx":624
 * )
 * 
 * def matrixstatus2str(int status):             # <<<<<<<<<<<<<<
 *     """
 *     Return a string identifier for a matrix status.
 */
  __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_matrixstatus2str, 624, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 624, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":722
 *                 return self._signature
 * 
 *     def get_data(self, copy=True):             # <<<<<<<<<<<<<<
 *         """
 *         Read the data from the matrix as a numpy array
 */
  __pyx_tuple__62 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_copy); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);
  __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_get_data, 722, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 722, __pyx_L1_error)
  __pyx_tuple__64 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);

  /* "pysdif/_pysdif.pyx":751
 *         return _array_from_matrix_data_no_copy(self.source_this.CurrMtrxData)
 * 
 *     def column_names(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a list of column names for the current matrix
 */
  __pyx_tuple__65 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_sig, __pyx_n_s_matrixtypes, __pyx_n_s_colnames, __pyx_n_s_mtd); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);
  __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_column_names, 751, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 751, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":765
 *         return colnames
 * 
 *     def skip(self):             # <<<<<<<<<<<<<<
 *         """
 *         Skip reading the data
 */
  __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_skip, 765, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 765, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":910
 *         return matrix
 * 
 *     def get_matrix(self, copy=True):             # <<<<<<<<<<<<<<
 *         """
 *         Reads the next matrix entirely, returns (matrixsig, data)
 */
  __pyx_tuple__70 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_copy, __pyx_n_s_matrix); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);
  __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_get_matrix, 910, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 910, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":996
 *             sig2str(self.signature), self.time, self.streamID, bool(self._written))
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         if self._written:
 *             raise RuntimeError("Frame has already been written!")
 */
  __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_enter, 996, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 996, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1001
 *         return self
 * 
 *     def __exit__(self, exception_type, exception_value, traceback):             # <<<<<<<<<<<<<<
 *         if self.num_matrices == 0:
 *             logger.warning("No matrices were added! Frame not written")
 */
  __pyx_tuple__75 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_exception_type, __pyx_n_s_exception_value, __pyx_n_s_traceback); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 1001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);
  __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_exit, 1001, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 1001, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1016
 *         def __get__(self): return bool(self._written)
 * 
 *     def add_matrix(self, str signature, c_numpy.ndarray data_array):             # <<<<<<<<<<<<<<
 *         """
 *         Add a matrix to this Frame
 */
  __pyx_tuple__77 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_signature, __pyx_n_s_data_array, __pyx_n_s_shape, __pyx_n_s_i); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 1016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);
  __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_add_matrix, 1016, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 1016, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1045
 * 
 * 
 *     def write(self):             # <<<<<<<<<<<<<<
 *         """
 *         Write the current frame to disk.
 */
  __pyx_tuple__79 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_fsz, __pyx_n_s_matrix_sig, __pyx_n_s_dtype, __pyx_n_s_matrix, __pyx_n_s_i); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 1045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);
  __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_write, 1045, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 1045, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FrameW, (type(self), 0x703a645, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FrameW__set_state(self, __pyx_state)
 */
  __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1254
 *         self.close()  # fails silently if already closed
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         """
 *         Close this SdifFile
 */
  __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_close, 1254, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 1254, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1315
 *         return self.this.CurrFramPos
 * 
 *     def curr_matrix_size(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the number of rows and number of columns in the current matrix
 */
  __pyx_tuple__84 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_m); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 1315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);
  __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_curr_matrix_size, 1315, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 1315, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1334
 *         return (m.NbRow, m.NbCol)
 * 
 *     def curr_matrix_datatype(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the datatype code (an int) or 0 if go current matrix
 */
  __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_curr_matrix_datatype, 1334, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 1334, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1345
 *         return self.this.CurrMtrxH.DataType
 * 
 *     def curr_signature(self):             # <<<<<<<<<<<<<<
 *         """
 *         **Low-level interface** - Return the current frame's numerical signature
 */
  __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_curr_signature, 1345, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 1345, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1359
 *         return self.this.CurrMtrxH.Signature
 * 
 *     def curr_matrix_signature(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get the string signature of the current matrix, or None if no current matrix
 */
  __pyx_tuple__88 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_sig); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 1359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);
  __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_curr_matrix_signature, 1359, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 1359, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1373
 *         return None
 * 
 *     def frame_num_matrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get the number of matrices in current frame.
 */
  __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_frame_num_matrix, 1373, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 1373, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1386
 *         return self.this.CurrFramH.NbMatrix
 * 
 *     def frame_id(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get the id of the current frame, or -1 if no current frame
 */
  __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_frame_id, 1386, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 1386, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1411
 *         SdifFSetPos(self.this, &pos)
 * 
 *     def frame_numerical_signature(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the num. signature of current frame, or -1 if no current frame
 */
  __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_frame_numerical_signature, 1411, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 1411, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1423
 *         return self.this.CurrFramH.Signature
 * 
 *     def frame_signature(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the str. signature of the current frame, or None if no current frame
 */
  __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_frame_signature, 1423, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 1423, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1434
 *         return sig2str(self.this.CurrFramH.Signature)
 * 
 *     def frame_time(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get the time of the current frame, or -1 if no current frame
 */
  __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_frame_time, 1434, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 1434, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1445
 *         return self.this.CurrFramH.Time
 * 
 *     def last_error(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns (error_tag, error_level) or None if there is no last error
 */
  __pyx_tuple__95 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_error); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 1445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);
  __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_last_error, 1445, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 1445, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1455
 *         return (error.Tag, error.Level)
 * 
 *     def curr_frame_is_selected(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the current frame is selected.
 */
  __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_curr_frame_is_selected, 1455, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 1455, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1472
 *         return bool(SdifFCurrFrameIsSelected(self.this))
 * 
 *     def curr_matrix_is_selected(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the current matrix is selected.
 */
  __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_curr_matrix_is_selected, 1472, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 1472, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1487
 *         return bool(SdifFCurrMatrixIsSelected(self.this))
 * 
 *     def get_num_NVTs(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get the number of NameValueTables defined in this sdif
 */
  __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_get_num_NVTs, 1487, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 1487, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1520
 *         return bytes_read
 * 
 *     def frame_read_header(self):             # <<<<<<<<<<<<<<
 *         """
 *         Low level interface - Read the frame header.
 */
  __pyx_tuple__100 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_error, __pyx_n_s_bytesread); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 1520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);
  __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__100, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_frame_read_header, 1520, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 1520, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1549
 *                 raise SdifOrderError("The frame should be read or skipped before a new header is read")
 * 
 *     def frame_skip_data(self):             # <<<<<<<<<<<<<<
 *         """
 *         Low level interface - Skip frame and all its matrices
 */
  __pyx_tuple__102 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_bytes_read, __pyx_n_s_error); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 1549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);
  __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_frame_skip_data, 1549, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 1549, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1560
 *         return bytes_read
 * 
 *     cpdef int _read_signature(self):             # <<<<<<<<<<<<<<
 *         cdef size_t NbCharRead
 *         self.eof = SdifFGetSignature(self.this, &NbCharRead) == eEof
 */
  __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_read_signature, 1560, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 1560, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1579
 *         return SdifFReadMatrixHeader(self.this)
 * 
 *     def matrix_read_header(self):             # <<<<<<<<<<<<<<
 *         """
 *         Low level interface - Read the matrix header
 */
  __pyx_tuple__105 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_bytesread); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 1579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);
  __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_matrix_read_header, 1579, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(0, 1579, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1606
 *         return bytesread
 * 
 *     def curr_frame_available(self):             # <<<<<<<<<<<<<<
 *        return self.this.CurrFramH != NULL
 * 
 */
  __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_curr_frame_available, 1606, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 1606, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1609
 *        return self.this.CurrFramH != NULL
 * 
 *     def curr_matrix_available(self):             # <<<<<<<<<<<<<<
 *        return self.this.CurrMtrxH != NULL
 * 
 */
  __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_curr_matrix_available, 1609, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 1609, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1612
 *        return self.this.CurrMtrxH != NULL
 * 
 *     def matrix_skip_data(self):             # <<<<<<<<<<<<<<
 *         """
 *         Low-level Interface - Skip the matrix data without reading it.
 */
  __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_matrix_skip_data, 1612, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 1612, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1650
 *         return bytesread
 * 
 *     def matrix_read_data(self, copy=False):             # <<<<<<<<<<<<<<
 *         """
 *         Read the data of the current matrix as a numpy array
 */
  __pyx_tuple__110 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_copy, __pyx_n_s_status, __pyx_n_s_bytesread); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 1650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);
  __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_matrix_read_data, 1650, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 1650, __pyx_L1_error)
  __pyx_tuple__112 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 1650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__112);
  __Pyx_GIVEREF(__pyx_tuple__112);

  /* "pysdif/_pysdif.pyx":1712
 *         return 0
 * 
 *     def matrix_skip(self):             # <<<<<<<<<<<<<<
 *         """
 *         Low level Interface. Skip the matrix altogether.
 */
  __pyx_tuple__113 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_matrix_status, __pyx_n_s_bytes_read, __pyx_n_s_error); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 1712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__113);
  __Pyx_GIVEREF(__pyx_tuple__113);
  __pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_matrix_skip, 1712, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) __PYX_ERR(0, 1712, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1739
 *         return bytes_read
 * 
 *     def status(self):             # <<<<<<<<<<<<<<
 *         """
 *         The status of this sdiffile
 */
  __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_status, 1739, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 1739, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1767
 *             return
 * 
 *     def next_frame(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read the next frame, returns a Frame or None if no more frames left.
 */
  __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_next_frame, 1767, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(0, 1767, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1798
 *         return self.frame if self.eof == 0 else None
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_enter, 1798, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 1798, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1801
 *         return self
 * 
 *     def __exit__(self):             # <<<<<<<<<<<<<<
 *         self.close()
 * 
 */
  __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_exit, 1801, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(0, 1801, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1804
 *         self.close()
 * 
 *     def frame_skip_rest(self):             # <<<<<<<<<<<<<<
 *         """
 *         Skipts the rest of the frame, so that a new frame can be read.
 */
  __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_frame_skip_rest, 1804, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 1804, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1849
 *         return 0
 * 
 *     def next_matrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read the next matrix header and return a Matrix with its data **still not read**.
 */
  __pyx_tuple__120 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_matrix_status); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 1849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__120);
  __Pyx_GIVEREF(__pyx_tuple__120);
  __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_next_matrix, 1849, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 1849, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1873
 *         return self.matrix
 * 
 *     def rewind(self):             # <<<<<<<<<<<<<<
 *         """
 *         Rewind the SdifFile.
 */
  __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_rewind, 1873, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(0, 1873, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1883
 *         self.reinit()
 * 
 *     def _rewind(self):             # <<<<<<<<<<<<<<
 *         SdifFRewind(self.this)
 * 
 */
  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_rewind_2, 1883, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 1883, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1892
 *             self.init_write()
 * 
 *     def _read_padding(self):             # <<<<<<<<<<<<<<
 *         return SdifFReadPadding(self.this, SdifFPaddingCalculate(self.this.Stream, self.this.Pos))
 * 
 */
  __pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_read_padding, 1892, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(0, 1892, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1899
 *     # ------------------------------------------------
 * 
 *     def add_NVT(self, dict d):             # <<<<<<<<<<<<<<
 *         """
 *         The NVT (Name Value Table) is a place to put metadata about the file.
 */
  __pyx_tuple__125 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_d, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(0, 1899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__125);
  __Pyx_GIVEREF(__pyx_tuple__125);
  __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_add_NVT, 1899, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(0, 1899, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1927
 *             SdifNameValuesLPutCurrNVT(self.this.NameValues, asbytes(name), asbytes(value))
 * 
 *     def add_matrix_type(self, signature, column_names):             # <<<<<<<<<<<<<<
 *         """
 *         Adds a matrix type to this Sdif
 */
  __pyx_tuple__127 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_signature, __pyx_n_s_column_names, __pyx_n_s_sig, __pyx_n_s_mt); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 1927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__127);
  __Pyx_GIVEREF(__pyx_tuple__127);
  __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_add_matrix_type, 1927, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(0, 1927, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1953
 *         #self.frame_status = eFrameInvalid
 * 
 *     def add_frame_type(self, signature, list components):             # <<<<<<<<<<<<<<
 *         """
 *         Adds a frame type to this sdif.
 */
  __pyx_tuple__129 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_signature, __pyx_n_s_components, __pyx_n_s_ft); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 1953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__129);
  __Pyx_GIVEREF(__pyx_tuple__129);
  __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_add_frame_type, 1953, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(0, 1953, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":1994
 *         # TODO: is this a memory leak? who destroys the FrameType?
 * 
 *     def clone_type_definitions(self, SdifFile source):             # <<<<<<<<<<<<<<
 *         """
 * 
 */
  __pyx_tuple__131 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_source, __pyx_n_s_frametypes, __pyx_n_s_matrixtypes, __pyx_n_s_frametype, __pyx_n_s_matrixtype); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 1994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__131);
  __Pyx_GIVEREF(__pyx_tuple__131);
  __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_clone_type_definitions, 1994, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 1994, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2016
 *             self.add_matrix_type(matrixtype.signature, matrixtype.column_names)
 * 
 *     def clone_NVTs(self, SdifFile source):             # <<<<<<<<<<<<<<
 *         """
 *         Clone the NVT (name:value table) from source (an open SdifFile)
 */
  __pyx_tuple__133 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_source, __pyx_n_s_nvt); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 2016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__133);
  __Pyx_GIVEREF(__pyx_tuple__133);
  __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_clone_NVTs, 2016, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(0, 2016, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2045
 *             self.add_NVT(nvt)
 * 
 *     def clone_definitions(self, SdifFile source):             # <<<<<<<<<<<<<<
 *         """
 *         Only for writing mode - Clone both NVT(s), frame and matrix definitions
 */
  __pyx_tuple__135 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_source); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 2045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__135);
  __Pyx_GIVEREF(__pyx_tuple__135);
  __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_clone_definitions, 2045, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(0, 2045, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2075
 *         return self
 * 
 *     def clone_frames(self, SdifFile source, signatures_to_clone=None):             # <<<<<<<<<<<<<<
 *         """
 *         Clone all the frames in source which are included in
 */
  __pyx_tuple__137 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_source, __pyx_n_s_signatures_to_clone, __pyx_n_s_sigs, __pyx_n_s_frame0, __pyx_n_s_frame1, __pyx_n_s_matrix, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 2075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__137);
  __Pyx_GIVEREF(__pyx_tuple__137);
  __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_clone_frames, 2075, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(0, 2075, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2105
 *                 frame1.write()
 * 
 *     def add_streamID(self, unsigned int numid, char *source, char *treeway):             # <<<<<<<<<<<<<<
 *         """
 *         This method is only there for completion.
 */
  __pyx_tuple__139 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_numid, __pyx_n_s_source, __pyx_n_s_treeway); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(0, 2105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__139);
  __Pyx_GIVEREF(__pyx_tuple__139);
  __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_add_streamID, 2105, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(0, 2105, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2122
 *             numid, source, treeway)
 * 
 *     def add_predefined_frametype(self, signature):             # <<<<<<<<<<<<<<
 *         """
 *         Add a predefined frame type with corresponding matrix definitions
 */
  __pyx_tuple__141 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_signature, __pyx_n_s_sig, __pyx_n_s_components, __pyx_n_s_comp, __pyx_n_s_matrixsig, __pyx_n_s_matrixrole, __pyx_n_s_column_names); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(0, 2122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__141);
  __Pyx_GIVEREF(__pyx_tuple__141);
  __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_add_predefined_frametype, 2122, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 2122, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2147
 *             self.add_matrix_type(matrixsig, column_names)
 * 
 *     def write_all_ascii_chunks(self):             # <<<<<<<<<<<<<<
 *         """
 *         **Low-level Interface**
 */
  __pyx_codeobj__143 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_write_all_ascii_chunks, 2147, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__143)) __PYX_ERR(0, 2147, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2162
 *         self.write_status = eSdifAllASCIIChunks
 * 
 *     def new_frame(self, signature, SdifFloat8 time, SdifUInt4 streamID=0):             # <<<<<<<<<<<<<<
 *         """
 *         Create a new frame with given signature and at given time
 */
  __pyx_tuple__144 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_signature, __pyx_n_s_time, __pyx_n_s_streamID); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__144);
  __Pyx_GIVEREF(__pyx_tuple__144);
  __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_new_frame, 2162, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __pyx_tuple__146 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__146);
  __Pyx_GIVEREF(__pyx_tuple__146);

  /* "pysdif/_pysdif.pyx":2207
 *         return FrameW_new(self, str2sig(asbytes(signature)), time, streamID)
 * 
 *     def new_frame_one_matrix(self, frame_sig, SdifFloat8 time, matrix_sig,             # <<<<<<<<<<<<<<
 *                              c_numpy.ndarray matrixdata, SdifUInt4 streamID=0):
 *         """
 */
  __pyx_tuple__147 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_frame_sig, __pyx_n_s_time, __pyx_n_s_matrix_sig, __pyx_n_s_matrixdata, __pyx_n_s_streamID, __pyx_n_s_frame_size); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 2207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__147);
  __Pyx_GIVEREF(__pyx_tuple__147);
  __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_new_frame_one_matrix, 2207, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 2207, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2255
 * 
 *     # low level functions to print info
 *     def print_NVT(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - Print the name value table """
 *         SdifFPrintAllNameValueNVT(self.this)
 */
  __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_print_NVT, 2255, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(0, 2255, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2259
 *         SdifFPrintAllNameValueNVT(self.this)
 * 
 *     def print_general_header(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - Print the general header """
 *         cdef size_t n = SdifFPrintGeneralHeader(self.this)
 */
  __pyx_tuple__150 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_n); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(0, 2259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__150);
  __Pyx_GIVEREF(__pyx_tuple__150);
  __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_print_general_header, 2259, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(0, 2259, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2263
 *         cdef size_t n = SdifFPrintGeneralHeader(self.this)
 * 
 *     def print_all_ascii_chunks(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - print all text chunks """
 *         SdifFPrintAllASCIIChunks(self.this)
 */
  __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_print_all_ascii_chunks, 2263, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(0, 2263, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2267
 *         SdifFPrintAllASCIIChunks(self.this)
 * 
 *     def print_all_types(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - Print all types defined in this sdif file"""
 *         SdifFPrintAllType(self.this)
 */
  __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_print_all_types, 2267, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(0, 2267, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2271
 *         SdifFPrintAllType(self.this)
 * 
 *     def print_matrix_header(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - Print the matrix header"""
 *         SdifFPrintMatrixHeader(self.this)
 */
  __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_print_matrix_header, 2271, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 2271, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2275
 *         SdifFPrintMatrixHeader(self.this)
 * 
 *     def print_one_row(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - print one row of the current matrix"""
 *         SdifFPrintOneRow(self.this)
 */
  __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_print_one_row, 2275, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(0, 2275, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2279
 *         SdifFPrintOneRow(self.this)
 * 
 *     def print_frame_header(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface- Print the frame header """
 *         SdifFPrintFrameHeader(self.this)
 */
  __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_print_frame_header, 2279, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(0, 2279, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2283
 *         SdifFPrintFrameHeader(self.this)
 * 
 *     def print_all_stream_ID(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - Print the ID of all streams """
 *         SdifFPrintAllStreamID(self.this)
 */
  __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_print_all_stream_ID, 2283, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(0, 2283, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2287
 *         SdifFPrintAllStreamID(self.this)
 * 
 *     def frame_types_to_string(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a string with all frame types
 */
  __pyx_tuple__158 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_sdifstr, __pyx_n_s_out); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(0, 2287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__158);
  __Pyx_GIVEREF(__pyx_tuple__158);
  __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_frame_types_to_string, 2287, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(0, 2287, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2299
 *         return out
 * 
 *     def get_frame_types(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a list of Frame Type Definitions (1FTD)
 */
  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_get_frame_types, 2299, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 2299, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2311
 *         return FrameTypesTable_to_list(self.this.FrameTypesTable)
 * 
 *     def matrix_types_to_string(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a string with all matrix types
 */
  __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_matrix_types_to_string, 2311, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) __PYX_ERR(0, 2311, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2325
 *         return out
 * 
 *     def get_matrix_types(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get a list of matrix type definitions (1MTD)
 */
  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_get_matrix_types, 2325, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 2325, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2335
 *         return MatrixTypesTable_to_list(self.this.MatrixTypesTable)
 * 
 *     def get_NVTs(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list with all defined NameValueTables
 */
  __pyx_codeobj__163 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_get_NVTs, 2335, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__163)) __PYX_ERR(0, 2335, __pyx_L1_error)

  /* "pysdif/_pysdif.pyx":2347
 *         return valuetables_to_dicts(self.this.NameValues)
 * 
 *     def get_stream_IDs(self):             # <<<<<<<<<<<<<<
 *         return streamidtable_to_list(self.this.StreamIDsTable)
 * 
 */
  __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysdif__pysdif_pyx, __pyx_n_s_get_stream_IDs, 2347, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 2347, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__165 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__165)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __pyx_unpickle_MatrixTypeDefinition(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_tuple__167 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__167);
  __Pyx_GIVEREF(__pyx_tuple__167);
  __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_MatrixTypeDefinit, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_codeobj__169 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Component, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__169)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_FrameTypeDefiniti, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_FrameW, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}
/* #### Code section: init_constants ### */

static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) {
  __pyx_umethod_PyBytes_Type_split.type = (PyObject*)&PyBytes_Type;
  __pyx_umethod_PyBytes_Type_split.method_name = &__pyx_n_s_split;
  __pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type;
  __pyx_umethod_PyDict_Type_get.method_name = &__pyx_n_s_get;
  if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_257 = PyInt_FromLong(257); if (unlikely(!__pyx_int_257)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_258 = PyInt_FromLong(258); if (unlikely(!__pyx_int_258)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_260 = PyInt_FromLong(260); if (unlikely(!__pyx_int_260)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_264 = PyInt_FromLong(264); if (unlikely(!__pyx_int_264)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_513 = PyInt_FromLong(513); if (unlikely(!__pyx_int_513)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_514 = PyInt_FromLong(514); if (unlikely(!__pyx_int_514)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_516 = PyInt_FromLong(516); if (unlikely(!__pyx_int_516)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_520 = PyInt_FromLong(520); if (unlikely(!__pyx_int_520)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_769 = PyInt_FromLong(769); if (unlikely(!__pyx_int_769)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_17723012 = PyInt_FromLong(17723012L); if (unlikely(!__pyx_int_17723012)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_20897590 = PyInt_FromLong(20897590L); if (unlikely(!__pyx_int_20897590)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_57246580 = PyInt_FromLong(57246580L); if (unlikely(!__pyx_int_57246580)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_66826235 = PyInt_FromLong(66826235L); if (unlikely(!__pyx_int_66826235)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_117679685 = PyInt_FromLong(117679685L); if (unlikely(!__pyx_int_117679685)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_149399746 = PyInt_FromLong(149399746L); if (unlikely(!__pyx_int_149399746)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_149774176 = PyInt_FromLong(149774176L); if (unlikely(!__pyx_int_149774176)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_168628298 = PyInt_FromLong(168628298L); if (unlikely(!__pyx_int_168628298)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_216518149 = PyInt_FromLong(216518149L); if (unlikely(!__pyx_int_216518149)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_229941985 = PyInt_FromLong(229941985L); if (unlikely(!__pyx_int_229941985)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_247608754 = PyInt_FromLong(247608754L); if (unlikely(!__pyx_int_247608754)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_256861586 = PyInt_FromLong(256861586L); if (unlikely(!__pyx_int_256861586)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: init_globals ### */

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  /* AssertionsEnabled.init */
  if (likely(__Pyx_init_assertions_enabled() == 0)); else

if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* NumpyImportArray.init */
  /*
 * Cython has automatically inserted a call to _import_array since
 * you didn't include one when you cimported numpy. To disable this
 * add the line
 *   <void>numpy._import_array
 */
#ifdef NPY_FEATURE_VERSION
#ifndef NO_IMPORT_ARRAY
if (unlikely(_import_array() == -1)) {
    PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import "
    "(auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; "
    "use '<void>numpy._import_array' to disable if you are certain you don't need it).");
}
#endif
#endif

if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: init_module ### */

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __pyx_v_6pysdif_7_pysdif_FILEMODE_STR2MODE = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_6pysdif_7_pysdif_FILEMODE_MODE2STR = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_6pysdif_7_pysdif__SDIF_DATATYPES = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_6pysdif_7_pysdif__SDIF_TO_NUMPY_TYPENUM = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_6pysdif_7_pysdif__framestatus2str = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_6pysdif_7_pysdif__matrixstatus2str = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6pysdif_7_pysdif_StreamID = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pysdif_7_pysdif_StreamID_spec, NULL); if (unlikely(!__pyx_ptype_6pysdif_7_pysdif_StreamID)) __PYX_ERR(0, 251, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pysdif_7_pysdif_StreamID_spec, __pyx_ptype_6pysdif_7_pysdif_StreamID) < 0) __PYX_ERR(0, 251, __pyx_L1_error)
  #else
  __pyx_ptype_6pysdif_7_pysdif_StreamID = &__pyx_type_6pysdif_7_pysdif_StreamID;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pysdif_7_pysdif_StreamID) < 0) __PYX_ERR(0, 251, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pysdif_7_pysdif_StreamID->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pysdif_7_pysdif_StreamID->tp_dictoffset && __pyx_ptype_6pysdif_7_pysdif_StreamID->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pysdif_7_pysdif_StreamID->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StreamID, (PyObject *) __pyx_ptype_6pysdif_7_pysdif_StreamID) < 0) __PYX_ERR(0, 251, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pysdif_7_pysdif_StreamID) < 0) __PYX_ERR(0, 251, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pysdif_7_pysdif_MatrixTypeDefinition = &__pyx_vtable_6pysdif_7_pysdif_MatrixTypeDefinition;
  __pyx_vtable_6pysdif_7_pysdif_MatrixTypeDefinition.toSdifMatrixType = (SdifMatrixTypeT *(*)(struct __pyx_obj_6pysdif_7_pysdif_MatrixTypeDefinition *))__pyx_f_6pysdif_7_pysdif_20MatrixTypeDefinition_toSdifMatrixType;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pysdif_7_pysdif_MatrixTypeDefinition_spec, NULL); if (unlikely(!__pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition)) __PYX_ERR(0, 331, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pysdif_7_pysdif_MatrixTypeDefinition_spec, __pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition) < 0) __PYX_ERR(0, 331, __pyx_L1_error)
  #else
  __pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition = &__pyx_type_6pysdif_7_pysdif_MatrixTypeDefinition;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition) < 0) __PYX_ERR(0, 331, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition->tp_dictoffset && __pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 331, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_6pysdif_7_pysdif_20MatrixTypeDefinition___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_6pysdif_7_pysdif_20MatrixTypeDefinition___init__.doc = __pyx_doc_6pysdif_7_pysdif_20MatrixTypeDefinition___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6pysdif_7_pysdif_20MatrixTypeDefinition___init__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition, __pyx_vtabptr_6pysdif_7_pysdif_MatrixTypeDefinition) < 0) __PYX_ERR(0, 331, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition) < 0) __PYX_ERR(0, 331, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MatrixTypeDefinition, (PyObject *) __pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition) < 0) __PYX_ERR(0, 331, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition) < 0) __PYX_ERR(0, 331, __pyx_L1_error)
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6pysdif_7_pysdif_Component = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pysdif_7_pysdif_Component_spec, NULL); if (unlikely(!__pyx_ptype_6pysdif_7_pysdif_Component)) __PYX_ERR(0, 375, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pysdif_7_pysdif_Component_spec, __pyx_ptype_6pysdif_7_pysdif_Component) < 0) __PYX_ERR(0, 375, __pyx_L1_error)
  #else
  __pyx_ptype_6pysdif_7_pysdif_Component = &__pyx_type_6pysdif_7_pysdif_Component;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pysdif_7_pysdif_Component) < 0) __PYX_ERR(0, 375, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pysdif_7_pysdif_Component->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pysdif_7_pysdif_Component->tp_dictoffset && __pyx_ptype_6pysdif_7_pysdif_Component->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pysdif_7_pysdif_Component->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Component, (PyObject *) __pyx_ptype_6pysdif_7_pysdif_Component) < 0) __PYX_ERR(0, 375, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pysdif_7_pysdif_Component) < 0) __PYX_ERR(0, 375, __pyx_L1_error)
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6pysdif_7_pysdif_FrameTypeDefinition = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pysdif_7_pysdif_FrameTypeDefinition_spec, NULL); if (unlikely(!__pyx_ptype_6pysdif_7_pysdif_FrameTypeDefinition)) __PYX_ERR(0, 414, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pysdif_7_pysdif_FrameTypeDefinition_spec, __pyx_ptype_6pysdif_7_pysdif_FrameTypeDefinition) < 0) __PYX_ERR(0, 414, __pyx_L1_error)
  #else
  __pyx_ptype_6pysdif_7_pysdif_FrameTypeDefinition = &__pyx_type_6pysdif_7_pysdif_FrameTypeDefinition;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pysdif_7_pysdif_FrameTypeDefinition) < 0) __PYX_ERR(0, 414, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pysdif_7_pysdif_FrameTypeDefinition->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pysdif_7_pysdif_FrameTypeDefinition->tp_dictoffset && __pyx_ptype_6pysdif_7_pysdif_FrameTypeDefinition->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pysdif_7_pysdif_FrameTypeDefinition->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_6pysdif_7_pysdif_FrameTypeDefinition, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 414, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_6pysdif_7_pysdif_19FrameTypeDefinition___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_6pysdif_7_pysdif_19FrameTypeDefinition___init__.doc = __pyx_doc_6pysdif_7_pysdif_19FrameTypeDefinition___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6pysdif_7_pysdif_19FrameTypeDefinition___init__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FrameTypeDefinition, (PyObject *) __pyx_ptype_6pysdif_7_pysdif_FrameTypeDefinition) < 0) __PYX_ERR(0, 414, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pysdif_7_pysdif_FrameTypeDefinition) < 0) __PYX_ERR(0, 414, __pyx_L1_error)
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6pysdif_7_pysdif_FrameR = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pysdif_7_pysdif_FrameR_spec, NULL); if (unlikely(!__pyx_ptype_6pysdif_7_pysdif_FrameR)) __PYX_ERR(0, 790, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pysdif_7_pysdif_FrameR_spec, __pyx_ptype_6pysdif_7_pysdif_FrameR) < 0) __PYX_ERR(0, 790, __pyx_L1_error)
  #else
  __pyx_ptype_6pysdif_7_pysdif_FrameR = &__pyx_type_6pysdif_7_pysdif_FrameR;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pysdif_7_pysdif_FrameR) < 0) __PYX_ERR(0, 790, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pysdif_7_pysdif_FrameR->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pysdif_7_pysdif_FrameR->tp_dictoffset && __pyx_ptype_6pysdif_7_pysdif_FrameR->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pysdif_7_pysdif_FrameR->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_6pysdif_7_pysdif_FrameR, "__next__"); if (unlikely(!wrapper)) __PYX_ERR(0, 790, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_6pysdif_7_pysdif_6FrameR_10__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_6pysdif_7_pysdif_6FrameR_10__next__.doc = __pyx_doc_6pysdif_7_pysdif_6FrameR_10__next__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6pysdif_7_pysdif_6FrameR_10__next__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FrameR, (PyObject *) __pyx_ptype_6pysdif_7_pysdif_FrameR) < 0) __PYX_ERR(0, 790, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pysdif_7_pysdif_FrameR) < 0) __PYX_ERR(0, 790, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6pysdif_7_pysdif_SdifFile = &__pyx_vtable_6pysdif_7_pysdif_SdifFile;
  __pyx_vtable_6pysdif_7_pysdif_SdifFile.init_read = (void (*)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *))__pyx_f_6pysdif_7_pysdif_8SdifFile_init_read;
  __pyx_vtable_6pysdif_7_pysdif_SdifFile.init_containers = (void (*)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *))__pyx_f_6pysdif_7_pysdif_8SdifFile_init_containers;
  __pyx_vtable_6pysdif_7_pysdif_SdifFile.init_write = (void (*)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *))__pyx_f_6pysdif_7_pysdif_8SdifFile_init_write;
  __pyx_vtable_6pysdif_7_pysdif_SdifFile.curr_matrix_numerical_signature = (int (*)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *))__pyx_f_6pysdif_7_pysdif_8SdifFile_curr_matrix_numerical_signature;
  __pyx_vtable_6pysdif_7_pysdif_SdifFile._frame_read_header = (int (*)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *))__pyx_f_6pysdif_7_pysdif_8SdifFile__frame_read_header;
  __pyx_vtable_6pysdif_7_pysdif_SdifFile._read_signature = (int (*)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *, int __pyx_skip_dispatch))__pyx_f_6pysdif_7_pysdif_8SdifFile__read_signature;
  __pyx_vtable_6pysdif_7_pysdif_SdifFile._read_matrix_header = (size_t (*)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *))__pyx_f_6pysdif_7_pysdif_8SdifFile__read_matrix_header;
  __pyx_vtable_6pysdif_7_pysdif_SdifFile._matrix_read_data = (int (*)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *))__pyx_f_6pysdif_7_pysdif_8SdifFile__matrix_read_data;
  __pyx_vtable_6pysdif_7_pysdif_SdifFile._finalize_matrix = (int (*)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *))__pyx_f_6pysdif_7_pysdif_8SdifFile__finalize_matrix;
  __pyx_vtable_6pysdif_7_pysdif_SdifFile._next_frame = (void (*)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *))__pyx_f_6pysdif_7_pysdif_8SdifFile__next_frame;
  __pyx_vtable_6pysdif_7_pysdif_SdifFile._frame_skip_rest = (int (*)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *))__pyx_f_6pysdif_7_pysdif_8SdifFile__frame_skip_rest;
  __pyx_vtable_6pysdif_7_pysdif_SdifFile._finalize_frame = (int (*)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *))__pyx_f_6pysdif_7_pysdif_8SdifFile__finalize_frame;
  __pyx_vtable_6pysdif_7_pysdif_SdifFile.reinit = (void (*)(struct __pyx_obj_6pysdif_7_pysdif_SdifFile *))__pyx_f_6pysdif_7_pysdif_8SdifFile_reinit;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6pysdif_7_pysdif_SdifFile = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pysdif_7_pysdif_SdifFile_spec, NULL); if (unlikely(!__pyx_ptype_6pysdif_7_pysdif_SdifFile)) __PYX_ERR(0, 1091, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pysdif_7_pysdif_SdifFile_spec, __pyx_ptype_6pysdif_7_pysdif_SdifFile) < 0) __PYX_ERR(0, 1091, __pyx_L1_error)
  #else
  __pyx_ptype_6pysdif_7_pysdif_SdifFile = &__pyx_type_6pysdif_7_pysdif_SdifFile;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pysdif_7_pysdif_SdifFile) < 0) __PYX_ERR(0, 1091, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pysdif_7_pysdif_SdifFile->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pysdif_7_pysdif_SdifFile->tp_dictoffset && __pyx_ptype_6pysdif_7_pysdif_SdifFile->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pysdif_7_pysdif_SdifFile->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1091, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_6pysdif_7_pysdif_8SdifFile_2__init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_6pysdif_7_pysdif_8SdifFile_2__init__.doc = __pyx_doc_6pysdif_7_pysdif_8SdifFile_2__init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6pysdif_7_pysdif_8SdifFile_2__init__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_vtabptr_6pysdif_7_pysdif_SdifFile) < 0) __PYX_ERR(0, 1091, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6pysdif_7_pysdif_SdifFile) < 0) __PYX_ERR(0, 1091, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SdifFile, (PyObject *) __pyx_ptype_6pysdif_7_pysdif_SdifFile) < 0) __PYX_ERR(0, 1091, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pysdif_7_pysdif_SdifFile) < 0) __PYX_ERR(0, 1091, __pyx_L1_error)
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6pysdif_7_pysdif_Matrix = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pysdif_7_pysdif_Matrix_spec, NULL); if (unlikely(!__pyx_ptype_6pysdif_7_pysdif_Matrix)) __PYX_ERR(0, 641, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pysdif_7_pysdif_Matrix_spec, __pyx_ptype_6pysdif_7_pysdif_Matrix) < 0) __PYX_ERR(0, 641, __pyx_L1_error)
  #else
  __pyx_ptype_6pysdif_7_pysdif_Matrix = &__pyx_type_6pysdif_7_pysdif_Matrix;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pysdif_7_pysdif_Matrix) < 0) __PYX_ERR(0, 641, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pysdif_7_pysdif_Matrix->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pysdif_7_pysdif_Matrix->tp_dictoffset && __pyx_ptype_6pysdif_7_pysdif_Matrix->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pysdif_7_pysdif_Matrix->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Matrix, (PyObject *) __pyx_ptype_6pysdif_7_pysdif_Matrix) < 0) __PYX_ERR(0, 641, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pysdif_7_pysdif_Matrix) < 0) __PYX_ERR(0, 641, __pyx_L1_error)
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6pysdif_7_pysdif_FrameW = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pysdif_7_pysdif_FrameW_spec, NULL); if (unlikely(!__pyx_ptype_6pysdif_7_pysdif_FrameW)) __PYX_ERR(0, 951, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pysdif_7_pysdif_FrameW_spec, __pyx_ptype_6pysdif_7_pysdif_FrameW) < 0) __PYX_ERR(0, 951, __pyx_L1_error)
  #else
  __pyx_ptype_6pysdif_7_pysdif_FrameW = &__pyx_type_6pysdif_7_pysdif_FrameW;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pysdif_7_pysdif_FrameW) < 0) __PYX_ERR(0, 951, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pysdif_7_pysdif_FrameW->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pysdif_7_pysdif_FrameW->tp_dictoffset && __pyx_ptype_6pysdif_7_pysdif_FrameW->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pysdif_7_pysdif_FrameW->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FrameW, (PyObject *) __pyx_ptype_6pysdif_7_pysdif_FrameW) < 0) __PYX_ERR(0, 951, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pysdif_7_pysdif_FrameW) < 0) __PYX_ERR(0, 951, __pyx_L1_error)
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct__genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pysdif_7_pysdif___pyx_scope_struct__genexpr_spec, NULL); if (unlikely(!__pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct__genexpr)) __PYX_ERR(0, 429, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pysdif_7_pysdif___pyx_scope_struct__genexpr_spec, __pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct__genexpr) < 0) __PYX_ERR(0, 429, __pyx_L1_error)
  #else
  __pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct__genexpr = &__pyx_type_6pysdif_7_pysdif___pyx_scope_struct__genexpr;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct__genexpr) < 0) __PYX_ERR(0, 429, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct__genexpr->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct__genexpr->tp_dictoffset && __pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct__genexpr->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct__genexpr->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr_spec, NULL); if (unlikely(!__pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr)) __PYX_ERR(0, 2097, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr_spec, __pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 2097, __pyx_L1_error)
  #else
  __pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr = &__pyx_type_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 2097, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr->tp_dictoffset && __pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pysdif_7_pysdif___pyx_scope_struct_1_genexpr->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  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(3, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_8(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", 
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyTypeObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __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(2, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_5numpy_dtype = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyArray_Descr),__Pyx_ImportType_CheckSize_Ignore_3_0_8); if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 202, __pyx_L1_error)
  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyArrayIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_8); if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 225, __pyx_L1_error)
  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyArrayMultiIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_8); if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 229, __pyx_L1_error)
  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyArrayObject),__Pyx_ImportType_CheckSize_Ignore_3_0_8); if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 238, __pyx_L1_error)
  __pyx_ptype_5numpy_generic = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 809, __pyx_L1_error)
  __pyx_ptype_5numpy_number = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "number", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 811, __pyx_L1_error)
  __pyx_ptype_5numpy_integer = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 813, __pyx_L1_error)
  __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 815, __pyx_L1_error)
  __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 817, __pyx_L1_error)
  __pyx_ptype_5numpy_inexact = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 819, __pyx_L1_error)
  __pyx_ptype_5numpy_floating = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 821, __pyx_L1_error)
  __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 823, __pyx_L1_error)
  __pyx_ptype_5numpy_flexible = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 825, __pyx_L1_error)
  __pyx_ptype_5numpy_character = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "character", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 827, __pyx_L1_error)
  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyUFuncObject),__Pyx_ImportType_CheckSize_Ignore_3_0_8); if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 865, __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(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec__pysdif(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec__pysdif},
  {0, NULL}
};
#endif

#ifdef __cplusplus
namespace {
  struct PyModuleDef __pyx_moduledef =
  #else
  static struct PyModuleDef __pyx_moduledef =
  #endif
  {
      PyModuleDef_HEAD_INIT,
      "_pysdif",
      __pyx_k_GPL_This_file_is_part_of_pysdif, /* m_doc */
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      0, /* m_size */
    #elif CYTHON_USE_MODULE_STATE
      sizeof(__pyx_mstate), /* m_size */
    #else
      -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
#endif

#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC init_pysdif(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC init_pysdif(void)
#else
__Pyx_PyMODINIT_FUNC PyInit__pysdif(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit__pysdif(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none)
#else
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)
#endif
{
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
#if CYTHON_COMPILING_IN_LIMITED_API
            result = PyModule_AddObject(module, to_name, value);
#else
            result = PyDict_SetItemString(moddict, to_name, value);
#endif
        }
        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 (__Pyx_check_single_interpreter())
        return NULL;
    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;
#if CYTHON_COMPILING_IN_LIMITED_API
    moddict = module;
#else
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
#endif
    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__pysdif(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  int stringtab_initialized = 0;
  #if CYTHON_USE_MODULE_STATE
  int pystate_addmodule_run = 0;
  #endif
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module '_pysdif' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("_pysdif", __pyx_methods, __pyx_k_GPL_This_file_is_part_of_pysdif, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #elif CYTHON_USE_MODULE_STATE
  __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  {
    int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef);
    __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "_pysdif" pseudovariable */
    if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    pystate_addmodule_run = 1;
  }
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #endif
  CYTHON_UNUSED_VAR(__pyx_t_1);
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #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("__Pyx_PyMODINIT_FUNC PyInit__pysdif(void)", 0);
  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)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  PyEval_InitThreads();
  #endif
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  stringtab_initialized = 1;
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_pysdif___pysdif) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "pysdif._pysdif")) {
      if (unlikely((PyDict_SetItemString(modules, "pysdif._pysdif", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_type_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "pysdif/_pysdif.pyx":34
 * ctypedef char* charptr
 * 
 * import os.path             # <<<<<<<<<<<<<<
 * import platform
 * import numpy as np
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_os_path, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_2) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":35
 * 
 * import os.path
 * import platform             # <<<<<<<<<<<<<<
 * import numpy as np
 * cimport numpy as c_numpy
 */
  __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_platform, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_platform, __pyx_t_2) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":36
 * import os.path
 * import platform
 * import numpy as np             # <<<<<<<<<<<<<<
 * cimport numpy as c_numpy
 * from numpy cimport ndarray, npy_intp
 */
  __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_numpy, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_2) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":39
 * cimport numpy as c_numpy
 * from numpy cimport ndarray, npy_intp
 * import logging             # <<<<<<<<<<<<<<
 * logger = logging.getLogger("pysdif")
 * logger.setLevel(logging.INFO)
 */
  __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_logging, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_logging, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":40
 * from numpy cimport ndarray, npy_intp
 * import logging
 * logger = logging.getLogger("pysdif")             # <<<<<<<<<<<<<<
 * logger.setLevel(logging.INFO)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logging); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_logger, __pyx_t_2) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":41
 * import logging
 * logger = logging.getLogger("pysdif")
 * logger.setLevel(logging.INFO)             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "numpy/arrayobject.h":
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_setLevel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logging); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_INFO); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":52
 * ######################################
 * 
 * class NoFrame(Exception): pass             # <<<<<<<<<<<<<<
 * class NoMatrix(Exception): pass
 * class SdifOrderError(Exception): pass
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]));
  __Pyx_GIVEREF((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]));
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])))) __PYX_ERR(0, 52, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_4, __pyx_n_s_NoFrame, __pyx_n_s_NoFrame, (PyObject *) NULL, __pyx_n_s_pysdif__pysdif, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_2) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 52, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_NoFrame, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NoFrame, __pyx_t_2) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
  __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_4); __pyx_t_4 = 0;

  /* "pysdif/_pysdif.pyx":53
 * 
 * class NoFrame(Exception): pass
 * class NoMatrix(Exception): pass             # <<<<<<<<<<<<<<
 * class SdifOrderError(Exception): pass
 * 
 */
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]));
  __Pyx_GIVEREF((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]));
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])))) __PYX_ERR(0, 53, __pyx_L1_error);
  __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_3, __pyx_n_s_NoMatrix, __pyx_n_s_NoMatrix, (PyObject *) NULL, __pyx_n_s_pysdif__pysdif, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__pyx_t_3 != __pyx_t_4) {
    if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 53, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_NoMatrix, __pyx_t_3, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NoMatrix, __pyx_t_4) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pysdif/_pysdif.pyx":54
 * class NoFrame(Exception): pass
 * class NoMatrix(Exception): pass
 * class SdifOrderError(Exception): pass             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]));
  __Pyx_GIVEREF((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]));
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])))) __PYX_ERR(0, 54, __pyx_L1_error);
  __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_5, __pyx_n_s_SdifOrderError, __pyx_n_s_SdifOrderError, (PyObject *) NULL, __pyx_n_s_pysdif__pysdif, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__pyx_t_5 != __pyx_t_3) {
    if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(0, 54, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_SdifOrderError, __pyx_t_5, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SdifOrderError, __pyx_t_3) < 0) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":60
 * # from sdifh cimport *
 * 
 * cdef unsigned int _SdifNVTStreamID = 0xfffffffd             # <<<<<<<<<<<<<<
 * 
 * # ----------------------------------------------------------------------------------
 */
  __pyx_v_6pysdif_7_pysdif__SdifNVTStreamID = 0xfffffffd;

  /* "pysdif/_pysdif.pyx":64
 * # ----------------------------------------------------------------------------------
 * 
 * cdef int SDIF_CLOSED = 2             # <<<<<<<<<<<<<<
 * cdef int _g_sdif_initiated = 0
 * 
 */
  __pyx_v_6pysdif_7_pysdif_SDIF_CLOSED = 2;

  /* "pysdif/_pysdif.pyx":65
 * 
 * cdef int SDIF_CLOSED = 2
 * cdef int _g_sdif_initiated = 0             # <<<<<<<<<<<<<<
 * 
 * cdef dict FILEMODE_STR2MODE = {
 */
  __pyx_v_6pysdif_7_pysdif__g_sdif_initiated = 0;

  /* "pysdif/_pysdif.pyx":68
 * 
 * cdef dict FILEMODE_STR2MODE = {
 *     'r' : eReadFile,             # <<<<<<<<<<<<<<
 *     'w' : eWriteFile,
 *     'rw': eReadWriteFile,
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyInt_From_enum__SdifFileModeE(eReadFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_r, __pyx_t_2) < 0) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":69
 * cdef dict FILEMODE_STR2MODE = {
 *     'r' : eReadFile,
 *     'w' : eWriteFile,             # <<<<<<<<<<<<<<
 *     'rw': eReadWriteFile,
 *     'wr': eReadWriteFile
 */
  __pyx_t_2 = __Pyx_PyInt_From_enum__SdifFileModeE(eWriteFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_w, __pyx_t_2) < 0) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":70
 *     'r' : eReadFile,
 *     'w' : eWriteFile,
 *     'rw': eReadWriteFile,             # <<<<<<<<<<<<<<
 *     'wr': eReadWriteFile
 * }
 */
  __pyx_t_2 = __Pyx_PyInt_From_enum__SdifFileModeE(eReadWriteFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_rw, __pyx_t_2) < 0) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":71
 *     'w' : eWriteFile,
 *     'rw': eReadWriteFile,
 *     'wr': eReadWriteFile             # <<<<<<<<<<<<<<
 * }
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_enum__SdifFileModeE(eReadWriteFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_wr, __pyx_t_2) < 0) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_XGOTREF(__pyx_v_6pysdif_7_pysdif_FILEMODE_STR2MODE);
  __Pyx_DECREF_SET(__pyx_v_6pysdif_7_pysdif_FILEMODE_STR2MODE, ((PyObject*)__pyx_t_5));
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":75
 * 
 * cdef dict FILEMODE_MODE2STR = {
 *     eReadFile: 'r',             # <<<<<<<<<<<<<<
 *     eWriteFile: 'w',
 *     eReadWriteFile: 'rw'
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyInt_From_enum__SdifFileModeE(eReadFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_5, __pyx_t_2, __pyx_n_s_r) < 0) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":76
 * cdef dict FILEMODE_MODE2STR = {
 *     eReadFile: 'r',
 *     eWriteFile: 'w',             # <<<<<<<<<<<<<<
 *     eReadWriteFile: 'rw'
 * }
 */
  __pyx_t_2 = __Pyx_PyInt_From_enum__SdifFileModeE(eWriteFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_5, __pyx_t_2, __pyx_n_s_w) < 0) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":77
 *     eReadFile: 'r',
 *     eWriteFile: 'w',
 *     eReadWriteFile: 'rw'             # <<<<<<<<<<<<<<
 * }
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_enum__SdifFileModeE(eReadWriteFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_5, __pyx_t_2, __pyx_n_s_rw) < 0) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_XGOTREF(__pyx_v_6pysdif_7_pysdif_FILEMODE_MODE2STR);
  __Pyx_DECREF_SET(__pyx_v_6pysdif_7_pysdif_FILEMODE_MODE2STR, ((PyObject*)__pyx_t_5));
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":81
 * 
 * cdef dict _SDIF_DATATYPES = {
 *     0x0301:"char",             # <<<<<<<<<<<<<<
 *     0x0004:"float32",
 *     0x0008:"float64",
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_769, __pyx_n_s_char) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_4, __pyx_n_s_float32) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_8, __pyx_n_s_float64) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_257, __pyx_n_s_int8) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_258, __pyx_n_s_int16) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_260, __pyx_n_s_int32) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_264, __pyx_n_s_int64) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_513, __pyx_n_s_uint8) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_514, __pyx_n_s_uint16) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_516, __pyx_n_s_uint32) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_520, __pyx_n_s_uint64) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_XGOTREF(__pyx_v_6pysdif_7_pysdif__SDIF_DATATYPES);
  __Pyx_DECREF_SET(__pyx_v_6pysdif_7_pysdif__SDIF_DATATYPES, ((PyObject*)__pyx_t_5));
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":95
 * 
 * cdef dict _SDIF_TO_NUMPY_TYPENUM = {
 *     0x0301:c_numpy.NPY_BYTE,             # <<<<<<<<<<<<<<
 *     0x0004:c_numpy.NPY_FLOAT,
 *     0x0008:c_numpy.NPY_DOUBLE,
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_769, __pyx_t_2) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":96
 * cdef dict _SDIF_TO_NUMPY_TYPENUM = {
 *     0x0301:c_numpy.NPY_BYTE,
 *     0x0004:c_numpy.NPY_FLOAT,             # <<<<<<<<<<<<<<
 *     0x0008:c_numpy.NPY_DOUBLE,
 *     0x0101:c_numpy.NPY_BYTE,
 */
  __pyx_t_2 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_4, __pyx_t_2) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":97
 *     0x0301:c_numpy.NPY_BYTE,
 *     0x0004:c_numpy.NPY_FLOAT,
 *     0x0008:c_numpy.NPY_DOUBLE,             # <<<<<<<<<<<<<<
 *     0x0101:c_numpy.NPY_BYTE,
 *     0x0102:c_numpy.NPY_SHORT,
 */
  __pyx_t_2 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_8, __pyx_t_2) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":98
 *     0x0004:c_numpy.NPY_FLOAT,
 *     0x0008:c_numpy.NPY_DOUBLE,
 *     0x0101:c_numpy.NPY_BYTE,             # <<<<<<<<<<<<<<
 *     0x0102:c_numpy.NPY_SHORT,
 *     0x0104:c_numpy.NPY_INT,
 */
  __pyx_t_2 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_257, __pyx_t_2) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":99
 *     0x0008:c_numpy.NPY_DOUBLE,
 *     0x0101:c_numpy.NPY_BYTE,
 *     0x0102:c_numpy.NPY_SHORT,             # <<<<<<<<<<<<<<
 *     0x0104:c_numpy.NPY_INT,
 *     0x0108:c_numpy.NPY_LONG,
 */
  __pyx_t_2 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_258, __pyx_t_2) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":100
 *     0x0101:c_numpy.NPY_BYTE,
 *     0x0102:c_numpy.NPY_SHORT,
 *     0x0104:c_numpy.NPY_INT,             # <<<<<<<<<<<<<<
 *     0x0108:c_numpy.NPY_LONG,
 *     0x0201:c_numpy.NPY_UBYTE,
 */
  __pyx_t_2 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_260, __pyx_t_2) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":101
 *     0x0102:c_numpy.NPY_SHORT,
 *     0x0104:c_numpy.NPY_INT,
 *     0x0108:c_numpy.NPY_LONG,             # <<<<<<<<<<<<<<
 *     0x0201:c_numpy.NPY_UBYTE,
 *     0x0202:c_numpy.NPY_USHORT,
 */
  __pyx_t_2 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_264, __pyx_t_2) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":102
 *     0x0104:c_numpy.NPY_INT,
 *     0x0108:c_numpy.NPY_LONG,
 *     0x0201:c_numpy.NPY_UBYTE,             # <<<<<<<<<<<<<<
 *     0x0202:c_numpy.NPY_USHORT,
 *     0x0204:c_numpy.NPY_UINT,
 */
  __pyx_t_2 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_513, __pyx_t_2) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":103
 *     0x0108:c_numpy.NPY_LONG,
 *     0x0201:c_numpy.NPY_UBYTE,
 *     0x0202:c_numpy.NPY_USHORT,             # <<<<<<<<<<<<<<
 *     0x0204:c_numpy.NPY_UINT,
 *     0x0208:c_numpy.NPY_ULONG
 */
  __pyx_t_2 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_514, __pyx_t_2) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":104
 *     0x0201:c_numpy.NPY_UBYTE,
 *     0x0202:c_numpy.NPY_USHORT,
 *     0x0204:c_numpy.NPY_UINT,             # <<<<<<<<<<<<<<
 *     0x0208:c_numpy.NPY_ULONG
 *     }
 */
  __pyx_t_2 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_516, __pyx_t_2) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":105
 *     0x0202:c_numpy.NPY_USHORT,
 *     0x0204:c_numpy.NPY_UINT,
 *     0x0208:c_numpy.NPY_ULONG             # <<<<<<<<<<<<<<
 *     }
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_520, __pyx_t_2) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_XGOTREF(__pyx_v_6pysdif_7_pysdif__SDIF_TO_NUMPY_TYPENUM);
  __Pyx_DECREF_SET(__pyx_v_6pysdif_7_pysdif__SDIF_TO_NUMPY_TYPENUM, ((PyObject*)__pyx_t_5));
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":151
 * 
 * 
 * def signature2str(int sig):             # <<<<<<<<<<<<<<
 *     """
 *     Converts a numeric signature into a string signature
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_1signature2str, 0, __pyx_n_s_signature2str, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_signature2str, __pyx_t_5) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":164
 * 
 * 
 * def str2signature(s):             # <<<<<<<<<<<<<<
 *     """
 *     Converts a 4-byte string signature into a numeric signature
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_3str2signature, 0, __pyx_n_s_str2signature, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_str2signature, __pyx_t_5) < 0) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8StreamID_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StreamID___reduce_cython, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_5) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8StreamID_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StreamID___setstate_cython, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_20MatrixTypeDefinition_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MatrixTypeDefinition___reduce_cy, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition, __pyx_n_s_reduce_cython, __pyx_t_5) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_MatrixTypeDefinition, (type(self), 0x8e7a8c2, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_MatrixTypeDefinition__set_state(self, __pyx_state)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_20MatrixTypeDefinition_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MatrixTypeDefinition___setstate, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_MatrixTypeDefinition);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_9Component_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Component___reduce_cython, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_Component, __pyx_n_s_reduce_cython, __pyx_t_5) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_Component);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Component, (type(self), 0xdb4a2e1, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Component__set_state(self, __pyx_state)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_9Component_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Component___setstate_cython, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_Component, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_Component);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_19FrameTypeDefinition_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FrameTypeDefinition___reduce_cyt, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_FrameTypeDefinition, __pyx_n_s_reduce_cython, __pyx_t_5) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_FrameTypeDefinition);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FrameTypeDefinition, (type(self), 0x10e6e84, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FrameTypeDefinition__set_state(self, __pyx_state)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_19FrameTypeDefinition_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FrameTypeDefinition___setstate_c, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_FrameTypeDefinition, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_FrameTypeDefinition);

  /* "pysdif/_pysdif.pyx":439
 * 
 * SDIF_PREDEFINEDTYPES = {
 *     'frametypes': {             # <<<<<<<<<<<<<<
 *         b'RBEP': [b'RBEP ReassignedBandEnhancedPartials']
 *     },
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "pysdif/_pysdif.pyx":440
 * SDIF_PREDEFINEDTYPES = {
 *     'frametypes': {
 *         b'RBEP': [b'RBEP ReassignedBandEnhancedPartials']             # <<<<<<<<<<<<<<
 *     },
 *     'matrixtypes': {
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_kp_b_RBEP_ReassignedBandEnhancedParti);
  __Pyx_GIVEREF(__pyx_kp_b_RBEP_ReassignedBandEnhancedParti);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_kp_b_RBEP_ReassignedBandEnhancedParti)) __PYX_ERR(0, 440, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_b_RBEP, __pyx_t_4) < 0) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_frametypes, __pyx_t_2) < 0) __PYX_ERR(0, 439, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pysdif/_pysdif.pyx":443
 *     },
 *     'matrixtypes': {
 *         b'RBEP': b'Index, Frequency, Amplitude, Phase, Bandwidth, Offset'             # <<<<<<<<<<<<<<
 *     }
 * }
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_b_RBEP, __pyx_kp_b_Index_Frequency_Amplitude_Phase) < 0) __PYX_ERR(0, 443, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_matrixtypes, __pyx_t_2) < 0) __PYX_ERR(0, 439, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SDIF_PREDEFINEDTYPES, __pyx_t_5) < 0) __PYX_ERR(0, 438, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":447
 * }
 * 
 * def read_sdiftypes():             # <<<<<<<<<<<<<<
 *     """
 *     Retrieves predefined types definitions parsed from SdifTypes.STYP
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_5read_sdiftypes, 0, __pyx_n_s_read_sdiftypes, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_read_sdiftypes, __pyx_t_5) < 0) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":459
 *     return frametypes, matrixtypes
 * 
 * def _frametypes_populate():             # <<<<<<<<<<<<<<
 *     frametypeslist, matrixtypeslist = read_sdiftypes()
 *     frametypes = {f.signature: f.components for f in frametypeslist}
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_7_frametypes_populate, 0, __pyx_n_s_frametypes_populate, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_frametypes_populate, __pyx_t_5) < 0) __PYX_ERR(0, 459, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":472
 * 
 * 
 * def predefined_frametypes():             # <<<<<<<<<<<<<<
 *     """
 *     Returns a dict of predefined sdif frame types
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_9predefined_frametypes, 0, __pyx_n_s_predefined_frametypes, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_predefined_frametypes, __pyx_t_5) < 0) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":482
 * 
 * 
 * def predefined_matrixtypes():             # <<<<<<<<<<<<<<
 *     """
 *     Returns a list of predefined sdif matrix types
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_11predefined_matrixtypes, 0, __pyx_n_s_predefined_matrixtypes, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_predefined_matrixtypes, __pyx_t_5) < 0) __PYX_ERR(0, 482, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":493
 * # ----------------------------------------------------------------------
 * 
 * def _find_sdiftypes():             # <<<<<<<<<<<<<<
 * 
 *     def get_packaged_sdiftypes():
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_13_find_sdiftypes, 0, __pyx_n_s_find_sdiftypes, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_find_sdiftypes, __pyx_t_5) < 0) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":529
 * 
 * 
 * def sdif_init(sdiftypes_path=None):             # <<<<<<<<<<<<<<
 *     """
 *     Initialize the sdif library
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_15sdif_init, 0, __pyx_n_s_sdif_init, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__55);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sdif_init, __pyx_t_5) < 0) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":567
 * 
 * 
 * def sdif_cleanup():             # <<<<<<<<<<<<<<
 *     SdifGenKill()
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_17sdif_cleanup, 0, __pyx_n_s_sdif_cleanup, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sdif_cleanup, __pyx_t_5) < 0) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":602
 * 
 * cdef tuple _framestatus2str = (
 *     "Invalid",             # <<<<<<<<<<<<<<
 *     "NothingRead",
 *     "HeaderRead",
 */
  __Pyx_INCREF(__pyx_tuple__57);
  __Pyx_XGOTREF(__pyx_v_6pysdif_7_pysdif__framestatus2str);
  __Pyx_DECREF_SET(__pyx_v_6pysdif_7_pysdif__framestatus2str, __pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);

  /* "pysdif/_pysdif.pyx":610
 * )
 * 
 * def framestatus2str(int status):             # <<<<<<<<<<<<<<
 *     if 0 <= status < 6:
 *         return _framestatus2str[status]
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_19framestatus2str, 0, __pyx_n_s_framestatus2str, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_framestatus2str, __pyx_t_5) < 0) __PYX_ERR(0, 610, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":616
 * 
 * cdef tuple _matrixstatus2str = (
 *     "Invalid",             # <<<<<<<<<<<<<<
 *     "NothingRead",
 *     "HeaderRead",
 */
  __Pyx_INCREF(__pyx_tuple__60);
  __Pyx_XGOTREF(__pyx_v_6pysdif_7_pysdif__matrixstatus2str);
  __Pyx_DECREF_SET(__pyx_v_6pysdif_7_pysdif__matrixstatus2str, __pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);

  /* "pysdif/_pysdif.pyx":624
 * )
 * 
 * def matrixstatus2str(int status):             # <<<<<<<<<<<<<<
 *     """
 *     Return a string identifier for a matrix status.
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_21matrixstatus2str, 0, __pyx_n_s_matrixstatus2str, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_matrixstatus2str, __pyx_t_5) < 0) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":722
 *                 return self._signature
 * 
 *     def get_data(self, copy=True):             # <<<<<<<<<<<<<<
 *         """
 *         Read the data from the matrix as a numpy array
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_6Matrix_3get_data, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Matrix_get_data, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__64);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_Matrix, __pyx_n_s_get_data, __pyx_t_5) < 0) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_Matrix);

  /* "pysdif/_pysdif.pyx":751
 *         return _array_from_matrix_data_no_copy(self.source_this.CurrMtrxData)
 * 
 *     def column_names(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a list of column names for the current matrix
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_6Matrix_5column_names, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Matrix_column_names, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_Matrix, __pyx_n_s_column_names, __pyx_t_5) < 0) __PYX_ERR(0, 751, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_Matrix);

  /* "pysdif/_pysdif.pyx":765
 *         return colnames
 * 
 *     def skip(self):             # <<<<<<<<<<<<<<
 *         """
 *         Skip reading the data
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_6Matrix_7skip, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Matrix_skip, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_Matrix, __pyx_n_s_skip, __pyx_t_5) < 0) __PYX_ERR(0, 765, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_Matrix);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_6Matrix_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Matrix___reduce_cython, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_5) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_6Matrix_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Matrix___setstate_cython, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":910
 *         return matrix
 * 
 *     def get_matrix(self, copy=True):             # <<<<<<<<<<<<<<
 *         """
 *         Reads the next matrix entirely, returns (matrixsig, data)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_6FrameR_13get_matrix, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FrameR_get_matrix, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__64);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_FrameR, __pyx_n_s_get_matrix, __pyx_t_5) < 0) __PYX_ERR(0, 910, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_FrameR);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_6FrameR_15__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FrameR___reduce_cython, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_5) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_6FrameR_17__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FrameR___setstate_cython, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":996
 *             sig2str(self.signature), self.time, self.streamID, bool(self._written))
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         if self._written:
 *             raise RuntimeError("Frame has already been written!")
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_6FrameW_3__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FrameW___enter, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_FrameW, __pyx_n_s_enter, __pyx_t_5) < 0) __PYX_ERR(0, 996, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_FrameW);

  /* "pysdif/_pysdif.pyx":1001
 *         return self
 * 
 *     def __exit__(self, exception_type, exception_value, traceback):             # <<<<<<<<<<<<<<
 *         if self.num_matrices == 0:
 *             logger.warning("No matrices were added! Frame not written")
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_6FrameW_5__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FrameW___exit, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_FrameW, __pyx_n_s_exit, __pyx_t_5) < 0) __PYX_ERR(0, 1001, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_FrameW);

  /* "pysdif/_pysdif.pyx":1016
 *         def __get__(self): return bool(self._written)
 * 
 *     def add_matrix(self, str signature, c_numpy.ndarray data_array):             # <<<<<<<<<<<<<<
 *         """
 *         Add a matrix to this Frame
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_6FrameW_9add_matrix, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FrameW_add_matrix, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_FrameW, __pyx_n_s_add_matrix, __pyx_t_5) < 0) __PYX_ERR(0, 1016, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_FrameW);

  /* "pysdif/_pysdif.pyx":1045
 * 
 * 
 *     def write(self):             # <<<<<<<<<<<<<<
 *         """
 *         Write the current frame to disk.
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_6FrameW_11write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FrameW_write, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_FrameW, __pyx_n_s_write, __pyx_t_5) < 0) __PYX_ERR(0, 1045, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_FrameW);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_6FrameW_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FrameW___reduce_cython, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_FrameW, __pyx_n_s_reduce_cython, __pyx_t_5) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_FrameW);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FrameW, (type(self), 0x703a645, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FrameW__set_state(self, __pyx_state)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_6FrameW_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FrameW___setstate_cython, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_FrameW, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_FrameW);

  /* "pysdif/_pysdif.pyx":1254
 *         self.close()  # fails silently if already closed
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         """
 *         Close this SdifFile
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_9close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_close, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_close, __pyx_t_5) < 0) __PYX_ERR(0, 1254, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1315
 *         return self.this.CurrFramPos
 * 
 *     def curr_matrix_size(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the number of rows and number of columns in the current matrix
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_11curr_matrix_size, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_curr_matrix_size, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_curr_matrix_size, __pyx_t_5) < 0) __PYX_ERR(0, 1315, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1334
 *         return (m.NbRow, m.NbCol)
 * 
 *     def curr_matrix_datatype(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the datatype code (an int) or 0 if go current matrix
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_13curr_matrix_datatype, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_curr_matrix_datatype, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_curr_matrix_datatype, __pyx_t_5) < 0) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1345
 *         return self.this.CurrMtrxH.DataType
 * 
 *     def curr_signature(self):             # <<<<<<<<<<<<<<
 *         """
 *         **Low-level interface** - Return the current frame's numerical signature
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_15curr_signature, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_curr_signature, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_curr_signature, __pyx_t_5) < 0) __PYX_ERR(0, 1345, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1359
 *         return self.this.CurrMtrxH.Signature
 * 
 *     def curr_matrix_signature(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get the string signature of the current matrix, or None if no current matrix
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_17curr_matrix_signature, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_curr_matrix_signature, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_curr_matrix_signature, __pyx_t_5) < 0) __PYX_ERR(0, 1359, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1373
 *         return None
 * 
 *     def frame_num_matrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get the number of matrices in current frame.
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_19frame_num_matrix, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_frame_num_matrix, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_frame_num_matrix, __pyx_t_5) < 0) __PYX_ERR(0, 1373, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1386
 *         return self.this.CurrFramH.NbMatrix
 * 
 *     def frame_id(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get the id of the current frame, or -1 if no current frame
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_21frame_id, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_frame_id, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_frame_id, __pyx_t_5) < 0) __PYX_ERR(0, 1386, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1411
 *         SdifFSetPos(self.this, &pos)
 * 
 *     def frame_numerical_signature(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the num. signature of current frame, or -1 if no current frame
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_23frame_numerical_signature, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_frame_numerical_signatu, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_frame_numerical_signature, __pyx_t_5) < 0) __PYX_ERR(0, 1411, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1423
 *         return self.this.CurrFramH.Signature
 * 
 *     def frame_signature(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the str. signature of the current frame, or None if no current frame
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_25frame_signature, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_frame_signature, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_frame_signature, __pyx_t_5) < 0) __PYX_ERR(0, 1423, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1434
 *         return sig2str(self.this.CurrFramH.Signature)
 * 
 *     def frame_time(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get the time of the current frame, or -1 if no current frame
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_27frame_time, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_frame_time, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_frame_time, __pyx_t_5) < 0) __PYX_ERR(0, 1434, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1445
 *         return self.this.CurrFramH.Time
 * 
 *     def last_error(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns (error_tag, error_level) or None if there is no last error
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_29last_error, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_last_error, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_last_error, __pyx_t_5) < 0) __PYX_ERR(0, 1445, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1455
 *         return (error.Tag, error.Level)
 * 
 *     def curr_frame_is_selected(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the current frame is selected.
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_31curr_frame_is_selected, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_curr_frame_is_selected, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_curr_frame_is_selected, __pyx_t_5) < 0) __PYX_ERR(0, 1455, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1472
 *         return bool(SdifFCurrFrameIsSelected(self.this))
 * 
 *     def curr_matrix_is_selected(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the current matrix is selected.
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_33curr_matrix_is_selected, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_curr_matrix_is_selected, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_curr_matrix_is_selected, __pyx_t_5) < 0) __PYX_ERR(0, 1472, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1487
 *         return bool(SdifFCurrMatrixIsSelected(self.this))
 * 
 *     def get_num_NVTs(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get the number of NameValueTables defined in this sdif
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_35get_num_NVTs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_get_num_NVTs, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_get_num_NVTs, __pyx_t_5) < 0) __PYX_ERR(0, 1487, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1520
 *         return bytes_read
 * 
 *     def frame_read_header(self):             # <<<<<<<<<<<<<<
 *         """
 *         Low level interface - Read the frame header.
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_37frame_read_header, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_frame_read_header, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_frame_read_header, __pyx_t_5) < 0) __PYX_ERR(0, 1520, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1549
 *                 raise SdifOrderError("The frame should be read or skipped before a new header is read")
 * 
 *     def frame_skip_data(self):             # <<<<<<<<<<<<<<
 *         """
 *         Low level interface - Skip frame and all its matrices
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_39frame_skip_data, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_frame_skip_data, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_frame_skip_data, __pyx_t_5) < 0) __PYX_ERR(0, 1549, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1560
 *         return bytes_read
 * 
 *     cpdef int _read_signature(self):             # <<<<<<<<<<<<<<
 *         cdef size_t NbCharRead
 *         self.eof = SdifFGetSignature(self.this, &NbCharRead) == eEof
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_41_read_signature, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile__read_signature, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_read_signature, __pyx_t_5) < 0) __PYX_ERR(0, 1560, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1579
 *         return SdifFReadMatrixHeader(self.this)
 * 
 *     def matrix_read_header(self):             # <<<<<<<<<<<<<<
 *         """
 *         Low level interface - Read the matrix header
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_43matrix_read_header, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_matrix_read_header, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__106)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_matrix_read_header, __pyx_t_5) < 0) __PYX_ERR(0, 1579, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1606
 *         return bytesread
 * 
 *     def curr_frame_available(self):             # <<<<<<<<<<<<<<
 *        return self.this.CurrFramH != NULL
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_45curr_frame_available, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_curr_frame_available, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_curr_frame_available, __pyx_t_5) < 0) __PYX_ERR(0, 1606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1609
 *        return self.this.CurrFramH != NULL
 * 
 *     def curr_matrix_available(self):             # <<<<<<<<<<<<<<
 *        return self.this.CurrMtrxH != NULL
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_47curr_matrix_available, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_curr_matrix_available, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__108)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_curr_matrix_available, __pyx_t_5) < 0) __PYX_ERR(0, 1609, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1612
 *        return self.this.CurrMtrxH != NULL
 * 
 *     def matrix_skip_data(self):             # <<<<<<<<<<<<<<
 *         """
 *         Low-level Interface - Skip the matrix data without reading it.
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_49matrix_skip_data, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_matrix_skip_data, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_matrix_skip_data, __pyx_t_5) < 0) __PYX_ERR(0, 1612, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1650
 *         return bytesread
 * 
 *     def matrix_read_data(self, copy=False):             # <<<<<<<<<<<<<<
 *         """
 *         Read the data of the current matrix as a numpy array
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_51matrix_read_data, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_matrix_read_data, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__112);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_matrix_read_data, __pyx_t_5) < 0) __PYX_ERR(0, 1650, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1712
 *         return 0
 * 
 *     def matrix_skip(self):             # <<<<<<<<<<<<<<
 *         """
 *         Low level Interface. Skip the matrix altogether.
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_53matrix_skip, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_matrix_skip, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__114)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_matrix_skip, __pyx_t_5) < 0) __PYX_ERR(0, 1712, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1739
 *         return bytes_read
 * 
 *     def status(self):             # <<<<<<<<<<<<<<
 *         """
 *         The status of this sdiffile
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_55status, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_status, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_status, __pyx_t_5) < 0) __PYX_ERR(0, 1739, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1767
 *             return
 * 
 *     def next_frame(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read the next frame, returns a Frame or None if no more frames left.
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_61next_frame, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_next_frame, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__116)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_next_frame, __pyx_t_5) < 0) __PYX_ERR(0, 1767, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1798
 *         return self.frame if self.eof == 0 else None
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_63__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile___enter, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_enter, __pyx_t_5) < 0) __PYX_ERR(0, 1798, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1801
 *         return self
 * 
 *     def __exit__(self):             # <<<<<<<<<<<<<<
 *         self.close()
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_65__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile___exit, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_exit, __pyx_t_5) < 0) __PYX_ERR(0, 1801, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1804
 *         self.close()
 * 
 *     def frame_skip_rest(self):             # <<<<<<<<<<<<<<
 *         """
 *         Skipts the rest of the frame, so that a new frame can be read.
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_67frame_skip_rest, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_frame_skip_rest, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_frame_skip_rest, __pyx_t_5) < 0) __PYX_ERR(0, 1804, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1849
 *         return 0
 * 
 *     def next_matrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Read the next matrix header and return a Matrix with its data **still not read**.
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_69next_matrix, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_next_matrix, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_next_matrix, __pyx_t_5) < 0) __PYX_ERR(0, 1849, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1873
 *         return self.matrix
 * 
 *     def rewind(self):             # <<<<<<<<<<<<<<
 *         """
 *         Rewind the SdifFile.
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_71rewind, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_rewind, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__122)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_rewind, __pyx_t_5) < 0) __PYX_ERR(0, 1873, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1883
 *         self.reinit()
 * 
 *     def _rewind(self):             # <<<<<<<<<<<<<<
 *         SdifFRewind(self.this)
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_73_rewind, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile__rewind, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_rewind_2, __pyx_t_5) < 0) __PYX_ERR(0, 1883, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1892
 *             self.init_write()
 * 
 *     def _read_padding(self):             # <<<<<<<<<<<<<<
 *         return SdifFReadPadding(self.this, SdifFPaddingCalculate(self.this.Stream, self.this.Pos))
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_75_read_padding, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile__read_padding, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__124)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_read_padding, __pyx_t_5) < 0) __PYX_ERR(0, 1892, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1899
 *     # ------------------------------------------------
 * 
 *     def add_NVT(self, dict d):             # <<<<<<<<<<<<<<
 *         """
 *         The NVT (Name Value Table) is a place to put metadata about the file.
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_77add_NVT, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_add_NVT, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__126)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_add_NVT, __pyx_t_5) < 0) __PYX_ERR(0, 1899, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1927
 *             SdifNameValuesLPutCurrNVT(self.this.NameValues, asbytes(name), asbytes(value))
 * 
 *     def add_matrix_type(self, signature, column_names):             # <<<<<<<<<<<<<<
 *         """
 *         Adds a matrix type to this Sdif
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_79add_matrix_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_add_matrix_type, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_add_matrix_type, __pyx_t_5) < 0) __PYX_ERR(0, 1927, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1953
 *         #self.frame_status = eFrameInvalid
 * 
 *     def add_frame_type(self, signature, list components):             # <<<<<<<<<<<<<<
 *         """
 *         Adds a frame type to this sdif.
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_81add_frame_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_add_frame_type, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_add_frame_type, __pyx_t_5) < 0) __PYX_ERR(0, 1953, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":1994
 *         # TODO: is this a memory leak? who destroys the FrameType?
 * 
 *     def clone_type_definitions(self, SdifFile source):             # <<<<<<<<<<<<<<
 *         """
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_83clone_type_definitions, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_clone_type_definitions, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_clone_type_definitions, __pyx_t_5) < 0) __PYX_ERR(0, 1994, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":2016
 *             self.add_matrix_type(matrixtype.signature, matrixtype.column_names)
 * 
 *     def clone_NVTs(self, SdifFile source):             # <<<<<<<<<<<<<<
 *         """
 *         Clone the NVT (name:value table) from source (an open SdifFile)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_85clone_NVTs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_clone_NVTs, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_clone_NVTs, __pyx_t_5) < 0) __PYX_ERR(0, 2016, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":2045
 *             self.add_NVT(nvt)
 * 
 *     def clone_definitions(self, SdifFile source):             # <<<<<<<<<<<<<<
 *         """
 *         Only for writing mode - Clone both NVT(s), frame and matrix definitions
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_87clone_definitions, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_clone_definitions, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_clone_definitions, __pyx_t_5) < 0) __PYX_ERR(0, 2045, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":2075
 *         return self
 * 
 *     def clone_frames(self, SdifFile source, signatures_to_clone=None):             # <<<<<<<<<<<<<<
 *         """
 *         Clone all the frames in source which are included in
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_89clone_frames, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_clone_frames, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__55);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_clone_frames, __pyx_t_5) < 0) __PYX_ERR(0, 2075, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":2105
 *                 frame1.write()
 * 
 *     def add_streamID(self, unsigned int numid, char *source, char *treeway):             # <<<<<<<<<<<<<<
 *         """
 *         This method is only there for completion.
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_91add_streamID, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_add_streamID, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_add_streamID, __pyx_t_5) < 0) __PYX_ERR(0, 2105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":2122
 *             numid, source, treeway)
 * 
 *     def add_predefined_frametype(self, signature):             # <<<<<<<<<<<<<<
 *         """
 *         Add a predefined frame type with corresponding matrix definitions
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_93add_predefined_frametype, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_add_predefined_frametyp, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_add_predefined_frametype, __pyx_t_5) < 0) __PYX_ERR(0, 2122, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":2147
 *             self.add_matrix_type(matrixsig, column_names)
 * 
 *     def write_all_ascii_chunks(self):             # <<<<<<<<<<<<<<
 *         """
 *         **Low-level Interface**
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_95write_all_ascii_chunks, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_write_all_ascii_chunks, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__143)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_write_all_ascii_chunks, __pyx_t_5) < 0) __PYX_ERR(0, 2147, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":2162
 *         self.write_status = eSdifAllASCIIChunks
 * 
 *     def new_frame(self, signature, SdifFloat8 time, SdifUInt4 streamID=0):             # <<<<<<<<<<<<<<
 *         """
 *         Create a new frame with given signature and at given time
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_97new_frame, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_new_frame, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__145)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__146);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_new_frame, __pyx_t_5) < 0) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":2207
 *         return FrameW_new(self, str2sig(asbytes(signature)), time, streamID)
 * 
 *     def new_frame_one_matrix(self, frame_sig, SdifFloat8 time, matrix_sig,             # <<<<<<<<<<<<<<
 *                              c_numpy.ndarray matrixdata, SdifUInt4 streamID=0):
 *         """
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_99new_frame_one_matrix, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_new_frame_one_matrix, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__146);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_new_frame_one_matrix, __pyx_t_5) < 0) __PYX_ERR(0, 2207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":2255
 * 
 *     # low level functions to print info
 *     def print_NVT(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - Print the name value table """
 *         SdifFPrintAllNameValueNVT(self.this)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_101print_NVT, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_print_NVT, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_print_NVT, __pyx_t_5) < 0) __PYX_ERR(0, 2255, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":2259
 *         SdifFPrintAllNameValueNVT(self.this)
 * 
 *     def print_general_header(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - Print the general header """
 *         cdef size_t n = SdifFPrintGeneralHeader(self.this)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_103print_general_header, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_print_general_header, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_print_general_header, __pyx_t_5) < 0) __PYX_ERR(0, 2259, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":2263
 *         cdef size_t n = SdifFPrintGeneralHeader(self.this)
 * 
 *     def print_all_ascii_chunks(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - print all text chunks """
 *         SdifFPrintAllASCIIChunks(self.this)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_105print_all_ascii_chunks, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_print_all_ascii_chunks, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__152)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_print_all_ascii_chunks, __pyx_t_5) < 0) __PYX_ERR(0, 2263, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":2267
 *         SdifFPrintAllASCIIChunks(self.this)
 * 
 *     def print_all_types(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - Print all types defined in this sdif file"""
 *         SdifFPrintAllType(self.this)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_107print_all_types, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_print_all_types, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__153)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_print_all_types, __pyx_t_5) < 0) __PYX_ERR(0, 2267, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":2271
 *         SdifFPrintAllType(self.this)
 * 
 *     def print_matrix_header(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - Print the matrix header"""
 *         SdifFPrintMatrixHeader(self.this)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_109print_matrix_header, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_print_matrix_header, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_print_matrix_header, __pyx_t_5) < 0) __PYX_ERR(0, 2271, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":2275
 *         SdifFPrintMatrixHeader(self.this)
 * 
 *     def print_one_row(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - print one row of the current matrix"""
 *         SdifFPrintOneRow(self.this)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_111print_one_row, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_print_one_row, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_print_one_row, __pyx_t_5) < 0) __PYX_ERR(0, 2275, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":2279
 *         SdifFPrintOneRow(self.this)
 * 
 *     def print_frame_header(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface- Print the frame header """
 *         SdifFPrintFrameHeader(self.this)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_113print_frame_header, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_print_frame_header, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__156)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_print_frame_header, __pyx_t_5) < 0) __PYX_ERR(0, 2279, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":2283
 *         SdifFPrintFrameHeader(self.this)
 * 
 *     def print_all_stream_ID(self):             # <<<<<<<<<<<<<<
 *         """Low-Level Interface - Print the ID of all streams """
 *         SdifFPrintAllStreamID(self.this)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_115print_all_stream_ID, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_print_all_stream_ID, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_print_all_stream_ID, __pyx_t_5) < 0) __PYX_ERR(0, 2283, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":2287
 *         SdifFPrintAllStreamID(self.this)
 * 
 *     def frame_types_to_string(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a string with all frame types
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_117frame_types_to_string, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_frame_types_to_string, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__159)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_frame_types_to_string, __pyx_t_5) < 0) __PYX_ERR(0, 2287, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":2299
 *         return out
 * 
 *     def get_frame_types(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a list of Frame Type Definitions (1FTD)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_119get_frame_types, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_get_frame_types, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_get_frame_types, __pyx_t_5) < 0) __PYX_ERR(0, 2299, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":2311
 *         return FrameTypesTable_to_list(self.this.FrameTypesTable)
 * 
 *     def matrix_types_to_string(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a string with all matrix types
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_121matrix_types_to_string, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_matrix_types_to_string, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__161)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_matrix_types_to_string, __pyx_t_5) < 0) __PYX_ERR(0, 2311, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":2325
 *         return out
 * 
 *     def get_matrix_types(self):             # <<<<<<<<<<<<<<
 *         """
 *         Get a list of matrix type definitions (1MTD)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_123get_matrix_types, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_get_matrix_types, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_get_matrix_types, __pyx_t_5) < 0) __PYX_ERR(0, 2325, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":2335
 *         return MatrixTypesTable_to_list(self.this.MatrixTypesTable)
 * 
 *     def get_NVTs(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list with all defined NameValueTables
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_125get_NVTs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_get_NVTs, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__163)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_get_NVTs, __pyx_t_5) < 0) __PYX_ERR(0, 2335, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "pysdif/_pysdif.pyx":2347
 *         return valuetables_to_dicts(self.this.NameValues)
 * 
 *     def get_stream_IDs(self):             # <<<<<<<<<<<<<<
 *         return streamidtable_to_list(self.this.StreamIDsTable)
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_127get_stream_IDs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile_get_stream_IDs, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6pysdif_7_pysdif_SdifFile, __pyx_n_s_get_stream_IDs, __pyx_t_5) < 0) __PYX_ERR(0, 2347, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_6pysdif_7_pysdif_SdifFile);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_129__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile___reduce_cython, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__165)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_5) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_8SdifFile_131__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SdifFile___setstate_cython, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_MatrixTypeDefinition(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_23__pyx_unpickle_MatrixTypeDefinition, 0, __pyx_n_s_pyx_unpickle_MatrixTypeDefinit, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_MatrixTypeDefinit, __pyx_t_5) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_MatrixTypeDefinition__set_state(<MatrixTypeDefinition> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_MatrixTypeDefinition__set_state(MatrixTypeDefinition __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.column_names = __pyx_state[0]; __pyx_result.signature = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_25__pyx_unpickle_Component, 0, __pyx_n_s_pyx_unpickle_Component, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__169)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Component, __pyx_t_5) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_FrameTypeDefinition(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_27__pyx_unpickle_FrameTypeDefinition, 0, __pyx_n_s_pyx_unpickle_FrameTypeDefiniti, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_FrameTypeDefiniti, __pyx_t_5) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_FrameTypeDefinition__set_state(<FrameTypeDefinition> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_FrameTypeDefinition__set_state(FrameTypeDefinition __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.components = __pyx_state[0]; __pyx_result.signature = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pysdif_7_pysdif_29__pyx_unpickle_FrameW, 0, __pyx_n_s_pyx_unpickle_FrameW, NULL, __pyx_n_s_pysdif__pysdif, __pyx_d, ((PyObject *)__pyx_codeobj__171)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_FrameW, __pyx_t_5) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pysdif/_pysdif.pyx":1
 * #cython: embedsignature=True             # <<<<<<<<<<<<<<
 * #cython: binding=True
 * """
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_5) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  if (__pyx_m) {
    if (__pyx_d && stringtab_initialized) {
      __Pyx_AddTraceback("init pysdif._pysdif", __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 pysdif._pysdif");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}
/* #### 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 */
#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);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    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 */
#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 */
#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);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError */
#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
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 >= 0x030d00A1
    (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
    return result;
#else
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    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_b, name);
    if (unlikely(!result) && !PyErr_Occurred()) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* GetTopmostException */
#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

/* 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);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
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);
    }
}
#endif
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);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        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

/* 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 >= 0x030C00A6
    local_value = tstate->current_exception;
    tstate->current_exception = 0;
    if (likely(local_value)) {
        local_type = (PyObject*) Py_TYPE(local_value);
        Py_INCREF(local_type);
        local_tb = PyException_GetTraceback(local_value);
    }
  #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
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6
    if (unlikely(tstate->current_exception))
#elif CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    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);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* PyObjectCall */
#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 PY_MAJOR_VERSION < 3
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    #else
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
        return NULL;
    #endif
    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

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    __Pyx_PyThreadState_declare
    CYTHON_UNUSED_VAR(cause);
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
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;
}
#endif

/* TupleAndListFromArray */
#if 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) {
        Py_INCREF(__pyx_empty_tuple);
        return __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 */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
    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 */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    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 PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            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));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            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_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    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 = PyTuple_GET_SIZE(kwnames);
    for (i = 0; i < n; i++)
    {
        if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i];
    }
    for (i = 0; i < n; i++)
    {
        int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), 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_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
    Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames);
    PyObject *dict;
    dict = PyDict_New();
    if (unlikely(!dict))
        return NULL;
    for (i=0; i<nkwargs; i++) {
        PyObject *key = PyTuple_GET_ITEM(kwnames, i);
        if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
            goto bad;
    }
    return dict;
bad:
    Py_DECREF(dict);
    return NULL;
}
#endif
#endif

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject *const *kwvalues,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds));
    while (1) {
        Py_XDECREF(key); key = NULL;
        Py_XDECREF(value); value = NULL;
        if (kwds_is_tuple) {
            Py_ssize_t size;
#if CYTHON_ASSUME_SAFE_MACROS
            size = PyTuple_GET_SIZE(kwds);
#else
            size = PyTuple_Size(kwds);
            if (size < 0) goto bad;
#endif
            if (pos >= size) break;
#if CYTHON_AVOID_BORROWED_REFS
            key = __Pyx_PySequence_ITEM(kwds, pos);
            if (!key) goto bad;
#elif CYTHON_ASSUME_SAFE_MACROS
            key = PyTuple_GET_ITEM(kwds, pos);
#else
            key = PyTuple_GetItem(kwds, pos);
            if (!key) goto bad;
#endif
            value = kwvalues[pos];
            pos++;
        }
        else
        {
            if (!PyDict_Next(kwds, &pos, &key, &value)) break;
#if CYTHON_AVOID_BORROWED_REFS
            Py_INCREF(key);
#endif
        }
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
#if CYTHON_AVOID_BORROWED_REFS
            Py_INCREF(value);
            Py_DECREF(key);
#endif
            key = NULL;
            value = NULL;
            continue;
        }
#if !CYTHON_AVOID_BORROWED_REFS
        Py_INCREF(key);
#endif
        Py_INCREF(value);
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
#if CYTHON_AVOID_BORROWED_REFS
                    value = NULL;
#endif
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key)
                );
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
#if CYTHON_AVOID_BORROWED_REFS
                    value = NULL;
#endif
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    Py_XDECREF(key);
    Py_XDECREF(value);
    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;
invalid_keyword:
    #if PY_MAJOR_VERSION < 3
    PyErr_Format(PyExc_TypeError,
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    Py_XDECREF(key);
    Py_XDECREF(value);
    return -1;
}

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

/* 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_GetName(Py_TYPE(obj));
    type_name = __Pyx_PyType_GetName(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;
}

/* KeywordStringCheck */
static int __Pyx_CheckKeywordStrings(
    PyObject *kw,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) {
        Py_ssize_t kwsize;
#if CYTHON_ASSUME_SAFE_MACROS
        kwsize = PyTuple_GET_SIZE(kw);
#else
        kwsize = PyTuple_Size(kw);
        if (kwsize < 0) return 0;
#endif
        if (unlikely(kwsize == 0))
            return 1;
        if (!kw_allowed) {
#if CYTHON_ASSUME_SAFE_MACROS
            key = PyTuple_GET_ITEM(kw, 0);
#else
            key = PyTuple_GetItem(kw, pos);
            if (!key) return 0;
#endif
            goto invalid_keyword;
        }
#if PY_VERSION_HEX < 0x03090000
        for (pos = 0; pos < kwsize; pos++) {
#if CYTHON_ASSUME_SAFE_MACROS
            key = PyTuple_GET_ITEM(kw, pos);
#else
            key = PyTuple_GetItem(kw, pos);
            if (!key) return 0;
#endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
        }
#endif
        return 1;
    }
    while (PyDict_Next(kw, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if (!kw_allowed && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    #if PY_MAJOR_VERSION < 3
    PyErr_Format(PyExc_TypeError,
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (unlikely(!j)) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (mm && mm->mp_subscript) {
            PyObject *r, *key = PyInt_FromSsize_t(i);
            if (unlikely(!key)) return NULL;
            r = mm->mp_subscript(o, key);
            Py_DECREF(key);
            return r;
        }
        if (likely(sm && sm->sq_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 NULL;
                    PyErr_Clear();
                }
            }
            return sm->sq_item(o, i);
        }
    }
#else
    if (is_list || !PyMapping_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* UnpackUnboundCMethod */
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;
}
static PyMethodDef __Pyx_UnboundCMethod_Def = {
     "CythonUnboundCMethod",
     __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
     METH_VARARGS | METH_KEYWORDS,
     NULL
};
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #else
    if (likely(!__Pyx_CyOrPyCFunction_Check(method)))
    #endif
    {
        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);
            target->method = unbound_method;
        }
    }
    return 0;
}

/* CallUnboundCMethod0 */
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_ASSUME_SAFE_MACROS
    args = PyTuple_New(1);
    if (unlikely(!args)) goto bad;
    Py_INCREF(self);
    PyTuple_SET_ITEM(args, 0, self);
#else
    args = PyTuple_Pack(1, self);
    if (unlikely(!args)) goto bad;
#endif
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    Py_DECREF(args);
bad:
    return result;
}

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
    PyObject* exc_type;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    exc_type = __Pyx_PyErr_CurrentExceptionType();
    if (unlikely(exc_type)) {
        if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
            return -1;
        __Pyx_PyErr_Clear();
        return 0;
    }
    return 0;
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    }
    return __Pyx_IterFinish();
}

/* PyDictVersioning */
#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_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#elif CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(!__pyx_m)) {
        return NULL;
    }
    result = PyObject_GetAttr(__pyx_m, name);
    if (likely(result)) {
        return result;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    #if PY_MAJOR_VERSION < 3
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) {
        return NULL;
    }
    #else
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) {
        return NULL;
    }
    #endif
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif

/* PyObjectCallMethO */
#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 PY_MAJOR_VERSION < 3
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    #else
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
        return NULL;
    #endif
    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 **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
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **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 PY_VERSION_HEX < 0x030800B1
    #if CYTHON_FAST_PYCCALL
    if (PyCFunction_Check(func)) {
        if (kwargs) {
            return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
        } else {
            return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
        }
    }
    #if PY_VERSION_HEX >= 0x030700A1
    if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
        return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
    }
    #endif
    #endif
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
    }
    #endif
    #endif
    if (kwargs == NULL) {
        #if CYTHON_VECTORCALL
        #if PY_VERSION_HEX < 0x03090000
        vectorcallfunc f = _PyVectorcall_Function(func);
        #else
        vectorcallfunc f = PyVectorcall_Function(func);
        #endif
        if (f) {
            return f(func, args, (size_t)nargs, NULL);
        }
        #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
        if (__Pyx_CyFunction_CheckExact(func)) {
            __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
            if (f) return f(func, args, (size_t)nargs, NULL);
        }
        #endif
    }
    if (nargs == 0) {
        return __Pyx_PyObject_Call(func, __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
}

/* RaiseUnexpectedTypeError */
static int
__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
{
    __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(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;
}

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

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    __Pyx_TypeName type_name;
    __Pyx_TypeName obj_type_name;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    type_name = __Pyx_PyType_GetName(type);
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
        ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name);
    __Pyx_DECREF_TypeName(type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* GetAttr3 */
#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
#endif
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r;
#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
    int res = PyObject_GetOptionalAttr(o, n, &r);
    return (res != 0) ? r : __Pyx_NewRef(d);
#else
  #if CYTHON_USE_TYPE_SLOTS
    if (likely(PyString_Check(n))) {
        r = __Pyx_PyObject_GetAttrStrNoError(o, n);
        if (unlikely(!r) && likely(!PyErr_Occurred())) {
            r = __Pyx_NewRef(d);
        }
        return r;
    }
  #endif
    r = PyObject_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
#endif
}

/* RaiseUnboundLocalError */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* pep479 */
static void __Pyx_Generator_Replace_StopIteration(int in_async_gen) {
    PyObject *exc, *val, *tb, *cur_exc;
    __Pyx_PyThreadState_declare
    #ifdef __Pyx_StopAsyncIteration_USED
    int is_async_stopiteration = 0;
    #endif
    CYTHON_MAYBE_UNUSED_VAR(in_async_gen);
    cur_exc = PyErr_Occurred();
    if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) {
        #ifdef __Pyx_StopAsyncIteration_USED
        if (in_async_gen && unlikely(__Pyx_PyErr_GivenExceptionMatches(cur_exc, __Pyx_PyExc_StopAsyncIteration))) {
            is_async_stopiteration = 1;
        } else
        #endif
            return;
    }
    __Pyx_PyThreadState_assign
    __Pyx_GetException(&exc, &val, &tb);
    Py_XDECREF(exc);
    Py_XDECREF(val);
    Py_XDECREF(tb);
    PyErr_SetString(PyExc_RuntimeError,
        #ifdef __Pyx_StopAsyncIteration_USED
        is_async_stopiteration ? "async generator raised StopAsyncIteration" :
        in_async_gen ? "async generator raised StopIteration" :
        #endif
        "generator raised StopIteration");
}

/* DictGetItem */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            if (unlikely(PyTuple_Check(key))) {
                PyObject* args = PyTuple_Pack(1, key);
                if (likely(args)) {
                    PyErr_SetObject(PyExc_KeyError, args);
                    Py_DECREF(args);
                }
            } else {
                PyErr_SetObject(PyExc_KeyError, key);
            }
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#endif

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

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    __Pyx_TypeName type_name;
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
        if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
#elif PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (likely(descr != NULL)) {
        *method = descr;
        return 0;
    }
    type_name = __Pyx_PyType_GetName(tp);
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, name);
#else
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
                 type_name, PyString_AS_STRING(name));
#endif
    __Pyx_DECREF_TypeName(type_name);
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod1 */
#if !(CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2)
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
#endif
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
#if CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2
    PyObject *args[2] = {obj, arg};
    (void) __Pyx_PyObject_GetMethod;
    (void) __Pyx_PyObject_CallOneArg;
    (void) __Pyx_PyObject_Call2Args;
    return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#else
    PyObject *method = NULL, *result;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_Call2Args(method, obj, arg);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) return NULL;
    return __Pyx__PyObject_CallMethod1(method, arg);
#endif
}

/* StringJoin */
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
    (void) __Pyx_PyObject_CallMethod1;
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION < 3
    return _PyString_Join(sep, values);
#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
    return _PyBytes_Join(sep, values);
#else
    return __Pyx_PyObject_CallMethod1(sep, __pyx_n_s_join, values);
#endif
}

/* PyObjectCallNoArg */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
    PyObject *arg[2] = {NULL, NULL};
    return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectCallMethod0 */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

/* RaiseNoneIterError */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* UnpackTupleError */
static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

/* UnpackTuple2 */
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
        PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
    PyObject *value1 = NULL, *value2 = NULL;
#if CYTHON_COMPILING_IN_PYPY
    value1 = PySequence_ITEM(tuple, 0);  if (unlikely(!value1)) goto bad;
    value2 = PySequence_ITEM(tuple, 1);  if (unlikely(!value2)) goto bad;
#else
    value1 = PyTuple_GET_ITEM(tuple, 0);  Py_INCREF(value1);
    value2 = PyTuple_GET_ITEM(tuple, 1);  Py_INCREF(value2);
#endif
    if (decref_tuple) {
        Py_DECREF(tuple);
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
#if CYTHON_COMPILING_IN_PYPY
bad:
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
#endif
}
static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                       int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    iternextfunc iternext;
    iter = PyObject_GetIter(tuple);
    if (unlikely(!iter)) goto bad;
    if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
    iternext = __Pyx_PyObject_GetIterNextFunc(iter);
    value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
    value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
    if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
    Py_DECREF(iter);
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

/* dict_iter */
#if CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
#include <string.h>
#endif
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
    if (is_dict) {
#if !CYTHON_COMPILING_IN_PYPY
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
#elif PY_MAJOR_VERSION >= 3
        static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
        PyObject **pp = NULL;
        if (method_name) {
            const char *name = PyUnicode_AsUTF8(method_name);
            if (strcmp(name, "iteritems") == 0) pp = &py_items;
            else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
            else if (strcmp(name, "itervalues") == 0) pp = &py_values;
            if (pp) {
                if (!*pp) {
                    *pp = PyUnicode_FromString(name + 4);
                    if (!*pp)
                        return NULL;
                }
                method_name = *pp;
            }
        }
#endif
    }
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

/* FixUpExtensionType */
#if CYTHON_USE_TYPE_SPECS
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
#if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    CYTHON_UNUSED_VAR(spec);
    CYTHON_UNUSED_VAR(type);
#else
    const PyType_Slot *slot = spec->slots;
    while (slot && slot->slot && slot->slot != Py_tp_members)
        slot++;
    if (slot && slot->slot == Py_tp_members) {
        int changed = 0;
#if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON)
        const
#endif
            PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
        while (memb && memb->name) {
            if (memb->name[0] == '_' && memb->name[1] == '_') {
#if PY_VERSION_HEX < 0x030900b1
                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);
#if PY_VERSION_HEX >= 0x030800b4
                    type->tp_vectorcall_offset = memb->offset;
#else
                    type->tp_print = (printfunc) memb->offset;
#endif
                    changed = 1;
                }
#endif
#else
                if ((0));
#endif
#if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON
                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;
                    if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) {
                        Py_DECREF(descr);
                        return -1;
                    }
                    Py_DECREF(descr);
                    changed = 1;
                }
#endif
            }
            memb++;
        }
        if (changed)
            PyType_Modified(type);
    }
#endif
    return 0;
}
#endif

/* FetchSharedCythonModule */
static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
    return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME);
}

/* FetchCommonType */
static int __Pyx_VerifyCachedType(PyObject *cached_type,
                               const char *name,
                               Py_ssize_t basicsize,
                               Py_ssize_t expected_basicsize) {
    if (!PyType_Check(cached_type)) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s is not a type object", name);
        return -1;
    }
    if (basicsize != expected_basicsize) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s has the wrong size, try recompiling",
            name);
        return -1;
    }
    return 0;
}
#if !CYTHON_USE_TYPE_SPECS
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* abi_module;
    const char* object_name;
    PyTypeObject *cached_type = NULL;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) return NULL;
    object_name = strrchr(type->tp_name, '.');
    object_name = object_name ? object_name+1 : type->tp_name;
    cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name);
    if (cached_type) {
        if (__Pyx_VerifyCachedType(
              (PyObject *)cached_type,
              object_name,
              cached_type->tp_basicsize,
              type->tp_basicsize) < 0) {
            goto bad;
        }
        goto done;
    }
    if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
    PyErr_Clear();
    if (PyType_Ready(type) < 0) goto bad;
    if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0)
        goto bad;
    Py_INCREF(type);
    cached_type = type;
done:
    Py_DECREF(abi_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}
#else
static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *abi_module, *cached_type = NULL;
    const char* object_name = strrchr(spec->name, '.');
    object_name = object_name ? object_name+1 : spec->name;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) return NULL;
    cached_type = PyObject_GetAttrString(abi_module, object_name);
    if (cached_type) {
        Py_ssize_t basicsize;
#if CYTHON_COMPILING_IN_LIMITED_API
        PyObject *py_basicsize;
        py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
        if (unlikely(!py_basicsize)) goto bad;
        basicsize = PyLong_AsSsize_t(py_basicsize);
        Py_DECREF(py_basicsize);
        py_basicsize = 0;
        if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
#else
        basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1;
#endif
        if (__Pyx_VerifyCachedType(
              cached_type,
              object_name,
              basicsize,
              spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    }
    if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
    PyErr_Clear();
    CYTHON_UNUSED_VAR(module);
    cached_type = __Pyx_PyType_FromModuleAndSpec(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;
    if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad;
done:
    Py_DECREF(abi_module);
    assert(cached_type == NULL || PyType_Check(cached_type));
    return (PyTypeObject *) cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}
#endif

/* PyVectorcallFastCallDict */
#if CYTHON_METH_FASTCALL
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, pos;
    size_t j;
    PyObject *key, *value;
    unsigned long keys_are_strings;
    Py_ssize_t nkw = PyDict_GET_SIZE(kw);
    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 = i = 0;
    keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
    while (PyDict_Next(kw, &pos, &key, &value)) {
        keys_are_strings &= Py_TYPE(key)->tp_flags;
        Py_INCREF(key);
        Py_INCREF(value);
        PyTuple_SET_ITEM(kwnames, i, key);
        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:
    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)
{
    if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) {
        return vc(func, args, nargs, NULL);
    }
    return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
}
#endif

/* CythonFunctionShared */
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
    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;
}
#else
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
    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(__pyx_CyFunctionObject *op, void *closure)
{
    CYTHON_UNUSED_VAR(closure);
    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) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
#endif
            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 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_Py_XDECREF_SET(op->func_doc, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(op->func_name == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_name = PyObject_GetAttrString(op->func, "__name__");
#elif PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#else
        op->func_name = PyString_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 int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_name, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_qualname, value);
    return 0;
}
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;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_dict, value);
    return 0;
}
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_Py_XDECREF_SET(op->defaults_tuple, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->defaults_tuple;
    CYTHON_UNUSED_VAR(context);
    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 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_Py_XDECREF_SET(op->defaults_kwdict, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->defaults_kwdict;
    CYTHON_UNUSED_VAR(context);
    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 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_Py_XDECREF_SET(op->func_annotations, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->func_annotations;
    CYTHON_UNUSED_VAR(context);
    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_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
    int is_coroutine;
    CYTHON_UNUSED_VAR(context);
    if (op->func_is_coroutine) {
        return __Pyx_NewRef(op->func_is_coroutine);
    }
    is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
#if PY_VERSION_HEX >= 0x03050000
    if (is_coroutine) {
        PyObject *module, *fromlist, *marker = __pyx_n_s_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_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
        if (unlikely(!module)) goto ignore;
        op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker);
        Py_DECREF(module);
        if (likely(op->func_is_coroutine)) {
            return __Pyx_NewRef(op->func_is_coroutine);
        }
ignore:
        PyErr_Clear();
    }
#endif
    op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine);
    return __Pyx_NewRef(op->func_is_coroutine);
}
#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[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {(char *) "_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
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
#endif
#if CYTHON_USE_TYPE_SPECS
    {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
#if CYTHON_METH_FASTCALL
#if CYTHON_BACKPORT_VECTORCALL
    {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
#else
#if !CYTHON_COMPILING_IN_LIMITED_API
    {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
#endif
#endif
#endif
#if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
    {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
#else
    {(char *) "__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)
{
    CYTHON_UNUSED_VAR(args);
#if PY_MAJOR_VERSION >= 3
    Py_INCREF(m->func_qualname);
    return m->func_qualname;
#else
    return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0 || 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
    op->func_dict = NULL;
    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_pyobjects = 0;
    op->defaults_size = 0;
    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
    Py_CLEAR(m->func_dict);
    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);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    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)
{
    Py_VISIT(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(m->func);
#else
    Py_VISIT(((PyCFunctionObject*)m)->m_module);
#endif
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(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);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
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;
    PyObject *py_name = NULL;
    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*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_MACROS
            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);
#if CYTHON_COMPILING_IN_LIMITED_API
            py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
            if (!py_name) return NULL;
            PyErr_Format(PyExc_TypeError,
                "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                py_name, size);
            Py_DECREF(py_name);
#else
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
#endif
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_MACROS
            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;
            }
#if CYTHON_COMPILING_IN_LIMITED_API
            py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
            if (!py_name) return NULL;
            PyErr_Format(PyExc_TypeError,
                "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                py_name, size);
            Py_DECREF(py_name);
#else
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
#endif
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        return NULL;
    }
#if CYTHON_COMPILING_IN_LIMITED_API
    py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
    if (!py_name) return NULL;
    PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments",
                 py_name);
    Py_DECREF(py_name);
#else
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
#endif
    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
     __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
    if (vc) {
#if CYTHON_ASSUME_SAFE_MACROS
        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_MACROS
        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);
#if PY_MAJOR_VERSION > 2
            PyErr_Format(PyExc_TypeError,
                         "unbound method %.200S() needs an argument",
                         cyfunc->func_qualname);
#else
            PyErr_SetString(PyExc_TypeError,
                            "unbound method needs an argument");
#endif
            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
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)) {
            PyErr_Format(PyExc_TypeError, "%.200s() needs an argument",
                         ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
            return -1;
        }
        ret = 1;
    }
    if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) {
        PyErr_Format(PyExc_TypeError,
                     "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
        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;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 0)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
            def->ml_name, nargs);
        return NULL;
    }
    return def->ml_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;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 1)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
            def->ml_name, nargs);
        return NULL;
    }
    return def->ml_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;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    return ((_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_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;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
    PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames);
}
#endif
#if CYTHON_USE_TYPE_SPECS
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 (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL)
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    __pyx_CyFunctionType_slots
};
#else
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
#if !CYTHON_METH_FASTCALL
    0,
#elif CYTHON_BACKPORT_VECTORCALL
    (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall),
#else
    offsetof(PyCFunctionObject, vectorcall),
#endif
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_PyMethod_New,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
    0,
#endif
#if __PYX_NEED_TP_PRINT_SLOT
    0,
#endif
#if PY_VERSION_HEX >= 0x030C0000
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0,
#endif
};
#endif
static int __pyx_CyFunction_init(PyObject *module) {
#if CYTHON_USE_TYPE_SPECS
    __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL);
#else
    CYTHON_UNUSED_VAR(module);
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
#endif
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    m->defaults_size = size;
    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_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *module = 0;
    PyObject *empty_dict = 0;
    PyObject *empty_list = 0;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (unlikely(!py_import))
        goto bad;
    if (!from_list) {
        empty_list = PyList_New(0);
        if (unlikely(!empty_list))
            goto bad;
        from_list = empty_list;
    }
    #endif
    empty_dict = PyDict_New();
    if (unlikely(!empty_dict))
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.') != NULL) {
                module = PyImport_ImportModuleLevelObject(
                    name, __pyx_d, empty_dict, from_list, 1);
                if (unlikely(!module)) {
                    if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (unlikely(!py_level))
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, __pyx_d, empty_dict, from_list, level);
            #endif
        }
    }
bad:
    Py_XDECREF(empty_dict);
    Py_XDECREF(empty_list);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    return module;
}

/* ImportDottedModule */
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) {
    PyObject *partial_name = NULL, *slice = NULL, *sep = NULL;
    if (unlikely(PyErr_Occurred())) {
        PyErr_Clear();
    }
    if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) {
        partial_name = name;
    } else {
        slice = PySequence_GetSlice(parts_tuple, 0, count);
        if (unlikely(!slice))
            goto bad;
        sep = PyUnicode_FromStringAndSize(".", 1);
        if (unlikely(!sep))
            goto bad;
        partial_name = PyUnicode_Join(sep, slice);
    }
    PyErr_Format(
#if PY_MAJOR_VERSION < 3
        PyExc_ImportError,
        "No module named '%s'", PyString_AS_STRING(partial_name));
#else
#if PY_VERSION_HEX >= 0x030600B1
        PyExc_ModuleNotFoundError,
#else
        PyExc_ImportError,
#endif
        "No module named '%U'", partial_name);
#endif
bad:
    Py_XDECREF(sep);
    Py_XDECREF(slice);
    Py_XDECREF(partial_name);
    return NULL;
}
#endif
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) {
    PyObject *imported_module;
#if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400)
    PyObject *modules = PyImport_GetModuleDict();
    if (unlikely(!modules))
        return NULL;
    imported_module = __Pyx_PyDict_GetItemStr(modules, name);
    Py_XINCREF(imported_module);
#else
    imported_module = PyImport_GetModule(name);
#endif
    return imported_module;
}
#endif
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) {
    Py_ssize_t i, nparts;
    nparts = PyTuple_GET_SIZE(parts_tuple);
    for (i=1; i < nparts && module; i++) {
        PyObject *part, *submodule;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        part = PyTuple_GET_ITEM(parts_tuple, i);
#else
        part = PySequence_ITEM(parts_tuple, i);
#endif
        submodule = __Pyx_PyObject_GetAttrStrNoError(module, part);
#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
        Py_DECREF(part);
#endif
        Py_DECREF(module);
        module = submodule;
    }
    if (unlikely(!module)) {
        return __Pyx__ImportDottedModule_Error(name, parts_tuple, i);
    }
    return module;
}
#endif
static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
#if PY_MAJOR_VERSION < 3
    PyObject *module, *from_list, *star = __pyx_n_s__9;
    CYTHON_UNUSED_VAR(parts_tuple);
    from_list = PyList_New(1);
    if (unlikely(!from_list))
        return NULL;
    Py_INCREF(star);
    PyList_SET_ITEM(from_list, 0, star);
    module = __Pyx_Import(name, from_list, 0);
    Py_DECREF(from_list);
    return module;
#else
    PyObject *imported_module;
    PyObject *module = __Pyx_Import(name, NULL, 0);
    if (!parts_tuple || unlikely(!module))
        return module;
    imported_module = __Pyx__ImportDottedModule_Lookup(name);
    if (likely(imported_module)) {
        Py_DECREF(module);
        return imported_module;
    }
    PyErr_Clear();
    return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple);
#endif
}
static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1
    PyObject *module = __Pyx__ImportDottedModule_Lookup(name);
    if (likely(module)) {
        PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec);
        if (likely(spec)) {
            PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing);
            if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) {
                Py_DECREF(spec);
                spec = NULL;
            }
            Py_XDECREF(unsafe);
        }
        if (likely(!spec)) {
            PyErr_Clear();
            return module;
        }
        Py_DECREF(spec);
        Py_DECREF(module);
    } else if (PyErr_Occurred()) {
        PyErr_Clear();
    }
#endif
    return __Pyx__ImportDottedModule(name, parts_tuple);
}

/* CallUnboundCMethod1 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
    if (likely(cfunc->func)) {
        int flag = cfunc->flag;
        if (flag == METH_O) {
            return (*(cfunc->func))(self, arg);
        } else if ((PY_VERSION_HEX >= 0x030600B1) && flag == METH_FASTCALL) {
            #if PY_VERSION_HEX >= 0x030700A0
                return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
            #else
                return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
            #endif
        } else if ((PY_VERSION_HEX >= 0x030700A0) && flag == (METH_FASTCALL | METH_KEYWORDS)) {
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
        }
    }
    return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
    PyObject *args, *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)) {
        args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 0, arg);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 1, arg);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(2, self, arg);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* CallUnboundCMethod2 */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    if (likely(cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            #if PY_VERSION_HEX >= 0x030700A0
            return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2);
            #else
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
            #endif
        }
        #if PY_VERSION_HEX >= 0x030700A0
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
        #endif
    }
    return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    PyObject *args, *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)) {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(3);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 1, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 2, arg2);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(3, self, arg1, arg2);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* dict_getitem_default */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
    PyObject* value;
#if PY_MAJOR_VERSION >= 3 && (!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 (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_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_umethod_PyDict_Type_get, d, key);
        else
            value = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_get, d, key, default_value);
    }
    return value;
}

/* 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
#ifdef WITH_THREAD
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
    else state = (PyGILState_STATE)0;
#endif
    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(1);
    }
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
#ifdef WITH_THREAD
    if (nogil)
        PyGILState_Release(state);
#endif
}

/* pyfrozenset_new */
static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) {
    if (it) {
        PyObject* result;
#if CYTHON_COMPILING_IN_PYPY
        PyObject* args;
        args = PyTuple_Pack(1, it);
        if (unlikely(!args))
            return NULL;
        result = PyObject_Call((PyObject*)&PyFrozenSet_Type, args, NULL);
        Py_DECREF(args);
        return result;
#else
        if (PyFrozenSet_CheckExact(it)) {
            Py_INCREF(it);
            return it;
        }
        result = PyFrozenSet_New(it);
        if (unlikely(!result))
            return NULL;
        if ((PY_VERSION_HEX >= 0x031000A1) || likely(PySet_GET_SIZE(result)))
            return result;
        Py_DECREF(result);
#endif
    }
#if CYTHON_USE_TYPE_SLOTS
    return PyFrozenSet_Type.tp_new(&PyFrozenSet_Type, __pyx_empty_tuple, NULL);
#else
    return PyObject_Call((PyObject*)&PyFrozenSet_Type, __pyx_empty_tuple, NULL);
#endif
}

/* PySetContains */
static int __Pyx_PySet_ContainsUnhashable(PyObject *set, PyObject *key) {
    int result = -1;
    if (PySet_Check(key) && PyErr_ExceptionMatches(PyExc_TypeError)) {
        PyObject *tmpkey;
        PyErr_Clear();
        tmpkey = __Pyx_PyFrozenSet_New(key);
        if (tmpkey != NULL) {
            result = PySet_Contains(set, tmpkey);
            Py_DECREF(tmpkey);
        }
    }
    return result;
}
static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq) {
    int result = PySet_Contains(set, key);
    if (unlikely(result < 0)) {
        result = __Pyx_PySet_ContainsUnhashable(set, key);
    }
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* decode_c_bytes */
static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
         const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    if (unlikely((start < 0) | (stop < 0))) {
        if (start < 0) {
            start += length;
            if (start < 0)
                start = 0;
        }
        if (stop < 0)
            stop += length;
    }
    if (stop > length)
        stop = length;
    if (unlikely(stop <= start))
        return __Pyx_NewRef(__pyx_empty_unicode);
    length = stop - start;
    cstring += start;
    if (decode_func) {
        return decode_func(cstring, length, errors);
    } else {
        return PyUnicode_Decode(cstring, length, encoding, errors);
    }
}

/* 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_kp_u__8);
        if (unlikely(!module_dot)) { goto modbad; }
        full_name = PyUnicode_Concat(module_dot, name);
        if (unlikely(!full_name)) { goto modbad; }
        #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400)
        {
            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,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* HasAttr */
#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!__Pyx_PyBaseString_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_GetAttr(o, n);
    if (!r) {
        PyErr_Clear();
        return 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}
#endif

/* ValidateBasesTuple */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
    Py_ssize_t i, n;
#if CYTHON_ASSUME_SAFE_MACROS
    n = PyTuple_GET_SIZE(bases);
#else
    n = PyTuple_Size(bases);
    if (n < 0) return -1;
#endif
    for (i = 1; i < n; i++)
    {
#if CYTHON_AVOID_BORROWED_REFS
        PyObject *b0 = PySequence_GetItem(bases, i);
        if (!b0) return -1;
#elif CYTHON_ASSUME_SAFE_MACROS
        PyObject *b0 = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *b0 = PyTuple_GetItem(bases, i);
        if (!b0) return -1;
#endif
        PyTypeObject *b;
#if PY_MAJOR_VERSION < 3
        if (PyClass_Check(b0))
        {
            PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class",
                         PyString_AS_STRING(((PyClassObject*)b0)->cl_name));
#if CYTHON_AVOID_BORROWED_REFS
            Py_DECREF(b0);
#endif
            return -1;
        }
#endif
        b = (PyTypeObject*) b0;
        if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
        {
            __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
            PyErr_Format(PyExc_TypeError,
                "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
            __Pyx_DECREF_TypeName(b_name);
#if CYTHON_AVOID_BORROWED_REFS
            Py_DECREF(b0);
#endif
            return -1;
        }
        if (dictoffset == 0)
        {
            Py_ssize_t b_dictoffset = 0;
#if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
            b_dictoffset = b->tp_dictoffset;
#else
            PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
            if (!py_b_dictoffset) goto dictoffset_return;
            b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
            Py_DECREF(py_b_dictoffset);
            if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
#endif
            if (b_dictoffset) {
                {
                    __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
                    PyErr_Format(PyExc_TypeError,
                        "extension type '%.200s' has no __dict__ slot, "
                        "but base type '" __Pyx_FMT_TYPENAME "' has: "
                        "either add 'cdef dict __dict__' to the extension type "
                        "or add '__slots__ = [...]' to the base type",
                        type_name, b_name);
                    __Pyx_DECREF_TypeName(b_name);
                }
#if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY)
              dictoffset_return:
#endif
#if CYTHON_AVOID_BORROWED_REFS
                Py_DECREF(b0);
#endif
                return -1;
            }
        }
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(b0);
#endif
    }
    return 0;
}
#endif

/* PyType_Ready */
static int __Pyx_PyType_Ready(PyTypeObject *t) {
#if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION)
    (void)__Pyx_PyObject_CallMethod0;
#if CYTHON_USE_TYPE_SPECS
    (void)__Pyx_validate_bases_tuple;
#endif
    return PyType_Ready(t);
#else
    int r;
    PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
    if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
        return -1;
#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
    {
        int gc_was_enabled;
    #if PY_VERSION_HEX >= 0x030A00b1
        gc_was_enabled = PyGC_Disable();
        (void)__Pyx_PyObject_CallMethod0;
    #else
        PyObject *ret, *py_status;
        PyObject *gc = NULL;
        #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400)
        gc = PyImport_GetModule(__pyx_kp_u_gc);
        #endif
        if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc);
        if (unlikely(!gc)) return -1;
        py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled);
        if (unlikely(!py_status)) {
            Py_DECREF(gc);
            return -1;
        }
        gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
        Py_DECREF(py_status);
        if (gc_was_enabled > 0) {
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable);
            if (unlikely(!ret)) {
                Py_DECREF(gc);
                return -1;
            }
            Py_DECREF(ret);
        } else if (unlikely(gc_was_enabled == -1)) {
            Py_DECREF(gc);
            return -1;
        }
    #endif
        t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
#if PY_VERSION_HEX >= 0x030A0000
        t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
#endif
#else
        (void)__Pyx_PyObject_CallMethod0;
#endif
    r = PyType_Ready(t);
#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
        t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
    #if PY_VERSION_HEX >= 0x030A00b1
        if (gc_was_enabled)
            PyGC_Enable();
    #else
        if (gc_was_enabled) {
            PyObject *tp, *v, *tb;
            PyErr_Fetch(&tp, &v, &tb);
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable);
            if (likely(ret || r == -1)) {
                Py_XDECREF(ret);
                PyErr_Restore(tp, v, tb);
            } else {
                Py_XDECREF(tp);
                Py_XDECREF(v);
                Py_XDECREF(tb);
                r = -1;
            }
        }
        Py_DECREF(gc);
    #endif
    }
#endif
    return r;
#endif
}

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp);
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, attr_name);
#else
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
                 type_name, PyString_AS_STRING(attr_name));
#endif
    __Pyx_DECREF_TypeName(type_name);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* PyObject_GenericGetAttr */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* SetupReduce */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name_2);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_getstate = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
    PyObject *getstate = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
#else
    getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
    if (!getstate && PyErr_Occurred()) {
        goto __PYX_BAD;
    }
#endif
    if (getstate) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
#else
        object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
        if (!object_getstate && PyErr_Occurred()) {
            goto __PYX_BAD;
        }
#endif
        if (object_getstate != getstate) {
            goto __PYX_GOOD;
        }
    }
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
            if (likely(reduce_cython)) {
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred()) {
        __Pyx_TypeName type_obj_name =
            __Pyx_PyType_GetName((PyTypeObject*)type_obj);
        PyErr_Format(PyExc_RuntimeError,
            "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name);
        __Pyx_DECREF_TypeName(type_obj_name);
    }
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
    Py_XDECREF(object_getstate);
    Py_XDECREF(getstate);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}
#endif

/* SetVTable */
static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) {
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
    if (unlikely(!ob))
        goto bad;
#if CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0))
#else
    if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0))
#endif
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* GetVTable */
static void* __Pyx_GetVtable(PyTypeObject *type) {
    void* ptr;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable);
#else
    PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_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;
}

/* MergeVTables */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_MergeVtables(PyTypeObject *type) {
    int i;
    void** base_vtables;
    __Pyx_TypeName tp_base_name;
    __Pyx_TypeName base_name;
    void* unknown = (void*)-1;
    PyObject* bases = type->tp_bases;
    int base_depth = 0;
    {
        PyTypeObject* base = type->tp_base;
        while (base) {
            base_depth += 1;
            base = base->tp_base;
        }
    }
    base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1));
    base_vtables[0] = unknown;
    for (i = 1; i < PyTuple_GET_SIZE(bases); i++) {
        void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i)));
        if (base_vtable != NULL) {
            int j;
            PyTypeObject* base = type->tp_base;
            for (j = 0; j < base_depth; j++) {
                if (base_vtables[j] == unknown) {
                    base_vtables[j] = __Pyx_GetVtable(base);
                    base_vtables[j + 1] = unknown;
                }
                if (base_vtables[j] == base_vtable) {
                    break;
                } else if (base_vtables[j] == NULL) {
                    goto bad;
                }
                base = base->tp_base;
            }
        }
    }
    PyErr_Clear();
    free(base_vtables);
    return 0;
bad:
    tp_base_name = __Pyx_PyType_GetName(type->tp_base);
    base_name = __Pyx_PyType_GetName((PyTypeObject*)PyTuple_GET_ITEM(bases, i));
    PyErr_Format(PyExc_TypeError,
        "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name);
    __Pyx_DECREF_TypeName(tp_base_name);
    __Pyx_DECREF_TypeName(base_name);
    free(base_vtables);
    return -1;
}
#endif

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType_3_0_8
#define __PYX_HAVE_RT_ImportType_3_0_8
static PyTypeObject *__Pyx_ImportType_3_0_8(PyObject *module, const char *module_name, const char *class_name,
    size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_8 check_size)
{
    PyObject *result = 0;
    char warning[200];
    Py_ssize_t basicsize;
    Py_ssize_t itemsize;
#if 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 !CYTHON_COMPILING_IN_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
    itemsize = ((PyTypeObject *)result)->tp_itemsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
    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_0_8 &&
            ((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_0_8 && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* Py3UpdateBases */
static PyObject*
__Pyx_PEP560_update_bases(PyObject *bases)
{
    Py_ssize_t i, j, size_bases;
    PyObject *base, *meth, *new_base, *result, *new_bases = NULL;
    size_bases = PyTuple_GET_SIZE(bases);
    for (i = 0; i < size_bases; i++) {
        base  = PyTuple_GET_ITEM(bases, i);
        if (PyType_Check(base)) {
            if (new_bases) {
                if (PyList_Append(new_bases, base) < 0) {
                    goto error;
                }
            }
            continue;
        }
        meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_n_s_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++) {
                base = PyTuple_GET_ITEM(bases, j);
                PyList_SET_ITEM(new_bases, j, base);
                Py_INCREF(base);
            }
        }
        j = PyList_GET_SIZE(new_bases);
        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);
    return result;
error:
    Py_XDECREF(new_bases);
    return NULL;
}

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases;
#if CYTHON_ASSUME_SAFE_MACROS
    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 PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        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) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* PyObjectLookupSpecial */
#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);
#if PY_MAJOR_VERSION < 3
    if (unlikely(PyInstance_Check(obj)))
        return with_error ? __Pyx_PyObject_GetAttrStr(obj, attr_name) : __Pyx_PyObject_GetAttrStrNoError(obj, attr_name);
#endif
    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_n_s_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_n_s_module, modname) < 0)) goto bad;
#if PY_VERSION_HEX >= 0x03030000
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
#else
    CYTHON_MAYBE_UNUSED_VAR(qualname);
#endif
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
#if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS
static int __Pyx_SetNamesPEP487(PyObject *type_obj) {
    PyTypeObject *type = (PyTypeObject*) type_obj;
    PyObject *names_to_set, *key, *value, *set_name, *tmp;
    Py_ssize_t i = 0;
#if CYTHON_USE_TYPE_SLOTS
    names_to_set = PyDict_Copy(type->tp_dict);
#else
    {
        PyObject *d = PyObject_GetAttr(type_obj, __pyx_n_s_dict);
        names_to_set = NULL;
        if (likely(d)) {
            PyObject *names_to_set = PyDict_New();
            int ret = likely(names_to_set) ? PyDict_Update(names_to_set, d) : -1;
            Py_DECREF(d);
            if (unlikely(ret < 0))
                Py_CLEAR(names_to_set);
        }
    }
#endif
    if (unlikely(names_to_set == NULL))
        goto bad;
    while (PyDict_Next(names_to_set, &i, &key, &value)) {
        set_name = __Pyx_PyObject_LookupSpecialNoError(value, __pyx_n_s_set_name);
        if (unlikely(set_name != NULL)) {
            tmp = __Pyx_PyObject_Call2Args(set_name, type_obj, key);
            Py_DECREF(set_name);
            if (unlikely(tmp == NULL)) {
                __Pyx_TypeName value_type_name =
                    __Pyx_PyType_GetName(Py_TYPE(value));
                __Pyx_TypeName type_name = __Pyx_PyType_GetName(type);
                PyErr_Format(PyExc_RuntimeError,
#if PY_MAJOR_VERSION >= 3
                    "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %R " "in '" __Pyx_FMT_TYPENAME "'",
                    value_type_name, key, type_name);
#else
                    "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %.100s in '" __Pyx_FMT_TYPENAME "'",
                    value_type_name,
                    PyString_Check(key) ? PyString_AS_STRING(key) : "?",
                    type_name);
#endif
                goto bad;
            } else {
                Py_DECREF(tmp);
            }
        }
        else if (unlikely(PyErr_Occurred())) {
            goto bad;
        }
    }
    Py_DECREF(names_to_set);
    return 0;
bad:
    Py_XDECREF(names_to_set);
    return -1;
}
static PyObject *__Pyx_InitSubclassPEP487(PyObject *type_obj, PyObject *mkw) {
#if CYTHON_USE_TYPE_SLOTS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyTypeObject *type = (PyTypeObject*) type_obj;
    PyObject *mro = type->tp_mro;
    Py_ssize_t i, nbases;
    if (unlikely(!mro)) goto done;
    (void) &__Pyx_GetBuiltinName;
    Py_INCREF(mro);
    nbases = PyTuple_GET_SIZE(mro);
    assert(PyTuple_GET_ITEM(mro, 0) == type_obj);
    for (i = 1; i < nbases-1; i++) {
        PyObject *base, *dict, *meth;
        base = PyTuple_GET_ITEM(mro, i);
        dict = ((PyTypeObject *)base)->tp_dict;
        meth = __Pyx_PyDict_GetItemStrWithError(dict, __pyx_n_s_init_subclass);
        if (unlikely(meth)) {
            descrgetfunc f = Py_TYPE(meth)->tp_descr_get;
            PyObject *res;
            Py_INCREF(meth);
            if (likely(f)) {
                res = f(meth, NULL, type_obj);
                Py_DECREF(meth);
                if (unlikely(!res)) goto bad;
                meth = res;
            }
            res = __Pyx_PyObject_FastCallDict(meth, NULL, 0, mkw);
            Py_DECREF(meth);
            if (unlikely(!res)) goto bad;
            Py_DECREF(res);
            goto done;
        } else if (unlikely(PyErr_Occurred())) {
            goto bad;
        }
    }
done:
    Py_XDECREF(mro);
    return type_obj;
bad:
    Py_XDECREF(mro);
    Py_DECREF(type_obj);
    return NULL;
#else
    PyObject *super_type, *super, *func, *res;
#if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type)
    super_type = __Pyx_GetBuiltinName(__pyx_n_s_super);
#else
    super_type = (PyObject*) &PySuper_Type;
    (void) &__Pyx_GetBuiltinName;
#endif
    super = likely(super_type) ? __Pyx_PyObject_Call2Args(super_type, type_obj, type_obj) : NULL;
#if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type)
    Py_XDECREF(super_type);
#endif
    if (unlikely(!super)) {
        Py_CLEAR(type_obj);
        goto done;
    }
    func = __Pyx_PyObject_GetAttrStrNoError(super, __pyx_n_s_init_subclass);
    Py_DECREF(super);
    if (likely(!func)) {
        if (unlikely(PyErr_Occurred()))
            Py_CLEAR(type_obj);
        goto done;
    }
    res = __Pyx_PyObject_FastCallDict(func, NULL, 0, mkw);
    Py_DECREF(func);
    if (unlikely(!res))
        Py_CLEAR(type_obj);
    Py_XDECREF(res);
done:
    return type_obj;
#endif
}
#endif
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_n_s_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,
#if PY_VERSION_HEX < 0x030600A4
        (metaclass == (PyObject*)&PyType_Type) ? NULL : mkw
#else
        mkw
#endif
    );
    Py_XDECREF(owned_metaclass);
#if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS
    if (likely(result) && likely(PyType_Check(result))) {
        if (unlikely(__Pyx_SetNamesPEP487(result) < 0)) {
            Py_CLEAR(result);
        } else {
            result = __Pyx_InitSubclassPEP487(result, mkw);
        }
    }
#else
    (void) &__Pyx_GetBuiltinName;
#endif
    return result;
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    CYTHON_MAYBE_UNUSED_VAR(tstate);
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
#if !CYTHON_COMPILING_IN_LIMITED_API
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 PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}
#endif

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
  #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;
        result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict);
        Py_DECREF(replace);
        return result;
    }
    PyErr_Clear();
    #if __PYX_LIMITED_VERSION_HEX < 0x030780000
    {
        PyObject *compiled = NULL, *result = NULL;
        if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL;
        if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL;
        compiled = Py_CompileString(
            "out = type(code)(\n"
            "  code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n"
            "  code.co_flags, code.co_code, code.co_consts, code.co_names,\n"
            "  code.co_varnames, code.co_filename, co_name, co_firstlineno,\n"
            "  code.co_lnotab)\n", "<dummy>", Py_file_input);
        if (!compiled) return NULL;
        result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict);
        Py_DECREF(compiled);
        if (!result) PyErr_Print();
        Py_DECREF(result);
        result = PyDict_GetItemString(scratch_dict, "out");
        if (result) Py_INCREF(result);
        return result;
    }
    #else
    return NULL;
    #endif
}
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) {
        (void) __pyx_cfilenm;
        (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
    }
    PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
    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;
    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;
    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 PY_MAJOR_VERSION < 3
    PyObject *py_srcfile = NULL;
    py_srcfile = PyString_FromString(filename);
    if (!py_srcfile) goto bad;
    #endif
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        #else
        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;
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        if (!py_funcname) goto bad;
        #endif
    }
    #if PY_MAJOR_VERSION < 3
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    #else
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    #endif
    Py_XDECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_srcfile);
    #endif
    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_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

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned 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(unsigned int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(unsigned int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(unsigned int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        return _PyLong_FromByteArray(bytes, sizeof(unsigned int),
                                     little, !is_unsigned);
#else
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = 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(unsigned int));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(unsigned int) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(unsigned int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (unsigned int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        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(unsigned 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(unsigned int) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(unsigned int) >= 2 * PyLong_SHIFT)) {
                                return (unsigned int) (((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(unsigned int) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(unsigned int) >= 3 * PyLong_SHIFT)) {
                                return (unsigned int) (((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(unsigned int) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) >= 4 * PyLong_SHIFT)) {
                                return (unsigned int) (((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned 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 (unsigned int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(unsigned int) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) {
                                return (unsigned int) (((unsigned int)-1)*(((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(unsigned int) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) {
                                return (unsigned int) ((((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) {
                                return (unsigned int) (((unsigned int)-1)*(((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(unsigned int) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) {
                                return (unsigned int) ((((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) - 1 > 4 * PyLong_SHIFT)) {
                                return (unsigned int) (((unsigned int)-1)*(((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(unsigned int) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) - 1 > 4 * PyLong_SHIFT)) {
                                return (unsigned int) ((((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(unsigned int) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(unsigned int) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
            unsigned int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
#if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
#endif
            if (likely(v)) {
                int ret = -1;
#if 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 *)v,
                                           bytes, sizeof(val),
                                           is_little, !is_unsigned);
#else
                PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
                int bits, remaining_bits, is_negative = 0;
                long idigit;
                int chunk_size = (sizeof(long) < 8) ? 30 : 62;
                if (unlikely(!PyLong_CheckExact(v))) {
                    PyObject *tmp = v;
                    v = PyNumber_Long(v);
                    assert(PyLong_CheckExact(v));
                    Py_DECREF(tmp);
                    if (unlikely(!v)) return (unsigned int) -1;
                }
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                if (Py_SIZE(x) == 0)
                    return (unsigned int) 0;
                is_negative = Py_SIZE(x) < 0;
#else
                {
                    int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                    if (unlikely(result < 0))
                        return (unsigned int) -1;
                    is_negative = result == 1;
                }
#endif
                if (is_unsigned && unlikely(is_negative)) {
                    goto raise_neg_overflow;
                } else if (is_negative) {
                    stepval = PyNumber_Invert(v);
                    if (unlikely(!stepval))
                        return (unsigned int) -1;
                } else {
                    stepval = __Pyx_NewRef(v);
                }
                val = (unsigned 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(unsigned int) * 8 - chunk_size; bits += chunk_size) {
                    PyObject *tmp, *digit;
                    digit = PyNumber_And(stepval, mask);
                    if (unlikely(!digit)) goto done;
                    idigit = PyLong_AsLong(digit);
                    Py_DECREF(digit);
                    if (unlikely(idigit < 0)) goto done;
                    tmp = PyNumber_Rshift(stepval, shift);
                    if (unlikely(!tmp)) goto done;
                    Py_DECREF(stepval); stepval = tmp;
                    val |= ((unsigned int) idigit) << bits;
                    #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                    if (Py_SIZE(stepval) == 0)
                        goto unpacking_done;
                    #endif
                }
                idigit = PyLong_AsLong(stepval);
                if (unlikely(idigit < 0)) goto done;
                remaining_bits = ((int) sizeof(unsigned int) * 8) - bits - (is_unsigned ? 0 : 1);
                if (unlikely(idigit >= (1L << remaining_bits)))
                    goto raise_overflow;
                val |= ((unsigned int) idigit) << bits;
            #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
            unpacking_done:
            #endif
                if (!is_unsigned) {
                    if (unlikely(val & (((unsigned int) 1) << (sizeof(unsigned int) * 8 - 1))))
                        goto raise_overflow;
                    if (is_negative)
                        val = ~val;
                }
                ret = 0;
            done:
                Py_XDECREF(shift);
                Py_XDECREF(mask);
                Py_XDECREF(stepval);
#endif
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
            return (unsigned int) -1;
        }
    } else {
        unsigned int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (unsigned int) -1;
        val = __Pyx_PyInt_As_unsigned_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to unsigned int");
    return (unsigned int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to unsigned int");
    return (unsigned int) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_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 PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } 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 PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
#else
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = 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;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_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 PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(int) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        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))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } 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))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
#if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
#endif
            if (likely(v)) {
                int ret = -1;
#if 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 *)v,
                                           bytes, sizeof(val),
                                           is_little, !is_unsigned);
#else
                PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
                int bits, remaining_bits, is_negative = 0;
                long idigit;
                int chunk_size = (sizeof(long) < 8) ? 30 : 62;
                if (unlikely(!PyLong_CheckExact(v))) {
                    PyObject *tmp = v;
                    v = PyNumber_Long(v);
                    assert(PyLong_CheckExact(v));
                    Py_DECREF(tmp);
                    if (unlikely(!v)) return (int) -1;
                }
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                if (Py_SIZE(x) == 0)
                    return (int) 0;
                is_negative = Py_SIZE(x) < 0;
#else
                {
                    int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                    if (unlikely(result < 0))
                        return (int) -1;
                    is_negative = result == 1;
                }
#endif
                if (is_unsigned && unlikely(is_negative)) {
                    goto raise_neg_overflow;
                } else if (is_negative) {
                    stepval = PyNumber_Invert(v);
                    if (unlikely(!stepval))
                        return (int) -1;
                } else {
                    stepval = __Pyx_NewRef(v);
                }
                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;
                    digit = PyNumber_And(stepval, mask);
                    if (unlikely(!digit)) goto done;
                    idigit = PyLong_AsLong(digit);
                    Py_DECREF(digit);
                    if (unlikely(idigit < 0)) goto done;
                    tmp = PyNumber_Rshift(stepval, shift);
                    if (unlikely(!tmp)) goto done;
                    Py_DECREF(stepval); stepval = tmp;
                    val |= ((int) idigit) << bits;
                    #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                    if (Py_SIZE(stepval) == 0)
                        goto unpacking_done;
                    #endif
                }
                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 CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
            unpacking_done:
            #endif
                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
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        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_PyInt_From_SdifUInt4(SdifUInt4 value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const SdifUInt4 neg_one = (SdifUInt4) -1, const_zero = (SdifUInt4) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(SdifUInt4) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(SdifUInt4) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(SdifUInt4) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(SdifUInt4) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(SdifUInt4) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        return _PyLong_FromByteArray(bytes, sizeof(SdifUInt4),
                                     little, !is_unsigned);
#else
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = 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(SdifUInt4));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE SdifUInt4 __Pyx_PyInt_As_SdifUInt4(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const SdifUInt4 neg_one = (SdifUInt4) -1, const_zero = (SdifUInt4) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(SdifUInt4) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(SdifUInt4, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (SdifUInt4) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        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(SdifUInt4, __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(SdifUInt4) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(SdifUInt4, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(SdifUInt4) >= 2 * PyLong_SHIFT)) {
                                return (SdifUInt4) (((((SdifUInt4)digits[1]) << PyLong_SHIFT) | (SdifUInt4)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(SdifUInt4) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(SdifUInt4, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(SdifUInt4) >= 3 * PyLong_SHIFT)) {
                                return (SdifUInt4) (((((((SdifUInt4)digits[2]) << PyLong_SHIFT) | (SdifUInt4)digits[1]) << PyLong_SHIFT) | (SdifUInt4)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(SdifUInt4) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(SdifUInt4, 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(SdifUInt4) >= 4 * PyLong_SHIFT)) {
                                return (SdifUInt4) (((((((((SdifUInt4)digits[3]) << PyLong_SHIFT) | (SdifUInt4)digits[2]) << PyLong_SHIFT) | (SdifUInt4)digits[1]) << PyLong_SHIFT) | (SdifUInt4)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 (SdifUInt4) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(SdifUInt4) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(SdifUInt4, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(SdifUInt4) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(SdifUInt4, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(SdifUInt4, __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(SdifUInt4) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(SdifUInt4, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(SdifUInt4) - 1 > 2 * PyLong_SHIFT)) {
                                return (SdifUInt4) (((SdifUInt4)-1)*(((((SdifUInt4)digits[1]) << PyLong_SHIFT) | (SdifUInt4)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(SdifUInt4) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(SdifUInt4, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(SdifUInt4) - 1 > 2 * PyLong_SHIFT)) {
                                return (SdifUInt4) ((((((SdifUInt4)digits[1]) << PyLong_SHIFT) | (SdifUInt4)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(SdifUInt4) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(SdifUInt4, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(SdifUInt4) - 1 > 3 * PyLong_SHIFT)) {
                                return (SdifUInt4) (((SdifUInt4)-1)*(((((((SdifUInt4)digits[2]) << PyLong_SHIFT) | (SdifUInt4)digits[1]) << PyLong_SHIFT) | (SdifUInt4)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(SdifUInt4) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(SdifUInt4, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(SdifUInt4) - 1 > 3 * PyLong_SHIFT)) {
                                return (SdifUInt4) ((((((((SdifUInt4)digits[2]) << PyLong_SHIFT) | (SdifUInt4)digits[1]) << PyLong_SHIFT) | (SdifUInt4)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(SdifUInt4) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(SdifUInt4, 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(SdifUInt4) - 1 > 4 * PyLong_SHIFT)) {
                                return (SdifUInt4) (((SdifUInt4)-1)*(((((((((SdifUInt4)digits[3]) << PyLong_SHIFT) | (SdifUInt4)digits[2]) << PyLong_SHIFT) | (SdifUInt4)digits[1]) << PyLong_SHIFT) | (SdifUInt4)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(SdifUInt4) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(SdifUInt4, 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(SdifUInt4) - 1 > 4 * PyLong_SHIFT)) {
                                return (SdifUInt4) ((((((((((SdifUInt4)digits[3]) << PyLong_SHIFT) | (SdifUInt4)digits[2]) << PyLong_SHIFT) | (SdifUInt4)digits[1]) << PyLong_SHIFT) | (SdifUInt4)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(SdifUInt4) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(SdifUInt4, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(SdifUInt4) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(SdifUInt4, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
            SdifUInt4 val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
#if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
#endif
            if (likely(v)) {
                int ret = -1;
#if 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 *)v,
                                           bytes, sizeof(val),
                                           is_little, !is_unsigned);
#else
                PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
                int bits, remaining_bits, is_negative = 0;
                long idigit;
                int chunk_size = (sizeof(long) < 8) ? 30 : 62;
                if (unlikely(!PyLong_CheckExact(v))) {
                    PyObject *tmp = v;
                    v = PyNumber_Long(v);
                    assert(PyLong_CheckExact(v));
                    Py_DECREF(tmp);
                    if (unlikely(!v)) return (SdifUInt4) -1;
                }
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                if (Py_SIZE(x) == 0)
                    return (SdifUInt4) 0;
                is_negative = Py_SIZE(x) < 0;
#else
                {
                    int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                    if (unlikely(result < 0))
                        return (SdifUInt4) -1;
                    is_negative = result == 1;
                }
#endif
                if (is_unsigned && unlikely(is_negative)) {
                    goto raise_neg_overflow;
                } else if (is_negative) {
                    stepval = PyNumber_Invert(v);
                    if (unlikely(!stepval))
                        return (SdifUInt4) -1;
                } else {
                    stepval = __Pyx_NewRef(v);
                }
                val = (SdifUInt4) 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(SdifUInt4) * 8 - chunk_size; bits += chunk_size) {
                    PyObject *tmp, *digit;
                    digit = PyNumber_And(stepval, mask);
                    if (unlikely(!digit)) goto done;
                    idigit = PyLong_AsLong(digit);
                    Py_DECREF(digit);
                    if (unlikely(idigit < 0)) goto done;
                    tmp = PyNumber_Rshift(stepval, shift);
                    if (unlikely(!tmp)) goto done;
                    Py_DECREF(stepval); stepval = tmp;
                    val |= ((SdifUInt4) idigit) << bits;
                    #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                    if (Py_SIZE(stepval) == 0)
                        goto unpacking_done;
                    #endif
                }
                idigit = PyLong_AsLong(stepval);
                if (unlikely(idigit < 0)) goto done;
                remaining_bits = ((int) sizeof(SdifUInt4) * 8) - bits - (is_unsigned ? 0 : 1);
                if (unlikely(idigit >= (1L << remaining_bits)))
                    goto raise_overflow;
                val |= ((SdifUInt4) idigit) << bits;
            #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
            unpacking_done:
            #endif
                if (!is_unsigned) {
                    if (unlikely(val & (((SdifUInt4) 1) << (sizeof(SdifUInt4) * 8 - 1))))
                        goto raise_overflow;
                    if (is_negative)
                        val = ~val;
                }
                ret = 0;
            done:
                Py_XDECREF(shift);
                Py_XDECREF(mask);
                Py_XDECREF(stepval);
#endif
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
            return (SdifUInt4) -1;
        }
    } else {
        SdifUInt4 val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (SdifUInt4) -1;
        val = __Pyx_PyInt_As_SdifUInt4(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to SdifUInt4");
    return (SdifUInt4) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to SdifUInt4");
    return (SdifUInt4) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__SdifFileModeE(enum SdifFileModeE value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum SdifFileModeE neg_one = (enum SdifFileModeE) -1, const_zero = (enum SdifFileModeE) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum SdifFileModeE) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum SdifFileModeE) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum SdifFileModeE) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum SdifFileModeE) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum SdifFileModeE) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        return _PyLong_FromByteArray(bytes, sizeof(enum SdifFileModeE),
                                     little, !is_unsigned);
#else
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = 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(enum SdifFileModeE));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum NPY_TYPES neg_one = (enum NPY_TYPES) -1, const_zero = (enum NPY_TYPES) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum NPY_TYPES) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum NPY_TYPES) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES),
                                     little, !is_unsigned);
#else
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = 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(enum NPY_TYPES));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_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 PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(long) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        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))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } 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))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
#if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
#endif
            if (likely(v)) {
                int ret = -1;
#if 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 *)v,
                                           bytes, sizeof(val),
                                           is_little, !is_unsigned);
#else
                PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
                int bits, remaining_bits, is_negative = 0;
                long idigit;
                int chunk_size = (sizeof(long) < 8) ? 30 : 62;
                if (unlikely(!PyLong_CheckExact(v))) {
                    PyObject *tmp = v;
                    v = PyNumber_Long(v);
                    assert(PyLong_CheckExact(v));
                    Py_DECREF(tmp);
                    if (unlikely(!v)) return (long) -1;
                }
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                if (Py_SIZE(x) == 0)
                    return (long) 0;
                is_negative = Py_SIZE(x) < 0;
#else
                {
                    int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                    if (unlikely(result < 0))
                        return (long) -1;
                    is_negative = result == 1;
                }
#endif
                if (is_unsigned && unlikely(is_negative)) {
                    goto raise_neg_overflow;
                } else if (is_negative) {
                    stepval = PyNumber_Invert(v);
                    if (unlikely(!stepval))
                        return (long) -1;
                } else {
                    stepval = __Pyx_NewRef(v);
                }
                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;
                    digit = PyNumber_And(stepval, mask);
                    if (unlikely(!digit)) goto done;
                    idigit = PyLong_AsLong(digit);
                    Py_DECREF(digit);
                    if (unlikely(idigit < 0)) goto done;
                    tmp = PyNumber_Rshift(stepval, shift);
                    if (unlikely(!tmp)) goto done;
                    Py_DECREF(stepval); stepval = tmp;
                    val |= ((long) idigit) << bits;
                    #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                    if (Py_SIZE(stepval) == 0)
                        goto unpacking_done;
                    #endif
                }
                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 CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
            unpacking_done:
            #endif
                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
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        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;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_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 PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } 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 PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
#else
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = 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;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__SdifDataTypeE(enum SdifDataTypeE value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum SdifDataTypeE neg_one = (enum SdifDataTypeE) -1, const_zero = (enum SdifDataTypeE) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum SdifDataTypeE) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum SdifDataTypeE) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum SdifDataTypeE) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum SdifDataTypeE) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum SdifDataTypeE) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        return _PyLong_FromByteArray(bytes, sizeof(enum SdifDataTypeE),
                                     little, !is_unsigned);
#else
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = 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(enum SdifDataTypeE));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_6pysdif_7_pysdif_MatrixStatusE(enum __pyx_t_6pysdif_7_pysdif_MatrixStatusE value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_6pysdif_7_pysdif_MatrixStatusE neg_one = (enum __pyx_t_6pysdif_7_pysdif_MatrixStatusE) -1, const_zero = (enum __pyx_t_6pysdif_7_pysdif_MatrixStatusE) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum __pyx_t_6pysdif_7_pysdif_MatrixStatusE) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum __pyx_t_6pysdif_7_pysdif_MatrixStatusE) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_6pysdif_7_pysdif_MatrixStatusE) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum __pyx_t_6pysdif_7_pysdif_MatrixStatusE) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_6pysdif_7_pysdif_MatrixStatusE) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        return _PyLong_FromByteArray(bytes, sizeof(enum __pyx_t_6pysdif_7_pysdif_MatrixStatusE),
                                     little, !is_unsigned);
#else
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = 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(enum __pyx_t_6pysdif_7_pysdif_MatrixStatusE));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE enum SdifFileModeE __Pyx_PyInt_As_enum__SdifFileModeE(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum SdifFileModeE neg_one = (enum SdifFileModeE) -1, const_zero = (enum SdifFileModeE) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(enum SdifFileModeE) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(enum SdifFileModeE, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum SdifFileModeE) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        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(enum SdifFileModeE, __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(enum SdifFileModeE) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum SdifFileModeE, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum SdifFileModeE) >= 2 * PyLong_SHIFT)) {
                                return (enum SdifFileModeE) (((((enum SdifFileModeE)digits[1]) << PyLong_SHIFT) | (enum SdifFileModeE)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(enum SdifFileModeE) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum SdifFileModeE, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum SdifFileModeE) >= 3 * PyLong_SHIFT)) {
                                return (enum SdifFileModeE) (((((((enum SdifFileModeE)digits[2]) << PyLong_SHIFT) | (enum SdifFileModeE)digits[1]) << PyLong_SHIFT) | (enum SdifFileModeE)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(enum SdifFileModeE) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum SdifFileModeE, 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(enum SdifFileModeE) >= 4 * PyLong_SHIFT)) {
                                return (enum SdifFileModeE) (((((((((enum SdifFileModeE)digits[3]) << PyLong_SHIFT) | (enum SdifFileModeE)digits[2]) << PyLong_SHIFT) | (enum SdifFileModeE)digits[1]) << PyLong_SHIFT) | (enum SdifFileModeE)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 (enum SdifFileModeE) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(enum SdifFileModeE) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(enum SdifFileModeE, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(enum SdifFileModeE) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(enum SdifFileModeE, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(enum SdifFileModeE, __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(enum SdifFileModeE) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum SdifFileModeE, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum SdifFileModeE) - 1 > 2 * PyLong_SHIFT)) {
                                return (enum SdifFileModeE) (((enum SdifFileModeE)-1)*(((((enum SdifFileModeE)digits[1]) << PyLong_SHIFT) | (enum SdifFileModeE)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(enum SdifFileModeE) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum SdifFileModeE, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum SdifFileModeE) - 1 > 2 * PyLong_SHIFT)) {
                                return (enum SdifFileModeE) ((((((enum SdifFileModeE)digits[1]) << PyLong_SHIFT) | (enum SdifFileModeE)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(enum SdifFileModeE) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum SdifFileModeE, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum SdifFileModeE) - 1 > 3 * PyLong_SHIFT)) {
                                return (enum SdifFileModeE) (((enum SdifFileModeE)-1)*(((((((enum SdifFileModeE)digits[2]) << PyLong_SHIFT) | (enum SdifFileModeE)digits[1]) << PyLong_SHIFT) | (enum SdifFileModeE)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(enum SdifFileModeE) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum SdifFileModeE, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(enum SdifFileModeE) - 1 > 3 * PyLong_SHIFT)) {
                                return (enum SdifFileModeE) ((((((((enum SdifFileModeE)digits[2]) << PyLong_SHIFT) | (enum SdifFileModeE)digits[1]) << PyLong_SHIFT) | (enum SdifFileModeE)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(enum SdifFileModeE) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum SdifFileModeE, 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(enum SdifFileModeE) - 1 > 4 * PyLong_SHIFT)) {
                                return (enum SdifFileModeE) (((enum SdifFileModeE)-1)*(((((((((enum SdifFileModeE)digits[3]) << PyLong_SHIFT) | (enum SdifFileModeE)digits[2]) << PyLong_SHIFT) | (enum SdifFileModeE)digits[1]) << PyLong_SHIFT) | (enum SdifFileModeE)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(enum SdifFileModeE) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(enum SdifFileModeE, 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(enum SdifFileModeE) - 1 > 4 * PyLong_SHIFT)) {
                                return (enum SdifFileModeE) ((((((((((enum SdifFileModeE)digits[3]) << PyLong_SHIFT) | (enum SdifFileModeE)digits[2]) << PyLong_SHIFT) | (enum SdifFileModeE)digits[1]) << PyLong_SHIFT) | (enum SdifFileModeE)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(enum SdifFileModeE) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(enum SdifFileModeE, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(enum SdifFileModeE) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(enum SdifFileModeE, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() not available, cannot convert large enums");
        return (enum SdifFileModeE) -1;
    } else {
        enum SdifFileModeE val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum SdifFileModeE) -1;
        val = __Pyx_PyInt_As_enum__SdifFileModeE(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum SdifFileModeE");
    return (enum SdifFileModeE) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum SdifFileModeE");
    return (enum SdifFileModeE) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_6pysdif_7_pysdif_FrameStatusE(enum __pyx_t_6pysdif_7_pysdif_FrameStatusE value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_6pysdif_7_pysdif_FrameStatusE neg_one = (enum __pyx_t_6pysdif_7_pysdif_FrameStatusE) -1, const_zero = (enum __pyx_t_6pysdif_7_pysdif_FrameStatusE) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum __pyx_t_6pysdif_7_pysdif_FrameStatusE) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum __pyx_t_6pysdif_7_pysdif_FrameStatusE) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_6pysdif_7_pysdif_FrameStatusE) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum __pyx_t_6pysdif_7_pysdif_FrameStatusE) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_6pysdif_7_pysdif_FrameStatusE) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        return _PyLong_FromByteArray(bytes, sizeof(enum __pyx_t_6pysdif_7_pysdif_FrameStatusE),
                                     little, !is_unsigned);
#else
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = 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(enum __pyx_t_6pysdif_7_pysdif_FrameStatusE));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SdiffPosT(SdiffPosT value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const SdiffPosT neg_one = (SdiffPosT) -1, const_zero = (SdiffPosT) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(SdiffPosT) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(SdiffPosT) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(SdiffPosT) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(SdiffPosT) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(SdiffPosT) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        return _PyLong_FromByteArray(bytes, sizeof(SdiffPosT),
                                     little, !is_unsigned);
#else
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = 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(SdiffPosT));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__SdifErrorTagE(enum SdifErrorTagE value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum SdifErrorTagE neg_one = (enum SdifErrorTagE) -1, const_zero = (enum SdifErrorTagE) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum SdifErrorTagE) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum SdifErrorTagE) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum SdifErrorTagE) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum SdifErrorTagE) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum SdifErrorTagE) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        return _PyLong_FromByteArray(bytes, sizeof(enum SdifErrorTagE),
                                     little, !is_unsigned);
#else
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = 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(enum SdifErrorTagE));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__SdifErrorLevelE(enum SdifErrorLevelE value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum SdifErrorLevelE neg_one = (enum SdifErrorLevelE) -1, const_zero = (enum SdifErrorLevelE) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum SdifErrorLevelE) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum SdifErrorLevelE) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum SdifErrorLevelE) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum SdifErrorLevelE) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum SdifErrorLevelE) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        return _PyLong_FromByteArray(bytes, sizeof(enum SdifErrorLevelE),
                                     little, !is_unsigned);
#else
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = 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(enum SdifErrorLevelE));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(size_t) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (size_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        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(size_t, __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(size_t) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(size_t) >= 2 * PyLong_SHIFT)) {
                                return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(size_t) >= 3 * PyLong_SHIFT)) {
                                return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(size_t, 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(size_t) >= 4 * PyLong_SHIFT)) {
                                return (size_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
#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 (size_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(size_t) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(size_t, __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(size_t) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) {
                                return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) {
                                return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) {
                                return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) {
                                return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(size_t, 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(size_t) - 1 > 4 * PyLong_SHIFT)) {
                                return (size_t) (((size_t)-1)*(((((((((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(size_t) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(size_t, 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(size_t) - 1 > 4 * PyLong_SHIFT)) {
                                return (size_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
            if ((sizeof(size_t) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(size_t) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
            size_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
#if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
#endif
            if (likely(v)) {
                int ret = -1;
#if 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 *)v,
                                           bytes, sizeof(val),
                                           is_little, !is_unsigned);
#else
                PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
                int bits, remaining_bits, is_negative = 0;
                long idigit;
                int chunk_size = (sizeof(long) < 8) ? 30 : 62;
                if (unlikely(!PyLong_CheckExact(v))) {
                    PyObject *tmp = v;
                    v = PyNumber_Long(v);
                    assert(PyLong_CheckExact(v));
                    Py_DECREF(tmp);
                    if (unlikely(!v)) return (size_t) -1;
                }
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                if (Py_SIZE(x) == 0)
                    return (size_t) 0;
                is_negative = Py_SIZE(x) < 0;
#else
                {
                    int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                    if (unlikely(result < 0))
                        return (size_t) -1;
                    is_negative = result == 1;
                }
#endif
                if (is_unsigned && unlikely(is_negative)) {
                    goto raise_neg_overflow;
                } else if (is_negative) {
                    stepval = PyNumber_Invert(v);
                    if (unlikely(!stepval))
                        return (size_t) -1;
                } else {
                    stepval = __Pyx_NewRef(v);
                }
                val = (size_t) 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(size_t) * 8 - chunk_size; bits += chunk_size) {
                    PyObject *tmp, *digit;
                    digit = PyNumber_And(stepval, mask);
                    if (unlikely(!digit)) goto done;
                    idigit = PyLong_AsLong(digit);
                    Py_DECREF(digit);
                    if (unlikely(idigit < 0)) goto done;
                    tmp = PyNumber_Rshift(stepval, shift);
                    if (unlikely(!tmp)) goto done;
                    Py_DECREF(stepval); stepval = tmp;
                    val |= ((size_t) idigit) << bits;
                    #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                    if (Py_SIZE(stepval) == 0)
                        goto unpacking_done;
                    #endif
                }
                idigit = PyLong_AsLong(stepval);
                if (unlikely(idigit < 0)) goto done;
                remaining_bits = ((int) sizeof(size_t) * 8) - bits - (is_unsigned ? 0 : 1);
                if (unlikely(idigit >= (1L << remaining_bits)))
                    goto raise_overflow;
                val |= ((size_t) idigit) << bits;
            #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
            unpacking_done:
            #endif
                if (!is_unsigned) {
                    if (unlikely(val & (((size_t) 1) << (sizeof(size_t) * 8 - 1))))
                        goto raise_overflow;
                    if (is_negative)
                        val = ~val;
                }
                ret = 0;
            done:
                Py_XDECREF(shift);
                Py_XDECREF(mask);
                Py_XDECREF(stepval);
#endif
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
            return (size_t) -1;
        }
    } else {
        size_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (size_t) -1;
        val = __Pyx_PyInt_As_size_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to size_t");
    return (size_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to size_t");
    return (size_t) -1;
}

/* FormatTypeName */
#if CYTHON_COMPILING_IN_LIMITED_API
static __Pyx_TypeName
__Pyx_PyType_GetName(PyTypeObject* tp)
{
    PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_n_s_name_2);
    if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) {
        PyErr_Clear();
        Py_XDECREF(name);
        name = __Pyx_NewRef(__pyx_n_s__172);
    }
    return name;
}
#endif

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

/* CoroutineBase */
#include <frameobject.h>
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *__pyx_tstate, PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    CYTHON_UNUSED_VAR(__pyx_tstate);
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (likely(et == PyExc_StopIteration)) {
        if (!ev) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#if PY_VERSION_HEX >= 0x030300A0
        else if (likely(__Pyx_IS_TYPE(ev, (PyTypeObject*)PyExc_StopIteration))) {
            value = ((PyStopIterationObject *)ev)->value;
            Py_INCREF(value);
            Py_DECREF(ev);
        }
#endif
        else if (unlikely(PyTuple_Check(ev))) {
            if (PyTuple_GET_SIZE(ev) >= 1) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                value = PyTuple_GET_ITEM(ev, 0);
                Py_INCREF(value);
#else
                value = PySequence_ITEM(ev, 0);
#endif
            } else {
                Py_INCREF(Py_None);
                value = Py_None;
            }
            Py_DECREF(ev);
        }
        else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
            value = ev;
        }
        if (likely(value)) {
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = value;
            return 0;
        }
    } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    Py_XDECREF(tb);
    Py_DECREF(et);
#if PY_VERSION_HEX >= 0x030300A0
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
    Py_DECREF(ev);
#else
    {
        PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
        Py_DECREF(ev);
        if (likely(args)) {
            value = PySequence_GetItem(args, 0);
            Py_DECREF(args);
        }
        if (unlikely(!value)) {
            __Pyx_ErrRestore(NULL, NULL, NULL);
            Py_INCREF(Py_None);
            value = Py_None;
        }
    }
#endif
    *pvalue = value;
    return 0;
}
static CYTHON_INLINE
void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
#if PY_VERSION_HEX >= 0x030B00a4
    Py_CLEAR(exc_state->exc_value);
#else
    PyObject *t, *v, *tb;
    t = exc_state->exc_type;
    v = exc_state->exc_value;
    tb = exc_state->exc_traceback;
    exc_state->exc_type = NULL;
    exc_state->exc_value = NULL;
    exc_state->exc_traceback = NULL;
    Py_XDECREF(t);
    Py_XDECREF(v);
    Py_XDECREF(tb);
#endif
}
#define __Pyx_Coroutine_AlreadyRunningError(gen)  (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyRunningError(__pyx_CoroutineObject *gen) {
    const char *msg;
    CYTHON_MAYBE_UNUSED_VAR(gen);
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
        msg = "coroutine already executing";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
        msg = "async generator already executing";
    #endif
    } else {
        msg = "generator already executing";
    }
    PyErr_SetString(PyExc_ValueError, msg);
}
#define __Pyx_Coroutine_NotStartedError(gen)  (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_NotStartedError(PyObject *gen) {
    const char *msg;
    CYTHON_MAYBE_UNUSED_VAR(gen);
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check(gen)) {
        msg = "can't send non-None value to a just-started coroutine";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact(gen)) {
        msg = "can't send non-None value to a just-started async generator";
    #endif
    } else {
        msg = "can't send non-None value to a just-started generator";
    }
    PyErr_SetString(PyExc_TypeError, msg);
}
#define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing)  (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyTerminatedError(PyObject *gen, PyObject *value, int closing) {
    CYTHON_MAYBE_UNUSED_VAR(gen);
    CYTHON_MAYBE_UNUSED_VAR(closing);
    #ifdef __Pyx_Coroutine_USED
    if (!closing && __Pyx_Coroutine_Check(gen)) {
        PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
    } else
    #endif
    if (value) {
        #ifdef __Pyx_AsyncGen_USED
        if (__Pyx_AsyncGen_CheckExact(gen))
            PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
        else
        #endif
        PyErr_SetNone(PyExc_StopIteration);
    }
}
static
PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
    __Pyx_PyThreadState_declare
    PyThreadState *tstate;
    __Pyx_ExcInfoStruct *exc_state;
    PyObject *retval;
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            return __Pyx_Coroutine_NotStartedError((PyObject*)self);
        }
    }
    if (unlikely(self->resume_label == -1)) {
        return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
    }
#if CYTHON_FAST_THREAD_STATE
    __Pyx_PyThreadState_assign
    tstate = __pyx_tstate;
#else
    tstate = __Pyx_PyThreadState_Current;
#endif
    exc_state = &self->gi_exc_state;
    if (exc_state->exc_value) {
        #if CYTHON_COMPILING_IN_PYPY
        #else
        PyObject *exc_tb;
        #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON
        exc_tb = PyException_GetTraceback(exc_state->exc_value);
        #elif PY_VERSION_HEX >= 0x030B00a4
        exc_tb = ((PyBaseExceptionObject*) exc_state->exc_value)->traceback;
        #else
        exc_tb = exc_state->exc_traceback;
        #endif
        if (exc_tb) {
            PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
            PyFrameObject *f = tb->tb_frame;
            assert(f->f_back == NULL);
            #if PY_VERSION_HEX >= 0x030B00A1
            f->f_back = PyThreadState_GetFrame(tstate);
            #else
            Py_XINCREF(tstate->frame);
            f->f_back = tstate->frame;
            #endif
            #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON
            Py_DECREF(exc_tb);
            #endif
        }
        #endif
    }
#if CYTHON_USE_EXC_INFO_STACK
    exc_state->previous_item = tstate->exc_info;
    tstate->exc_info = exc_state;
#else
    if (exc_state->exc_type) {
        __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    } else {
        __Pyx_Coroutine_ExceptionClear(exc_state);
        __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    }
#endif
    self->is_running = 1;
    retval = self->body(self, tstate, value);
    self->is_running = 0;
#if CYTHON_USE_EXC_INFO_STACK
    exc_state = &self->gi_exc_state;
    tstate->exc_info = exc_state->previous_item;
    exc_state->previous_item = NULL;
    __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
#endif
    return retval;
}
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
#if CYTHON_COMPILING_IN_PYPY
    CYTHON_UNUSED_VAR(exc_state);
#else
    PyObject *exc_tb;
    #if PY_VERSION_HEX >= 0x030B00a4
    if (!exc_state->exc_value) return;
    exc_tb = PyException_GetTraceback(exc_state->exc_value);
    #else
    exc_tb = exc_state->exc_traceback;
    #endif
    if (likely(exc_tb)) {
        PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
        PyFrameObject *f = tb->tb_frame;
        Py_CLEAR(f->f_back);
        #if PY_VERSION_HEX >= 0x030B00a4
        Py_DECREF(exc_tb);
        #endif
    }
#endif
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_MethodReturn(PyObject* gen, PyObject *retval) {
    CYTHON_MAYBE_UNUSED_VAR(gen);
    if (unlikely(!retval)) {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        if (!__Pyx_PyErr_Occurred()) {
            PyObject *exc = PyExc_StopIteration;
            #ifdef __Pyx_AsyncGen_USED
            if (__Pyx_AsyncGen_CheckExact(gen))
                exc = __Pyx_PyExc_StopAsyncIteration;
            #endif
            __Pyx_PyErr_SetNone(exc);
        }
    }
    return retval;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
static CYTHON_INLINE
PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) {
#if PY_VERSION_HEX <= 0x030A00A1
    return _PyGen_Send(gen, arg);
#else
    PyObject *result;
    if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) {
        if (PyAsyncGen_CheckExact(gen)) {
            assert(result == Py_None);
            PyErr_SetNone(PyExc_StopAsyncIteration);
        }
        else if (result == Py_None) {
            PyErr_SetNone(PyExc_StopIteration);
        }
        else {
#if PY_VERSION_HEX < 0x030d00A1
            _PyGen_SetStopIterationValue(result);
#else
            if (!PyTuple_Check(result) && !PyExceptionInstance_Check(result)) {
                PyErr_SetObject(PyExc_StopIteration, result);
            } else {
                PyObject *exc = __Pyx_PyObject_CallOneArg(PyExc_StopIteration, result);
                if (likely(exc != NULL)) {
                    PyErr_SetObject(PyExc_StopIteration, exc);
                    Py_DECREF(exc);
                }
            }
#endif
        }
        Py_DECREF(result);
        result = NULL;
    }
    return result;
#endif
}
#endif
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Coroutine_Undelegate(gen);
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
    ret = __Pyx_Coroutine_SendEx(gen, val, 0);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
    PyObject *retval;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_AsyncGen_USED
        if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
            ret = __Pyx_async_gen_asend_send(yf, value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyCoro_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        {
            if (value == Py_None)
                ret = __Pyx_PyObject_GetIterNextFunc(yf)(yf);
            else
                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        retval = __Pyx_Coroutine_FinishDelegation(gen);
    } else {
        retval = __Pyx_Coroutine_SendEx(gen, value, 0);
    }
    return __Pyx_Coroutine_MethodReturn(self, retval);
}
static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    #ifdef __Pyx_Generator_USED
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_Coroutine_USED
    if (__Pyx_Coroutine_Check(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    if (__Pyx_CoroutineAwait_CheckExact(yf)) {
        retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_AsyncGen_USED
    if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
        retval = __Pyx_async_gen_asend_close(yf, NULL);
    } else
    if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
        retval = __Pyx_async_gen_athrow_close(yf, NULL);
    } else
    #endif
    {
        PyObject *meth;
        gen->is_running = 1;
        meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_n_s_close);
        if (unlikely(!meth)) {
            if (unlikely(PyErr_Occurred())) {
                PyErr_WriteUnraisable(yf);
            }
        } else {
            retval = __Pyx_PyObject_CallNoArg(meth);
            Py_DECREF(meth);
            if (unlikely(!retval))
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Next(yf);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, Py_None);
        } else
        #endif
            ret = __Pyx_PyObject_GetIterNextFunc(yf)(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Coroutine_FinishDelegation(gen);
    }
    return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
}
static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, PyObject *arg) {
    CYTHON_UNUSED_VAR(arg);
    return __Pyx_Coroutine_Close(self);
}
static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Coroutine_CloseIter(gen, yf);
        __Pyx_Coroutine_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
        PyErr_SetNone(PyExc_GeneratorExit);
    retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
    if (unlikely(retval)) {
        const char *msg;
        Py_DECREF(retval);
        if ((0)) {
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_Coroutine_Check(self)) {
            msg = "coroutine ignored GeneratorExit";
        #endif
        #ifdef __Pyx_AsyncGen_USED
        } else if (__Pyx_AsyncGen_CheckExact(self)) {
#if PY_VERSION_HEX < 0x03060000
            msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
#else
            msg = "async generator ignored GeneratorExit";
#endif
        #endif
        } else {
            msg = "generator ignored GeneratorExit";
        }
        PyErr_SetString(PyExc_RuntimeError, msg);
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
        if (raised_exception) PyErr_Clear();
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
                                        PyObject *args, int close_on_genexit) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
        if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
            int err = __Pyx_Coroutine_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Coroutine_Undelegate(gen);
            if (err < 0)
                return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
            goto throw_here;
        }
        gen->is_running = 1;
        if (0
        #ifdef __Pyx_Generator_USED
            || __Pyx_Generator_CheckExact(yf)
        #endif
        #ifdef __Pyx_Coroutine_USED
            || __Pyx_Coroutine_Check(yf)
        #endif
            ) {
            ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
            ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
        #endif
        } else {
            PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_n_s_throw);
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (unlikely(PyErr_Occurred())) {
                    gen->is_running = 0;
                    return NULL;
                }
                __Pyx_Coroutine_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            if (likely(args)) {
                ret = __Pyx_PyObject_Call(meth, args, NULL);
            } else {
                PyObject *cargs[4] = {NULL, typ, val, tb};
                ret = __Pyx_PyObject_FastCall(meth, cargs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
            }
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Coroutine_FinishDelegation(gen);
        }
        return __Pyx_Coroutine_MethodReturn(self, ret);
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
}
static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
    PyObject *typ;
    PyObject *val = NULL;
    PyObject *tb = NULL;
    if (unlikely(!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb)))
        return NULL;
    return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
}
static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
#if PY_VERSION_HEX >= 0x030B00a4
    Py_VISIT(exc_state->exc_value);
#else
    Py_VISIT(exc_state->exc_type);
    Py_VISIT(exc_state->exc_value);
    Py_VISIT(exc_state->exc_traceback);
#endif
    return 0;
}
static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
}
static int __Pyx_Coroutine_clear(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    Py_CLEAR(gen->yieldfrom);
    __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
    }
#endif
    Py_CLEAR(gen->gi_code);
    Py_CLEAR(gen->gi_frame);
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    Py_CLEAR(gen->gi_modulename);
    return 0;
}
static void __Pyx_Coroutine_dealloc(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject_GC_UnTrack(gen);
    if (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    if (gen->resume_label >= 0) {
        PyObject_GC_Track(self);
#if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
        if (unlikely(PyObject_CallFinalizerFromDealloc(self)))
#else
        Py_TYPE(gen)->tp_del(self);
        if (unlikely(Py_REFCNT(self) > 0))
#endif
        {
            return;
        }
        PyObject_GC_UnTrack(self);
    }
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        /* We have to handle this case for asynchronous generators
           right here, because this code has to be between UNTRACK
           and GC_Del. */
        Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
    }
#endif
    __Pyx_Coroutine_clear(self);
    __Pyx_PyHeapTypeObject_GC_Del(gen);
}
static void __Pyx_Coroutine_del(PyObject *self) {
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    __Pyx_PyThreadState_declare
    if (gen->resume_label < 0) {
        return;
    }
#if !CYTHON_USE_TP_FINALIZE
    assert(self->ob_refcnt == 0);
    __Pyx_SET_REFCNT(self, 1);
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
        PyObject *finalizer = agen->ag_finalizer;
        if (finalizer && !agen->ag_closed) {
            PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
            if (unlikely(!res)) {
                PyErr_WriteUnraisable(self);
            } else {
                Py_DECREF(res);
            }
            __Pyx_ErrRestore(error_type, error_value, error_traceback);
            return;
        }
    }
#endif
    if (unlikely(gen->resume_label == 0 && !error_value)) {
#ifdef __Pyx_Coroutine_USED
#ifdef __Pyx_Generator_USED
    if (!__Pyx_Generator_CheckExact(self))
#endif
        {
        PyObject_GC_UnTrack(self);
#if PY_MAJOR_VERSION >= 3  || defined(PyErr_WarnFormat)
        if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
            PyErr_WriteUnraisable(self);
#else
        {PyObject *msg;
        char *cmsg;
        #if CYTHON_COMPILING_IN_PYPY
        msg = NULL;
        cmsg = (char*) "coroutine was never awaited";
        #else
        char *cname;
        PyObject *qualname;
        qualname = gen->gi_qualname;
        cname = PyString_AS_STRING(qualname);
        msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
        if (unlikely(!msg)) {
            PyErr_Clear();
            cmsg = (char*) "coroutine was never awaited";
        } else {
            cmsg = PyString_AS_STRING(msg);
        }
        #endif
        if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
            PyErr_WriteUnraisable(self);
        Py_XDECREF(msg);}
#endif
        PyObject_GC_Track(self);
        }
#endif
    } else {
        PyObject *res = __Pyx_Coroutine_Close(self);
        if (unlikely(!res)) {
            if (PyErr_Occurred())
                PyErr_WriteUnraisable(self);
        } else {
            Py_DECREF(res);
        }
    }
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
#if !CYTHON_USE_TP_FINALIZE
    assert(Py_REFCNT(self) > 0);
    if (likely(--self->ob_refcnt == 0)) {
        return;
    }
    {
        Py_ssize_t refcnt = Py_REFCNT(self);
        _Py_NewReference(self);
        __Pyx_SET_REFCNT(self, refcnt);
    }
#if CYTHON_COMPILING_IN_CPYTHON
    assert(PyType_IS_GC(Py_TYPE(self)) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    _Py_DEC_REFTOTAL;
#endif
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
#endif
}
static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, void *context)
{
    PyObject *name = self->gi_name;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(self->gi_name, value);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, void *context)
{
    PyObject *name = self->gi_qualname;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(self->gi_qualname, value);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, void *context)
{
    PyObject *frame = self->gi_frame;
    CYTHON_UNUSED_VAR(context);
    if (!frame) {
        if (unlikely(!self->gi_code)) {
            Py_RETURN_NONE;
        }
        frame = (PyObject *) PyFrame_New(
            PyThreadState_Get(),            /*PyThreadState *tstate,*/
            (PyCodeObject*) self->gi_code,  /*PyCodeObject *code,*/
            __pyx_d,                 /*PyObject *globals,*/
            0                               /*PyObject *locals*/
        );
        if (unlikely(!frame))
            return NULL;
        self->gi_frame = frame;
    }
    Py_INCREF(frame);
    return frame;
}
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
            PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
    if (unlikely(!gen))
        return NULL;
    return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
}
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    #if PY_VERSION_HEX >= 0x030B00a4
    gen->gi_exc_state.exc_value = NULL;
    #else
    gen->gi_exc_state.exc_type = NULL;
    gen->gi_exc_state.exc_value = NULL;
    gen->gi_exc_state.exc_traceback = NULL;
    #endif
#if CYTHON_USE_EXC_INFO_STACK
    gen->gi_exc_state.previous_item = NULL;
#endif
    gen->gi_weakreflist = NULL;
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    Py_XINCREF(module_name);
    gen->gi_modulename = module_name;
    Py_XINCREF(code);
    gen->gi_code = code;
    gen->gi_frame = NULL;
    PyObject_GC_Track(gen);
    return gen;
}

/* PatchModuleWithCoroutine */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    int result;
    PyObject *globals, *result_obj;
    globals = PyDict_New();  if (unlikely(!globals)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_coroutine_type",
    #ifdef __Pyx_Coroutine_USED
        (PyObject*)__pyx_CoroutineType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_generator_type",
    #ifdef __Pyx_Generator_USED
        (PyObject*)__pyx_GeneratorType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
    result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
    if (unlikely(!result_obj)) goto ignore;
    Py_DECREF(result_obj);
    Py_DECREF(globals);
    return module;
ignore:
    Py_XDECREF(globals);
    PyErr_WriteUnraisable(module);
    if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
        Py_DECREF(module);
        module = NULL;
    }
#else
    py_code++;
#endif
    return module;
}

/* PatchGeneratorABC */
#ifndef CYTHON_REGISTER_ABCS
#define CYTHON_REGISTER_ABCS 1
#endif
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
static PyObject* __Pyx_patch_abc_module(PyObject *module);
static PyObject* __Pyx_patch_abc_module(PyObject *module) {
    module = __Pyx_Coroutine_patch_module(
        module, ""
"if _cython_generator_type is not None:\n"
"    try: Generator = _module.Generator\n"
"    except AttributeError: pass\n"
"    else: Generator.register(_cython_generator_type)\n"
"if _cython_coroutine_type is not None:\n"
"    try: Coroutine = _module.Coroutine\n"
"    except AttributeError: pass\n"
"    else: Coroutine.register(_cython_coroutine_type)\n"
    );
    return module;
}
#endif
static int __Pyx_patch_abc(void) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    static int abc_patched = 0;
    if (CYTHON_REGISTER_ABCS && !abc_patched) {
        PyObject *module;
        module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
        if (unlikely(!module)) {
            PyErr_WriteUnraisable(NULL);
            if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
                    ((PY_MAJOR_VERSION >= 3) ?
                        "Cython module failed to register with collections.abc module" :
                        "Cython module failed to register with collections module"), 1) < 0)) {
                return -1;
            }
        } else {
            module = __Pyx_patch_abc_module(module);
            abc_patched = 1;
            if (unlikely(!module))
                return -1;
            Py_DECREF(module);
        }
        module = PyImport_ImportModule("backports_abc");
        if (module) {
            module = __Pyx_patch_abc_module(module);
            Py_XDECREF(module);
        }
        if (!module) {
            PyErr_Clear();
        }
    }
#else
    if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
#endif
    return 0;
}

/* Generator */
static PyMethodDef __pyx_Generator_methods[] = {
    {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
     (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
    {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
     (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
    {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
     (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
    {0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
    {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
     (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
    {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
    {(char *) "__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), 0, 0},
#if CYTHON_USE_TYPE_SPECS
    {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CoroutineObject, gi_weakreflist), READONLY, 0},
#endif
    {0, 0, 0, 0, 0}
};
static PyGetSetDef __pyx_Generator_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
     (char*) PyDoc_STR("name of the generator"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
     (char*) PyDoc_STR("qualified name of the generator"), 0},
    {(char *) "gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL,
     (char*) PyDoc_STR("Frame of the generator"), 0},
    {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_GeneratorType_slots[] = {
    {Py_tp_dealloc, (void *)__Pyx_Coroutine_dealloc},
    {Py_tp_traverse, (void *)__Pyx_Coroutine_traverse},
    {Py_tp_iter, (void *)PyObject_SelfIter},
    {Py_tp_iternext, (void *)__Pyx_Generator_Next},
    {Py_tp_methods, (void *)__pyx_Generator_methods},
    {Py_tp_members, (void *)__pyx_Generator_memberlist},
    {Py_tp_getset, (void *)__pyx_Generator_getsets},
    {Py_tp_getattro, (void *) __Pyx_PyObject_GenericGetAttrNoDict},
#if CYTHON_USE_TP_FINALIZE
    {Py_tp_finalize, (void *)__Pyx_Coroutine_del},
#endif
    {0, 0},
};
static PyType_Spec __pyx_GeneratorType_spec = {
    __PYX_TYPE_MODULE_PREFIX "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    __pyx_GeneratorType_slots
};
#else
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __PYX_TYPE_MODULE_PREFIX "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    (destructor) __Pyx_Coroutine_dealloc,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    0,
    (traverseproc) __Pyx_Coroutine_traverse,
    0,
    0,
    offsetof(__pyx_CoroutineObject, gi_weakreflist),
    0,
    (iternextfunc) __Pyx_Generator_Next,
    __pyx_Generator_methods,
    __pyx_Generator_memberlist,
    __pyx_Generator_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if CYTHON_USE_TP_FINALIZE
    0,
#else
    __Pyx_Coroutine_del,
#endif
    0,
#if CYTHON_USE_TP_FINALIZE
    __Pyx_Coroutine_del,
#elif PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
    0,
#endif
#if __PYX_NEED_TP_PRINT_SLOT
    0,
#endif
#if PY_VERSION_HEX >= 0x030C0000
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0,
#endif
};
#endif
static int __pyx_Generator_init(PyObject *module) {
#if CYTHON_USE_TYPE_SPECS
    __pyx_GeneratorType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_GeneratorType_spec, NULL);
#else
    CYTHON_UNUSED_VAR(module);
    __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
#endif
    if (unlikely(!__pyx_GeneratorType)) {
        return -1;
    }
    return 0;
}

/* CheckBinaryVersion */
static unsigned long __Pyx_get_runtime_version(void) {
#if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4
    return Py_Version & ~0xFFUL;
#else
    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;
    }
    return version;
#endif
}
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);
    }
}

/* InitStrings */
#if PY_MAJOR_VERSION >= 3
static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) {
    if (t.is_unicode | t.is_str) {
        if (t.intern) {
            *str = PyUnicode_InternFromString(t.s);
        } else if (t.encoding) {
            *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL);
        } else {
            *str = PyUnicode_FromStringAndSize(t.s, t.n - 1);
        }
    } else {
        *str = PyBytes_FromStringAndSize(t.s, t.n - 1);
    }
    if (!*str)
        return -1;
    if (PyObject_Hash(*str) == -1)
        return -1;
    return 0;
}
#endif
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION >= 3
        __Pyx_InitString(*t, t->p);
        #else
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        #endif
        ++t;
    }
    return 0;
}

#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_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#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_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        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_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
    __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result));
#if PY_MAJOR_VERSION >= 3
    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;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")",
                 type_name, type_name, result_type_name);
    __Pyx_DECREF_TypeName(result_type_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  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 PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  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 = PyInt_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);
#if PY_MAJOR_VERSION < 3
  } else if (likely(PyInt_CheckExact(o))) {
    return PyInt_AS_LONG(o);
#endif
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyInt_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


/* #### Code section: utility_code_pragmas_end ### */
#ifdef _MSC_VER
#pragma warning( pop )
#endif



/* #### Code section: end ### */
#endif /* Py_PYTHON_H */
